How To Guide [GUIDE] Install LineageOS 19.1 with gapps

Search This thread

beastbrain

Senior Member
Jul 4, 2018
106
36
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 how did you get an OTA? I'm trying lineage-19.1-20220810-UNOFFICIAL-GMS-cupid.zip no OTA
 

DankDeuxez

Senior Member
Jan 13, 2020
68
11
Xiaomi 12
Seems like it wont work for me. Flashed everything thats needed but the recovery is basically just pitch black. First time i just got MIUI recovery, the second and third time its just black. Unresponsive until the bottom part of the screen flashes green then the phone just reboots. Tried to flash everything multiple times, still the same issue. Can still get into fastboot without any issues. Tried both Fastbootd and normal fastboot.
 

DankDeuxez

Senior Member
Jan 13, 2020
68
11
Xiaomi 12
NVM. i changed USB ports on my computer and tried everything again, now it works! Also seems like the phone switched to boot_b automatically which might have been the solution?

EDIT: I only find lineage without gApps, is the .zip.sha265sum the one WITH gApps? Flashed rom without issues, but whenever i remove the charger from the phone it restart itself automatically even if i have 50% battery?

EDIT 2: starting the phone with no charger in actually works, until i get "System UI keeps crashing". :/

EDIT 3: Nothing seemed to work when i tried to install the recovery. Ended up using miFlash and a fastboot rom for my device to get stock MIUI installed, and from that i tried to install everything once again and it seems to have worked!
 
Last edited:

DankDeuxez

Senior Member
Jan 13, 2020
68
11
Xiaomi 12
Soooo the latest GMS version (20220802) is missing boot_vendor and recovery. Which am i suppose to use since lineage 20 recovery and boot_vendor wont work. Do i need to use some older versions instead?
 
Last edited:

beastbrain

Senior Member
Jul 4, 2018
106
36
Sooo none of the lineageOS roms include gApps? Do i need to flash them separately even if the title is "WITH Gapps"?

EDIT: im an idiot, sorry. Had to scroll through a few pages on the github to find the actual GMS version hehe. SORRY once again

Hey I had same problems because I didn't flash exactly same versions as mentioned in instructions, also don't flash LOS 20, current version shuts down when you unplug charging cable.
Last version with gapps is from august as you said, I am trying it (only wifi for now, no sim) and it is smooth so far. If dev can push OTA will be cool. Battery seems ok.

In general, flashing recoveries etc. is sadly getting more complicated every year.
 

DankDeuxez

Senior Member
Jan 13, 2020
68
11
Xiaomi 12
Hey I had same problems because I didn't flash exactly same versions as mentioned in instructions, also don't flash LOS 20, current version shuts down when you unplug charging cable.
Last version with gapps is from august as you said, I am trying it (only wifi for now, no sim) and it is smooth so far. If dev can push OTA will be cool. Battery seems ok.

In general, flashing recoveries etc. is sadly getting more complicated every year.
yeah i managed to find a version from 20220618 that actually had all the stuff needed. Seems like mixing the files isnt working. However, even after i downloaded all the GMS files, i still have no google apps on boot. What could be going on?

EDIT: also this version cant find my SIM-card at all.
 

beastbrain

Senior Member
Jul 4, 2018
106
36
yeah i managed to find a version from 20220618 that actually had all the stuff needed. Seems like mixing the files isnt working. However, even after i downloaded all the GMS files, i still have no google apps on boot. What could be going on?

EDIT: also this version cant find my SIM-card at all.
that's the thing, you don't need all GMS files, use exactly what guide is saying with GMS rom, that's what I did and I have gapps.

Also did anyone notice any apps being too bright? Maybe it's my idea but coming from MI9, apps look kinda different.
 

immerzu2

Member
Dec 11, 2020
48
6
The original camera app in the xiaomi.eu ROM is very poor. What camera app is there in this image and how is the quality of the photos?

Thanks.
 

DankDeuxez

Senior Member
Jan 13, 2020
68
11
Xiaomi 12
that's the thing, you don't need all GMS files, use exactly what guide is saying with GMS rom, that's what I did and I have gapps.

Also did anyone notice any apps being too bright? Maybe it's my idea but coming from MI9, apps look kinda different.
yeah and it states 4 files, boot, boot_vendor, dtbo and recovery. The latest GMS that i can find only got boot and dtbo files.. which recovery should i use then? which boot_vendor should i use? Ive tried mixing in vanilla recovery and vendor_boot but that results in a broken LOS recovery that doesnt work.
 

