yashsingh1/xdaforums huggingface dataset:
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
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...
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nezus3301:
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://xdaforums.com/t/rom-treble-microg-lineageos-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?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] TYOPXN360:
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
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
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...
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
New build with August 2021 ASB patches available

Hi all,

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

https://sourceforge.net/projects/lin16-microg/files/treble_p9eva/treble_arm64_a_lineage16_20210805_system.img.zip/download

ASB Security String 2021-08-01

Bromite Webview updated to 92.0.4515.134

F-Droid on 1.13

Happy flashing!

Regards, M.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
@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!
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
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.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
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!
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
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.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
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?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
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")
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
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
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
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.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
Gotcha. What about the part where it asks me to download playstore and any keyboard? Since Im doing this to degoogle, ideally I can avoid installing gapps and just toss smethg like openkeyboard into the phone instead?

And making sure Stock EMUI recovery comes with enabling OTA too I assume? Since the steps are bundled together. Im not sure how OTA works, but ideally I can severe the dependence on Huawei too. Will OTA be needed for your ROM and any downsides to not having it?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
You need a keyboard app, the network patch also throws away a lot of Chinese bloat/spyware. You need the keyboard app only for the time you use the original Stock ROM, but you need it, so use Swiftkey and not Gboard. As you in fact target on flashing LineageOS, you obviously do not need Playstore and - besides the fact, that there most probably won't be any further OTA package offered by Huawei for this device - again, you are going to flash LineageOS at the end, so you don't need that either.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
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.

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
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
I forgot to ask, the rebrand guide told me to puy thr P9 Eva 8.0 Twrp v4 img into the hwota7> windows folder and flash it with adb. But what about the emui stock recovery? Do I use the same steps I did for flashing the twrp file, or somewhere else?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
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.

Yes, I am. You can DM me.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
Great! I messaged you through the XDA conversations/ dm. If you have telegram or smethg, that'd make chatting easier too. Btw, what should I do for the question above, on img files and flashing?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
You flash the stock recovery at the end with the below fastboot command (assuming the file is called "recovery_ramdis.img" - alter the filename accordingly to reflect the real file name):

fastboot flash recovery_ramdisk recovery_ramdis.img
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
Hey, so i flashed the emui stock recovery file in adb with my phone in fastboot mode. I turned my phone off and held on the vol + and power button to see if it works. Now ny phone is stuck in "your phone is unlocked... your device is booting up" screen.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
What

exactly

did you do?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
I used twrp to flash the disable ota zip file. Booted the phone and everything was good. After that, I just booted into fastboot mode, ran cmd.exe and copy pasted the "fast flash recovery... emui recovery...img" command, with the img file in the directory. It took a few seconds and said it was done.

After that I forgot if I just held the power button while still in fastboot mode and then held the vol + and power button to try and see if i can boot up emui stock reocvery; OR i booted the system up first, powered it off, and held vol+ and power button to see if I can pull up stock emui recovery.

And either scenario just led to the phone being stuck on the "device is booting now" screen.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
New Update: After an ungodly amount of time being stuck on that screen, it shoes the EMUI logo screen and says software installation failed. However, it allowed me to reboot system and I can boot the phone up now lol

Erm given what I mentioned above, how do I make sure I dont get the same thing again? And if there's a way I can check if EMUI stock recovery was successfully installed? Cause I assume TWRP gets replaced by the EMUI stock recovery right, due to them sharing the same buttons when you pull em up?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Normally, if your phone is somehow stuck, you can force-switch-off with the fastboot key combo (power+vol down).

If you have flashed the recovery properly, it should boot up. Did you use the right file, as I have mentioned? So using the B552 recovery file, if you have used the b552 firmware?

To make sure, I have those recovery files here: https://sourceforge.net/projects/lin16-microg/files/treble_p9eva/EMUI8.0_Stock/

Also, important is the command "fastboot flash recovery-ramdisk <name of recovery file>" (impor,tant is to really say recovery-ramdisk and not simply recovery)

Before you flash the lineageos system.img file from this thread, it is important to have a properly working stock recovery.

I recommend to flash the recovery image again. Unfortunately, the only way to test the recovery is to boot into it.

It should look like here: https://www.hardreset.info/media/resetinfo/2016/114/4f1e525917414db39f6daa04b56ed2a4/huawei-p9.JPG
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
Ahhh I used the b540 file from the thread om this b552 firmware, I think that mightve been the problem *facepalm*. Ill grab your b552 recovery file and see what happens then.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
Crap, I think the open kirin site is down, do you know of another set of instructions for installation? Id love to get this running soon, excited to revive this device haha

