[ROM][Treble][microG]LineageOS 16.0 for HUAWEI P9

Search This thread

Olliblacklist

Member
Sep 17, 2018
14
0
So you did not follow the install instructions! OK, what EXACTLY did you do with TWRP to flash LineageOS over EMUI?
I deleted the cache and delvi chace data and installed the img file this I did with the twrp and it starts normally but the only problem is that it gets hot as soon as I finish starting and configuring everything even without doing anything the phone is always hot
 
I deleted the cache and delvi chace data and installed the img file this I did with the twrp and it starts normally but the only problem is that it gets hot as soon as I finish starting and configuring everything even without doing anything the phone is always hot
Please follow my install instructions! I normally like TWRP a lot for orher devices. But for this device, it is a recipe for trouble! You need it on your journey to get to EMUI, but then just leave it apart, you only earn trouble with it!
So: Go to fastboot mode and flash the Huawei recovery. Then flash the system img via fastboot. Then use the key combo to enter EMUI recovery, do the factory reset and afterwards the cache deletion, then reboot. You need to do that only once.
EDIT: If you had active fingerprints for unlock in EMUI 8, you must delete them while you are still in EMUI 8 !
 
  • Like
Reactions: Tecalote

Olliblacklist

Member
Sep 17, 2018
14
0
Please follow my install instructions! I normally like TWRP a lot for orher devices. But for this device, it is a recipe for trouble! You need it on your journey to get to EMUI, but then just leave it apart, you only earn trouble with it!
So: Go to fastboot mode and flash the Huawei recovery. Then flash the system img via fastboot. Then use the key combo to enter EMUI recovery, do the factory reset and afterwards the cache deletion, then reboot. You need to do that only once.
EDIT: If you had active fingerprints for unlock in EMUI 8, you must delete them while you are still in EMUI 8 !
okay I do as you say and let's see how it goes thanks I'll let you know
 

brookie229

Senior Member
Aug 20, 2017
78
9
in practice I install the rom and everything is successful only that the mobile phone becomes hot and remains hot and the battery runs out I don't understand why you can help me understand how I have to solve why I would like to keep the lineage 16 thanks
Could be that you need a new battery. Check the health with some app.
 

Tecalote

Senior Member
Aug 6, 2015
4,105
3,133
60
Leipzig
Huawei Mate 40 Pro
Xiaomi Mi 11 Ultra
Still,all those AL10-c00 firmwares: b399SP17 (needed for HWOTA7 rebranding from c432 or another Nougat to Chinese Nougat), b528 (first Oreo that HWOTA7 thread was originally developped for), b535, b540 (OP posts were later adapted to), b550 and b552 are available for download from:
https://www.firmfinder.ml/

Open the page, fill in Eva-Al10 c00 as on the screenshot 1. Scroll down and find the firmwares (not only for AL10 but also for AL00, CL00, DL00 and TL00 - all Chinese)

For any of them, scroll to the right to find File List button - screenshot 2. Open and copy the URL for that filelist.xml.

E.g., for b552 it will be:
http://update.dbankcdn.com/download...d62a4ae400eaf8f451c81c2d32f/full/filelist.xml

Scroll through the opened xml to find the 3 filenames exactly as below - screenshots 3,4:
update.zip
update_full_EVA-AL10_all_cn.zip
update_data_full_public.zip

Now, remove filelist.xml from its URL as above and combine with subpath= and package= values for those filenames

E.g., for b552:
package="update_full_EVA-AL10_all_cn.zip"
subpath="EVA-AL10_all_cn"/>
it makes:
http://update.dbankcdn.com/download...9/f6/v3/1afd1d62a4ae400eaf8f451c81c2d32f/full/
+
EVA-AL10_all_cn/
+
update_full_EVA-AL10_all_cn.zip
=
http://update.dbankcdn.com/download...A-AL10_all_cn/update_full_EVA-AL10_all_cn.zip

That way it gives all three URLs for the EVA-AL10 c00 b552 firmware:
http://update.dbankcdn.com/download...d1d62a4ae400eaf8f451c81c2d32f/full/update.zip

