[ROM][Huawei][13] LeaOS - Lineage 20.0 for Huawei device (EMUI 9.1 version)

Search This thread


Senior Member
May 7, 2017
Must I have kernel 4.9.148+ installed or must I have EMUI 9.1 installed in order to get Android 13 GSI working on Huawei?
Does it releate to kernel version or EMUI version? (I know EMUI 9.1 includes kernel 4.9.148 but I want to know which one is must).


New member
Nov 2, 2022
Hi, does this ROM needs the phone to be decrypted? I was trying to encrypt the phone through settings>security, but it doesnt return anything. Is that last thing supossed to be that way? Thanks in advance.
  • Like
Reactions: AltairFR


Senior Member
Jun 13, 2009
Ok, so I got this rom up and running but by pure luck I think.
LeaOS - Lineage 20.0 seem to run just fine. Not tested all things, but it runs stable,
but it does seem a bit slugish (too used to the my new oneplus 8T)

I downgraded the firmware to be able to get a unlock code for the bootloader using (dc-unlocker not free).
I got the latest firmware I could find installed (P20 Lite Anne-L21
Extracted the recovery_ramdisk image from official firmware (with HuaweiUpdateExtractor_0.9.9.5)
In HuaweiUpdateExtractor, remember to uncheck all verify options in the settings if the program won't open
the update.app file found in the stock firmware. The bootloader and recovery_ramdisk are the same thing?

Got the twrp-3.7.0_9-0-anne, SHRP_recovery_anne_yahia-4-12-2022 (Sky Hawk Recovery), and Magisk-v26.1 ready.
TWRP only show a 9.0 version - is it compatible with version 9.1?
TWRP did not show any option to flash ramdisk image to erecovery!! SHRP does so I dropped TWRP.

As it sits now I have the phone running with unpatched bootloader (stock ramdisk) flashed to e-recovery.
And Sky Hawk Recovery flashed to normal recovery. I can't get into android with root access.

On first boot the stock bootloader flagged an error and wanted me to low-level format the phone,
but after a reboot it loaded the custom rom normally!

I tried to run Magisk and get a patched bootloader installed too, but when I tried to boot the phone
it would be very slow and when it got into android it would stay there for a few seconds and
automatically reboot.
I was actually at some point able to get the phone to start and I had root access, but it would have major
issues with startup. It would just hang and take forever to boot. Not sure how I managed that...

CPU-z info:
buildID: TQ3A.230605.012
kernel: 4.9.148
Last edited:


Senior Member
Jun 13, 2009
Various key combination to access the recovery system (P20 lite).
Just adding some findings on how my phone now operates:

No usb attached: (I think it behaves different with usb connected)
boot custom recovery (TWRP, SHRP etc.) -- Phone OFF->hold V+ & Power (not releasing any buttons)
boot stock (e)recovery -- Phone OFF->hold V+ & Power (release power after screen wakes)
normal boot (no root) -- Phone OFF->Power...

fastboot -- Phone OFF->Connect usb to PC->hold V- & Power
Last edited:


Senior Member
Nov 3, 2019
Tiu Keng Leng
LG Optimus 4X HD
Here is some feedback and observations I've made when using Android 13 on my Huawei P20 Lite.

The problem with this OS is that it doesn't auto detect your device model, causing it to enable features not available for different variants. For example, my P20 Lite is a ANE-LX2 which doesn't have support for NFC. This can be solved by either spiting different models or some other method that I can't think of. NFC currently constantly crashes in the background.

Another thing I observed is that Bluetooth audio is slightly broken. It crashes every so often which makes it nearly unusable. I forgot to capture logs but I think it isn't hard to figure out.

LineageOS TrebleDroid
This is more stable for my device., but suspend seems to broken. Sometimes Spotify doesn't work properly when dozing and Bluetooth audio cuts in and out every so often. It is also smoother than LeaOS. Pausing music when using Blueooth headsets is completely impossible as it complains about not sending any data.

I think I might do my own builds later, but I currently don't have the time to do so. If the author wants testing and building help, my i9 13th Gen rig with me in summer holiday can provide some help. :D
Last edited:


New member
Jul 10, 2023
Unfortunately, my device is unable to make and receive phone calls using the preinstalled dialer. Occasionally, I can make the callee ring but sometimes telephoning just fails completely and the network indicator on my devices switches to the symbol that indicates that there's no reception while the dialer attempts to connect. If the callee answers the phone, no sound is transmitted and after a few seconds the call is ended.

09-12 12:38:41.264 17396 17409 D StrictMode: StrictMode policy violation: android.os.strictmode.SqliteObjectLeakedViolation: Finalizing a Cursor that has not been deactivated or closed. database = /data/user/0/com.android.providers.contacts/databases/contacts2.db, table = raw_contacts, query = SELECT contacts_view._id AS contact_id, contacts_view.display_name AS display_name, data2 AS type, data3 AS label, data1 AS number, data4 AS normalized_number, contacts_view.photo_id AS photo_id, contacts_view.lookup AS lookup, contacts_view.photo_uri AS photo_uri FROM raw_contacts JOIN view_contacts contacts_view ON (contacts_view._id = raw_contacts.contact_id), (SELECT data_id, normalized_number, length(normalized_number) as len  FROM phone_lookup  WHERE (phone_lookup.min_match = '⟨REDACTED:Seven digits⟩')) AS lookup, data WHERE (lookup.data_id=data._id AND data.raw_contact_id=raw_contacts._id AND (  lookup.normalized_number = '+⟨REDACTED:Phone Number I called, international format⟩' OR  lookup.len <= 12 AND substr('⟨REDACTED:Phone Number I called, local format⟩',12 - lookup.len + 1) = lookup.normalized_number OR ( lookup.len > 12 AND substr(lookup.normalized_number,lookup.len + 1 - 12) = '⟨REDACTED:Phone Number I called, local format⟩'))) ORDER BY  length(lookup.normalized_number) DESC
09-12 12:38:41.264 17396 17409 D StrictMode:     at android.os.StrictMode.onSqliteObjectLeaked(StrictMode.java:2185)
09-12 12:38:41.264 17396 17409 D StrictMode:     at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:282)
09-12 12:38:41.264 17396 17409 D StrictMode:     at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:319)
09-12 12:38:41.264 17396 17409 D StrictMode:     at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:306)
09-12 12:38:41.264 17396 17409 D StrictMode:     at java.lang.Daemons$Daemon.run(Daemons.java:140)
09-12 12:38:41.264 17396 17409 D StrictMode:     at java.lang.Thread.run(Thread.java:1012)
09-12 12:38:42.081  1789  1789 E MmTelFeatureConn [0]: ImsRegistrationCallbackAdapter: ImsRegistration is null
09-12 12:38:45.562  4801  4900 D asd_primary_out: L[0],R[0], continus 20 times!

