Install LineageOS on Xiaomi Mi 9T Pro/Redmi K20 Pro (raphael)
Note
Make sure you have read the Getting started page before proceeding with the installation.
Installing Lineage Recovery using fastboot
Warning
Other recoveries may not work for installation or updates. We strongly recommend to use the one linked below!
- Download Lineage Recovery. Simply download the latest recovery file, named
recovery.img
. - Connect your device to your PC via USB if it isn’t already.
- If your device isn’t already in fastboot mode, on the computer, open a command prompt (on Windows) or terminal (on Linux or macOS) window, and type:
$ adb -d reboot bootloader
You can also boot into fastboot mode via a key combination:
With the device powered off, hold Volume Down
+ Power
. Keep holding both buttons until the word “FASTBOOT” appears on the screen, then release.
-
Once the device is in fastboot mode, verify your PC finds it by typing:
$ fastboot devices
-
Flash recovery onto your device:
$ fastboot flash recovery recovery.img
-
Now reboot into recovery to verify the installation. Do not reboot into the existing OS, since it will overwrite the recovery you just installed!
With the device powered off, hold Volume Up
+ Power
. Keep holding both buttons until the “MI” logo appears on the screen, then release.
Installing device firmware from recovery
- Download the latest device firmware available for your device according to your region:
Firmware | Region | Link |
---|---|---|
V12.5.2.0.RFKMIXM | Global | Click here |
V12.5.1.0.RFKEUXM | Europe | Click here |
V12.5.6.0.RFKCNXM | China | Click here |
V12.5.1.0.RFKINXM | India | Click here |
-
On the
LineageOS Recovery
home screen, tapApply update
, thenApply from ADB
for starting the sideload service. -
Open a
ADB & Fastboot
tools window on your PC and flash thedevice firmware
install package you downloaded above:
$ adb sideload filename.zip
Note
When presented with a screen that says Signature verification failed, click Yes
. It is expected as add-ons aren’t signed with LineageOS’s official key!
Installing LineageOS from recovery
- Download the LineageOS zip file. Simply download the latest zip file, named
lineage-21.0-xxxxxxxx-UNOFFICIAL-raphael.zip
. - On the
Lineage Recovery
home screen tap,Factory Reset
, thenFormat data / factory reset
and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage, as well as format your cache partition (if you have one). - Return to the main menu.
- On the
Lineage Recovery
home screen, tapApply update
, thenApply from ADB
for starting the sideload service. - Open a
ADB & Fastboot
tools window on your PC and flash theLineageOS install package
you downloaded above:
$ adb sideload lineage-21.0-xxxxxxxx-UNOFFICIAL-raphael.zip
Information
Normally, adb will report Total xfer: 1.00x, but in some cases, even if the process succeeds the output will stop at 47% and report adb: failed to read command: Success. In some cases it will report adb: failed to read command: No error or adb: failed to read command: Undefined error: 0 which is also fine.
Installing Add-Ons
Warning
If you don’t want to install any add-on (such as Google Apps), you can skip this whole section and reboot to system!
If you want to install Google Apps add-on package (use the arm64
architecture), you can download it from here. This add-on needs to be installed before booting into LineageOS for the first time!
- On the
Lineage Recovery
home screen, tapApply update
, thenApply from ADB
for starting the sideload service. - Open a
ADB & Fastboot
tools window on your PC and flash theLineageOS install package
you downloaded above (for example: Google Apps):
$ adb sideload filename.zip
Note
When presented with a screen that says Signature verification failed, click Yes
. It is expected as add-ons aren’t signed with LineageOS’s official key!
All set!
- Once you have installed everything successfully, click the back arrow in the top left of the screen, then
Reboot system now
.
Note
The first boot usually takes no longer than 15 minutes, depending on the device. If it takes longer, you may have missed a step.