yashsingh1/xdaforums huggingface dataset:
[Huawei P9 Guides, News, & Discussion] Tecalote:
@kundifon You can't install this Lineage OS on Huawei P9. You know, European P9 original Firmware is based on Android 7.

Rebranded to Chinese model, it's based on Android 8.

The LOS you have mentioned, is based on Android 11 (LOS 18) and wouldn't work. It would send your P9 to nirvana with no return, if you could install it at all. :)

Only alternative to the MicroG Rom you have tested, is the Rom made by OpenKirin (including GAPS).

There Website is offline.

But the Firmwares for P9, which are mentioned here:

https://xdaforums.com/t/roms-treble-openkirin-aosp-collection.3828806/

are still download able from OpenKirin Telegram Channel:

https://t.me/OpenKirin

You can only install the ones for EMUI 8! And those ones, which are listed in the XDA Thread.

The only exception is the Omni Pie Rom, which is based on Android 9 but backwards compatible with Android 8.

The installation process is described here (in German, if your native language is English, please use Google Translate) :

https://www.android-hilfe.de/forum/...u-al10-rebrandeten-p9-und-p9-plus.901530.html

The important prerequisite is:

The phone must be on Android 8 with working network patch.

You need after that the EMUI Stock Recovery (not TWRP).

You can switch to Stock Recovery by flashing this script with TWRP for Android 8:

https://www.androidfilehost.com/?fid=1395089523397921866

After this step you must download and unzip the file (with 7zip) and get a system.img for flashing only in Fastboot Mode.

Once Rom flashing is done, you must boot to Stock Recovery and doing a factory reset from there. That's all in a nutshell

*****

Not necessary for AOSP Rom, but just for your question about TWRP for Android 8:

you can't do a factory reset, because it hasn't access to /data cause of the missing Decryption. And there's no any other TWRP.

@zgfg found a way and described it here in this Thread to be able to get access to data by format data (several steps are required to manage this without bricking the phone.

Perhaps he has stored the link to his post.

At the moment it's really difficult to search this thread and find it.
[Huawei P9 Guides, News, & Discussion] zgfg:
Unfortunately, "Search This Thread" at the top of the page 'does not work' properly (and out-of-the-box) on XDA

But there is a trick to search through the threads - the trick works both in browser and from the XDA app

Click on "Search This Thread". Do not bother to type any keyword(s) to search for - it will be ignored. Just click on "Search" button and (no matter if you typed the keyword or not) you will be given "Search results for query: *"

That is, each and every post in the thread will be 'found' as 'relevant' (it actually searched for the keyword "*", a placeholder for any word)

Now click on that "*" and a new Search option will open. Here you should type in your keywords (like "decryption" but without the quotes), scroll down and better "Restrict search to specified thread" to "Most recent" and click on "Search"

Here, finally, you will be given the proper "Search results for query: decryption"

See the screenshots below

---

Now, searching for decryption gives one of my post from those times (there are more but this post looks like 'final'):

https://xdaforums.com/t/rebrand-update-tool-hwota7-p9-eva.3820849/post-80029346

However, for the described steps a special TWRP versions were required. I had them at those times and kept on my Mega cloud storage, and the links to download were in my post

However, once I stopped playing with P9 and Huawei phones, I wiped my Mega cloud to make room for the stuff for my new phones.

Now, maybe @Tecalote still has all the tools, including the needed custom TWRP versions...
[Huawei P9 Guides, News, & Discussion] kundifon:
That's clear to me rebranding to Chinese AL10 to get EMUI 8 firmware is prerequest to continue journey to custom roms. Your guide @Tecalote is very good, step by step described. Absolutely no problem now since you preprared P9-EVA-HWOTA7-v1.2 with all neccessery firmwares.

Thanks for advise for other available roms.

Ok I read. For P9 is TWRP recepe for trouble. Otherwise I like it and is generally simple to instal OS and gapps on any phone.

https://xdaforums.com/t/rom-treble-microg-lineageos-16-0-for-huawei-p9.4078383/page-28#post-86919719

@zgfg thanks anyway. Searching instruction will help anytime!

Till P9 eva I always instaled custum rom and gapps via TWRP. You just add zips one after another.

How is in case with fastboot?

fastboot flash system <name of the rom img file>.img

how then with gapps if they aren't included? (and better if they aren't because apps stay in english langue. I alwys instal pico edition of opengapps and then manualy download only needed apps in my language)
[Huawei P9 Guides, News, & Discussion] zgfg:
More about decryption and then a possibility to use TWRP to read Data partition and Internal memory