http://update.dbankcdn.com/download...2d32f/full/public/update_data_full_public.zip

http://update.dbankcdn.com/download...A-AL10_all_cn/update_full_EVA-AL10_all_cn.zip
The Huawei Firm Finder URL has been changed:
https://professorjtj.github.io/
The method described by @zgfg is the same
 
  • Like
Reactions: MSe1969 and zgfg

P9_User

Member
Oct 27, 2020
28
2
New build with June '22 ASB patches available

Hi all,
a new build is available for download (update instructions, see OP):
  • Custom build release 2022-06-01
  • Bromite Webview 102.0.5005.96
  • F-Droid 1.15.2
  • microG 0.2.24.214816-11
Happy flashing!
Regards, M.

Hi. I made update as usual but this happened. Any advice?

G:\android\fastboot>fastboot flash system los16.img
target reported max download size of 471859200 bytes
sending sparse 'system' 1/5 (460796 KB)...
OKAY [ 10.774s]
writing 'system' 1/5...
FAILED (status read failed (Too many links))
finished. total time: 12.757s

Edit: Did DL and unzip again, and it worked as usual. Strange but okay, its up to date now.
Cheers.
 
Last edited:
  • Like
Reactions: MSe1969

Jon (aka nle)

Member
Mar 4, 2011
39
7
Oslo
I have a P9 that I only use as a GPS with Android Auto. Recently Android Auto keep bugging me about "outdated android".

Is this the latest and greatest ROM I should use for my use case?
 

Tecalote

Senior Member
Aug 6, 2015
4,105
3,133
60
Leipzig
Huawei Mate 40 Pro
Xiaomi Mi 11 Ultra
@Jon (aka nle) It's a very good ROM. But as far as I know, Google Assistant doesn't run on MicroG. If Google Assistant Driving Mode only runs on Android 8, you need to rebrand to EVA-AL10 first and then update to EMUI 8 /Android 8. I think there is an Open Kirin ROM based on Android 8 for the P9 with Google services. You have to check if it's still available.
Do you have P9 or P9 Plus (makes things little bit different)?
 

Jon (aka nle)

Member
Mar 4, 2011
39
7
Oslo
@Jon (aka nle) It's a very good ROM. But as far as I know, Google Assistant doesn't run on MicroG. If Google Assistant Driving Mode only runs on Android 8, you need to rebrand to EVA-AL10 first and then update to EMUI 8 /Android 8. I think there is an Open Kirin ROM based on Android 8 for the P9 with Google services. You have to check if it's still available.
Do you have P9 or P9 Plus (makes things little bit different)?
Thanks! It's the P9 (EVA-L09)
 
  • Like
Reactions: Tecalote

P9_User

Member
Oct 27, 2020
28
2
Hi. I have an urgent problem regarding Aurora Store. Since yesterday it says:
"Download failed, Sitzung ist abgelaufen (session is unexpired) please log in again."

Now I tried to log out and log in again, nothing changed. I need to install an airkey app for my new job which is pretty urgent for me. : /

I will do more research but maybe one of you know what to do?

I know its no problem with the LOS16 but I really dont wat to set up for playstore.
 
Hi. I have an urgent problem regarding Aurora Store. Since yesterday it says:
"Download failed, Sitzung ist abgelaufen (session is unexpired) please log in again."

Now I tried to log out and log in again, nothing changed. I need to install an airkey app for my new job which is pretty urgent for me. : /

I will do more research but maybe one of you know what to do?

I know its no problem with the LOS16 but I really dont wat to set up for playstore.
You could try the following (try one after the other)
- There is an option to delete all downloads
- Try force-closing the app and purge the app's cache (Settings - Apps - Aurora Store - ...)
- Try to purge app data (same path as before)
 

kundifon

Member
Apr 16, 2019
12
11
Thanks for great rom! I realized, that without google goes too.

My bank app claimed that weren't installed from playstore and therefore it closed for that reason. How bad, ugly bank!
Then I change the install method in Aurora store to Native installer (for older android versions) (Setting/Instalation/Instalation method). After reinstall bank app works for now.
What if maybe will need the playstore in future app versions?

