[ROM][AOSP][9.0.0][NOT TREBLE][ALPHA] AOSP Pie for Huawei Mate 9 - EARLY ALPHA

irony_delerium

Senior Member
Jan 13, 2013
304
204
63
Portland, OR
WARNING: You'll most probably loose ALL your data, and might break your phone. Please use with extreme caution!

This is a fully custom ROM for the Huawei Mate 9, derived from the AOSP Pie device tree for the HiKey960 development board, with minimal usage of the existing Huawei vendor stack.

This ROM does include Gapps for Pie.

IMPORTANT: See the broken features below. Most importantly: Phone and cellular is currently entirely non-functional, as there is no RIL implemented. If I can get away with it, I'm not importing code from Huawei's existing vendor stack. The graphics stack is fully sourced from the HiKey960 development board sources, as provided by Google on the Driver Binaries page for AOSP; the only blobs which are sourced directly from the Mate 9 system images are the device firmware blobs from /vendor/firmware.

Working features:

  • Basic graphics hardware acceleration & 3d support.
  • Wifi
  • Bluetooth (partial: kernel wakelock permanently held, preventing deep sleep. Generally functional, you will need to bring over your MAC address and configure it yourself.)
  • Touchscreen
  • Notification LED
  • Screen brightness
  • USB
  • Fast charging
  • Vibration
  • Battery information

Broken or not hooked up yet:
  • Reboot / shutdown: always cycles to eRecovery. (BFM is disabled, so the loader doesn't know that boot was successful.
  • Audio via wired headset, earpiece, speaker. (Bluetooth audio works. Over USB-C, untested.)
  • Cellular. (No RIL yet.)
  • SD card.
  • Camera
  • Fingerprint sensor
  • NFC
  • Any and all sensors.
  • GPS
  • More that I have yet to list, I'm sure.

Installation Instructions
  • Make note of your bluetooth hardware address.
  • Factory reset your device, preferably using stock recovery. TWRP builds will not work once this ROM is installed.
  • Install the kernel, ramdisk, and system image with fastboot.
  • Boot the system
  • Once booted: adb shell setprop persist.service.bdroid.bdaddr <your bluetooth hardware address>

Notes
The image is pre-rooted (it is an AOSP "eng" build). ADB is on by default, running as root, with no authentication.

Even though it is pre-rooted, I still recommend installing Magisk for the time being. Use the ramdisk image provided here with "Patch Boot Image". Magisk 17.1 with Magisk Manager 5.9.1 work. (Installing Magisk also works around a few other issues - for example, Developer Options is completely inaccessible on the default install.)

Changelog
2017-09-03: Initial release.

Download
GitHub release

Thanks
  • @wirmpolter for the Serenity kernel (which is used as the basis for the kernel image)
  • @TheHitMan for BiTGApps Pie

Sources

XDA:DevDB Information
Custom AOSP Pie for Huawei Mate 9, ROM for the Huawei Mate 9

Contributors
irony_delerium, wirmpolter
Source Code: https://github.com/ironydelerium/device_huawei_mha/

ROM OS Version: 9.x Pie
ROM Kernel: Linux 4.x
ROM Firmware Required: EMUI 8.0
Based On: AOSP

Version Information
Status: Alpha
Beta Release Date: 2018-09-03

Created 2018-09-03
Last Updated 2018-09-03
 

Attachments

Last edited:

luyongfeng

Senior Member
Aug 31, 2007
53
10
0
Thank you much.

I tried this ROM. But too much bugs. I had to roll back to original EMUI ROM.

Hope you can fix the bugs in future.

Thank you very much for your efforts anyway.
 

irony_delerium

Senior Member
Jan 13, 2013
304
204
63
Portland, OR
Thank you much.

I tried this ROM. But too much bugs. I had to roll back to original EMUI ROM.

Hope you can fix the bugs in future.

Thank you very much for your efforts anyway.
I'm planning on it.

There's a lot of work to do - cellular, audio, basic sensors, camera - none of those things are even there yet.

What's there works, unfortunately as you can tell, that's not a lot yet. :)
 

irony_delerium

Senior Member
Jan 13, 2013
304
204
63
Portland, OR
I am still working on it.

Not even considering Lineage at this point - just trying to get a complete device tree constructed, of which there are a lot of pieces to construct (not the least of which because I'm basically building it up from scratch, instead of using Huawei's vendor image).