Nowadays, when I know more about (Huawei was one of the first who started to encrypt Data back with Oreo and official TWRP did not support yet - later, Google enforced encryption with A9 and as mandatory with A10 and that caused delays for TWRP to support A10, A11 and now still the official TWRP does not support yet A12, mainly because of the new Data encryption schemes)

Filesystems are described in /vendor/etc/fstab.* file (extension in the name will differ but it is standard Linux conf, textual file)

There must be a line like (I think on P9, Oreo it was more simple with less options) - copying line from my Xiaomi, Android 11 - scroll to the right, line is long:

dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,inlinecrypt,reserve_root=32768,resgid=1065,fsync_mode=nobarrier latemount,wait,check,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+emmc_optimized+wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption,metadata_encryption=aes-256-xts:wrappedkey_v0,quota,reservedsize=128M,sysfs_path=/sys/devices/platform/soc/1d84000.ufshc,checkpoint=fs

Since on P9 /vendor partition was not read-only, that text-file was writable,

"fileencryption=" option (filesystem options are separated by commas) must be removed, saved (better make a backup copy that it could be restored from TWRP, just in case)

That step was actually what those special Chinese versions of TWRP were needed for, having there the option to "Remove data encryption" or so (what was actually editing the fstab file)

Then, the 'usual' TWRP must have the standard option to Format Data (since no encryption will be found in fstab, it should work) and after reboot to the System and (re)setting the Android (Data was wiped), 'usual' TWRP for P9 Oreo should have no problems thereafter to read/write to not-encrypted /data and Internal memory
[Huawei P9 Guides, News, & Discussion] jotakinhan:
Hi, i think i have followed the instructions, eveything went well with rebranding and chinese nougat worked, but chinese oreo won't boot properly, shows EMUI logo but before continuing into setup black screen and reboot. Any ideas? Thanks. EVAL09
[Huawei P9 Guides, News, & Discussion] Tecalote:
Which firmware did you use? Is the Bootloader open or closed?

Did you boot on Chinese Nougat into system before updating to Oreo?
[Huawei P9 Guides, News, & Discussion] jotakinhan:
Hi, i checked i had latest nougat for l09 before beginning, and got BL unlock code with PotatoNV program. Unlocked with hwota script and i think it worked, i am able to flash TWRP with hwota. Yes, booted into chinese nougat, disabled trustspace and hdb. everything went like in instructions until booting chinese oreo which briefly gets to the EMUI logo screen but then either freezes or immediate black screen and reboot.
[Huawei P9 Guides, News, & Discussion] Tecalote:
@jotakinhan I meant /ask for:

Which version of Oreo Firmware did you use for update to Oreo?

It seems that flashing this Firmware wasn't successful. Perhaps some files are not correctly copied to data during the process.

And I like to know, if the Bootloader is currently open or closed after flashing Oreo Firmware?
[Huawei P9 Guides, News, & Discussion] jotakinhan:
The firmware i started from was EVA-L09C432B506
[Huawei P9 Guides, News, & Discussion] Tecalote:
@jotakinhan

I didn't ask for the European Firmware you had started.

I want to know, which Firmware Version did you use for the Update from Chinese Nougat (EVA-AL10C00B399x) - to Oreo?

Which Chinese Oreo Version?

And: Is the Bootloader at the moment closed or open? (Actually, Currently)
[Huawei P9 Guides, News, & Discussion] jotakinhan:
Thanks, so i used what was included in hwota download which i now realise is AL10C00B552 (whereas the instruction talking about B540) so should i first flash B540? Bootloader seems to be left open (i always chose 2 "dont lock BL" in hwota) and BL mode confirms its open.
[Huawei P9 Guides, News, & Discussion] Tecalote:
@jotakinhan B552 is okay.

