• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

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

Search This thread

eamagoo

New member
Nov 25, 2010
2
0
Hello everybody
I need to update my P9 but my problem is that I am on android 6, EMUI 4.1.3
Could you help me? what should I do?
Try to update but can't find anything
Model: EVA-L09
Comp: EVA-L09C110B160
Version de Android: 6
kirim 955
3gb
1080x1920
sec patch 1/1/2018
emui 4.1.3
 

brookie229

Senior Member
Aug 20, 2017
74
9
It's pretty complicated for a low techie type person. Maybe too much. You have to update your device to Android 8 (emui 5) before you can flash this rom. There are several threads to show you how to do this and in many cases you must even re-brand your device to a Chinese version of the stock rom. Again, that is a separate thread (see post #1 for links). This process is NOT for the feint of heart! Good Luck!
 
Hello everybody
I need to update my P9 but my problem is that I am on android 6, EMUI 4.1.3
Could you help me? what should I do?
Try to update but can't find anything
Model: EVA-L09
Comp: EVA-L09C110B160
Version de Android: 6
kirim 955
3gb
1080x1920
sec patch 1/1/2018
emui 4.1.3
I had a quick look as well, and I could not find any good way forward either - but that was really a quick search - it does not mean, that there isn't any way... I assume however, that you have done already a comprehensive search, right? Seems that for your specific firmware, there is no Android-7 upgrade available?
A potential 2nd approach could be to find a way to rebrand your device under Android 6 to a more common branding, then apply the fitting Android-6 firmware and then let the device auto-upgrade to Android-7...?
The HWOTA tool in the rebranding thread contains the necessary information and the respective oeminfo files, so you could flash a TWRP suitable for Android 6 to obtain a root shell and then manually execute the respective 'dd' command to replace the oeminfo partition (backup the current partition via 'dd' first!). I will not give you more details, as this for sure is very risky (you could brick your device) and you should have some knowledge about this topic.
@zgfg : Do you maybe have an opinion about this?

It's pretty complicated for a low techie type person. Maybe too much. You have to update your device to Android 8 (emui 5) before you can flash this rom. There are several threads to show you how to do this and in many cases you must even re-brand your device to a Chinese version of the stock rom. Again, that is a separate thread (see post #1 for links). This process is NOT for the feint of heart! Good Luck!
I think @eamagoo 's problem is, that he is on Android 6 with a 'special' (maybe carrier-branded?) firmware, which does not offer any Android-7 upgrade, that's why the rebranding thread is one step too early to take, as you need to be on Android-7 for that...
 
  • Like
Reactions: brookie229

zgfg

Senior Member
Oct 10, 2016
5,703
3,144
I had a quick look as well, and I could not find any good way forward either - but that was really a quick search - it does not mean, that there isn't any way... I assume however, that you have done already a comprehensive search, right? Seems that for your specific firmware, there is no Android-7 upgrade available?
A potential 2nd approach could be to find a way to rebrand your device under Android 6 to a more common branding, then apply the fitting Android-6 firmware and then let the device auto-upgrade to Android-7...?
The HWOTA tool in the rebranding thread contains the necessary information and the respective oeminfo files, so you could flash a TWRP suitable for Android 6 to obtain a root shell and then manually execute the respective 'dd' command to replace the oeminfo partition (backup the current partition via 'dd' first!). I will not give you more details, as this for sure is very risky (you could brick your device) and you should have some knowledge about this topic.
@zgfg : Do you maybe have an opinion about this?


I think @eamagoo 's problem is, that he is on Android 6 with a 'special' (maybe carrier-branded?) firmware, which does not offer any Android-7 upgrade, that's why the rebranding thread is one step too early to take, as you need to be on Android-7 for that...
Huawei pulled off all their old firmwares more than a half a year ago and it's practically not posible to find any older firmware needed for such operations

IMHO, who didn't think about upgrading their P9 since 2017, can still continue using the A6.

It's not worth of wasting times and nerves, with a great chance that due to using some firmwares from not trustworthy places, phone could be bricked (Huawei is very sensitive)
 

TYOPXN360

