[Huawei Mate 9 Questions & Answers] prestonmcafee:
Guide Summary

The upgrade to EMUI 8/Oreo made my Mate 9 worse. Widgets broke (e.g. Business Calendar and My Stocks). This is the fault of EMUI 8, not Oreo. Installing an EMUI widget when using Nova Launcher caused crashes, and Huawei pesters you to use EMUI's launcher rather than a third party. EMUI quit updating the lockscreen magazine. Overall, EMUI 8 seemed worse than EMUI 5, the previous version. There is a guide on rolling back to Nougat/EMUI 5, but that has several defects -- Huawei will try to update you, and no security updates will be issued. The better choice is to put an alternate ROM on the Mate 9, thereby removing EMUI 8. This will also remove the apps, like QQ, that Huawei blocks from removing. Fortunately, the Oreo update to the Mate 9 turned it into a Project Treble phone. Project Treble separates the firmware that operates the hardware from the Android OS, which means that in principle you can put a "vanilla" OS on a Treble phone and it will just work. Indeed, I am using an OS for a Huawei Honor 8 on my Mate 9. Now, these phones have similar hardware, but they are different phones.

The last time I installed an alternate OS was in 2014, so I was very rusty on the process, and indeed, the process and the language has completely changed from the CyanogenMod days. I needed and received a lot of help. Special thanks to WirmPolter and ironydelerium for their patient explanations. I am assuming you are using a PC. In this guide, we will not replace the stock recovery app with TWRP. There are advantages to TWRP, but if you have a problem, the stock recovery app is superior.

1. Download Minimal ADB and Fastboot here: https://xdaforums.com/showthread.php?t=2317790. Extract it from the Zip and install it. This should produce an icon on your desktop for the program.

2. Visit the Google Play store on your phone, search firmware finder, and install Firmware Finder for Huawei. Look up your OS Build Number in settings/about (mine is MHA-L29 8.0.0.366(C567)). Find this on Firmware Finder; there will generally be more than one, and you want the one that says FULLOTA. Download the file Update.zip to your phone. Connect your phone to your PC and copy it over.

3. Follow the instructions at https://android.tutorials.how/unlock-bootloader-huawei/ to unlock your bootloader. You can substitute Minimal ADB and Fastboot for the ADB and Fastboot program that site references. Note that this process will wipe your phone, so you might want to enable backups and back it up.

4. Download the system.img file (it is contained in aosp-8.1_duk.zip) from https://xdaforums.com/honor-8-pro/development/rom-t3758564, as well as the camera file StockHuaweiCam.zip.

5. Extract (unzip) system.img and put it in the folder where Minimal ADB & Fastboot installed.

6. Run Minimal ADB & Fastboot as administrator -- right click on the desktop icon and choose run as administrator. You should see a command prompt.

7. Power off your phone, and connect it to the PC, holding down the VOLUME DOWN button. This should cause your phone to turn on. Keep holding VOLUME DOWN until you reach the Fastboot screen, a mostly white screen with an Android guy on it.

8. Run command "fastboot devices" (the quotes demark the command you are entering but don't enter the quote marks themselves). You should see a device ID -- a long, not-mnemonic name.

9. Run command "fastboot flash system system.img". This will take a bit of time to complete.

10. When the command prompt returns, run command "fastboot reboot". As soon as the screen goes off, hold the volume up button to get the phone into stock recovery. Disconnect from PC at this point.

11. Perform a factory reset. The first screen in recovery may not show this option; if so, select reboot while continuing to hold down VOLUME UP and eventually (may take a couple of reboots) it will provide the factory reset option.

12. Reboot the phone (there should be an option to do so after the reset; if not, you can just hold power down)

13. At this point you are running AOSP! You can stop, but the camera doesn't work so well, so we will install Magisk (the modern version of rooting) and put the original Huawei camera on.

14. From item 2 above, extract the file UPDATE.APP from Update.zip.

15. Download the program Huawei update extractor from https://xdaforums.com/sho....php?t=2433454. Extract it and run it. Go to settings tab and uncheck Verify Header Checksum. Then go to the Extract tab, click on the box with two dots [..] and navigate to UPDATE.APP. This will produce a list of files. Scroll to RAMDISK.img, right click, and choose Extract Selected. This will produce the file RAMDISK.img in the folder.

16. Download Magisk Manager from https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445.

17. Connect your phone to your PC (choose file transfer option) and copy Magisk Manager, StockHuaweiCam.zip, and RAMDISK.img to the downloads folder on your phone. Disconnect your phone from your PC.

18. Using the file manager on the phone, navigate to Magisk Manager and start it. Choose Install, and then choose the option that involves a patched boot file (it is the only option with the word patch in it). When it asks for a boot file, navigate to RAMDISK.img and select that. Magisk Manager will create a patched RAMDISK file named Patched_Boot.img (or similar).

19. Run Minimal ADB & Fastboot, turn phone off and connect to PC holding VOLUME DOWN until reaching the Fastboot screen. Check that you are connected with "Fastboot Devices", and then enter "adb pull /sdcard/MagiskManager/patched_boot.img", and when the command prompt returns, enter "fastboot flash ramdisk patched_boot.img" Restart your phone and you have Magisk.

20. Open the Magisk Manager app. Click the hamburger (three parallel lines) and choose modules. Choose +, and then navigate to StockHuaweiCam.zip. Clicking on it will install the original camera app into your phone, improving the quality of photos.

21. Install the app Simple Tiny Equalizer

https://play.google.com/store/apps/details?id=com.kevinboone.tiny_eq

and use it to turn off the equalizer, to fix audio problems.

Bugs:

1. the SD card. The file app sees and can read and write to the SD card, but other apps, like Google Maps and my music player, can't find it. So I use it to store music, Titanium backs and other files I might need to update.

2. The camera is as good as it was before (I had thought it was worse but now I've replicated some photos and it seems very similar.)

3. Headphones work for calls, but not for music playback. Plugging in the headphone jack reduces volume by ~50% (3db). [Edit: This is problem with the equalizer; turning the equalizer off fixes the problem.]

4. Mute in speakerphone during calls doesn't work, though it also reduces volume by ~3db.

All my apps work and widgets update.