Update: Figured out I could use the wayback machine
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
Sorry for all the questions, but I have flashed the b552 stock recovery file and your rom.

But when I boot into EMUI stock recovery to try and factory reset, it keeps getting interrupted. It shows me that it's doing a factory reset but gets interrupted at 19% and asks me if I want to factory reset/ reboot system/ wipe cache partition again (it also asks me to enter yes and confirm everytime i select factory reset).

And the screen where it gives me the options has a huge red exclamation mark in the middle where the EMUI logo should be. Oddly enough when its actually trying to factory reset, it shoes the normal EMUI logo before stopping at about 19% again.

Should I just select reboot the system anyways?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Ok, in short:

Prerequisite is, that you have a working Phone having EMUI 8.0, including ability to make phone calls, have mobile data, and a working Stock recovery.

If the prerequisite is fully met, flash the system image of my ROM (unzip before) with the command:

fastboot flash system <name of my ROM>.IMG

Afterwards, reboot to recovery! Do so e.g. by entering "fastboot reboot" and pressing power+vol up afterwards. It is important not to let the system boot normally, this won't work and you will end up in a boot loop.

In recovery, choose "Wipe data / Factory reset". Don't get fooled by any percentage shown less than 100% or by a red exclamation mark.

Once that step is done, choose "wipe cache". Once that is done as well, choose reboot.

The 1st time of reboot will in between even show an encryption screen and maybe another reboot. Don't worry.

See above :)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
Hmmm the weird thing is, it keeps stopping at 19%, goes into a screeb with a huge exclamation mark and asks me if I wanna reboot system, wipe data/ factory reset, wipe cache. If i select wipe data/ factory reset, Ill have to key in yes and select wipe data. It never goes past 19% before showing this screen again o.o

And I selected reboot system just now for a change. Like you said, the encryption screen showed up and it guided me through the set up process, and Lineage OS actually booted. But Im not sure will other issues show up later lol Is this considered a full factory reset? Id hate to still have huawei/ google spyware stuff in it.

I then tried factory resetting with EMUI recovery again, and its the same thing, stops at 19% when factory resetting. Am I supposed to keep repeating it for 10-20 times? Asking just to make sure cause I did 5 times at most iirc

Attached pics below to give you an idea.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
All fine, as mentioned already. You have booted LineageOS, so you're done - congrats.

For the next update, all is easier: You only need to do another "fastboot flash system <name of my ROM>.img" w/o wipe.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
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
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
The percentage display is known to be rubbish. When you do a wipe, it does the wipe, but as indicated, ignore the percent complete.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] xHayashi:
That sounds great, I can finally check this off my list. Thank you so much!
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] ericww:
WOW! NICE! My P9 was an EVA-L29 Dual-SIM, and now has been rebranded to EVA-AL10 oreo. Is this rom going to work with P9 Dual-SIM? I mean the dual sim network. Thanks!
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] ericww:
I have flashed, but only sim 2 detected. Signal only EDGE. I can call normaly, but with edge signal i cant do browsing and stuffs. I did flash the network patch before, 2 sim cards detected. But after flashed this ROM, dual sim doesn't work
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] ericww:
Tried once again,

Restored to B550 via stock eRecovery > Flashed temporary TWRP via fastboot > Flashed EVA-L29 network patch via TWRP > Flashed enable-Hwota.zip via TWRP > Flashed Stock Recovery via Fastboot > Flashed LineageOS 16.0 via Fastboot > Factory Reset via Stock Recovery (Failed at around 20%-ish)

Result: Everything worked normally, except the network:

1. Only SIM Slot 2 can detect SIM Card, Slot 1 cannot detect SIM card at all.

2. I can make calls normally with SIM 2

3. I have 2G signal only. Have tried to set the APN, and make sure to set the preferred network type to LTE, but nothing changed.

4. Internet works fine, but very slow due to the 2G signal.

Can anybody help me with this? For now i'm sticking with EMUI 8 until i can resolve this problem.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Thanks for reporting back. I only have a single SIM P9, so I cannot directly analyze the issue, but I'll try to research in the next days - not sure, but this sounds "familiar" somehow.

Two remarks however:

1. It is known, that the Stock recovery counts only to a value of 20% - 40% and then shows an exclamation mark. Normally, do wipe cache afterwards and it "continues" counting. Nevertheless, this is only a 'cosmetic' issue.