Member
Jan 26, 2021
24
6
hello! When I insert a new UIM card into the rom, it recognizes and displays "Roaming indicator is flashing", and there is no sound when making a call. Others cannot hear what I say and I cannot hear what others say. But can surf the Internet and send and receive text messages normally
 
hello! When I insert a new UIM card into the rom, it recognizes and displays "Roaming indicator is flashing", and there is no sound when making a call. Others cannot hear what I say and I cannot hear what others say. But can surf the Internet and send and receive text messages normally
No idea. Is the new SIM card from same region? E.g., when using the ROM in Europe, one of the steps to do after the Chinese rebranding is to flash a network patch to have the European SIM card recognized...
 

Nezus3301

Member
Aug 14, 2020
28
4
28
Samsung Galaxy S3 Neo
Huawei P9
Due to different signing keys, this won't work w/o wipe.
ok, then, now for me, there's again that annoying magisk problem that last time we solved it by flashing Twrp, deleting su from bin and xbin files (https://forum.xda-developers.com/t/...geos-16-0-for-huawei-p9.4078383/post-85008901), then patching the ramdisk with the latest magisk ver.
but with the new rom update, this problem can't be fixed by 'recycling' these steps, what should I do?
 

TYOPXN360

Member
Jan 26, 2021
24
6
No idea. Is the new SIM card from same region? E.g., when using the ROM in Europe, one of the steps to do after the Chinese rebranding is to flash a network patch to have the European SIM card recognized...
They are from the same area, but different operators. So I use a UIM card instead of a sim card, and this device does not have a network patch, and can only be used normally by saving the relevant files, but the UIM card does not work
 
They are from the same area, but different operators. So I use a UIM card instead of a sim card, and this device does not have a network patch, and can only be used normally by saving the relevant files, but the UIM card does not work
OK, I first thought it was a typo, but you really mean UIM (or more precisely R-UIM, if I found the proper reference, when searching the net for that expression). Nevertheless, my ROM is simply the system partition, whilst the drivers for the modem etc. are normally on either the vendor partition or other partitions on the device.
However, as you most probably use China Telecom (which I have read is CDMA standard), I vaguely remember some CDMA related fixes in some of the Android parts, which indeed are on the system partition. If I remember correctly, there was something a year or so ago regarding CDMA fixes, which I could not apply properly...
Will check it, when I find the time...
 

xHayashi

Member
Oct 26, 2020
27
0
@MSe1969 Thank you for making this! I was hoping to get my old Huawei phone up and running again and am so glad to come across this.

Btw, Id like to know if I need if having the b540 firmware is enough, or do I need to follow the HWOTA7 guide and manually upgrade till b552? Since you mentioned just EMUI8 is enough, I assume any of it will work? Or can I just used b552 instead of b540 when following the guide?

In addition, you also mentioned that I should follow ALL the steps on the HWOTA7 guide till the part about the EMUI stock recovery part in post #2. Do i need to follow the steps in the other posts? I know I can skip Post #3 "Restore current firmware," but is post #4 "Enable Root Access" and post #5 "Manual Firmware Update on OREO" needed?

Sorry for my rookie questions, but thank you so much in advance!
 
Last edited:
@MSe1969 Thank you for making this! I was hoping to get my old Huawei phone up and running again and am so glad to come across this.

