How To Guide [GUIDE] Install LineageOS 19.1 with gapps

Top Liked Posts

  • There are no posts matching your filters.
  • 14


    * I am not a developer.
    * I did all of this on Arch Linux, you shouldn't have trouble doing this on either Linux or Windows.
    * See the Telegram group if you have issues - search for "Xiaomi 12 OFFICIAL" on TG, unfortunately cannot link directly to it on XDA.
    * This is an unofficial version of LineageOS
    * Thanks to @gr0ndpa whose writeup I based this guide on.
    * Massive thanks to @ArianK16a who actually made LOS work on Xiaomi 12, despite Xiaomi breaking GPL licensing and not providing full kernel sources for Android 12


    * Your bootloader must be unlocked. This thread does not cover this.
    * You should use latest platform tools on Windows.
    * Your device should be charged above 50%. Well, it doesn't have to be, but this is just for your phone's safety.
    * Download 4 required .img files - boot, vendor_boot, dtbo and recovery from the latest build that has them all - rest miss recovery/vendor_boot, linking latest one at the time of writing for convenience
    * Download latest ROM of your choosing (GMS=with gapps, VANILLA=no gapps) from arian-ota/ota
    * If you intend to root the device with Magisk, also download latest boot.img
    * Make a proper backup if needed and push it to another storage.

    First steps:​

    * After you have unlocked the bootloader, device will reboot automatically. Finish the setup, enable developer settings and finally enable USB-Debugging in developer settings.
    * In Windows open the folder in which you have unzipped the platform tools.
    * Hold left shift and press right click, click "open powershell window here"
    * Connect the phone via USB
    * Execute the following in Windows Terminal and grant the permissions for this PC on your device:
    adb devices
    * Execute the following to either reboot to fastboot or fastbootd. Flashing works from either, I used fastbootd:
    adb reboot fastboot # fastbootd
    adb reboot bootloader # fastboot

    The flashing procedure:​

    * Flash boot, vendor_boot, dtbo and recovery by executing the following in Windows Terminal:
    fastboot flash boot lineage-19.1-20220618-UNOFFICIAL-cupid-boot.img
    fastboot flash vendor_boot lineage-19.1-20220618-UNOFFICIAL-cupid-vendor_boot.img
    fastboot flash dtbo lineage-19.1-20220618-UNOFFICIAL-cupid-dtbo.img
    fastboot flash recovery lineage-19.1-20220618-UNOFFICIAL-cupid-recovery.img
    * Finally execute the following, or reboot to recovery by holding VOLUME UP and POWER buttons until you see Mi logo on your device's screen:
    fastboot reboot recovery # or bootloader
    * If you get MIUI recovery, reboot back to fastboot, you should hopefully get LOS fastbootd now and be able to redo the steps and get LOS recovery next

    Sideload the ROM from LOS recovery:​

    * Go to Factory reset and perform Format data / Factory reset
    * Go to Apply update, followed by Apply from ADB
    * Execute the following Windows Terminal:
    adb sideload
    * Reboot your device


    * Follow this thread but use the latest boot.img you downloaded earlier instead of the one from stock ROM.


    * If you won't fake the build prop to get certified status, you should at least follow Alphabet's instructions to make sure your device does not potentially get blacklisted from Play services

    * Certification is required to run some apps - i.e. Netflix, Revolut, ...
    * You can view certification state in Play store -> Profile -> Settings -> About -> Play Protect certification. This will cache the status. For a while, how to force the check again is shown down below
    * Your device will not be certified on this ROM because it does not attempt to fake build props
    * To get known good props for security update date and device fingerprint, you need either a rooted device with MIUI you want to extract the values from by executing the following in root adb shell:
    grep -e fingerprint -e security_patch /system/build.prop
    Or you can download latest recovery .zip from the download thread and open the file located in it from /META-INF/com/android/metadata in the archive
    * Here's an example of the two values needed for my EEA device I got from the recovery zip:
    * Install the following module through Magisk
    * Run the following:
    adb shell
    1 # Set the fingerprint to the one you obtained
    5 # Add a custom prop with the name, it should already exist, but it is most likely wrong
    * Install the following module through Magisk
    * After the final reboot, remove storage of "Google Play Store" app to refresh the cache manually, open Play store and check the status, you should be in the green now

    Known issues:​

    * Face recognition libraries are not included due to legal reasons, if one is interested in adding them, see the discussion starting here
    * Minimum brightness is too bright. This can be mitigated by adding the "Extra Dim" card in the notification menu and long-pressing it to configure your desired intensity.
    * When Smooth Display (120Hz) is enabled, screen flashes/redraws when it changes to and from 90Hz. This is more noticeable with lower brightness and no light in the room, and not really noticeable in daylight. Can be triggered by opening settings and typing a word and waiting half a second.
    * Netflix(and only Netflix) is not available from the Play store on GSM ROM even with certification. Netflix provides an APK on their website, but that still gives me an unsupported device message.
    Translation: Everything is fine except for the face recognition.

    As a "one time" courtesy, I have translated your post to this thread and because it was not a spam
    Please be respectful and observant of XDA Rule #4
    for all of your future posts.

    4. Use the English language.
    We understand that with all the different nationalities, not everyone speaks English well, but please try. If you're really unable to post in English, use an online translator. You're free to include your original message in your own language, below the English translation. (This rule covers your posts, profile entries and signature). You could try :- or or use one of your choice.

    Thank you for your cooperation, and enjoy your stay on XDA.
    Sib64 - Moderator
    xiaomi cam is not working on LOS ... you have to use gcam etc ...
    read carefully ... you have to use these 4 files from 20220618 release and only the gms rom image from 20220810 ...
    Installed it two weeks ago, no root
    - Camera not working but fixed after OTA update
    - SMS issue (can send but cannot receive), fixed with firmware update
    - missing calls (phone never rings...) applied firmware update, still testing
    - Battery drain very high - fixed with disabling AOD (or at a glance...)
    - Tethering (wifi and USB) not working, phone UI freezes
    - Still having issues with Auto-brightness
    hey is it good for a daily driver? any issues? I'm talking about the LOS 20 I see in the github