yashsingh1/xdaforums huggingface dataset:
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Besides my technical answer in the previous post - Please let me know, if you are interested in some more information about how to solve the above topics while using my ROM with microG.

EDIT: Thought it may be interesting also for others, hence some further input

Contact sync

Google (GMail account) is by far not the only service offering you contact / calendar sync. My recommendation would be to use other services in conjunction with the DAVx5 app - see e.g. here: https://www.davx5.com/tested-with/ - there are also free mailers amongst the services.

If you absolutely want to store your contacts in GMail, the below links may provide helpful:

No GAPPS Setup Guide - Step 3: Contacts and Calendar Sync

<p>When it comes to setting up contacts and calendar sync on your No GApps device, there are a few different ways you can go about it. Here are the methods I have found. </p>

web.archive.org

Google

DAVx⁵ is not affiliated to, nor has it been authorized, sponsored or otherwise approved by Google LLC.

www.davx5.com

GMail notifications

You don't need the genuine GMail app to access your GMail account - you can configure your GMail account to allow IMAP and use then any E-Mail program, like e.g. the shipped LineageOS EMail app, K9 or FairEmail to name some. In general, I don't understand, why people even use GMail, as every e-mail is scanned by some shady AI for "suspicious activities". There are other freemailers around, which do not perform full scans of your mails - and if you are willing to pay as little as 1€ / 1$ per month, you get a truly private mail account with calendar/contact sync, cloud space and other nice features. (I in general do not recommend freemailers at all, but that is off-topic here)

Buying apps from Aurora

Extract from AuroraStore FAQ: "How do I purchase paid apps ? Purchase the apps from the PlayStore website, and login using your own account in Aurora Store to download them."

Genuine G*Apps

In general

,

microG aims at providing a compatibility layer to apps having built-in G* dependencies. The genuine Google apps are usually deeply integrated with the 'original' play services, so best is to use alternative apps. And for many (admittedly not all) use cases, the ordinary mobile browser does its job as well.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] kundifon:
I knew it, that won't be that easy. Wow, you are amazing! I appreciate your quick reliable support!

Sure I'm interested, becase this phone probably be at least the famly backup phone, and mother uses another P9 eva (stock rom).

If I compare google account (settings/accounts) on this microG rom to my other GApps phone, here is missing contacts and docs, spreedshets.

I will try with contact sync adapter. Calendar works fine already and gdrive seemt to sync properly.

About location service. I compared app Sygic side by side this and another phone. It cleary shows deviation of about ~60 m to accurete position on the map. May be this device related?

-- Edit --

For now GoogleContactsSyncAdapter is working. In the first attempt it didn't, don't know the reason. Then I do the factory reset (EMUI recovery) to achive working state. (Factory reset didn't remove /system/app/GoogleContactsSyncAdapter/GoogleContactsSyncAdapter.apk)

At the moment google maps is working and navigate, but complain that will stop working due outdated google play services.

Ok, I found very good alternative for my oppinion, Here WeGo navigation and would recomend it with this rom. But this app uses text-to-speech for voice guidance. Here we encounter a problem.

Together whith this custom rom come eSpeak preinstalled. Honestly, it's unusable TTS synthesizes speech mechanism. You cannot understand ENG, DEU language at all!! @MSe1969 I recommend you improvement, please replace eSpeak with RHVoice. So we get working ENG speech TTS synthesizer.

Location deviance still persist on my device an have influence by navigation. Any advice from somebody?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Next ROM release comes with updated (fake) play services version in microG - maybe it helps?

Thanks for the hint with RHVoice - I'll have a look at it soon.

For the time being, I also have another 'dirty trick', which works quite well, but you need to follow below instructions step-by-step:

- Launch Aurora Store and search "Speech Services by Google"

-

D

o not simply install it

, because we need an older version

- Manually download and install, via "choose version", the version 210354702

- Add the app afterwards to Aurora's block list to make sure, it does never get updated

- Activate it in Settings and download the speech files of your preferred language(s)

- Afterwards, block the network traffic for this app to force 100% offline mode
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
New build with backported October '22 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_20221011_system.img.zip/download

Custom build release 2022-10-01

Bromite Webview 105.0.5195.147

microG 0.2.24.223616-61

APN configurations updated

Happy flashing!

Regards, M.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] lzyshiki:
Great ROM,My P9 got a second life