2.The missing 3G/4G capability I also faced on my device, I had to properly configure the APN and then it worked well. I was able to look the EXACT config on another device with the same carrier and I created a new entry even using the same profile name.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] ericww:
Noted, i will do what you said on the next flashing. Thanks!

Fingers cross, dual-sim capabilty will make this quite a perfect ROM for me :D
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] commandonz:
I have a P9 EVA-L09 on B504 firmware with EMUi 5.0.3 and Android 7, with bootloader unlocked and TWRP installed. I wanted to update to a standard Android ROM as a backup to my main phone. I run "Treble Check" and it said "Your device does not support project treble". I'm assuming that means I can't install this ROM?

If not, can anyone suggest a ROM (Lineage or EMUi) that will work on a P9 that doesn't support treble? Perhaps "LineageOS 16.0 Build 6" from OpenKirin.net? Unfortunately their support site says "the device must be running EMUI 8.0/EMUI 9.0/EMUI9.1" and mine's on EMUi 5 - pretty old.

General tips for how to get this phone onto a more modern Android distro would be appreciated :)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Please read the OP carefully, it links to a thread, which describes all the necessary steps to upgrade your phone from EMUI 5 on Android 7 to EMUI 8 on Android 8. Once your phone is on EMUI 8, your device will support treble and you can install this ROM (or Openkirin, if you prefer)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Hi, interim feedback:

Do you see in the Settings any Dual-SIM options, or does the settings structure look like if it was a single-SIM device?

If the latter, could you please try setprop persist.radio.multisim.config dsds (in an adb root session) and reboot?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] ericww:
It did look like dual sim menu. But sim 1 seemed inactive. But the menu for sim1 & sim2 was there.

Will try tonight! Thanks for your feedback! 👍😁
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Just a hint: On my single sim P9, this property isn't present - before setting the prop, please check with getprop, whether there is a value on your device, so just in case, you have a value to return to.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
@ericww :

I found out something more, which you could also evaluate,

while you are still on the Stock EMUI 8

:

You need to be in an adb shell session. First, you need the value of the property ro.board.modemid. (e.g. getprop | grep ro.board.modemid). In the file /vendor/phone.prop, there are sections listed for each modem. Look at the section of your modem and copy/write down the values listed there.

Now, compare those values with the actual properties of your phone (you indicated, that in Stock EMUI 8, all perfectly works).

Are there any differences between those values?

Reason I am asking is, that for the treble LineageOS ROM, there is a boot script section, which in fact reads the modem ID and explicitly sets the properties listed for that modem.

I have two ideas, what could be your issue (it's a wild guess, but why not?):

a. The property persist.radio.multisim.config for the Dual-SIM stuff says 'dsda' for all Dual-SIM modems in /vendor/phone.prop, but as proposed, 'dsds' (don't ask me, why) seems to help in some cases. This in fact was my previous proposal.

b. My further idea is, that - for whatever reason - the Stock ROM may have different values in your case than defined in the /vendor/phone.prop. As in LineageOS, those values are explicitly set, different values may cause issues.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] W00fer:
Can someone help me to update from Marshmallow to Nougat @MSe1969

Huawei's update servers are down and the only firmware I can find is B210 which is old.

B360 is only OTA and not FullOTA-MF-PV so I cannot go to Nougat.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Maybe this link could help you? https://androidfilehost.com/?w=files&flid=304458

Not sure, what exactly this is, but the Owner of the linked rebranding thread has some collections, which may be useful...

If not:

I'm afraid there won't be a satisfying answer for you: This has already been discussed earlier in this thread and I have also made a note in the OP. Huawei has shut down most of their update servers in regards to older devices, if you read through this thread, you will find some links, which may, or may not, be helpful. Further, in the linked thread in the OP to rebrand the device, this topic is also being discussed...

However - the question to get to Nougat from Marshmallow has already been explicitly asked and there wasn't any good solution.

If someone can provide any better info, I will be happy to update the OP of this thread accordingly.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] W00fer:
Isn't there a solution to extract the 2GB images and flash the partitions separately?

The B505 you linked to is too new, when coming from B182 / B210

I wonder why nobody stored the Marshmallow to Nougat fullota-mf-pv on a backup
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Please read carefully through the OP, there are some links provided. Also in this thread, there are discussion points (with links), as mentioned already. Further, please - as indicated, browse through @Tecalote 's Android file host space, you may (or may not) find something you need - besides, the situation has been explained, so that's all, which I can tell you.