[ZTE Axon 7 Guides, News, & Discussion] Oki:
INTRODUCTION

I posted my configuration before inside a couple of threads. After that, I have received a lot of questions about the same issues. I have also been asked to create a thread so newbies could have an easy way of having an Oreo system up and running in the Axon 7. So I am doing it. Newbies will have an easy entry point to the world of custom Oreo ROMs and a single point to clarify any question. We have a healthy and active Axon 7 scene here at XDA. This guide provides a path to have a custom Oreo system with the latest features available for this device requiring a minimum effort. It applies to any of the 3 Axon 7 flavors: A2017 (China), A2017G (Europe) and A2017U (Americas) with any memory and storage capacity. At this time there are 3 groups of ROMs depending on the Bootstack and GSI support:

1. B32+B10 ROMs use the reliable Nougat bootstack. They are very stable and battery efficient. On the other hand, none of them support dual SIM or HDR+ camera. However they support HDR and Camera2 API.

2. B12 without GSI support ROMs use the Oreo beta B12 bootstack. Full support for Camera2 API and HDR+ but very poor battery performance and stability issues.

3. B12 with GSI support ROMs also use the same Oreo beta B12 bootstack. They also require a separated vendor partition. They share the same benefits and limitations of the previous group. So far they are experimental and the Treble ROMs don't support yet all the Axon 7 Hardware when using them along with a GSI image. They are examples of a Work-In-Progress that is yet to be finished.

WHAT THE HECK IS TREBLE AND GSI?

Since Oreo, all the new devices must have a separated vendor partition to fulfill Google's Treble project requirements. This way the OS is structured in two parts:

1. Treble ROM: includes all the device drivers and vendor related files in the vendor and boot partitions. The Treble ROM is owned and updated by the device vendor or a custom ROM developer.

2. Generic System Image (GSI): Includes the Android OS, it is controlled by Google and allow generic and frequent security and system feature updates directly from Google. It uses the system partition.

So far, custom Android distributions such as LineageOS, Resurrection Remix, AOKP, Dirty Unicorns, AEX, etc... had to create specific ROMs for each supported device. This was painful and it all was depending on the willingness of a developer to maintain a version for each device. Thanks to Treble project, now Android distributions just release a single GSI able to be installed in any device using a Treble ROM. This way they can properly maintain all the devices with a single GSI image by focusing on frequent updates of a single GSI. These custom distributions will also deliver the security and feature updates by Google. So a fully Treble ROM for the Axon 7 will open the door to virtually all the Android distribution out there.

[MENTION=5492451]NFound[/MENTION] in the AEX ROM thread) is the only one working in developing a Treble ROM for our device. He has released some incomplete Treble ROMs coupled with non-generic system images. Others like [MENTION=7790189]Kranoner[/MENTION] in the Hellsgate Kernel thread or [MENTION=5027381]OrdenKrieger[/MENTION] in the LineageOS 15.1 are building and kindly sharing unofficial releases of several custom Oreo 8.1 ROMs that are used in the EDL packages below.

[MENTION=8495959]Victor13f[/MENTION] has also created guides on how to install the leaked Stock Oreo 8.0 Beta B12 ROM. I really advise to upgrade to any of the current Oreo ROMs since the current unofficial releases work way better than the previous Nougat versions. The custom AOSP Oreo 8.1 ROMs offer a wider spectrum for tweaking for better performance and battery. Custom kernels are adding full featured and optimized drivers for custom ROMs. They support almost everything, including backported drivers from the latest Linux 4.xx official kernel sources.

BACKUP:

Please note that a dirty flash won't work when coming from any non Treblerized Axon 7 (Axon 7 without the vendor partition). So, if you want to keep your information, then you should do a backup of your data before continuing with this guide. You can use the file manager to move your Documents, Downloads, Music, Pictures, Videos, etc... from your internal storage to an external SD card. You can upload them to a cloud service such as Google Drive, One Drive, MEGA, DropBox, etc. Or use the USB connection to move your information to your PC.

DEVICE UNLOCK:

Unlocking your bootloader will trigger a factory reset, and will delete the internal storage along with all the information in your phone. If your Axon 7 bootloader is still locked, you have to follow this guide before proceeding to the rest of this guide. It works for Marshmallow and Nougat stock phones. Please use that thread to ask any question related to unlocking your device.

INSTALLATION INSTRUCTIONS:

WARNING, THIS GUIDE WILL WIPE ALL THE DATA IN YOUR DEVICE, INCLUDING THE INTERNAL STORAGE.

IT REQUIRES YOUR DEVICE TO BE UNLOCKED, OTHERWISE YOUR DEVICE COULD BE BRICKED.

!!! Whatever you do, it is at your own risk !!!
​

In case you get stuck at any point in this guide, do not panic! There is a straightforward way to go back to stock. Just follow this Unbrick/Restore guide. I've tried to make things as easier as possible for everyone, specially newbies not used to deal with the Axon 7. So, I have created stable custom EDL packages. In order to reduce the risk and complexity, this one Stop ROM Shop performs all the following actions in a single flash:

- installs TWRP custom recovery

- installs my customized Bootstack

- removes unlocked bootloader annoying warning message.

- installs custom Oreo ROM.

- installs google apps.

- installs custom kernel.

- installs magisk root

- creates vendor partition to treblerize your phone, this way it will be futureproof.

- formats vendor partition as ext4 filesystem to complete the previous task.

- And the guide also helps you to format data and cache as f2fs in case you haven't done it already. It provides better battery, performance and extends the lifespan of the internal flash.

I provide here 2 basic EDL package options. Both of them include the vendor partition so you won't have to perform any additional formatting and backup when upgrading to treble roms. Both options are this way future proof, just choose one of them:

