Jump to content

Xiaomi Mi Note 10 Lite (xiaomi-toco)

From postmarketOS Wiki
Note This device is supported as part of a generic port. Refer to Generic SM7150 (qcom-sm7150) for installation instructions and more information.
Xiaomi Mi Note 10 Lite
Manufacturer Xiaomi
Name Mi Note 10 Lite
Codename xiaomi-toco
Released 2020
Type handset
Hardware
Chipset Qualcomm Snapdragon 730G (SM7150-AB)
CPU Octa-core (2x 2.2 GHz Kryo 470 Gold
6x 1.8 GHz Kryo 470 Silver)
GPU Adreno 618
Display 1080 x 2340 AMOLED
Storage 64/128/256 GB
Memory 6/8 GB
Architecture aarch64
Software
Original software
The software and version the device was shipped with.
Android 10 (MIUI 11) (Linux kernel 4.14.117)
Extended version
The most recent supported version from the manufacturer.
Android 12 (MIUI 14)
FOSS bootloader partial
postmarketOS
Category testing
Mainline
Instead of a Linux kernel fork, it is possible to run (Close to) Mainline.
yes
pmOS kernel
The kernel version that runs on the device's port.
Mainline 6.15-rc3
Generic port Generic SM7150 (qcom-sm7150)
Device package device-qcom-sm7150
Kernel package linux-postmarketos-qcom-sm7150
Features
Flashing
It is possible to flash the device with pmbootstrap flasher.
Works
USB Networking
After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system).
Works
Internal storage
eMMC, SD cards, UFS, ...
Works
Battery
Charging and battery level reporting works
Partial
Screen
Display works. Ideally with sleep mode and brightness control.
Works
Touchscreen
Works
Multimedia
3D Acceleration
Works
Audio
Audio playback, microphone, headset and buttons.
Partial
Camera
Broken
Camera Flash
Works
IR TX
Works
Connectivity
WiFi
Works
Bluetooth
Works
GPS
Broken
NFC
Near Field Communication
Works
Modem
Calls
Works
SMS
Works
Mobile data
Works
Miscellaneous
FDE
Full disk encryption and unlocking with unl0kr.
Partial
USB OTG
USB On-The-Go or USB-C Role switching
Works
Sensors
Accelerometer
Auto screen rotation works in desktops e.g. Phosh or Plasma Mobile
Works
Magnetometer
Sensor to measure magnetism
Works
Ambient Light
Works
Proximity
Broken
Haptics
Works
U-Boot
Secondary Bootloader
It is possible to chainload U-Boot from stock bootloader.
Works
Mainline
Latest versions of U-Boot are not broken and it is possible to use them.
Works
Internal Storage
It is possible to boot from internal storage (e.g. eMMC or UFS).
Works
USB Host
It is possible to boot from a USB storage or connect a keyboard.
Partial
USB Peripheral
It is possible to use device as a peripheral in U-Boot, e.g. for fastboot mode.
Works
Display
Works
Buttons
It is possible to navigate in boot menu or grub with volume and power buttons.
Works


Maintainer(s)

Users owning this device


How to enter flash mode

  • Bootloader: Power on the device with both Power and Volume Down buttons.
  • Recovery: Power on the device with both Power and Volume Up buttons.
  • Fastbootd: Reboot into bootloader mode first and then run fastboot reboot fastboot from a computer.

Installation

  1. Make sure pmbootstrap is installed and your bootloader is unlocked
  2. This device is now a part of SM7150 generic port, and requires an installed U-Boot for EFI environment (systemd-boot is used).
    So, install U-Boot as described on the generic port page
  3. Run through pmbootstrap init and select qcom as the vendor and sm7150 as the device.
  4. Build the kernel yourself
  5. Generate the rootfs
    • For netbooting pmOS without flashing the phone, run pmbootstrap --extra-space 1000 install --no-sparse and pmbootstrap initfs hook_add netboot
    • If you want to flash pmOS to the phone, run pmbootstrap install
  6. Backup and erase the dtbo partition
    To boot Linux, you'll have to erase the dtbo partition. It is recommended to back it up first if you want to boot Android again
    1. Run dd if=/dev/block/by-name/dtbo of=/sdcard/dtbo.img from a rooted shell on your phone and pull it with adb pull /sdcard/dtbo.img to your computer.
    2. Boot into bootloader mode
    3. Erase the dtbo partition with fastboot erase dtbo
    To restore the partition flash it with fastboot flash dtbo dtbo.img
  7. Flash the rootfs
    • If you decided to go with netbooting, start the server with pmbootstrap netboot serve
    • If you want to install pmOS to the phones internal storage, run pmbootstrap flasher flash_rootfs
  8. Install the kernel
    • To flash the EFI partition to the cache partition, run pmbootstrap flasher flash_kernel and reboot with fastboot reboot

Building the latest kernel yourself

Note Note: The latest kernel is under active development and things might not work as expected.
  1. Make sure you installed pmbootstrap from git, as the packaged versions do not include envkernel.sh, which needed for compiling the kernel. Follow this guide to install pmbootstrap from git.
  2. Go through $ pmbootstrap init and select qcom-sm7150 as the device. The UI can be choosen as desired.
  3. Clone the sm7150-mainline kernel fork: $ cd ~/Downloads && git clone https://github.com/sm7150-mainline/linux.git && cd linux.
  4. Prepare envkernel: $ source ~/.local/share/pmbootstrap/helpers/envkernel.sh
  5. Generate the kernel config: $ make defconfig sm7150.config
  6. Build the kernel: $ make -j$(nproc)
  7. After the build has finished, package the built kernel for postmarketOS: $ pmbootstrap build linux-postmarketos-qcom-sm7150 --force --envkernel

Now you can follow the installation guide above.

After successfully following this guide, your phone should boot postmarketOS! If you have problems installing, feel free to ask in #sm7150-mainline:matrix.org

Mainline

A work in progress mainline kernel is being developed here.

See also