But you must flash it again. Not with HWOTA7 Tool (because this doesn't work on Oreo)

In the HWOTA7 Firmware folder are all necessary Firmwares (but zipped, make sure to unzipping them one times before using).

And in the HWOTA7 Firmware folder is also the ExtSD-FirmwareUpdateScript.

(it's mostly used for downgrades to Nougat, but you can use it also for update or reflash Oreo Firmware)

Just create a folder on external SD card (not internal storage) called HWOTA and copy inside the ExtSD-FirmwareUpdateScript.zip and the B552 Firmware with the B552 Firmware Subfolders (which contains also Firmware Parts).

Then flash from HWOTA folder on external SD only the ExtSD-FirmwareUpdateScript.zip with TWRP for Oreo (not with the one for Nougat).

This should reflash B552 and after phone should boot.
[Huawei P9 Guides, News, & Discussion] jotakinhan:
Thanks. I tried that, didn't work. Then noticed in the instructions "extract with 7-zip and remove former nougat update files from update folder before extracting oreo" and that worked, i had been using winrar and not removing former files before extracting oreo. Now i have 2 P9's on Openkirin Pie (Lineage) installed after Oreo EMUI update, everything seems to be working, thanks for support, i'm going to donate these devices to someone who needs, wouldn't have been possible without your work.
[Huawei P9 Guides, News, & Discussion] kundifon:
Maybe tip for you @jotakinhan . I thought that my phone was bricked. Just by mistake then I reopened the bootloader again and how the hell phone booted then in Oreo. DLOAD method may always heal phone. See my post for details https://xdaforums.com/t/rebrand-update-tool-hwota7-p9-eva.3820849/page-110#post-87202875

If you use HWOTA7 Tool 1.2 together with instructions and provided firmwares from Tecalote I guarant you 100% success!

Just continue with dload/downgrade and start again from Nugat. For better feeling you may let eRecovery proceed (at Nugat) to achive original factory state od phone.
[Huawei P9 Guides, News, & Discussion] Nicknackpaddywack101:
Sorry to interrupt...

I have got hold of a Chinese eva-al10 but it seems stuck on Android 6 emui 4.1, apparently huawei shut the server for updating it.

Any solution to update it to Android 7 and then go on?

I have searched for a long time but the only models with the same issue are the European version, which I specifically avoided to get hold of Android 8.

So I have to do the reverse and make it an European model to update it to Android 7? Or what else should I do?
[Huawei P9 Guides, News, & Discussion] Tecalote:
No, don't change it to an European model, because also European models of P9 EVA can't receive updates from Android 6 to 7.

It's because Huawei changed the OTA Serveradresses and additional stopped the support for OTA Updates for such old devices on Android 6.

On Android 7 you can receive the Updates, if your SIM is inserted.

I know that, because some guys from Android Hilfe de sent me P9 devices to do the update for them.

The other thing is, you can't rebrand with this Tool here, because it is working only on Android 7.

You must find for your phone original EVA-AL10 full Firmwares (which can be installed with dload method) to update:

1) from Android 6 to Android 7

2) on Android 7 to b399SP1a

3) you should receive then OTA to Android 8.
[Huawei P9 Guides, News, & Discussion] Nicknackpaddywack101:
Thanks, but I already did it...

Android 7 seems to not update too though. I'm on b386.

Might have to manually get it going.

At least European version got more support from you guys.:D
[Huawei P9 Guides, News, & Discussion] Nicknackpaddywack101:
OK, I made an epic failure...

Branded back to al10, installed b399, as stated in my own post, updated to 8.0 from internal updater, unlocked and got to lineageos16 by Mse1969, but discovered it had no play store due to fakestore on MicroG...

Tried to root and delete and replace with real one, no success, tried flashing OpenGapps but even the smallest one was like 180 or so MB and was too big for system partition.

tried to follow these guides

https://iwf1.com/how-to-re-partitio...ll-options-included-change-size-fs-type-etc/2

https://android.stackexchange.com/q...onnected,ADB ... 8 The command ... More items

https://xdaforums.com/t/guide-syste...id-12-gapps-large-gsis-on-pixel-2-xl.4311129/

but they either were not specific enough or did not work after reboot into stock recovery (I have to flash TWRP every time to boot into it, then gets replaced by erecovery again)

Now I sort of soft bricked my (backup) phone and I am trying to flash emui 8 on it to see if it works...
[Huawei P9 Guides, News, & Discussion] Tecalote:
@Nicknackpaddywack101 Was flashing of EMUI 8 again successful?
[Huawei P9 Guides, News, & Discussion] Nicknackpaddywack101:
Unfortunately I deleted the roms to save disk space, so now I have to download the whole ROM again from MEGA. Taking forever. Sometimes 8 MBps but then only a few KBps. Mega works weird here in India...

I deleted the following partitions:

52 1174405120B 3254779903B 2080374784B ext4 system

53 3254779904B 3456106495B 201326592B ext4 cust

54 3456106496B 3489660927B 33554432B ext4 version

55 3489660928B 4127195135B 637534208B ext4 vendor

56 4127195136B 4328521727B 201326592B ext4 product

57 4328521728B 4332716031B 4194304B hisitest2

