yashsingh1/xdaforums huggingface dataset:
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
GAPPS - Some remarks​

As already explained:

I won't provide a Gapps build

, as I am not keen on resetting my device and doing thorough testing and supporting and having to potentially doing that over and over to support issues with that. My mind hasn't changed in that regards, but I would like to give you some further hints on how you could achieve running Gapps on my build - as said: not recommended by me, won't be supported by me in case of issues and I don't even know whether it'll really work at the end. Having read however, what some of you described, I think the below may be helpful:

Size​

The /system partition itself is large enough to carry Gapps (Openkirin has provided Gapps builds).

The issue is, when you flash a ZIP, there must be temporarily enough space for the zip itself and the unpacked contents of the zip, and that seems to be an issue and the reason why flashing failed.

Root file explorer​

If you are keen on working with a root file explorer, you should do the following. Best is to do it from TWRP recovery (see my previous warnings) and not from running system. If you do from running system, make sure do deactivate the microG, GSF Proxy and Fakestore app first and reboot afterwards.

Files to delete​

Delete the below files, and remove also the directories, which remain empty after file deletion:

/system/apps/AuroraStore/AuroraStore.apk
/system/apps/GSFProxy/GSFProxy.apk
/system/apps/IchnaeaNlpBackend/IchnaeaNlpBackend.apk
/system/apps/NominatimNlpBackend/NominatimNlpBackend.apk
/system/etc/permissions/privapp-permissions-com.android.vending.xml
/system/etc/permissions/privapp-permissions-com.google.android.gms.xml
/system/priv-app/FakeStore/FakeStore.apk
/system/priv-app/GmsCore/GmsCore.apk

Files to copy/install​

Extract an arm64 Pie MindTheGapps zip with its folder structure into a local PC directory.

Install only the following files (different from the Opengapps Pico flavor,

that

is the real bare minimum you need (you could even further omit the SyncAdapters and BackupTransport, if you don't want to synchronize anything with Google. Of course, if you

really

want, feel free to copy everything):

/system/app/GoogleCalendarSyncAdapter/GoogleCalendarSyncAdapter.apk
/system/app/GoogleContactsSyncAdapter/GoogleContactsSyncAdapter.apk
/system/etc/default-permissions/default-permissions.xml
/system/etc/permissions/com.google.android.maps.xml
/system/etc/permissions/privapp-permissions-google.xml
/system/etc/sysconfig/google-hiddenapi-package-whitelist.xml
/system/etc/sysconfig/google.xml
/system/etc/sysconfig/google_build.xml
/system/framework/com.google.android.maps.jar
/system/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk
/system/priv-app/GooglePartnerSetup/GooglePartnerSetup.apk
/system/priv-app/GoogleServicesFramework/GoogleServicesFramework.apk
/system/priv-app/Phonesky/Phonesky.apk
/system/priv-app/PrebuildGmsCore/PrebuiltGmsCore.apk

Make sure to set ownership and permissions exactly as the other files already present.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] lo_ol:
Another option is to setup magisk and bitgapps module for systemless install.

Make sure keep avb2 verity is checked on magisk install to avoid nasty bugs

Disable potentially conflicting apps from settings as advised above

That way you don’t have to worry about free space in /system, which is down to around 30mb on recent builds, and you can just fastboot flash an update and you’re basically ready to go right away
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
Since my p9 (al10 rebranded to l09 for Android 7 then branded back for 8) was a backup device, I did not test calling.

...But now my Xiaomi12s abruptly broke down while charging

Spoiler content hidden.

Anyways somehow Lineageos telephony is broken... I have the dialog when calling or recieving calls, but no sound would come from the other end. When recieving calls the ringtone still sounds after the answer button is clicked. Either way, no sound from or to other end. I can rule out hardware issues, so either something went wrong when updating and rebranding from MM to Oreo ( rebranded since I cannot find a Chinese al10 update pack) and also I did not test telephony functions after updating, or it has to do with more complex issues...

I should have got the european version initially but back in 2016 I got the Chinese version since it was available first.

Anyone have similar issues when calling? I do not really expect people with the same issue since most here have already given up their Huawei (thanks a lot for refusing to unlock the bootloader, now enjoy the sanctions) or have a rebranded one.

Spoiler content hidden.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] lo_ol:
From time to time there were always few Chinese users showing up stating calls don’t work on original Chinese models running any treble build. https://xdaforums.com/t/rom-treble-microg-lineageos-16-0-for-huawei-p9.4078383/page-25#post-86337721 several other examples in rebrand or openkirin threads. No one ever followed up or provided logs

Maybe calls via volte can work https://xdaforums.com/t/hwims-volte-for-hi6250.3911374/ (requires lucky patcher - toolbox – android patch – uncheck dalvik only - check disable packet manager signature check to allow app install on this build and reversal after installation since this breaks some features)