(Unable to attach complete logcat snippet as Cloudflare blocks me from doing that)

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Non-Official Lineage 20.0 for EMUI 9 Huawei (ANE, FIG, POT, VTR, STF)


    LeaOS is a project which based on LineageOS 20.1 with Andy Yan's and TrebleDroid GSI patches. I have added my personnals patches for Huawei devices : Encryption, Signal Strengh, Speed Boot, Assisted GPS, NFC, CAST/Miracast, Media App fixes, Camera HDR, SafetyNet etc..)

    Changelog :

    LeaOS Maarch 2023 version

    • Move to Android r35 (SPL Maarch)
    • Add offline charging
    • Add spoof model to pass safetynet
    LeaOS February 2023 version
    • First release

    Pre-requisite :

    You must have TWRP installed if you want install patch. and a phone with unlock bootloader

    Installation (crypt or uncrypt)

    • Download the version that corresponds to your Huawei phone model here and extract img file. You can choose with ou without GoogleApps
    • Flash system image : fastboot flash system <drag system.img here>
    • Flash twrp image: fastboot flash recovery_ramdisk <drag twrp img here>
    • Boot into twrp: power + vol+ while NOT connected to pc
    • Resize system: Wipe > Advanced Wipe > System > Repair or Change File System > Resize File System > Swipe
    • Wipe cache, dalvik/art cache, internal storage
    • Wipe data
    • (option) Install DRM patch for EMUI 9.1 to support DRM : 8-Huawei-FixPreav-AB-v1.3-signed.zip
    • (option) Install single modem patch for multi-sim device : 11-Huawei-MonoSim-AB-v1.1-signed.zip
    • reboot to System and set up the phone with Lineage first start assistant.
    • Enjoy !!!

    Source Code:

    ROM OS Version: Android 13
    ROM Kernel: Linux Huawei 4.9.148 or Phenix 4.9.319
    ROM Firmware Required: EMUI 9.1
    Based On: Lineage 20.0 and TrebleDroid


    And all the others who tested my patches and helped me improve this ROM

    Support Group
    Channel update
    Thank you for releasing this ROM, gave my old P20 lite new life! Everything works as far as i can tell, only one minor annoying thing: When i unlock the phone via finger print a random widget gets highlighted on the home screen or if i am in a messaging app while unlocking it types the "="-sign into the input field
    Thank you for releasing this ROM, gave my old P20 lite new life! Everything works as far as i can tell, only one minor annoying thing: When i unlock the phone via finger print a random widget gets highlighted on the home screen or if i am in a messaging app while unlocking it types the "="-sign into the input field
    Same here. What do you think the possible solution?
    USB tethering is not working on Phenix 4.9.319 but works on Linux Huawei 4.9.148.
    Other things just works fine.