So far the most useful documentation was at Lineage's Redmi section, random "mobile enthusiast" sites were "not very good" and youtube videos are to be avoided like the plague.
- SDK platform tools from android.com
- mi flash unlock gui tool (
miflash_unlock-en-5.5.224.24.zip
) - newest twrp for device (
twrp-3.5.2_9-0-santoni.img
), from twrp site - lineage OS main image (
lineage-16.0-20210210-nightly-santoni-signed.zip
) - lineage google apps (
open_gapps-arm64-9.0-nano-20210810.zip
) - lineage su (
addonsu-16.0-arm64-signed.zip
)
- install android platform tools (for
adb
andfastboot
utilities) and a universal adb driver - enable developer tools on phone (devtools, usb debugging, unlock boot etc.)
- create mi account
- on phone link mi account (you must have an active sim card)
- power off
- enter fastboot mode using power on + volume down
- use "mi flash unlock" gui app (requires mi account) to unlock the bootloader
fastboot oem device-info
to see if the fastboot connection is okay (when in doubt, reboot; that's how IT works, remember?)fastboot flash recovery <twrp.img>
to install twrp bootloaderfastboot boot <twrp.img>
to reboot into twrp- now you are in twrp
- select wipe -> format data (formats drive)
- select advanced wipe -> select cache and system
- sideload zip files: advanced -> adb sideload
- on PC use
adb sideload <image.img>
- do this for lineage, gapps and su
- reboot (first boot will take quite a while)
"this devices is for ."
error: the downloaded twrp is too old, are you using a fresh one from their official site?remote dtb not found
error: try using another usb port and reboot back to twrp- boot stuck at logo, nothing is happening: just boot into fastboot instead, probably your system is unbootable, but that's okay (unless it isn't)
- you can always check the connection to the PC/phone via
adb devices
for "normal" boot andfastboot devices
in fastboot mode - booting into twrp with power + volup + voldown doesn't work: just boot
into fastboot and then use the
fastboot boot <twrp.img>
cli command to boot into twrp