Install LineageOS 19.1 on POCO F3 to replace MIUI 13.0.4

Disclaimer: those are basically the steps described on the LineageOS wiki. Check the wiki for updated information.

Prerequisites#

  • Phone unlocked (OEM unlock / Mi unlock)
  • USB debug enabled

Flashing the vendor boot partition#

Download vendor_boot file (vendor_boot.img) from here from the directory named with the latest date. For example, https://mirror.math.princeton.edu/pub/lineageos/full/alioth/20220528/vendor_boot.img.

Reboot the phone in bootloader/fastboot mode:

$ adb reboot bootloader

Flash the vendor boot image:

$ fastboot flash vendor_boot vendor_boot.img

Temporarily booting a custom recovery#

Download Lineage Recovery image. For example, https://mirrorbits.lineageos.org/recovery/alioth/20220528/lineage-19.1-20220528-recovery-alioth.img.

Temporarily flash the recovery image on our device (we are already in fastboot mode from previous steps):

$ fastboot flash boot lineage-19.1-20220528-recovery-alioth.img

Note: In my case it flashed to boot_b partition.

Now reboot into recovery to verify the installation.

$ fastboot reboot-recovery

Ensuring all firmware partitions are consistent#

To avoid issues, we'll copy the contents of the active slot to the inactive slot.

Sideload the copy-partitions-20210323_1922.zip:

  1. Download the copy-partitions-20210323_1922.zip file from here.
  2. Sideload the copy-partitions-20210323_1922.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 copy-partitions-20210323_1922.zip
  • Click on Yes (install anyway) when it says Signature verification failed (because it's made by LineageOS developers but is not signed with official keys)
  1. Return to previous menu with the left arrow, then reboot to recovery by tapping Advanced, then Reboot to recovery.

Installing LineageOS from recovery#

  1. Download the LineageOS installation package that you would like to install. For example https://mirrorbits.lineageos.org/full/alioth/20220528/lineage-19.1-20220528-nightly-alioth-signed.zip.
  2. Download Google Apps addon from here. For example, mobile version Lineage 19.1 (android 12.1) nano package arm64 architecture from MindTheGapps: MindTheGapps-12.1.0-arm64-20220416_174313.zip.
  3. We already are in recovery mode from previous steps
  4. 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).
  5. Return to the main menu.
  6. 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 lineage-19.1-20220528-nightly-alioth-signed.zip.
  1. To install Google Apps addon:
  • Return to the main menu
  • Click Advanced, then Reboot to Recovery
  • Then when your device reboots, click Apply Update, then Apply from ADB
  • Sideload Google Apps: adb sideload MindTheGapps-12.1.0-arm64-20220416_174313.zip
  • Click on Yes (install anyway) when it says Signature verification failed (because it's not made by LineageOS developers and so is not signed with official keys)
  1. Once you have installed everything successfully, click the back arrow in the top left of the screen, then Reboot system now.
Share