58 4332716032B 62537072639B 58204356608B userdata

And I shoulld have checked if I finished backing up them (no it did not even start due to confirmation dialog)

Ok, as you stated, this tool does not work for Android 8, so I turned back to flashing Android 7 through the twrp image linked in my guide updating from MM to Nougat. After factory reset I somehow ended up in testkeys mode instead but that did not affect me from using HWOTA7 and doing all this again.
[Huawei P9 Guides, News, & Discussion] fresison:
new update anyone?
[Huawei P9 Guides, News, & Discussion] Nicknackpaddywack101:
Spoiler content hidden.

Yes. I got it too. It is not really an "update". Just some icons in default launcher which directs you to download apps (similar to what Microsoft did with Windows 10)
[Huawei P9 Guides, News, & Discussion] fresison:
I dont know if the latest networkpatch will work. I haven't try yet
[Huawei P9 Guides, News, & Discussion] PabloSevilla:
Hi all - first of all, thank you so much for all this information @Tecalote

I followed post #1 and #2 carefully with my EVA-L19 and all was going well until the end.

After step 26) all was good, I was in the system and had 4G connection, chinese apps gone, and so on - was very happy

In 27) I couldnt install Gboard-Keyboard because I could not switch on the permissions (I dont know why the phone wouldn't allow me). So I installed SwiftKey instead and it works well. Then, I could not install Playstore, old or new, I could launch it from the OTG (external USB thumb drive), but it will quit by itself while launching the installation. I tried with different USB thumb drive and I downloaded it several times, in case the file was corrupt, but nothing fixed it.

So I continue without installing Playstore, thinkging that I might have another chance later on

In 28) I didn't install the "Enable-Hwota.zip" because I wasn't sure what "flashing" meant in the instructions (from fastboot? from OTG? from TWRP?) But I thought that was ok, I thought I didn't need it. What I needed to install was Recovery EMUI recovery because that's a prerequisite for installing [ROM][Treble][microG]LineageOS 16.0 for HUAWEI P9 (my end goal).

After installing Recovery EMUI recovery (EVA-b540-EMUI-RECOVERY_RAMDIS.img), the phone would not do anything, so I just unplug the USB and press power to start it, but now the phone would get stuck in the booting initial page (After Huawei logo) and wouldn't actually start the system.

So now, I cannot:

- Turn off the phone (if I try, it just starts again and get stuck in the booting page)

- Reboot with Vol- or Vol+ -> when I try the phone just go to the booting page and get stuck again, it doesn't start fastboot or the recovery tool.

I thought the phone was lost at this point. But then, I connected it to the PC with the USB cable and when I press Vol- & Power, it restarts into fastboot. And if I try Vol+ & Power it restarts into Huawei eRecovery.

I tried to recover with the Huawei eRecovery, it connect to the wifi without issues, but then it says "Getting package info failed". Another observation, when I restart in fastboot (connected to the PC), HiSuite opens and it allows me to use recovery mode (I didnt try to recover it yet with HiSuite). I thought to ask you guys what should I do before attempting anything else on my own.
[Huawei P9 Guides, News, & Discussion] Tecalote:
@PabloSevilla I will answer detailed during this day how you can restore the phone and what faults did you make.

In Principle you just need the correct recovery_ramdisk.img for the firmware you're already having and you can flash it over fastboot. Then phone should start again.

Which firmware was the last you did install?

There's a Tool called "Huawei Extractor" on xda.

You can extract Recovery_Ramdisk.img from the UPDATE.APP.

Make sure to uncheck in settings of Huawei Extractor any "checksum" to be able to extract the img file.
[Huawei P9 Guides, News, & Discussion] PabloSevilla:
Thank you - very much appreciated

The last firmware would be: "EVA-AL10C00B552-Android-8", which is included in the HWOTA7 v1.2 package (step 18). After that I flash the other things following your post #2 (P9-EVA-8.0.0-TWRP-v4.img, Network patch, Stock EMUI Recovery,...) but those are not firmwares I believe.
[Huawei P9 Guides, News, & Discussion] Tecalote:
This is because you installed the Recovery_Ramdisk.img for the older Firmware B540.

But you are already on B552 Firmware, that's why you have to flash Recovery_Ramdisk.img for B552 Firmware.

So, what you must do is following:

1) Unzip update.zip from B552 Firmware - you get UPDATE.APP

2) Download Huawei Extractor 0.9.9.5 from this Thread:

https://xdaforums.com/t/tool-huawei-update-extractor-updated-v0-9-9-5-open-source-library.2433454/

