[ROM][Treble][microG]LineageOS 16.0 for HUAWEI P9

Magdy Doze

Member
Jun 10, 2020
32
1
0
As I don't own a P9 plus, I can only guess: I think it is worth a try on any emui 8.0 device! So if you would like to give it a try, please do so and report back. If all OK, I'll update the respective info section in this thread.

Regarding emui 10 - same story: I don't own such a device, so I can't try a Lineage 17.1 build.
(BTW, honesty, Android 10 / Lineage 17.1 is at the moment not my highest priority. I would have to port all my hardening features first and whilst I don't see any "killer" feature of Android 10 making we want to switch, I in the contrary see feature losses like dropped privacy guard in 17.1 and no homegrown root support any more)
Understandable...& I'll give it a try & report back
 

StickmanCheng

New member
Jul 17, 2020
1
0
0
I'm not sure I got your point properly.
I assume you have rebranded your device following the step sequence in the linked thread to "become" an AL00 (Chinese) as a prerequisite to upgrade to EMUI 8.0. After you did so, the thread explains to also flash a specific patch to re-enable SIM recognition for your region.
Did you do that? The prerequisite to flash this (and also any other treble) build is, that the "rebranded stock" Oreo EMUI 8.0 works properly in all aspects.

Or are you really saying, that your "patched Chinese Stock Oreo EMUI 8.0" works fine and only my build does not recognize your SIM?
Where is that specific patch?
 

MSe1969

Senior Member
Dec 16, 2016
1,411
2,575
133
Frankfurt Rhine-Main metropolitan region
  • Like
Reactions: Crohny and lo_ol

sebasmadd

Member
Nov 30, 2015
15
2
0
Hi, I want to try this rom on my p9 because I want a change from emui. But I have a stupid question, what's the difference with this and any other rom? I mean, I know this rom is intended so google can't "track" you I guess, but for example, can I still use google apps with this rom? and download apps thru play store as usual? because I like google apps tho, so that's what I want to know. Most importantly I ask this question because I have apps that probably are only on the play store, like the apps from the banks in my country.
 

MSe1969

Senior Member
Dec 16, 2016
1,411
2,575
133
Frankfurt Rhine-Main metropolitan region
Hi, I want to try this rom on my p9 because I want a change from emui. But I have a stupid question, what's the difference with this and any other rom? I mean, I know this rom is intended so google can't "track" you I guess, but for example, can I still use google apps with this rom? and download apps thru play store as usual? because I like google apps tho, so that's what I want to know. Most importantly I ask this question because I have apps that probably are only on the play store, like the apps from the banks in my country.
The answer to your questions isn't a simple "yes" or "no". This ROM comes bundled with AuroraStore, which is a frontend to the play store. So you can download (almost) all free apps, and - if you use your own credentials to access, instead of the dummy accounts provided, you can also update your paid apps.
Further, microG coming with this ROM provides a basic compatibility with apps having dependencies to the Google play services. So many, but NOT all apps having such dependencies, also run fine with this ROM.
As a rule of thumb, complex games from big gaming companies and the apps coming directly from Google themselves probably won't run with this ROM, as they deeply integrate with the Google spy services. For the latter however, there are free and better alternatives available, so I don't consider this a real "loss".
In regards to banking apps, usually, those consist of the banking part as an app and a separate "push TAN" app. The push TAN apps most probably (I'd say for sure) won't work! (This anyhow isn't secure and is no 2factor authentication, despite the marketing blah blah from the banks).
The banking app may or may not work, depends on the product.
 

MSe1969

Senior Member
Dec 16, 2016
1,411
2,575
133
Frankfurt Rhine-Main metropolitan region
Hi,
does the WiFi hotspot work already within this 'official' LineageOS release?

Thanks,
X.
As far as I can see on their change logs next to the download links, they claim it does.
Unfortunately, their device repo isn't publicly visible and they on purpose don't want to make their sources public.
I am still trying to find out how to make the hotspot work. Any hint appreciated ;)
 

MSe1969

Senior Member
Dec 16, 2016
1,411
2,575
133
Frankfurt Rhine-Main metropolitan region
@MSe1969
I solved the audio jack problem, build and apply the treble-device-huawei-EVA overlay in this repo
https://gitlab.com/insaane/vendor_hardware_overlay

It also has the correct power profile and battery stats
Thanks a lot! Indeed, the battery stats issue is now solved, this will be part of my next build. :good:
Regarding audio jack, I did not have those issues before, but if that solves the issue for you, it will probably also for others.

Now, the only open issue (besides the missing boot animation after decryption, which is not really a big deal) is the non-working wi-fi hotspot.
 

Mywayorthehuawei

New member
May 5, 2020
2
2
0
As far as I can see on their change logs next to the download links, they claim it does.
Unfortunately, their device repo isn't publicly visible and they on purpose don't want to make their sources public.
I am still trying to find out how to make the hotspot work. Any hint appreciated ;)
Yea the wifi hotspot works in official lineage - Tested with openkirin's emui 8 build on a p9.
 

Wattsensi

Senior Member
May 13, 2018
221
34
0
Talca
Thanks a lot! Indeed, the battery stats issue is now solved, this will be part of my next build. :good:
Regarding audio jack, I did not have those issues before, but if that solves the issue for you, it will probably also for others.

Now, the only open issue (besides the missing boot animation after decryption, which is not really a big deal) is the non-working wi-fi hotspot.
I'm working really hard on this device to divorce ourselves from OpenKirin as much as possible. Unlike them I always open source my work so if I get bored of working on EVA or someone wants to work too it will ease the work. We still pretty much have no access to Android 10, but at least with this new development we have access to a large gamut of Pie GSIs rather than what just OpenKirin cooks for us. I myself use AOSP 9 for development. I am trying to diagnose AOSP 10 v213 (v220 doesn't get to the boot animation and I have no way to debug that early stage boot)
 