OPTION 1: B32+B10 based EDL Package if you prefer stability. It includes:

- N+O custom Bootstack (B32+B10)

- TWRP 3.2.1-7 recovery by NFound

- Resurrection Remix Oreo 6.0.0 2018.05.11 ROM By Kranoner

- Google apps (ARM64, 8.1, micro)

- HellsGate v3.0 Kernel by Kranoner

- Magisk root 16.7

OPTION 2: B12 based EDL Package If you require dual SIM or full support for HDR+ camera apps. It includes:

- O custom Bootstack (B12)

- TWRP 3.2.2 recovery

- AEX 5.7 20180711 ROM by NFound

- Google apps (ARM64, 8.1, micro)

- HellsGate X12 GClang Kernel by Kranoner

- Magisk root 16.7

Once you had chosen your preferred option then proceed with these steps:

Download and Un7zip the chosen package to a folder in your computer, ensuring there are no errors. I have an A2017U, so the American modem is the package default. If you have an A2017 or A2017G just copy your modem firmware, from the corresponding provided modem subfolder, to the main folder. Just overwrite the default American modem file.

Install MiFlash in your PC. It includes the Qualcomm Snapdragon SoC drivers, nonetheless you can always install the latest Qualcomm drivers.

Enter EDL mode using one of the following options:

by pressing VolUp+VolDn+Power until the power led flashes briefly

Installing a terminal app and typing reboot edl at the app prompt.

connecting your phone to your PC and typing adb reboot edl at your computer's command prompt.

While your phone is completely off, press VolUp+VolDn while connecting your phone to your PC.

If you haven't done yet, it's time to connect your phone to your computer.

Open MiFlash in your computer.

Click Browse button and select the folder you created with the firmware files.

Click Refresh button and your device will appear listed as virtual COM port.

Click Flash button and wait for a few minutes until it finishes. Note the bottom options are not applicable.

Wait a few seconds until the boot animation begins and press again VolUp+Power until the phone vibrates to enter again into recovery. Go to Advanced > Terminal and now type: reboot "dm-verity enforcing"

Press VolUp+Power until the phone vibrates to enter into recovery, then release both buttons. Go to Advanced > Terminal and type: reboot disemmcwp

Wait a few seconds until the boot animation begins and press again VolUp+Power until the phone vibrates to enter again into recovery for a 3rd time. To ensure everything is clean you should format the DATA partition, including internal storage. Go to settings and ensure "Use rm -rf instead of formatting" option is not selected. Then go to Wipe > Advanced Wipe, select Data partition and tap on Repair_or_Change_File_System button and then on Change_File_System button. Select F2FS and confirm action. Do the same to apply F2FS to the Cache Partition. Now, from the main menu > Wipe, select and clean dalvik.

NOTE: If you receive an error while formatting data, then go to Wipe > Advanced Wipe, select Data partition and tap on Repair_or_Change_File_System button and then on Change_File_System button. Format DATA as EXT4 first and, without leaving TWRP do it again as F2FS. That will fix the issue.

Go to main menu and reboot system.

Complete the setup process so you can continue with the rest of the customizations not included in the basic package:

SOUND EXPERIENCE:

The following steps will provide you with Dolby ATMOS and Viper4Audio pre-processors along with the HiFi DAC output. Please note that the activation of these features will drain your battery faster since both will use your CPU. Nonetheless the benefits are evident. if you want to fully enjoy the audio capabilities of the Axon 7 you should go ahead and use them. The steps are:

Download Mixer_AK4490.zip and Dolby-Oreo.zip to your phone.

Open Magisk Manager app, go to the Download section and Download (do not install yet) Ainur Sauron, Viper4Android FX and Audio Modification Library.

Reboot to recovery the same way you did during System installation, press install, navigate to /sdcard/MagiskManager folder and install Ainur Sauron, Viper4Android (I prefer 2.5.0.5 and traditional interface, however it is all up your personal preference) and Audio Modification Library zip files in that order. Do not reboot after flashing these files, just navigate now to the /sdcard/Download folder and flash Dolby-Oreo.zip and Mixer_AK4490.zip

SCREEN COLOR ENHANCEMENT:

Download and install KCAL Color Calibration/enhancement app. I only modify the Saturation to 62 to get amazing vibrant colors from this AMOLED screen, nonetheless this is a very personal configuration. At the end this has to please your own eyes. . This app optional since Kernel Adiutor and EX Kernel Manager apps can also configure Qualcomm SoC Color Control.

AVOID BATTERY DEGRADATION:

Install Battery charge Limit [ROOT] app. Open it and set Limit charge to 85% and recharge below 79%. Do you want to avoid your battery to wear as the time go by? do not miss this guide to understand why this step is so important for the health of your device.

BETTER CAMERA:

+ Snap Camera App

I am using, and heavily recommend the paid version of Snap Camera HDR. It supports Camera2 API with full manual and HDR support. Find recommended settings here.

Testing now GCAM v4.0. Nonetheless so far I am just starting testing.

Bacon Camera is another Camera I am now actively testing.

The next level of this guide will provide with instructions on how to change recovery, ROM, kernels and all the details and options you have. It is late today so I'll finish it later.

Hope it helps. I will be updating this guide in the future as soon my configuration changes or I find new technologies, apps or patches. If you know about a better option just post your suggestions!

Thanks and credits go to [MENTION=5492451]NFound[/MENTION], [MENTION=7790189]Kranoner[/MENTION], [MENTION=4493018]Infy_AsiX[/MENTION], [MENTION=7340768]roisuke[/MENTION], [MENTION=6977124]Skrem339[/MENTION], [MENTION=6330152]djkuz[/MENTION] and you too for bringing up issues and valuable solutions.