beastbrain

Senior Member
Jul 4, 2018
106
36
just you use exactly the versions from first page, check the numbers, you can find all in github, page 1-2, you use different version of recovery, boot etc and different rom like says and it will work
 

DankDeuxez

Senior Member
Jan 13, 2020
68
11
Xiaomi 12
just you use exactly the versions from first page, check the numbers, you can find all in github, page 1-2, you use different version of recovery, boot etc and different rom like says and it will work
used the 0618 recovery and vendor_boot images, alongside the 0810 GMS dtbo and boot images, this only gives me a constant reboot whenever its trying to access the recovery..

EDIT: flashed the 0618 dtbo and boot and it worked. So nothing except the same version works.
 

beastbrain

Senior Member
Jul 4, 2018
106
36
used the 0618 recovery and vendor_boot images, alongside the 0810 GMS dtbo and boot images, this only gives me a constant reboot whenever its trying to access the recovery..

EDIT: flashed the 0618 dtbo and boot and it worked. So nothing except the same version works.
yeah weirdly it works that way, maybe something in these older versions is essential to boot,
also for me flashing magisk and then removing it bricks the phone again cause you mess with the boot images,
cupid is a bit messy right now and not many roms sadly
 

phyrz

New member
Dec 12, 2022
3
0
Xiaomi 12
Hi, is there such a possibility?
I install the latest LineageOS 19.1 image for Cupid (0915), variant VANILLA and then I load GAPPS e.g. from NikGapps?


Will this combination work?

If so, is it better to use img files - boot, vendor_boot, dtbo and recovery version 0618 or version 1117(LineageOS 20)?

I hope I have clearly described what is going on.

Regards,

Damian.
 

beastbrain

Senior Member
Jul 4, 2018
106
36
Hi, is there such a possibility?
I install the latest LineageOS 19.1 image for Cupid (0915), variant VANILLA and then I load GAPPS e.g. from NikGapps?


Will this combination work?

If so, is it better to use img files - boot, vendor_boot, dtbo and recovery version 0618 or version 1117(LineageOS 20)?

I hope I have clearly described what is going on.

Regards,

Damian.

It didn't work for me, tried most gapps versions out there, just go with GMS rom mentioned in the instructions of post #1
 
  • Like
Reactions: phyrz

phyrz

New member
Dec 12, 2022
3
0
Xiaomi 12
Does WiFi Calling work for you? On MIUI everything worked. Version 0810.

Can we update the GMS version with a newer version in the VANILIA variant? Will we keep the Google app after such an update?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 11

    Notes:​

    * 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

    Prerequisites:​

    * 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:
    Code:
    adb devices
    * Execute the following to either reboot to fastboot or fastbootd. Flashing works from either, I used fastbootd:
    Code:
    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:
    Code:
    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:
    Code:
    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:​

    * ALL DATA WILL BE ERASED WITH THE NEXT STEP
    * Go to Factory reset and perform Format data / Factory reset
    * Go to Apply update, followed by Apply from ADB
    * Execute the following Windows Terminal:
    Code:
    adb sideload lineage-19.1-20220810-UNOFFICIAL-GMS-cupid.zip
    * Reboot your device

    Rooting:​

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

    Certification:​

    * 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:
    Code:
    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:
    Code:
    2022-07-01
    Xiaomi/cupid_eea/cupid:12/SKQ1.211006.001/V13.0.19.0.SLCEUXM:user/release-keys
    * Install the following module through Magisk https://github.com/Magisk-Modules-Repo/MagiskHidePropsConf
    * Run the following:
    Code:
    adb shell
    su
    props
    1 # Set the fingerprint to the one you obtained
    5 # Add a custom prop with the name ro.build.version.security_patch, 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. https://help.netflix.com/en/node/57688
    1
    除了人脸识别之外,一切都很好。
    Translation: Everything is fine except for the face recognition.

    Hi,
    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 :- https://translate.google.com/ or https://www.babelfish.com/ or use one of your choice.

    Thank you for your cooperation, and enjoy your stay on XDA.
    Regards
    Sib64 - Moderator
    1
    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 ...
    1
    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
    1
    hey is it good for a daily driver? any issues? I'm talking about the LOS 20 I see in the github