Source: https://wiki.lineageos.org/devices/davinci/install
Unlocking the bootloader:
- Create a Mi account on Xiaomi’s website.
- Add a phone number to your Mi account.
- Insert a SIM into your phone.
- Enable developer options in
Settings
>About Phone
by repeatedly tappingMIUI Version
. - Link the device to your Mi account in
Settings
>Additional settings
>Developer options
>Mi Unlock status
. - Download the Mi Unlock app (Windows is required to run the app).
- Run the Mi Unlock app and follow the instructions provided by the app.
- After device and Mi account are successfully verified, the bootloader should be unlocked.
- Since the device resets completely, you will need to re-enable USB debugging to continue.
Installing a custom recovery using fastboot
:
- Download a custom recovery ( https://eu.dl.twrp.me/davinci/ )
c6ffbe106db581c0d26cf65c1b3c7a2f726e23ebc8b629205afae0c6b1380fb0 twrp-3.5.0_9-0-davinci.img
64428565b5d2e365da7e012bf1f1a1cbcb31a325e3c254a339eb79fef56db5e6 twrp-3.5.0_9-0-davinci.img.asc
078362f72f87a2ed496e24014a738bdeb5f77eebdd147cf500c6cd20b345abca twrp_public.asc
- Connect your device to your PC via USB.
- On the computer, open a terminal and type:
adb 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 twrp-3.5.0_9-0-davinci.img
- Now reboot into recovery to verify the installation:
- With the device powered off, hold Volume Up + Power. Keep holding both buttons until the “MI” logo appears on the screen, then release.
Installing LineageOS from recovery:
- Download the LineageOS installation package that you would like to install or build the package yourself.
- Optionally, download additional application packages such as Google Apps (use the
arm64
architecture).
- Optionally, download additional application packages such as Google Apps (use the
1c6127415f8b3e47a3aca909c15f06246fe33ddb3b341b3f1e3be20f69f089e3 lineage-17.1-20201230-nightly-davinci-signed.zip
d48b1248ff990c0bdf28ef0ddca76610253ff4764f3c39630b9a2526a9b30fa0 lineage-17.1-20201230-nightly-davinci-signed.zip.sha256
- If you are not in recovery, reboot into recovery:
- With the device powered off, hold Volume Up + Power. Keep holding both buttons until the “MI” logo appears on the screen, then release.
- Now tap Factory Reset, then Format 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.
- Sideload the LineageOS
.zip
package:- On the device, select “Apply Update”, then “Apply from ADB” to begin sideload.
- On the host machine, sideload the package using:
adb sideload filename.zip
. Info: If the process succeeds the output will stop at 47% and reportadb: failed to read command: Success
.
- (Optionally): If you want to install any additional add-ons, repeat the sideload steps above for those packages in sequence.
- Once you have installed everything successfully, click the back arrow in the top left of the screen, then “Reboot system now”.
Install App Store
download F-Droid from https://f-droid.org/
8476d8951d764de3b732fb41d080c95b1fcdf140ccff5675364b797d272f92f2 F-Droid.apk
29202f1f85641b156be93d1022d54f42757c7ebeedce4e6e524fc43c360af9c1 F-Droid.apk.asc