But if its an audio routing issue that might not work either
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] golvelliuscs:
Hi ..

I have installed latest version : Custom build release 2023-01-01 .

I have noticed if adb debug is enabled .. the cpu its working 100% .. Ithe phone becames hot and battery ends very quickly. .. even if you're not connected to the phone.

Also in adb shell with top app you see that 96% of cpu is being use by adbd ...

For normal working use i disabled ADB .Debug..

Is this normal? Because in the other build i think this is not happening..
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
I think this is "normal" by means of having to accept/tolerate it, as I do not see any way to improve (of course it's not good - but as adb should only be active temporarily, this shouldn't be an issue for daily use). This has, if I remember right, already been discussed in this thread back in 2020.

(In theory, the "Treble" concept supports GSIs out of the box, but in practice, a lot of tweaks are necessary...)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
Well I am not a Chinese user, but I do have the Chinese al10 version of the phone...

I got it simply as a backup, but long story short since the device had to have its bootloader unlocked to get to Android 8 I thought I might as well get a GSI running.

I can try to reproduce the issue and get some logs if anyone is interested in a fix.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] kundifon:
I did systematic tryouts and I tried one more. So last attempt was steps following:

1. I did factory reset with emui recovery

2. Then I boot into the fastboot (vol down + plug usb cable). Flashed the latest (january) build of this rom. I flashed twrp in same session.

3. Next I booted in to recovery (power + vol up). So I was in TWRP recovery, perform the steps to clean up microG files.

4. From TWRP I instaled nikGapps core version via Instal -> select zips. (as many times bevor on others phones). Clean dalvik cache at end.

I assume this have to lead to same result as manualy copy files as MSe1969 suggest. For me is installer much convinient and faster way as manualy. As I figured out Instal packages up to aprox. 100 mb are small enough, otherwise you are temporarily out of space due unpacking and manually copy could be the only way.

5. Followed another boot to fastboot (volume down + plug usb cable). I flashed stock emui recovery back to phone.

6. Next I boot to stock emui recovery (power + vol up). I did all steps for factory reset. Chosed the option "wipe data/factory reset" and then "wipe cache partition".

7. Finaly boot to the system for first time.

This was another fail attempt. Play store icon was present but didn't work. It repets notification that play store cannot work without play services. Add a google account in the settings/Accounts was not possible, there wasn't on the list.

Gapps should be installed immediately after installing LineageOS. Thats well known. https://wiki.lineageos.org/gapps

If someone manage to get working "genue" gapps, please report.

Manually copy files would be tricky for me. Set ownership and permissions is beyond my knowledge. I assume that's nothing wrong to instal with installer. It's only easiest way are my guesses.

Or is this rom just not suitable for gapps in the current state. May I kindly ask member with really deep related knowlage to read this my post. @Tecalote , @zgfg thanks!

I have three P9-eva phones in family...

How ever, many thanks to @MSe1969 to providing this rom (in current stage) to make old phone usable again. Yes, you provided great support even though you are not interested in gapps.

Some related things I figured out.

If you flash twrp recovery on working rom and then format that you remove encrption. This leads you in ugly boot loop. You get working rom back, but you have to flash stock emui recovery back. Then do factory reset. You can boot to system, phone encrypts again.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Would it be possible to produce a log ? (adb logcat)

I simply meant "genuine" Gapps being the 'real' Gapps (of any kind, opengapps, mindthegapps, nickgapps, ...)

Correct - I gave the manual instructions, because it was said that flashing didn't work due to space issues.

Could very well be - I have always indicated that possibility.

However, a log (see above) would definitely help to see the root cause of the issue. Based on that, there is either a solution or the final confirmation that it won't work.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] golvelliuscs:
Hi ..

I was able to install Play Store manually following the explanation post ..

But you need to understand that after you have installed google services, you have another problem, your phone it's rooted and some apps like , Whatsapp, Edge Broser .. and others .. can not be installed, because system is rooted ... So you need to install other app like Magisk to hide rooted phone, but to rme it's impossible to hide all .. so at the end i prefer to use the MicroG distro as normal, and install the apps from Auroa App ...

If you need you can install manually, Google contacts/calendar Sync ... ( easy process) but you need to connect phone to computer, install drivers, etc ( and copy 2 folfers in /system/app) .. i do not know if is possible to make it with twrp ..

Now my contacts are synchronized from my account without problems .. Whatsapp, Edge etc .. are installed from Aurora and working perfectly .. Now i am happy with my Huawei P9 ... ;).

That's why I think it's best to keep the distribution as it is without installing Google services.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] kundifon:
Thank you for this feedback. You save a lot of time to me and others too.