But a tiny problem here, I swiched off root access in dev.settings, but some apps(like bank apps) still waring my device is rooted,how to hide or how to completly turn off root?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Well, the "root detection methods" of the apps vary, and "root" is not necessarily bound to the existence of the 'su' binary, but can also look for other kinds of "device tampering" (e.g. if the Google Safety API is used).

Banking apps are especially bad (if you ask me for my personal opinion, this seems mostly to make the work of security researchers more difficult, as finding loopholes isn't good for the public image - however, spending the efforts to secure the code rather than improving the root detection would be better invested...)

Depending on the specific bank app, there are usually three ways, how a bank app reacts on root detection:

a. A popup is shown at start to warn about root, you click "OK, proceed anyway" and you can fully use the app

b. The app is still usable in display-mode, but you cannot initiate any transfers/payments

c. The app refuses to launch and ends, once you confirm the "root" popup

So this determines the severity of your issue. Coming now to the technical side of your root detection issue:

You could try to flash Magisk (look for an older version, which still ships "Magisk hide"). You could also try the "unroot" / "securize" option in the "Phh Treble app" (I've never tried that, so be prepared to flash the system.img again...).

This ROM in particular, since it's a "treble" build, still uses the Huawei Stock Kernel, so the LineageOS patches to hide the 'su' binary, when root id disabled, aren't present. It further contains some specific hardening features, which for sure will trigger the "SafetyNet" API (in case your app makes use of it).

So if the above options don't help, the only remaining option, I am afraid, is considering e.g. to use the mobile browser to access your bank account or use an alternative 'generic' banking app (if possible), which could at least provide you display-access.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
New build with backported November '22 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_20221112_system.img.zip/download

https://sourceforge.net/projects/li..._a_lineage16_20221114_system.img.zip/download

Custom build release 2022-11-01

Bromite Webview 106.0.5249.163

microG 0.2.25.223616-10

F-Droid 1.15.3

Timezone data updated to 2022f

Happy flashing!

Regards, M.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Corrected Build

Hi all,

I had to push a new build, the download link has been adapted in the OP and the previous post.

In the build provided before, by accident, the "basic" F-Droid version, instead of the full version, had been shipped - this has lead to some issues. (When building F-Droid from source, two APKs are built and I accidentically took the wrong one) Sorry for the inconvenience.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] lzyshiki:
Hi,when i need fake gps to work on root mode, it is warning like "disable the selinux",It is possible to force disable it on this rom? thanks
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
As this is a treble build, your phone still uses the Huawei Stock kernel. If I remember right, the kernel does not allow to switch off SELinux. Nevertheless, you could try a root shell (e.g. via adb) and enter the command setenforce 0.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] lzyshiki:
setenforce doesnt work.

and yes,it is the kernel thing,sadly its beyond my knowlege to modify kernel
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
hi. for my new job I need oultlook calendar app on my P9. bevor I install, can you recommend any slim and safe app? preinstalled calendar does not offer to sync with oultlook, only google.

thnaks in advance.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Unfortunately, Microsoft isn't really keen on adhering to any standards, they usually try to force people to exclusively use their proprietary cr*p. Next to searching for info using the search engine of your choice, you could also try the exchange app: Create an e-mail connection with the shipped e-mail app of the type "Exchange". Once that is established, you have an Exchange account with sync options, maybe that will then allow to to calendar syncs too?

Edit: I mean the shipped Exchange APP, which is part of LineageOS...
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] brookie229:
Not sure if the opensource Etar app will sync - ??
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
Sorry to post here...

I read an earlier post about the firmware finder but it appears the page is down.

Where can I downloaded the firmware then?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Please look at the OP, there is a mega.nz link listed under "Update 2", next to some other info.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
Thanks! The install worked perfectly. However I could not find playstore.

I tried to replace the fakestore.apk with the real one, though it gave me errors even when done with adb su permissions.

Since I still prefer traditional Gapps, so I as usual downloaded the smallest package of OpenGapps and tried to flash it after doing facory reset. While it did uninstall MicroG, it was too big for the system partition.

I tried to partition my system, but Parted on Android was too weird for me to use and I eventually bricked my phone.

Can anyone please release a version with additional system partition space without MicroG?

Or can anyone give repartitioning tips?

Or perhaps I overdid this procedure and could just find an older (which is) smaller package of the smallest gapps to flash and then update? Android 9 is not that old (4 years is not that much to me) though, so the smallest package would not be that small.

Or am I usig the wrong Gapps and should use another gapps package?

Thanks in advance for your help.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
The ROM comes with AuroraStore, which is a front-end to anonymously access the G* play store