Btw, Id like to know if I need if having the b540 firmware is enough, or do I need to follow the HWOTA7 guide and manually upgrade till b552? Since you mentioned just EMUI8 is enough, I assume any of it will work? Or can I just used b552 instead of b540 when following the guide?
Depends, what is your starting point:
  • If you are already on a working Huawei EMUI 8 Oreo Stock ROM (like b540), then you can avoid that extra round of rebranding etc. - In that case, all pre-requisites are met and you can flash the provided system.img file aka "my ROM".
  • If you anyhow need to rebrand your phone and follow the instructions in the HWOTA thread (mainly post #2), why not simply download the B550 or B552 Stock ROM instead (assuming you know where to get them)? All instructions are still the same, you would only take the files from the newer firmware, as suggested already in your question.
In addition, you also mentioned that I should follow ALL the steps on the HWOTA7 guide till the part about the EMUI stock recovery part in post #2. Do i need to follow the steps in the other posts? I know I can skip Post #3 "Restore current firmware," but is post #4 "Enable Root Access" and post #5 "Manual Firmware Update on OREO" needed?
In fact, the main thing is post #2. The successful result is a working Oreo EMUI 8 Stock ROM. The following posts of that thread deal with what you can do with the Stock ROM (like e.g. rooting it), whilst you would like to install LineageOS finally on your device.
So when you did all from post #2 correct, including flashing the stock recovery, you have all the pre-requisites to flash my ROM.
 

xHayashi

Member
Oct 26, 2020
27
0
Depends, what is your starting point:
  • If you are already on a working Huawei EMUI 8 Oreo Stock ROM (like b540), then you can avoid that extra round of rebranding etc. - In that case, all pre-requisites are met and you can flash the provided system.img file aka "my ROM".
  • If you anyhow need to rebrand your phone and follow the instructions in the HWOTA thread (mainly post #2), why not simply download the B550 or B552 Stock ROM instead (assuming you know where to get them)? All instructions are still the same, you would only take the files from the newer firmware, as suggested already in your question.

In fact, the main thing is post #2. The successful result is a working Oreo EMUI 8 Stock ROM. The following posts of that thread deal with what you can do with the Stock ROM (like e.g. rooting it), whilst you would like to install LineageOS finally on your device.
So when you did all from post #2 correct, including flashing the stock recovery, you have all the pre-requisites to flash my ROM.
Thanks for the detailed reply! You answered all the questions I have for now haha I'll do as you suggested to just grab the b552 files instead of the b40 to save myself time, kinda, since any EMUI 8 will work, which is great!

In addition, do you know if there's a good, trustworthy guide on installing Huawei drivers? I got mine to work with Hi suite, but all the guides I came across are pretty bad or unclear. Id love to know one where it shows me how to check if I got the right drivers, and preferably one where it shows me how I can avoid Hi suite since Im only interested in the drivers (so i can uninstall hi suite). The other vids/ guides I came across are just sketchy.

Also, Ill definitely be posting here if I hit any roadblocks. Thank you so much!
 
Thanks for the detailed reply! You answered all the questions I have for now haha I'll do as you suggested to just grab the b552 files instead of the b40 to save myself time, kinda, since any EMUI 8 will work, which is great!
Good - just a hint: When you come to the very last step of flashing the Stock recovery, make sure to flash the equivalent recovery as well, e.g. the Stock b552 recovery, when you have used the b552 firmware (and not the linked b540 recovery from the HWOTA thread, which is only valid for b540)

In addition, do you know if there's a good, trustworthy guide on installing Huawei drivers? I got mine to work with Hi suite, but all the guides I came across are pretty bad or unclear. Id love to know one where it shows me how to check if I got the right drivers, and preferably one where it shows me how I can avoid Hi suite since Im only interested in the drivers (so i can uninstall hi suite). The other vids/ guides I came across are just sketchy.
Sorry, can't help unfortunately with this question: I personally use Linux on my private PC, and not Windows. So I never had to deal with having to install USB drivers to be able to use adb and fastboot. Under Linux, this works out of the box without the need of installing additional drivers. But I am sure, others following this thread should be able to help.
 

xHayashi

Member
Oct 26, 2020
27
0
Good - just a hint: When you come to the very last step of flashing the Stock recovery, make sure to flash the equivalent recovery as well, e.g. the Stock b552 recovery, when you have used the b552 firmware (and not the linked b540 recovery from the HWOTA thread, which is only valid for b540)


Sorry, can't help unfortunately with this question: I personally use Linux on my private PC, and not Windows. So I never had to deal with having to install USB drivers to be able to use adb and fastboot. Under Linux, this works out of the box without the need of installing additional drivers. But I am sure, others following this thread should be able to help.
Im actually looking to switch to Linux soon. Sounds great that stuff like adb works out of the box, but dont stuff like drivers still have to be installed since they're proprietary stuff? For the computer to detect them?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    New build with September 2021 ASB patches available

    Hi all,
    a new build is available for download (install instructions in OP):
    • ASB Security String 2021-09-01
    • microG 0.2.22.212658-2

    Happy flashing!
    Regards, M.
    1
    Im actually looking to switch to Linux soon. Sounds great that stuff like adb works out of the box, but dont stuff like drivers still have to be installed since they're proprietary stuff? For the computer to detect them?
    In fact, you need to install adb and fastboot as packages under Linux (similar, as you would download that famous "minimal fastboot and adb" thing for Windows). But as said, you don't need any drivers under Linux to connect to any mobile device. (Most probably, because Linux knows how to talk with Linux, and - OK, that's now a drastically simplified statement - Android also runs on Linux or "is Linux")
    1
    Hey, I got EMUI 8 running successfully, but do I need to fix the network? cause the network patches he provided are for b540 instead of b522
    The network fix from b540 is to be used, if needed. Depends on the region in the world, where you are: If the phone recognized your SIM card (if you are e.g. in China), you obviously don't need it. If your SIM wasn't found, you need it.
    1
    Cool! I was wondering if Lineage OS and other roms would utilize the OTA function for their own rom updates as well. But Im not tech savvy enuf to know all these things haha Thanks for the clarification! Imma just grab like openboard or something.
    In general, LineageOS uses its own OTA mechanism. For other builds, which I offer, I am making use of that mechanism to offer OTA updates of my builds. However, this build for the P9 is a "treble" build - this means that only the /system partition is replaced and also updated. So whenever I publish an update, people willing to apply it have to flash it manually via fastboot.

    Btw are you familiar with degoogling or privacy stuff on smartphones? I know privacy on smartphone is kinda a joke, but Id love to ask some of the questions I have if you're familiar with it. Probably in a dm since I dont wanna flood this thread with non-los relatrd stuff haha
    Yes, I am. You can DM me.
    1
    Oh, eventhough the factory reset didnt "fully wipe" the data since it kept stopping at 19% it's all good? I mean as long as I can get rid of the spyware etc. Im fine haha
    The percentage display is known to be rubbish. When you do a wipe, it does the wipe, but as indicated, ignore the percent complete.
  • 15
    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
    Security string: 2021-09-01
    AOSP tag: 9.0.0_r46
    Bromite System Webview: M92


    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.
    The OpenKirin installation instructions describe this in a very good way, I could not really explain it better (please note, that I have no relation to them, but they are really doing an amazing job).
    Nevertheless (as their site will soon be retired, if I understand their TG channel right), here comes the short version of the install instructions for the 1st install:
    • 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).
    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!

    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').



    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)


    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: 2021-08-06

    Created 2020-04-06
    Last Updated 2021-08-06
    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
    New build with August 2021 ASB patches available

    Hi all,
    a new build is available for download (install instructions in OP):

    • ASB Security String 2021-08-01
    • Bromite Webview updated to 92.0.4515.134
    • F-Droid on 1.13

    Happy flashing!
    Regards, M.
    4
    New build with July ASB patches

    Hi all,
    a new build is available for download (install instructions, see OP):
    https://sourceforge.net/projects/li..._a_lineage16_20200708_system.img.zip/download

    • ASB Security string 2020-07-01
    • microG: updated prebuilt GmsCore fom /e/ project (fixed FCM registration issues)
    • F-Droid updated to 1.8 / F-Droid privileged extension updated to 0.2.11
    • Aurorastore updated to 3.2.9 / AuroraServices updated to 1.0.6
    • Bromite Webview on 83.0.4103.101
    • Sepolicy: Netmonitor exception f. "Tracker Control" app

    Happy flashing - regards, M.
    3
    Kernel

    Just gave a try to the ECO Kernel, which seems to run really fine on the P9.
    Instructions in the linked thread (I flashed the "04.05.20 build with Linaro").

    Advantages:
    - Up to date with current patches (Stock kernel is from December 2018)
    - Hopefully better battery behavior

    I'll report my impressions soon, after using the device for some time.