Some noob qustion. If some custom rom has latest security patches and updates like this one, does android version matter?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Thanks for great rom! I realized, that without google goes too.
    Thanks for the positive feedback :)

    My bank app claimed that weren't installed from playstore and therefore it closed for that reason. How bad, ugly bank!
    Then I change the install method in Aurora store to Native installer (for older android versions) (Setting/Instalation/Instalation method). After reinstall bank app works for now.
    What if maybe will need the playstore in future app versions?
    Depends on "how" the app is bound to the PS. Right now, it only seems to be an installer flag, so you have worked around it. Some apps however use PS license verification - as explained in the Aurora FAQ, in such a case, you're lost. Same applies, if e.g. the "Safety net" api is used; this isn't related to the play sore, but the genuine Google Play services (I always call then "Spy services").

    Some noob qustion. If some custom rom has latest security patches and updates like this one, does android version matter?
    Phew... That's a complex question. The "short & easy" answer would be "no, it does not matter!", but that answer deserves some further elaboration, as it in fact is not that easy:

    A ROM has got in fact four "components":
    • The device-independent android platform
    • The Linux-Kernel
    • The device hardware drivers (aka "vendor blobs"), which are closed source vendor delivered
    • The device configuration, which glues the above three together

    Whilst the device-independent android-platform is usually very well maintained (or back-ported), the maintenance of the kernel and the updates of the vendor blobs is a different question and depends on the device maintainer / ROM builder.

    The older the android version, the harder the backport and the bigger the "unknowns". Android 9 isn't officially supported any longer by Google, but so far, it has been pretty straight-forward to backport the ASB patches, so Android 9 I would still consider 'safe'. But I am also providing Android 7 based ROMs, where it starts to become very difficult and also a "grey area"...

    This ROM here for the P9 of this thread is a "treble build", so only the device-independent android platform is updated, whilst kernel and device blobs stay "as is". (Unless Huawei surprisingly delivers another EMUI 8 update, which I severely doubt...)

    So I would split the question into two different situations:

    A.)
    Q: For my device "ABC", there is only an Android 'n' build available, whilst the most recent Android release is meanwhile 'n + x'. Do I need to worry?
    A: The available ROM is the "best", you can get for your device and for sure better than using the outdated stock ROM. So in the absence of a true alternative (other than getting a different, newer device) there is nothing to worry. I think that would describe the situation of the P9 quite well, I think. Having said so, if you fear being "professionally targeted", seek professional advice and aim at least for an "original" GrapheneOS device...

    B.)
    Q: For my device, there are Android 'n' as well as 'n +1' or even 'n + 2' builds available. What should I do?
    A: First of all, the functionality counts. Is the build with the latest Android release really stable, has acceptable performance (the newer the Android release, the higher the hardware demands) and is really daily-driver capable and also offers the features, which are important to me? If the answer is no, rather stick with the current stable, fast and daily-driver proven build.
    (Just some thoughts: ROMs, where e.g. SELinux has been deactivated in the kernel are experimental and unsafe, applying ASB patches to such a ROM is close to useless - such stuff may be nice as a temporary test, if you are interested to see the look and feel of a new version, but don't use that as "daily driver". Further, some ROM developers apply heavy downporting modifications to a modern Android version just to get it "somehow" running on a very old device - also not what I would consider a "daily driver" use. Another example: I used to offer LineageOS 17.1 builds for the Osprey device, and finally decided to stop it and offer again LineageOS 16.0 builds with recent ASB backports for it, as 17.1 simply was too laggy and slow)
    If however there is really no difference, the more modern Android version is to be preferred; especially, if the device manufacturer still delivers updates, which means that even the vendor blobs can be updated.

    Hope that could give you a better view on that topic.
    3
    New build with backported August '22 ASB patches available

    Hi all,
    a new build is available for download (update instructions, see OP):
    • Custom build release 2022-08-01
    • Bromite Webview 103.0.5060.140
    Happy flashing!
    Regards, M.
    1
    Another problem is that if Magisk is installed , the CPU temperature would be really high (up to 64℃) and remain unchanged. At the same time , the internal Root settings would disappear. I had no choice but give up installing Magisk.

    Besides , it seems that the camera problem can be solved by adjusting settings. If "Save photo to SD card" switch is turned on , camera will work normally. But I still can't delete any photo.

    That's all the problems I've found until now.

    Although there are bugs , this system is good and easy to use . Thanks to the developers , this old device comes to life again.
    1
    This system image works well on my EVA-AL10(Chinese version), but there are still some bugs.
    Thanks for your feedback.

    1. The most serious one is that I can't delete any photo in /DCIM/Camera , as the picture below shows. If I try to delete these photos in Gallery app , they would "disappear" but not really be deleted.
    I can't reproduce this behavior on my own P9.

    2. Sometimes , the device will immedietely turn black and then automatically reboot after taking a photo in stock camera.
    Haven't experienced this so far on my own device. However, the P9 is not my primary device, so I am not a "power user" of it or its Camera...

    3. When I use this system for the first time , it asked me for password . But I never set any password on this device and I used fastboot -w before flashing. In the end I ran factory reset in Recovery mode and it showed "Device is being encrypted" before booting into system.
    As explained in the OP, when flashing this GSI the fisrt time (e.g. over stock EMUI 8.0), it is key to afterwards run a factory reset and afterwards a cache wipe in recovery. ('fastboot -w' may not be enough)
    1
    Another problem is that if Magisk is installed , the CPU temperature would be really high (up to 64℃) and remain unchanged. At the same time , the internal Root settings would disappear. I had no choice but give up installing Magisk.
    In my tips & tricks section, there is also some information about Magisk. Please read that carefully - however, I don't use Magisk myself, so I can't give you any assurance, whether it works or not.
    And yes, it is a "feature" of Magisk to remove/hide any other root solution...

    Besides , it seems that the camera problem can be solved by adjusting settings. If "Save photo to SD card" switch is turned on , camera will work normally. But I still can't delete any photo.
    Maybe something weird with your SD card? Have you tried deleting files via root shell, just to see, whether that would solve the issue or also throw any error? I has such a problem with a complete different device and SD card some years back, where at the end, I had to format the SD card to get rid of the issue...

    That's all the problems I've found until now.

    Although there are bugs , this system is good and easy to use . Thanks to the developers , this old device comes to life again.
    Thanks again for your feedback.
  • 20
    This thread is dedicated to provide Lineage-OS 16.0 builds with microG included for the HUAWEI P9 with current security patches.

    It is a treble build, therefore it could also work on other devices, but I haven't tested. And yes, the camera works!
    (Although it is based on the work of phhusson's GSI builds, some specific adaptations have been made, so I guess, it is worth a try for further Huawei devices based on EMUI 8, but that's it...)

    Features of this ROM
    Download here
    • Pre-installed microG and F-Droid like the LineageOS for microG project (own fork)
    • Pre-installed AuroraStore
    • Root included (switch on in dev. settings)
    • eSpeakTTS (FOSS TTS engine)
    • Additional security hardening features listed below
    • Access to /proc/net blocked for user apps
    • Bundled netmonitor app to allow network monitoring
    • Enhanced Privacy Guard: Switches for motion sensors and other sensors
    • Cloudflare as default DNS (instead of Google)
    • Privacy-preferred default settings
    • Optional blocking of Facebook- and Google-Tracking
    • Optional disabling of captive portal detection
    • Firewall UI
    • No submission of IMSI/phone number to Google/Sony when GPS is in use
    • Default hosts file with many blocked ad/tracking sites
    • Privacy-enhanced Bromite SystemWebView
    • Additional restrictions for secondary users
    • Increased password length
    • Hardened bionic lib and constified JNI method tables
    • Huawei Stock Camera

    Current release levels
    Custom build release 2022-08-01
    Security string: 2022-01-01
    AOSP tag: 9.0.0_r46
    Bromite System Webview: M103


    Source-code and build instructions
    Device config.: https://github.com/lin16-microg/device_phh_treble/tree/lin-16.0-eva-p9
    Build manifest: https://github.com/lin16-microg/local_manifests/tree/lin-16.0-treble


    Installation Instructions

    YOU ARE RESPONSIBLE SOLELY YOURSELF FOR ANY ACTIONS YOU DO WITH YOUR DEVICE !!!

    Please note - I won't explain any single aspect (e.g. how to install 'fastboot' on your PC or troubleshoot USB connectivity issues under Windows). Search the net and consult the search engine of your choice or look here in XDA, there is plenty of information available.

    Pre-Requisites
    • Have fastboot and adb installed on your PC and make sure, you can connect via USB to your device in fastboot mode and via adb
    • Know the key combinations to get your phone into fastboot mode and recovery mode
    • An unlocked bootloader
    • EMUI 8.0 firmware
    • Have the Huawei Stock recovery installed (not TWRP)

    ONLY, If the above pre-requisites are met, download and unpack the linked ZIP file, and flash the .img file via fastboot (EMUI 8.0 is the tricky pre-requisite - see further below).
    • Get your device into fastboot mode and connect to your PC via USB - the screen should look like below, indicating "PHONE Unlocked"
      P9_fastboot.png
    • Flash the ROM with the command fastboot flash system <name of the rom img file>.img
      fastboot-flash.png
    • Afterwards, enter the command fastboot reboot
    • Hold Power+Vol.Up to get into the Stock recovery:
      p9_stockRecovery.png
    • Choose the option "wipe data/factory reset"
      Don't 'panic' if the operation stops at a percentage significantly lower than 100% and you see a red exclamation mark, all is fine
    • Next, choose "wipe cache partition"
    • Finally choose "reboot system now"

    Some hints:
    • If you come from an EMUI 8.0 stock ROM or a different treble build (which means, you are already on EMUI 8.0), don't forget the factory reset as described.
    • If you update one of my builds from this thread, you don't need to wipe anything, so you can skip everything after the 'fastboot reboot' step!
    • On some (but not all) PCs, you may have to run fastboot as Admin (Windows) or root/sudo (Linux)

    If the above pre-requisites are NOT met, you will have some extra-rounds to perform, until you get there:
    Unlocked Bootloader
    Huawei has stopped providing unlock keys, so if you haven't got one, this thread and of course the search-engine of your choice may be helpful. I was lucky enough to obtain an official unlock key on the last day of HUAWEI's unlock page, so I have no experience with the unofficial unlock methods - good luck!

    EMUI 8.0 firmware
    Get back to Stock ROM, if you use a Custom ROM. On Stock, if not yet done, apply all updates offered to you by the Stock ROM updater, until you are on the latest officially offered Android 7 (Nougat) EMUI 5.x release.
    Huawei has shut down however their update servers for older devices and older software releases, so this may become difficult, if you are e.g. still on Android 6 - I don't have a good advice for you in this case.
    Once you are on Android 7 (aka Nougat), please visit this thread, which really explains step-by-step, what needs to be done. Really carefully ready everything and follow ALL the steps, especially, don't forget at the very end to flash the Stock EMUI recovery!
    IMPORTANT UPDATE:
    The linked thread, as well as the Openkirin documentation point - via a Russian firmware site - to the domain 'hicloud.com' for the firmware download, which seems to be down. As suggested by @zgfg you can try either
    his Mega link or e.g. https://androidhost.ru/search.html
    Update: See this post to obtain the firmware!
    Update 2: See also here

    You need your unlock key handy: During this process, the bootloader will be automatically locked several times, so you need the key a couple of times to unlock again!
    A hint for Linux users: The HWOTA tool is in fact a windows wrapper around Linux shell scripts, so there is no real need to use Windows, if you have a working Linux installation (however, make sure to replace the 'mkdir' commands in hwota_eng.sh with 'mkdir -p').


    Android 10, 11 or 12 builds?

    Simple answer: There won't be any coming from my end (my aim is to provide daily-driver capable builds and not to boot an experimental GSI with lots of issues and a non-working camera) - so stop wasting everybody's time by repeatedly asking!


    Bug reports:
    If you have a problem, please create a post with these informations:
    Build Date:
    And try to get log as described here
    Please note that I can't and won't support issues with builds using a different kernel or Xposed.
    In regards to microG, I will try my best to help when it is related to this ROM (I use it myself), but any questions of the type "the YXZ-app can't do <some sort of fancy xyz Google functionality> properly" are better asked in the respective microG forums.

    Credits
    AOSP project
    LineageOS project
    openkirin.net
    phhusson
    AndyYan
    Tecalote
    microG project
    Graphene OS project
    csagan5 (Bromite)
    WhyOrean (Aurora)
    zgfg (for very helpful contributions in this thread)


    XDA:DevDB Information
    [ROM][Treble][microG]LineageOS 16.0 for HUAWEI P9, ROM for the Huawei P9

    Contributors
    MSe1969
    Source Code: https://github.com/lin16-microg/device_phh_treble/tree/lin-16.0-eva-p9

    ROM OS Version: 9.x Pie
    ROM Kernel: Linux 4.x
    ROM Firmware Required: EMUI 8 firmware
    Based On: LineageOS

    Version Information
    Status:
    Stable
    Stable Release Date: 2022-08-08

    Created 2020-04-06
    Last Updated 2022-08-08
    8
    New build with backported July '22 ASB patches available

    Hi all,
    a new build is available for download (update instructions, see OP):
    • Custom build release 2022-07-01
    Happy flashing!
    Regards, M.
    5
    New build with April ASB patches available

    Hi all,
    a new build is available for download (update instructions, see OP):
    • Custom build release 2022-04-01
    • Bromite Webview 100.0.4896.57
    Happy flashing!
    Regards, M.
    5
    New build with May 2020 ASB

    Hi all, a new build is available for download:
    https://sourceforge.net/projects/li..._a_lineage16_20200508_system.img.zip/download

    To install, download, unzip and follow instructions as outlined in OP.
    The build has the following features:
    • Sec. string 2020-05-01
    • Bromite Webview on 81.0.4044.127
    • AuroraStore updated to 3.2.8
    • Fix of bundled 'netmonitor' app not starting

    Regards, M.
    4
    I will upload the original RAMDISK firmware images for B540, B550 and B552 after my return
    Still,all those AL10-c00 firmwares: b399SP17 (needed for HWOTA7 rebranding from c432 or another Nougat to Chinese Nougat), b528 (first Oreo that HWOTA7 thread was originally developped for), b535, b540 (OP posts were later adapted to), b550 and b552 are available for download from:
    https://www.firmfinder.ml/

    Open the page, fill in Eva-Al10 c00 as on the screenshot 1. Scroll down and find the firmwares (not only for AL10 but also for AL00, CL00, DL00 and TL00 - all Chinese)

    For any of them, scroll to the right to find File List button - screenshot 2. Open and copy the URL for that filelist.xml.

    E.g., for b552 it will be:
    http://update.dbankcdn.com/download...d62a4ae400eaf8f451c81c2d32f/full/filelist.xml

    Scroll through the opened xml to find the 3 filenames exactly as below - screenshots 3,4:
    update.zip
    update_full_EVA-AL10_all_cn.zip
    update_data_full_public.zip

    Now, remove filelist.xml from its URL as above and combine with subpath= and package= values for those filenames

    E.g., for b552:
    package="update_full_EVA-AL10_all_cn.zip"
    subpath="EVA-AL10_all_cn"/>
    it makes:
    http://update.dbankcdn.com/download...9/f6/v3/1afd1d62a4ae400eaf8f451c81c2d32f/full/
    +
    EVA-AL10_all_cn/
    +
    update_full_EVA-AL10_all_cn.zip
    =
    http://update.dbankcdn.com/download...A-AL10_all_cn/update_full_EVA-AL10_all_cn.zip

    That way it gives all three URLs for the EVA-AL10 c00 b552 firmware:
    http://update.dbankcdn.com/download...d1d62a4ae400eaf8f451c81c2d32f/full/update.zip

    http://update.dbankcdn.com/download...2d32f/full/public/update_data_full_public.zip

    http://update.dbankcdn.com/download...A-AL10_all_cn/update_full_EVA-AL10_all_cn.zip