3) Unzip that file and start Huawei Extractor (run it as administrator) (Note: Net Framework in Windows must be enabled)

In settings tab of Huawei Extractor disable "checksum" setting (2 times)

4) Insert UPDATE.APP from B552 Firmware

5) Extract only RECOVERY_RAMDIS.img

6) Start phone into Fastboot mode and flash Recovery_Ramdisk.img

fastboot flash recovery_ramdisk
RECOVERY_RAMDIS.img

7) Phone should be able to start again.

8) Install your Treble Lineage OS
[Huawei P9 Guides, News, & Discussion] PabloSevilla:
Thank you for the instructions.

In step 1) the last firmware I installed was "EVA-AL10C00B552-Android-8", should I use that update.zip or do I need to find the one for B555 as you mention?

An additional question: Do I need to install Playstore before installing the Treble Lineage OS? Or can I just ignore installing it?
[Huawei P9 Guides, News, & Discussion] Tecalote:
Sorry, I made a typo (corrected) . Yes, of course, you must use B552 Firmware to extract Recovery_Ramdis.img

Recovery must always match the Firmware.

Not in your case when phone doesn't boot, but in case everything is working:

If TWRP is installed you can easily switch from TWRP to original Recovery by flashing this zip file with TWRP:

https://www.androidfilehost.com/?fid=1395089523397921866

Playstore Installation you can ignore, because you install the Treble Rom and don't need it.

This Rom is based on MicroG and instead of Playstore use AuroraStore is using in [ROM][Treble][microG]LineageOS 16.0 for HUAWEI P9
[Huawei P9 Guides, News, & Discussion] PabloSevilla:
Great! I can confirm that I was able to start the phone :) and install LineageOS 16.0 (P9 works so fast with it, its amazing!)

The only thing that was different than anticipated was the optoins in the eRecovery that I got (attached). Different to the one in the instructions of link.

Nevertheless, I just play with it and at some point, the recovery told me that the system had a fatal crashed and had to do a recovery. Then lineage started well and it all went well after that.

Thank you so much for your patience and dedication! You guys are heros!
[Huawei P9 Guides, News, & Discussion] fasteel:
I find this post is extremely helpful. Following the procedures in post #2 and after a number of tries, I have completed the processes till 19). Now I can boot my P9 EVA-L09C636B396 into AL10C00B552. However, I still need to go through procedure 20) to 29). I noticed that in 20) the process tries to use the network patch file for EVA-L09_B540. As my phone is EVA-L09C636B396, I want to know if the network patch file for EVA-L09_B540 works for my phone. If not. what files I should use and where I can find the files.

Thanks very much.
[Huawei P9 Guides, News, & Discussion] zgfg:
It doesn't matter if your phone was c636, it matters that you are now at AL10C00B552

Check through the previous posts, AFAIK ppl reported that NW patch works also for 552, not only 540
[Huawei P9 Guides, News, & Discussion] fasteel:
Thanks for your reply. I just come across this forum recently as I have an old Huawei P9. I originally thought that a specific model should have a specific NW patch for it. I should have checked the previous posts. However, it appears to be a challenging task considering that there are 111 posts already.

Anyway it is good to hear that the NW patch works for 552. I will give it a go and report whether it works for me or not.
[Huawei P9 Guides, News, & Discussion] fasteel:
I finally finish the remaining process from 20) to 28) except 29). It is awesome the rebranded phone is working and there is no problem for me to make calls. It is really amazing that even I don't know the terms in the instructions and what the instructions mean, I finally reach the near end by purely following the instructions. I have the following two questions:

1) Is it necessary for me to undertake 29) procedure? Note that my phone is working now.

2) I noticed that every time I turn on the phone there is a warning saying "Your device has been unlocked and can't be trusted." along with other instructions. Is it normal or I did something wrong? Is it possible to get rid of it?

I really appreciate if any expert here can answer me. Thanks.
[Huawei P9 Guides, News, & Discussion] Nicknackpaddywack101:
The warning is due to unlocked bootloader, but I advise you not to relock it as it could brick your phone
[Huawei P9 Guides, News, & Discussion] fasteel:
Thanks for your reply. It appears that I better just keep the phone as it is for the time being. The important thing is that it is a working phone now with the latest system. In terms of the issue you mention in your other post regarding the calling issue, I don't have. I don't know what Lineageos is. I guess it is another system? But I didn't have it on my phone. The more things you change to the phone, the more issues likely to happen. Just my thought.