Regarding syncadapters I alredy manage to solve this. Calender sync works out of the box on microG, for contactsyc you have to instal it. Instructions are on this thread https://xdaforums.com/t/rom-treble-microg-lineageos-16-0-for-huawei-p9.4078383/page-30#post-87443885

Do you maybe have an Idea, how to keep working GoogleContactsSyncAdapter.apk without factory resset ??

Some remarks and observations are here https://xdaforums.com/t/rom-treble-microg-lineageos-16-0-for-huawei-p9.4078383/page-32#post-87954803
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Just for understanding: What drives the necessity for the factory reset?

The fact that you want to temporarily flash TWRP? Or any other reason?

Because if we only talk about the Calendar and Contact sync apk files to be

added

, this could also be achieved by the following command sequence, when you have booted up LineageOS (assuming you have enabled adb and root in dev. options and phone is connected to your PC and the two apk files are in the directory on your PC, from which you initiate the adb connection and 'adb devices' returns that your device is connected):

adb root
adb remount
adb shell mkdir -p /system/app/GoogleCalendarSyncAdapter/
adb shell mkdir -p /system/app/GoogleContactsSyncAdapter/
adb push GoogleCalendarSyncAdapter.apk /system/app/GoogleCalendarSyncAdapter/
adb push GoogleContactsSyncAdapter.apk /system/app/GoogleContactsSyncAdapter/
adb reboot

I haven't tried myself due to obvious reasons, but the above would avoid the necessity to temporarily flash TWRP.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] lo_ol:
Yeah bitgapps is fully working folks:giggle::cool:
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
Yay! Please provide an update on the battery life after installation of Gapps, They tend to deplete my battery fast (although accubattery says mine only has 33% capacity, thats why i'm shipping mine back to China for official battery replacement which only costs 99CNY)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] kundifon:
The answer have to split in two parts:

I enabled root access in developer options and then I copied GoogleContactsSyncAdapter.apk to the place with some file explorer (I used Total commander). It's clear that at lest reboot is needed. But the adapter newer works. As I said already, only after factory reset GoogleContactsSyncAdapter starts working.

This is not good, mens a lot of work - set everything up again and install apps, if I have to factory reset every time I flashed new build of this rom.

I temporarly flashed twrp for purpose to instal gapps. I this is the way i know.

Maybe some hint, how did you instal them?

Did you folow MSe1969 instructions, what to delete to clean up microG? Do you delete some more?

How did you install gapps? Maybe with twrp or any other way and how?

I'm really confused, why I fail. (I did instalation in twrp, afterall should work)

I want to know what are yours experience after instaling bitgapps? Few post above @golvelliuscs reported that pre-rooted phone caoses new problems. Many usual applications can't be installed, because system is rooted.

(Till now I never rooted phone, so this is new for me [also cat and mouse game, how to successfully hide root] ).

I need such phone that my mum and dad will be capable to use it. And have to be reliable daly driver!
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] lo_ol:
Yep i use twrp, make sure to get arm64 package for pie

https://github.com/BiTGApps/BiTGApps-Release/releases/download/v1.8/BiTGApps-arm64-9.0.0-v1.8_signed.zip

This package requires around 155mb free space in /system

30mb are left free on current January build

Remove GsfProxy, FakeStore, GmsCore

That makes it to 100mb free space

So additionally a bunch of non-essential or replaceable apps need to go in order to free up sufficient space for example netmonitor 18mb, gallery2 15mb, inbuilt email client 7mb, eleven music player 10mb, Aurora Store and Services 6+3mb… = 59mb

I flashed it many times, have never seen it fail unless it runs out of available space

Playstore behaves normally. Whenever safetynet fails some apps that rely on these checks get hidden. Most widely used is probably netflix app. Thats what happens on any device that has its bootloader unlocked however. Magisk can help out for time being. Whatsapp, egde and the likes don't use root checks and can be installed regardless

I can't really tell what the direct impact on the battery is. Screenshots actually indicate gapps were installed back in September 2021, certainly have it running for quite some time already
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
Hi, please forgive me since I have a "real" AL10...

I wanted to know if this model has NFC because the NFC function in quick settings would not work.

Anyone else have such issues?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] seitentaisei:
I would like to try this. I haven't used my P9 for 3 years now and this seems like a good update (from Nougat to Pie). I checked my phone and it seems like I am using a custom ROM. Anyone here who has a link for a stock ROM? I am using EVA-L19. However for the life of me I don't know how to check what variant it is e.g. BXXX or CXXX.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
In the OP, there are links to Stock ROM files, maybe you find sth. suitable?

The linked thread for the rebranding can also be helpful to allow flashing certain stock files.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
Try using HWOTA7 by Tecalote.

gives very detailed instructions and all the firmware you need.

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

Or you can check out my guide on upgrading from Android 6 to 7 if you're familiar with flashing in TWRP.(I think it is also faster)

