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

Search This thread

Harris-io

Member
May 15, 2009
5
2
Hello,

I found and installed your rom. I really like the "no Google policy" .

I have however a issue:
When logging in inside a app (LEGO Super Mario) I log in using the internal browser. However the response does not get recognized => App is unusable...

Second bug is a not working login with Anton ( https://play.google.com/store/apps/details?id=com.solocode.anton&hl=de&gl=US ) . The app freezes after trying to log in...

fixed installing the february update

Any ideas?
 

Attachments

  • Unbenannt.png
    Unbenannt.png
    58.6 KB · Views: 23
Last edited:
  • Like
Reactions: MSe1969

Harris-io

Member
May 15, 2009
5
2
Hi, just to make sure: Is your problem completely solved, or is only the crossed issue solved and the 1st issue with the screenshot still exists?


The browser issue was not solved this day - but after I installed another Browser and made it default I was able to log in using this browser and it worked.
 
  • Like
Reactions: MSe1969

thinsoklearp

Member
May 13, 2013
36
0
PS C:\Users\thins\Desktop\fastboot\fastboot> fastboot flash system treble_arm64_a_lineage16_20210204_system.img
target reported max download size of 471859200 bytes
sending sparse 'system' (460796 KB)...
OKAY [ 14.206s]
writing 'system'...
FAILED (remote: sparse flash write failure)
finished. total time: 14.234s

i can't flash my P9 and now it brick any help? thank
 

zgfg

Senior Member
Oct 10, 2016
4,994
2,280
PS C:\Users\thins\Desktop\fastboot\fastboot> fastboot flash system treble_arm64_a_lineage16_20210204_system.img
target reported max download size of 471859200 bytes
sending sparse 'system' (460796 KB)...
OKAY [ 14.206s]
writing 'system'...
FAILED (remote: sparse flash write failure)
finished. total time: 14.234s

i can't flash my P9 and now it brick any help? thank
Did you have EMUI 8, as it states for pre-requisite in the post #1
 
  • Like
Reactions: MSe1969

MSe1969

Senior Member
Dec 16, 2016
1,650
2,928
Frankfurt Rhine-Main metropolitan region
The functions of the camera are a bit too few, can you consider adding a native camera to this Rom?
Not immediately, but if I find the time, I can have a look. I did initially play around with that, but at that time no success. I know that Openkirin does (or at least did) so, therefore I can have a closer look at their system.img - if anybody has got a clue what to do, I'd appreciate.
In any case, native Cam app has been built for Oreo (8.0), this ROM is Pie (9.0) and there ARE issues because of that, afaik
 

MSe1969

Senior Member
Dec 16, 2016
1,650
2,928
Frankfurt Rhine-Main metropolitan region
New build available with March 2021 ASB patches
Hi all, a new build is available for download (install instructions, see OP):

  • ASB Security string 2021-03-01
  • Bromite Webview on 88.0.4324.207
  • Updated microG from upstream to 0.2.18.204714 (picked until 87465cd)
  • Updated F-Droid to 1.11
  • Updated phh treble app
  • Extended phone number blocking options (Dialer settings)
Happy flashing!
Regards, M.
 

thinsoklearp

Member
May 13, 2013
36
0
Your bootloader is unlocked?
And did you try running fastboot as Administrator (Windows) / root user or sudo (Linux)?
Have recent version of fastboot?


i have unlock bootloader but it only show phone unlock and not FRP unlock and it is EVA-AL00
and i don't know how to run fastboot as administrator too
 
Last edited:

Igoran

Senior Member
Sep 14, 2006
130
15
Saint-Petersburg
New build available with March 2021 ASB patches
Thanks for your hard work for maintenance that old device!
Using it as 2nd phone.

For camera - it was interested to use GCam on this build too. But if you have a time for it. Doesn't so important.

Really interesting tweak for me - can it be changed default Bluetooth LDAC Codec Playback Quality from "Best effort" to "Optimized for Audio Quality" setting in "Developer options"?
 

MSe1969

Senior Member
Dec 16, 2016
1,650
2,928
Frankfurt Rhine-Main metropolitan region
i have unlock bootloader but it only show phone unlock and not FRP unlock and it is EVA-AL00
and i don't know how to run fastboot as administrator too
For the Chinese branding (AL00 or AL10), it is normal, that no FRP lock is shown.
Run fastboot as administrator:
On Windows, run the terminal / command window as administrator, and within, operate fastboot normally.
If your phone is still bricked, have you tried to restore stock ROM using eRecovery?
Besides, I have no good idea, why fastboot would not write.
EDIT: Have you installed a very recent version of fastboot? If not, try to obtain the most recent version. And also make sure (as you seem to use Windows) to have recent USB drivers for Huawei devices.
 
Last edited:
  • Like
Reactions: thinsoklearp

TYOPXN360

Member
Jan 26, 2021
18
4
I have installed the version released in February and now the version released in March. Can I install it directly on my mobile phone? (installed by third party twrp)
 

MSe1969

Senior Member
Dec 16, 2016
1,650
2,928
Frankfurt Rhine-Main metropolitan region
I have installed the version released in February and now the version released in March. Can I install it directly on my mobile phone? (installed by third party twrp)
Yes, if you use my build from February, you simply flash the new system.img (no wipe) - either via fastboot (recommended), or - as you seem to use TWRP (so assume device not encrypted) - you can do so also via TWRP with flash image option.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    @danipan - I searched instead of you (?), please for the beginning study the following guide about rebranding (it contains TWRP for P9 for MM and oeminfo for P9 c432 MM):
    Read also (use Chrome and the built-in translator) the following tutorial - it includes rebranding at MM to c432:

    More about custs, build numbering schemes etc, find at:
    2
    I understand I need to be in Nougat. I am not sure and is asking
    1. if I can update directly from c636b168 to B390? Since it's the only one fw I can find right now. I don't know why ota doesn't work on my device. In some phones, if major updates, there's prerequisite rom needed.
    2. And if ever I have successfully updated from B390 can I rebrand from there?
    3. I also have twrp and root right now upon searching I understand I have to restore stock recovery and unroot if I am updating to B390 right?
    4. I haven't thoroughly read about rebranding but my hunch says fw is not available anymore and if I'm lucky to be in this step, could you please reupload the files? Huawei recently deleted all their fws.

    I am sorry for asking a lot of questions, just making sure before I proceed as I don't have UPDATE.APP. I am really looking forward to have this rom installed as I suffered from terrible connectivity issue and is driving me crazy.
    I don't know do you mean c432b390 or c636b390 - it's different but important

    You can not 'update' from c636b182 to c432b390 - you must always stay on the same cust

    You either need to find Nougat version for c636, or you must first rebrand from c636 MM to c432 MM to be able then to update to c432b390 Nougat

    That's the whole story about custs and rebranding (your Bootloader must be unlocked for rebranding) - please google about, there were many old posts and thread(s)/instructions here in XDA forum about rebranding and updating from MM to Nougat, etc

    (That is not the same ss rebranding to Chinese Oreo - that will be the later step once you already succesfully update to Nougat either with c636, c432 or with any other cust

    So again, you must do two steps:
    - update c636 to Nougat or rebrand to c432 and then update to Nougat
    -later, use HWOTA-7 thread to rebrand and update from Nougat to Chinese Oreo)

    I really don't have any files for c636, I never used it.
    And I was finished with my P9 two years ago, and sorry I really won't/cannot help about rebranding from c636 to c432 or so

    PS: Go to the HWOTA-7 thread, last post - somebody asked and I dumped all things for Huawei P9 I still found on my PCs to my Mega account.
    It should cover all files you will need for HWOTA-7 steps (rebranding from Nougat to Chinese Oreo) - but you will have to read and follow OP instrucrtions by the original developer in the HWOTA-7 thread

    For c636, you could try searching for firmwares (but again, I never played with c636 and cannot recommend you any.firmware) at:
    1) https://androidhost.ru/search.html
    enter eva-l09c636 (if you have l09) or eva-l19c636 if you have l19 - but sometimes it's worth even to download a firmware for l19, unpack, and check if you find inside also a stuff for l09 or vice versa
    2) https://support.halabtech.com/index.php?a=downloads&b=folder&id=14393
    They have complicated subscription/download rules (at least they had 2-3 years ago when I onced used them), but if you cannot find c636 firmwares anywhere else, maybe you will find there - under the E series, EVA

    Good luck

    Sorry guys but you see that Huawei stopped providing firmwares for P9, Firmware Finder closed their store, it's two years too late for trying to upgrade from Marshmallow to Nougat now - Huawei was releasing MM firmwares 2016-2017 and Nougat firmwares 2017-2020, now is already 2021, and the whole official/unofficial support, community, everything is practically dead by now 😥
    2
    @MSe1969 Since there's no more firmware available and I am still in the launched firmware of P9 (the oldest) and is not getting ota. Can I jump from Android 6 to rebranded EMUI 8 or jump to the only P9 firmware I have found B390 which I do not know its Android version? I'm asking because in other brand some fw is required. Do I still have luck in trying this custom rom?
    No, HWOTA-7 thread, it's OP instrucrtions (and actually the way how HWOTA-7 method works by utilizing the TWRP for Android 7 - thus the '7' in its name) strictly reauires EMUI 5.1 (Android 7 = Nougat)

    Btw, b390 should be Nougat (it's definitely Nougat if you are asking about c432 cust), no more Marshmallow (MM was up to b210 or b300 if making a rollback from Nougat to MM)
    2
    Thank you OP for updates! Hi, I'm not new to flashing but this is the first time I'll be flashing on huawei. Currently, I'm still in EMUI 4, bl unlocked, from what I gathered I have to flash EMUI 8 first, but from where and do we have twrp treble for P9? And is it possible to flash any gsi roms or we can only flash what we have in here?
    Hi, this is all described in the OP, also with the fitting links. But once again in short:
    - Your starting point is EMUI 4, so you first need to get to EMUI 5 (Android 7), by applying the offered Stock OTA updates or via eRecovery.
    - If both does not help you to get to EMUI 5, you'll need to search the net on your own...
    - Make sure you have your BL unlock key handy, as it could even be, that your BL gets locked again
    - If you are on EMUI 5, follow all the instructions step-by-step in the linked thread (i.e. rebrand your device to Chinese, flash the EMUI 8 update, flash the further stuff, until you get a fully working EMUI 8 Stock ROM, which also recognizes your SIM card).
    - Apply all Stock updates, which will be offered to you then (I expect two, maybe three!)
    - Then, you are in a position to flash any GSI

    Now to your specific questions:
    - There are misc. TWRP versions for the P9 out there, for the rebrand & upgrade to EMUI 8 exercise you'll even have to use them temporarily, but when all is finished, I do not recommend to use TWRP! (I like TWRP and it is a pitty, that it does not work properly with the P9, but is is as it is. I will therefore not support any issues resulting from the use of it!)
    - Although you can use any GSI, the camera will only work on those ROMs with a specific patch for the P9 camera, which more or less leaves you with either my ROM or the OpenKirin ROMs for this device, also because they have a specialized power profile
    2
    One thing I'm most afraid of updating is it might lock my bl again. Does my code stay the same or does it change? Will rebranding also relock bl? As we know, our bl code is very precious right now.

    Could you please reupload recovery if you have backups for our device P9 that I will be needing from updating to rebranding to flashing gsi? I tried to download one but is unfortunately not available anymore as the posts were already years old and xda recently migrated.

    And, if I'm already done in everything, like I'm already using this rom, which recovery do you recommend?

    I've customized a lot of different brands, and Huawei is the hardest and trickiest to tinker... Just for unlocking bl I've spent 2 years..

    Also, I'm guessing by your response, I think magisk is not available to us?
    Your Bootloader code stays the same for a lifetime of your Huawei phone - no matter which EMUI version you go for
  • 13
    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!

    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

    Current release levels
    Security string: 2021-04-01
    AOSP tag: 9.0.0_r46
    Bromite System Webview: M90


    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
    • An unlocked bootloader
    • EMUI 8.0 firmware

    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!)
    Some hints:
    • If you come from an EMUI 8.0 stock ROM or a different treble build, 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
    • 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.
    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!

    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:
    Testing
    Stable Release Date: 2021-03-08

    Created 2020-04-06
    Last Updated 2021-03-08
    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 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.
    3
    Do you plan to provide regular updates with the latest security patches in the future?
    Yes, I do - April ASB is "already in the pipeline"...
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone