yashsingh1/xdaforums huggingface dataset:
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Then the pre-requisites are met (as you later also state, that you have the EMUI recovery).

As recommended by me, you can just get into fastboot mode, flash my ROM (the system.img), reboot into recovery (DON'T boot the ROM, yet) and perform factory reset and cache wipe - exactly as explained in the OP.

The HUAWEI phones have some specific "branding" settings in the boot loader to allow country-specific software. HUAWEI has, at that time, decided to only offer Android 8 updates for China - maybe due to the fact, that in China obviously, certain "Google handcuffs" do not apply...

The "rebranding" into a Chinese model was a pre-requisite to obtain the Android 8 / EMUI 8 stock ROM.

If you don't remember having done anything else, let's assume all will be fine.

In between the procedure, TWRP was needed for special flashing activities, but at the end, there was a step to flash the original recovery again, to get proper device encryption. All fine, I'd say.

Yes - in any case worth a try. If you are happy, leave it like that. If something goes wrong, you can still go ahead with option #2.

The "very old firmware" topic has to be understood as follows:

When HUAWEI provided Android 8 updates for the Chinese market, they also provided frequent updates within Android 8. Even in 2020 (unexpectedly), a last update was provided. If you look at the software info, what number is shown? 552 would e.g. be the 2020 update, 540 is significantly older, but the linked thread is based on that firmware; if you have a value below 540, this is what I mean with "very old" - it should still work, but in that case, you may want to consider going for option #2 finally...

You're very welcome

No, don't ! The recovery must fit to the rest of the components. So if e.g. you are on the firmware version 540, only the specific recovery being part of that version will properly work.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] SideSkroll:
Hi, yes. I'm currently running the 540 firmware (EVA-AL10 8.0.0.540 (C00)

Would it be worth it to go through the trouble of going back to stock and updating it to the latest one? I read that it came with battery enhancements and all sorts of QOL improvements... Or that wouldnt matter as it wouldnt affect your roms performance?

Also, one more question, what about gapps? Can I flash open gapps? If so, how? Flashify or some other app like that?

Thanks again!

TL : DR: Does it make a difference if I leave it at 540 or would it we worth it to update?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
As explained already before: You could start in-between with the step, where you would flash the 552 firmware (instead of the 540 firmware).

I can't take the decision for you.

I suggested to you already to simply stay on 540 and see, how it goes. In the "Tips & tricks" section, there is a striked paragraph about a thread with the "Eco kernel" - I was using that kernel, when I was on 540 - may be worth a thought? (DON'T use that, if you are on a different FW than 540)

I however understand, that you may want to avoid setting everything up, install many apps etc. and then come to the conclusion to wipe and upgrade and do all again..

There are a couple of questions you can ask yourself:

- Are there other thread participants also still on 540? What are their experiences?

- Is the P9 becoming your new main device, which you use on a day-to-day base for the mid-term future and where you need to 100% reply upon? (If the answer is yes, that would indicate an update)

- Or will the P9 be a secondary, "spare" device for you, maybe an interim solution for next couple of weeks? (Then just stay on 540)

TL;DR: Forget about Gapps!

Main reason is that the system partition size is exhausted - more than a year ago or so, the webview component doubled its size, which has forced me (see OP) to do some stupid exercises, and recently, I had to ship the February version of webview only and ask the users to update afterwards.

The Openkirin guys already provided Gapps builds in a special way with truly the bare minimum (even OpenGapps pico is still bloated with unnecessary stuff, which you do not need to flash, but you could manually install afterwards, if really needed)

If you're still interested in that: If I remember right, there were some attempts and discussions on that topic here in the thread...

Lastly, why do you think you absolutely need Gapps and cannot go with microG ? I may be able to give you some advice.

see above
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] SideSkroll:
Yes. I'll probably be using this phone for the next 6 months (at least). So I guess that means updating is in order? So there ARE improvements with the latest update even if Im definetely going to be daily driving your rom?

Ill need to search for the firmwares now I guess... Also the network patch, right? Flashing back to stock means CHINESE stock. With Their network etc...

Regarding Gapps I dont "need them" . Its just that Ive always flashed opengapps. But Its being a long (LONG) time since Ive played with flashing, custom roms etc... So Im most likely completely outdated...

So to summarize: Find firmware 552, flash it (somehow), I guess installing twrp afterwards to flash the network patch? Update OTA and... profit?

Thanks again. Youve helped me more than you can imagine. (Ive forgotten MORE THAN I THOUGHT about custom roms, flashing, rooting etc...)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
You'll find everything here: https://mega.nz/folder/4QdBwSIZ#qpsC0N9g-0Y8TGvqlHZffA

Please carefully read the OP and the linked thread, then realize, where you would need to step in (don't downgrade to Android 7!)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Kendrick_Katongo:
I need help please my Huawei p9 never connects to a PC always says USB not recognised in running on Android 7 using the African variant, I have tried all USB drivers even a different laptop. Anyone help please
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Do you use Android 7 Stock ROM or any Android 7 based custom ROM? I assume stock.

Normally, there should not be any issue with USB connectivity, so no good idea. You would need to allow USB connection on the device after connecting the cable, but that I assume is known.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Kendrick_Katongo:
I'm literally running Android 7 stock, my phone has never ever been modified before. It's so annoying man, like I can't update to Android 8 because of my variant and I Have tried all USB settings not sure why it brings me to USB connection not recognised, I even tried wiping the port still nothing man, any ideas I can try I really wanna update this phone
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Kendrick_Katongo:
Is there a telegram group, if yes maybe link me up please or anyone that can help me
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] SideSkroll:
Have you tried with a new cable? If not a different port on the PC. Last idea wpuld be a deffective charginf port on the phone. But I wouod start by getting a new cable (remember to get one for data+power. Most cheap cables are power only)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] SideSkroll:
I will. Im just waiting for my new battery to get here any day now.

Is it necessary to roll back to oem rom (540) before upgrading? (Through eRecovery for instance... Not sure if that even works these days) or should I just flash the 552 firmware in your mega share on top of what I have now? Also, I presume the network patch is compatible with the latest firmware?

Thanks.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
HUAWEI has shut down their update servers, at least for this device, so eRecovery won't work any longer, AFAIK.

I originally used a method to upgrade from 540 to 550 and then to 552,

which won't work anymore now:

I had extracted via the Huawei firmware extractor software the 540 system.img, flashed it via fastboot, wiped everything in recovery and simply had the stock ROM offer me the update, flashed afterwards TWRP, then network patch (yes, it is compatible, at least up to 552) and finally the new recovery (also extracted via firmware extractor from the new firmware).

The respective thread by @Tecalote is your friend now - I originally suggested to simply jump to step 14 of the original procedure with the newer firmware, but there is also a dedicated post about upgrading the firmware, if you are already on Oreo.

I have seen, that you are already in touch with Tecalote in his thread, so best is to follow his advice.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
No TG group from my end - only this thread.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Kendrick_Katongo:
Thanks brother
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
@rdy2fly and @lo_ol - I have created a test build with the linked patches.

From the patches provided by @AltairFR all except 0008, 0012 and 0017 were already present - I could port/apply 0008 and 0012, but 0017 was impossible to port (patches are from a higher Android release).

I could only install an outdated version of scrcpy on my laptop (not at home right now) and I did not want to install 50+ packages to install the complete build environment on my laptop to build the most recent version. Old version crashes with my test build - please do a test on your end. If it works, I will apply the two patches into my build, if not, let's forget about it.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
@SideSkroll :

The way I see it, you have the following options, based on also reading your conversation with @Tecalote :

1. Stay on 540 firmware

In that case, you would need to:

- flash my build via fastboot

- reboot immediately afterwards into EMUI Recovery (command 'fastboot reboot', followed by the hardware key combinations to enter recovery)

- Do a factory reset and wipe cache and reboot

2. Upgrade to 552 firmware

- Follow this post by replacing the files with my 552 firmware files

- Flash TWRP (again)

- Flash the network patch

- Flash EMUI recovery for 552

- Do some tests with 552 Stock

- Flash my ROM

Based on a comment by Tecalote, it seems that the network patch does not work any more for newer firmware...
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] AltairFR:
Do you have enable wifi cast in the property file ?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
That one is already part of my build.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
I assume you wanted to reply to my "cast" post?

What exactly do you mean, please?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] AltairFR:
The wifi display or miracast must be activated, but given the logs it must be activated otherwise there would be no logs
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] SideSkroll:
Hi, the erecovery route is a moot point (even if it did work) cause for some unknown reason, it just gives me a "data partition is SEVERELY corrupted" (literally SEVERELY) and it only gives me the option to format/wipe and shutdown phone.

Why that happens? Probabky because the current rom somehow messed the partition back when I installed it? Not aure, but at least the phone still "works".

Anyway, so I guess updating to 552 with the files in your mega share is my only option? Of course like you mentioned I could stay on 540. But I think later kernels have had a significant improvement in battery life and stability. Do you know anything about it? Cause otherwise it wouldnt be worth it....
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
eRecovery talks about "severely" corrupted by simply recognizing, that you obviously do not run Huawei stock. If your system partition truly was corrupted, you could not boot the Omni ROM at all.

As mentioned by me before, there is a thread about the "Eco kernel" (striked out) in my Tips & Tricks section. I did flash it on my device, when I was still on 540 fw. I felt a huge improvement; this kernel was maintained by an Openkirin member based on Huawei's official kernel sources. So I think worth a try for 540 firmware (only)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
I am still on 540(C00) and Kernel 4.4.23+ with your latest fw.

So this Link is the way to go? Simple flash kernel with fastboot, right?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Yes.

In case, something goes wrong, here is the original kernel:

lin16-microG - Browse /treble_p9eva/EMUI8.0_Stock at SourceForge.net

sourceforge.net
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
Great, it worked. Do you agree, latest working upstream applied: Version 4.4.206 is the one to go?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Seems like it - I haven't carefully read through that thread now, but if it worked properly for you, that's all, which counts
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
Aftet two days of use I can tell 4.4.206 does run fine. Great to stumbled over your comment about this option.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
New build with backported June '24 ASB patches available

Hi all,

a new build is available for download (update instructions, see OP):

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

Custom build release 2024-06-01

General information - please read carefully:

The /system partition of the P9 device is quite small with its ~1.8GB - due to mainly the meanwhile extraordinarily large size of the Webview component, I am faced with space restrictions in each build, which I can only overcome by either not any more shipping specific apps or, if that is not possible, by shipping older versions, which still fit, but you as a user must update them afterwards.

I have updated a comprehensive info in the OP, the main points are (again) listed below:

1. Mulch System Webview

The shipped version is from February '24 and hence outdated. Please configure the DivestOS F-Droid repository in F-Droid and always apply the offered updates accordingly, whenever available.

2. AuroraStore

Please download / install (and also update!) the AuroraStore always from here. (After initial setup, you should change the installation method to "AuroraServices", despite this being shown as "outdated") - the most recent version is 4.5.1, I recommend to update now.

3. microG updates

With its most recent release 0.3.2, also microG app size has significantly grown and caused this time a size exceeded issue during build. microG is shipped in version 0.3.0 and I recommend to update. Its main component is signed with the platform key of this build, so it can't be updated via F-Droid.

To keep microG current, please proceed as follows:

Check, download and install the latest GmsCore*.apk from here, if advised by me, when I publish my monthly ROM update (microG updates happen not so often, I will advise you accordingly - like this time)

Activate the microG F-Droid repository in F-Droid (if not done, yet)

Update the "microG Companion app" to the same version as the microG main component (you need to manually select the version, ignore the "recommended version")

Happy flashing!

Regards, M.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
2) .apk can not be installed from file browser. adb mode? If so, which directory does it need to be placed? can not find anything...

3) can you please point me how to manualy install microG please?

Thanks in advance.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Have you originally intalled Aurora from F-Droid or as apk Download? F-Droid main repository signs their apks with their own key, so if you originally installed from F-Droid, you must update from F-Doid or uninstall.

All described, download the GmsCore*.apk from sourceforge (see link in my post) and tap on the apk, which will update the GmsCore.apk core component.

Afterwards, if not yet done, configure the microG repository in F-Droid and update the Companion app (formerly known as FakeStore) to the 0.3.2... Version.

Alternatively, download the com.android.vending*.apk from here
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
Oh my...

3) updated!

2) I can not remember how I acutually installed Aurora Store. F-Droid offers me version 4.4.4 Also I can not deinstall aurora, no from F-Droid or from app-details. Any advice?

Thnaks again.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
What does it mean "can not deinstall" ? What is shown in app details? And what options are offered there?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
App-Detail:

Deinstall and Force-Close

If I deinstall arora store, it is still on my device but set back. I have to do all settings new. Thats with F-Droid the same.

Trying to install the new version app denies installation. Everything set okay for 3rd party apps.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Interesting...

what happens, if you try to deinstall from adb ? pm uninstall com.aurora.store
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
nothing : (

Edit: I think my adb client is not working right. Will check it.

Edit 2: I had adb disabeled on device. Now enabled, adb devices telling me the number but pm uninstall com.aurora.store is still same result as my screenshot is showing. Do I miss anything tool-like installed on my PC(not linux) ?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
No, all fine - you only need to decide on the syntax.

Either, you enter the adb shell with adb shell first, which brings you into the Linux shell within your phone. From here, you can start the pm command. When finished, you leave the shell with exit

Or, you temporary enter the Linux shell only to shoot a command and leave it after executing the command. This is done with a preceeding adb shell instruction, hence adb shell pm uninstall com.aurora.store
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
Ok. I see! This is the result.

E:\05_Android\fastboot>adb shell

HWEVA:/ # pm uninstall com.aurora.store

cmd: Failure calling service package: Broken pipe (32)

224|HWEVA:/ #

Does it make any problems that I have HiSuite installed on my PC? I neede it for some drivers...
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Hmmm... - now it becomes tricky, as I don't know, whether you have on top an issue with your adb setup (independently from your original issue), or whether this is still your original issue...

Will have to think about this and get back...
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
@P9_User : Could you please try the following:

Activate the built-in shell/terminal app (in developer options) or, if you have already a terminal app (e.g. Termux), use that

Allow root and become root in the terminal app

run pm uninstall com.aurora.store from there

if that fails - even if it reads weird - try calling the command su within your root shell first (to become root within root) and try again the above command
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
Got the Terminal running with root rights. After pm uninstall... it says acces denied. It is very hard to get a propper screenshot even not possible to c&p the text : (

View attachment 6115519

View attachment 6115520
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
You're not root in the screenshot, but a regular user only. Allow root and first enter the command 'su' (without quotes), you should see a # prompt.

And the app name is 'com.aurora.store' (not .shop)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
Ah okay. Got it done this time. Same is happening as when I deinstall via F_Droid or App-Details.

Screen light switch to bright after two seconds. Device freezes for another five seconds or so. Then I am landing in my lock-screen, network saying "no service" for a second and then everything is fine. But Aurora store still installed but set back to opening screen wizzard, where you do all settings the very first time.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
That is very weird!

OK, could you please open the terminal, become root, and enter the commands below and tell me the outcomes?

ls -la /system/app | grep aurora

pm list packages | grep aurora
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
ls -la /system/app | grep aurora

Ends with a promt:

1|:/ #

Then the second command gives me this lines:

package: com.aurora.store
package: com.aurora.services
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Thanks - and ls -la /system/priv-app | grep aurora ?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
xxx
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
1|:/ #

Thats all it says.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Sorry, my bad - Linux is case-sensitive, please repeat as follows (and yes, I omit the first letter "A" in Aurora on purpose):

ls -la /system/app | grep urora

ls -la /system/priv-app | grep urora
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
okay! it now says:

drwxr -xr -x 2 root root 4096 2024-06-17 18:07 AuroraServices
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
And the other one in /system/app still nothing, I assume - well that is, how it should be.

Okay, could it maybe be, that AuroraStore is set as "device admin" ? (Settings => Security / Location => Device admin) - if yes, unset and try uninstalling again.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
/system/app did not gave any output in the terminal. There is no device admin set on my device.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
OK, please do the following in the terminal app as root:

pm dump com.aurora.store > /storage/emulated/0/Download/aurora-dump.txt

Afterwards, you'll find a file called aurora-dump.txt in the Download folder of your "Internal Storage" of your device, please download and attach here (or paste its contents)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
dumpfile says: cmd: Failure calling service package: Failed transaction (2147483646)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Something is terribly wrong with your device - but I have no clue, what.

Let's try a very last thing:

connect your device via USB to your PC

Enable debugging and also enable data transfer (so you see the Internal Storage) as drive in your PC's file manager

make sure that adb devices shows your device

Go to the settings app into AuroraStore, so you see (but don't press yet) the 'uninstall' button

Now, on your PC, enter the command adb logcat > logcat.txt (it is normal and expected, that this command will look like "hanging" - it is busy writing a log)

On your device, uninstall Aurora again

Based on your description, there will be a crash probably also releasing the adb activity on your PC - if not, press [Ctrl]+[C] on your PC to stop the adb activity

Attach or paste the file logcat.txt here, which you will find in the directory, from where you launched the adb command on your PC

Please note:

The log file *may* (but does not necessarily has to) contain data, which you consider confidential and don't want to really make visible here in the forum (e.g. some of the installed apps on your phone could indicate a political or sexual preference for example) - so either "edit" the file before sending, and/or send me the file via PM.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
Will try later but cant promisse to have time. Talk later. Thanks for all your help mate!
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
Hi. Got adb working on my office pc now. Will work on it now.