This file doubles as unbrick firmware.

Downloads for : Huawei P9 | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.

Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.

androidfilehost.com

Then you can go into HWOTA7 if you want to further upgrade to oreo or if your firmware has issues...
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] seitentaisei:
@MSe1969 @Nicknackpaddywack101 Thank you guys! I will take a look at those!
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] AltairFR:
Hi

You can use HWGSIpartitionKit to resize huawei system partition

This kit work on all huawei emui 8,9 and harmonyos 2.0 (android 9)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
Thanks for your suggestion! Where can I download this tool?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] AltairFR:
https://xdaforums.com/posts/88053461
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
Hi. A very basic question about stock sms/mms app.

Since Signal announced it will stopp sms support I went back (added) to the stock sms/mms app for this purpose. Now its like a very basic app. Its working, but no settings for design or colours.

Is there any other minimalistic and trustfull app which provides some more settings?

Thanks on advance.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] kundifon:
I mentioned Simple mobile tools. They are open source and available on playstore and fdroid.

Simple Mobile Tools

A group of simple, open source Android apps without ads and unnecessary permissions, with customizable colors.

www.simplemobiletools.com

Or do your own calculation, how much free space you need. As I said, it's not neccessary to delete all those things. Simply preserve stock sms/mms app.

(I instaled NikGapps. Tryed also with BitGapps but did't work for me, don't know why.) https://xdaforums.com/t/rom-treble-microg-lineageos-16-0-for-huawei-p9.4078383/page-33#post-88045927
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] lo_ol:
Do you use magisk? That can mess things up on initial setup
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
As said in the directions, flash the gsi and use stock recovery.

It may also be due to your phone.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
New build with back-ported February '23 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_20230219_system.img.zip/download

Custom build release 2023-02-01

microG on 0.2.27.223616-3

Spoof apps installed by G*PlayStore *)

*) Apps installed by Aurora are now spoofed as "installed by Google PlayStore". This should fix such issues, where certain apps complain or refuse to run, when installed via Aurora - the internal string they expect is "com.android.vending", which translates in this build to the FakeStore app, so don't be worried, if the app info tells you "installed by FakeStore"

Happy flashing!

Regards, M.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
Hi there.

It happenes every few weeks that all my stored contacts are gone but only some of the last new ones are left.

I do backups so I can restore it but its still somehow anoying.

Contacts are all stored on internal memory. Any idear?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] kundifon:
I'm facing with very slow battery charging, thats means for about 8 hours from empty to full. I think it's way too long. Recently weared battery was replaced with brand new. It's the same with second phone on this rom.

In the Settings / Phh Treble Settings / Huawei features / Huawei fast charge I choose fast. No differences has noticed!

The third P9-eva is still on stock rom, charging goes fast. How to achieve the same on this custom rom?

Secont thing is about camera. how to convince the stock camera app to save images to the external SD card? There is an option but it doesn't aplly. Otherwise external SD works well in other apps (file managerS and tested also open camera)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
What charger are you using?

Fast charge only supports Huawei chargers, and newer chargers seems to not recognise it as fast charge compatible.

Mine is from a 2019 Huawei p30.

Also it may be your battery if you are not using an official Huawei Battery.

Technical support for the P9 is still available in China. The official cost for changing a battery (including shipping in mainand China) is 99 CNY.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] kundifon:
Yes it was a charger fault. Thank you for hint.

I can just say that takes on my Samsung S8 about 4 hours, P9-eva needs 8 hours on the same mentioned charger.

On Huawei original charger which come along the phone, no problems at all. Charging goes fast, really fast!
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
New build with back-ported March '23 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_20230322_system.img.zip/download

Custom build release 2023-03-01

Bromite Webview replaced by Mulch Webview 111.0.5563.58

*) Bromite hasn't received updates since end of last year. It is meanwhile 3 major versions behind Chromium upstream, so this becomes a security issue! So I have decided to bundle the Mulch Webview from the DivestOS project with my build, as it comes very close to my original motivation to bundle Bromite - it is mainly a Chromium webview with many patches applied from the GrapheneOS project.

Happy flashing!

Regards, M.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
Great! It also solved my issue with Autodesk fusion app which did not work with Bromite : )
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] AltairFR:
Good morning,

I tested your rom on my pra-lx1. It works, the phone starts without problem. I noticed two problems:

- It seems that the AGPS part is missing, so the phone is quite slow to fix its position.

- Safetynet does not pass, bootloader is not locked (perhaps missing entry in phh scrupt)

To correct these problems you can find information in the repo of LeaOS (AGPS and Safetynet)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] brookie229:
Would be great if Graphene OS releases it's Vanadium browser to other platforms and if that could be incorporated. They plan to do so but nothing yet.