Last edited:

MSe1969

Senior Member
Dec 16, 2016
1,411
2,575
133
Frankfurt Rhine-Main metropolitan region
I'm working really hard on this device to divorce ourselves from OpenKirin as much as possible. Unlike them I always open source my work so if I get bored of working on EVA or someone wants to work too it will ease the work. We still pretty much have no access to Android 10, but at least with this new development we have access to a large gamut of Pie GSIs rather than what just OpenKirin cooks for us. I myself use AOSP 9 for development.
Right - and yes, really a pitty that they keep their work a "secret". It is of course their right to do so, but I don't even see the benefit of doing so: They don't earn money with that, have no other necessity to hide their work (unless they have some secret contact with somebody obliging them to non-disclosure - which I don't believe, as their builds aren't perfect either) and they could for sure benefit from people making suggestions etc. - But enough of that, why wasting energy on things we cannot change?
Let's hope we'll find out how to fix the Hotspot issue. Looking at phh's treble_experimentations repo and the open issues, the Hotspot seems to be tricky also for other devices . . .
 

Wattsensi

Senior Member
May 13, 2018
221
34
0
Talca
Right - and yes, really a pitty that they keep their work a "secret". It is of course their right to do so, but I don't even see the benefit of doing so: They don't earn money with that, have no other necessity to hide their work (unless they have some secret contact with somebody obliging them to non-disclosure - which I don't believe, as their builds aren't perfect either) and they could for sure benefit from people making suggestions etc. - But enough of that, why wasting energy on things we cannot change?
Let's hope we'll find out how to fix the Hotspot issue. Looking at phh's treble_experimentations repo and the open issues, the Hotspot seems to be tricky also for other devices . . .
Hotspot looks like it works on Phh-Treble
 

MSe1969

Senior Member
Dec 16, 2016
1,411
2,575
133
Frankfurt Rhine-Main metropolitan region
Hotspot looks like it works on Phh-Treble
Seems to work, but not for all devices. . . - anyhow, as indicated already, I am glad for any hint to make it work.
I have tried already the configurations/overlays, but the current config is the same as in Huawei Oreo stock, so my guess is, that there is some Emui/Huawei specific mod necessary to work with the emui-vendor partition properly.
But that's a wild guess from my end and not really a helpful one. . .
 

Wattsensi

Senior Member
May 13, 2018
221
34
0
Talca
Seems to work, but not for all devices. . . - anyhow, as indicated already, I am glad for any hint to make it work.
I have tried already the configurations/overlays, but the current config is the same as in Huawei Oreo stock, so my guess is, that there is some Emui/Huawei specific mod necessary to work with the emui-vendor partition properly.
But that's a wild guess from my end and not really a helpful one. . .
Weird, I can engage the AP and make a network appear on my computer's WLAN scanner when I'm using Phh-Treble. Haven't tried other GSIs. Shame that the "Open"Kirin guys are so secretive, if they weren't like that we would already be running all the ROMs we wanted to with few issues, but alas they have all the right to withhold their work from us. I'm about to release a joint fix ZIP that will make Pie ROMs bearable in the meantime that fixes offline charging, NFC, ROM features and adds the device overlay, if you flash it between the GSI and the gapps then it should behave like the OK ROM.

Also, modern Treble ROMs only modify the system partition. The vendor partition and the kernel are separate and stay untouched by the OS.
 
Last edited:

MSe1969

Senior Member
Dec 16, 2016
1,411
2,575
133
Frankfurt Rhine-Main metropolitan region
Weird, I can engage the AP and make a network appear on my computer's WLAN scanner when I'm using Phh-Treble. Haven't tried other GSIs. Shame that the "Open"Kirin guys are so secretive, if they weren't like that we would already be running all the ROMs we wanted to with few issues, but alas they have all the right to withhold their work from us. I'm about to release a joint fix ZIP that will make Pie ROMs bearable in the meantime that fixes offline charging, NFC, ROM features and adds the device overlay, if you flash it between the GSI and the gapps then it should behave like the OK ROM.

Also, modern Treble ROMs only modify the system partition. The vendor partition and the kernel are separate and stay untouched by the OS.
When you say, you can do so with phh-treble:
On the P9, right? Did you compile a test build yourself using directly the phh source tree? If yes, could you please share the build manifest?
Or did you use an already compiled GSI? In that case, which one exactly?
My build is fully based on phh, but with the following modifications:
- Applied the additional LineageOS patches by AndyYan to all affected repos
- Additional patches in device repo (see branch lin-16.0-eva-p9): Camera, Offline-Charger, declaring the print feature (needed for Lineage Settings menu)
- The "microG" specific platform changes (should have no impact on AP)
- In general, I refer in my manifest to the "pie" branches of phh, when they exist - or should I use master instead? => I understand "pie" being the build I make (as LineageOS 16.0 is pie), or does "pie" here mean "pie vendor partition" (as opposed to Oreo Vendor, which we have for the P9)?

Have the feeling we're quite close to a solution... Please advise, thanks M.

-