It is said to work with microG, but I haven't tested since more than 3 years, so maybe not any more. Make sure to place it under /system/priv-app/phonesky/phonesky.apk and set the permissions and SELinux context properly.

If you scroll up a little, there was a similar discussion already - I can't really help here. However, what you *could* try having a look at the last Openkirin build, mount the IMG file (there are instructions online how to do that) and have a look, which G* stuff is part of the build (compare with the contents of the opengapps pico zip - not trivial, but if you understand what the contents of the file are and how flashing works, you should get an idea) - however, this ROM with its hardening measures was never intended to work with Gapps, so you are on your own.

Good luck with un-bricking.

I leave that question to others - I however do not recommend to mess with the system partition. The Openkirin folks did ship a truly minimal Gapps build, and also you could have a look to the phhusson repo on Github, who deals with GSI builds and is THE expert on that... - There is also a flavor to build a GSI with minimalistic Gapps

Even the opengapps pico flavor is bloated, nevertheless if you take Opengapps, you must use Android 9, arm64 and the flavor of your choice - so only pico, and if that is even too much - see above...
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
New build with back-ported December '22 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_20221212_system.img.zip/download

Custom build release 2022-12-01

Bromite Webview 108.0.5359.106

microG 0.2.26.223616-2

Happy flashing!

Regards, M.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
Thanks for your help. It is always nice to see people like you who are still working on this phone and giving it the love even though Huawei abandoned it. It really is a shame that they abandoned the European models and even decided to stop providing bootloader unlock codes...
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Yes, indeed. And that has happened way before Huawei got targeted by (questionable) US sanctions...
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] olaioo:
@MSe1969​

This is a good forum. How long will there still be support for the good old p9?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
Can't tell - as long as my P9 is alive and usable, I have the time and energy to do it and I am able to backport the ASB patches... :)
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] olaioo:
All respect !
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
Great, will keep my eyes open for a spare p9 then.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
Well if I'll be honest I think it deserves the sanctions. That is what it gets for stealing code, evading privacy, putting bloatware on phones and upsetting the whole world's modding community by refusing to unlock bootloaders...

Anyways I got a Xiaomi 12s now and I am waiting to unlock the bootloader and do some cool stuff.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] V0latyle:
Let's keep the political discussions off XDA. Thanks
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
Well be sure to have the bootloader unlock code.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
Sorry, just frustrated of this bootloader situation.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] P9_User:
I bought the code for 5 or 10 bucks somewhere online... its a few years ago. So i guess its not really a problem to archeiv a bootloader code for some little money.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
I have linked in the OP a Github repo with an Unlock Tool for Huawei/Honor devices - no idea, whether it works or not, but worth a try.

Edit: Well, I think spending some bucks might be more suitable for most, as the free option requires you to disassemble your device...
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] brookie229:
Yeah that free option is pretty much a non-starter for most people. Just too much trouble opening that case and an easy way to damage a phone even though it's probably not worth much these days. Still using my P9 though thanks to you and this thread!!
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] SephRobbertse:
great work on this @MSe1969 .
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] golvelliuscs:
Hi..

First of all i would like to thank you (Mse1968) for your great lineage 16 rom ...

I have some questions about this rom ..

I am trying to use the google play games service , but it did not work. Also i am using google podcast, it works but i can't login with my account .. is it possible to solve using your great rom?

Best regards.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
According to microG docu, Goggle games is not supported. So I am afraid, that I don't have a solution for you...
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] kundifon:
regarding to post https://xdaforums.com/t/rebrand-update-tool-hwota7-p9-eva.3820849/page-111#post-87834853

and Quote below

I intend to do the same, get the real google play services, because I always encounter issues at some point that something is not working under microG.

I can't imagine, how my mum and father will use such phone if even I have trouble with many workarounds - if there is even available. (In total I have three P9-eva)

Provided guide by @MSe1969 what to clean up microG are here https://xdaforums.com/t/rom-treble-microg-lineageos-16-0-for-huawei-p9.4078383/page-30#post-87443839

I did this in two ways. Enabled root in developers menu and used some file manager to delete files/folders. Next attempt was with TWRP. (I left Aurora store and Aurora services only if this matters)

Tryed with Nikgapps, Litegapps. Suitable are also others ( www.xda-developers.com/download-google-apps-gapps/ ), but I get some error and can't install it with TWRP. I don't know the rerason why.

I figured out that size have to be max. aprox. 100 mb, due partition size.

So I finally flashed gapps. Thenafter patch stock recovery immediately, did the factory reset and after that boot first time to the system.

I tried few times with different gapps package but result was more or less the same. Play store didn't work. Sometimes crashed constantly. It said that play services are not pressent. I could't add google account in settings/account, there was no such option available. Camera suddenly stop working and qr code reader eather.

I'm running out of ideas, what try next. Do you @Nicknackpaddywack101 have some? How to get working genue play services? Stock rom is absolutely not an option for me!

Custom rom from @MSe1969 is really great rom and the only one alive/updated at this time. Pity he is not interested in separate GAPPS flashing able variant. However, thanks him for advices and support so far.

I really don't remember exact steps in many attempts I made but once I formated and wipe system, data, internal, cache, dalvik and maybe some more partitions with TWRP (I don't bother about encryption and stored data) and ended in bricked state.

DLOAD method always healed my phone in such situations. https://xdaforums.com/t/rebrand-update-tool-hwota7-p9-eva.3820849/page-110#post-87202875

You lose time, because you have to prepare phone once again with firmware(s) and patches provided by @Tecalote in HWOTA7 v1.2 for new journey to custom roms. Many thanks him for tool, patches, firmwares and detailed describtion!
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] PabloSevilla:
@MSe1969 thank you so much, what a great rom! Brought P9 back to live!

All is working for me, DAVx5 is great! The one last thing I would like is to have Whasapp backup working (google drive). Any tips on how to make that happened (if at all feasible)?
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] kundifon:
Standalone application Google drive works. That you cannot backup What's up things to gdrive seems to be microG related fault. (See my post above yours) For instance I use Noteblock and cannot backup to gdrive either.

I assume you are using DAVx5 for contact sync with gmail/google. How is it?

I tryed GoogleContactsSyncAdapter. Works reliable. But every time you install it, factory reset is neccessery to work. Then every time you flash new buid of this rom, you have to reinstal the GoogleContactsSyncAdapter (and do neccessery factory reset).

Yes, I totaly agree that this custom rom provided by @MSe1969 is really great rom, finetuned and fast. It's very triky to find all app alternatives and do workarounds due lacking genue google services. Sometimes isn't possible on the way we are used to. Or you just have to come to terms with the fact that this is simply not possible!
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
I would assume, that your aim is to have your WA Chats backed up in the cloud, (so you have a place outside your phone) and not necessarily that it has to be with Google and nowhere else. It is anyhow more than shady, that GDrive backups are unencrypted, which entirely voids the whole E2E approach in WA. Only since a couple of months, you can choose to encrypt your WA backups (disabled by default, of course) - my personal trust in this E2E password truly being "not shared to anybody" is fairly low, when it comes to FB/Google. Nevertheless, this new option is independent from moving it to GDrive, as far as I know.

So you can achieve cloud backups of your WA chats with any cloud solution - many freemailers and even ISPs offer you free cloud storage plans and the respective apps to synchronize your device, or look for Nextcloud plans (would be my recommendation)...

What you would to in that case it to disable the option in WA to move backups to GDrive, so from WA's point of view, the backups are only stored locally. In your cloud solution (e.g. Nextcloud app), you set the WA backup directory to be synchronized, that's it.

I quote my Sept 16 post:

"In general

,

microG aims at providing a compatibility layer to apps having built-in G* dependencies. The genuine Google apps are usually deeply integrated with the 'original' play services, so best is to use alternative apps."
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] lo_ol:
WA inbuilt backup feature should however work after enabling 'Allow apps to find accounts' in Settings > Account > Google Account > Sign-in & security
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] Nicknackpaddywack101:
Hi,

Having worked as a part time developer during the winter in a firm in China for about 10 years( 2010-2020, left fled due to rumors of a virus you probably know) I am not really dependent on Google (Though I know how to proxy climb walls) I failed at flashing any form of Gapps that I could find since the packages were all too large to be flashed (tried TWRP and other flashing/tweaking apps) even though I deleted system software to a bare minimum using titanium backup (even got rid of Jelly browser as I would never need to use it) I decided to just replace the fakestore apk with the real phonesky(playstore) apk using root explorer. The variant I used is MindtheGapps which was recommended for that version by Lineageos and by the way it was packaged I simply extracted the apk out.

Playstore would not update somehow but it does not really bother you from using it.
[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] MSe1969:
New build with back-ported January '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_20230107_system.img.zip/download

Custom build release 2023-01-01

microG 0.2.26.223616-16

Happy flashing!

Regards, M.