[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
Team Win Recovery Project 3.1.1-0

This is for the A2017, A2017U, and A2017G.

WARNING: The ZTE Axon 7 stock boot image has dm-verity, which prevents you from booting if you swipe to enable system modifications!

SOLUTION: Follow the full rooting steps below in order to allow system modifications without the risk of a boot loop!

WHAT IS TWRP?

Oh come on, you know what it is - don't try to fool me!

In case you're serious, though...

Team Win Recovery Project is a custom recovery for Android devices.

It allows you to back up and restore your data, flash custom ROMs to your device, repair broken file systems, and root your device.

Read more about TWRP here: https://twrp.me/about/

DOWNLOAD

You can find the device page here:

http://teamw.in/devices/zteaxon7.html

There is a download link there, as well as instructions on how to flash it.

You can find up to date fastboot & adb binaries here!

UNLOCKING YOUR BOOTLOADER

WARNING: Unlocking your bootloader will erase all userdata on the device! Your device will be completely reset to factory defaults!

A2017U or A2017 users can simply unlock from EDL mode using MiFlash here.

I do not have a method for A2017G, there may be other threads on XDA to guide you through the process.

FULL STEPS FOR OBTAINING ROOT

Follow these instructions until someone nice comes along and makes a video from them (without ads):

Unlock your bootloader! See above!

Download TWRP for the ZTE Axon 7.

Reboot your device into fastboot mode. To do this, select reboot from the power menu and hold the [Volume Up] button while your device reboots

or

boots from power off.

Once you're in fastboot with your bootloader unlocked, you're ready to flash TWRP. To do this, run the command (replacing twrp.img with the actual image name):

fastboot flash recovery twrp.img

Once the image is flashed, you should use your volume keys to navigate to RECOVERY and the press the power key to select it.

At this point, you will reach the screen asking you if you want to allow system modifications.

By swiping right, you will trigger dm-verity, and if you don't follow the next step you will be unable to boot!

If you are going to root your device and follow the rest of these steps, then it is safe to swipe right and enable modifications.

If you want to be rooted with SuperSU:

Download the latest SuperSU stable by Chainfire.

Without exiting TWRP, transfer the SuperSU zip to your device over MTP* and flash it using [Install] in TWRP.

---or (not both) ---

If you want to be rooted with Magisk:

Download the latest Magisk stable by topjohnwu.

Without exiting TWRP, transfer the Magisk zip to your device over MTP* and flash it using [Install] in TWRP.

---or (not both) ---

If you want to be rooted with something else or just want a bootable system:

Download the latest dm-verity and forced encryption disabler zip.

Without exiting TWRP, transfer the no-verity-opt-encrypt zip to your device over MTP* and flash it using [Install] in TWRP.

This will also allow you to use [Format Data] to completely disable your encryption if desired.

Go to [Reboot] -> [System].

Wait 2-5 minutes for your device to finish setting itself up. (SuperSU will reboot you a few times)

* MTP, known as Media Transfer Protocol, is the same way you transfer files from your PC to your device when booted into system.

UPDATING TWRP

To update TWRP, simply download the new twrp.img on your phone, then boot into your current TWRP and flash it.

To flash a twrp.img, navigate to [Install] -> [Flash Image] -> select your twrp.img -> [x] Recovery -> Flash!

After that, just use [Reboot] -> [Recovery] to reboot into the updated TWRP.

CHANGES

v3.1.1-0 (twrp.me) - See release details here!

v3.1.0-0 (twrp.me) - See release details here!

v3.0.4-1 (build.nethunter.com) - Fix crash on selecting reboot with an empty data partition, add Data backup warnings

v3.0.4-0 (build.nethunter.com) - Capability restoration for Nougat, F2FS backport support, EXT4 decryption support

v3.0.3-1 (twrp.me) - Use crypto libraries from ROM (Nougat support). Fix USB OTG and Fast Charging. Reduce boot times.

v3.0.3-0 (twrp.me) - Renamed to ailsa_ii, Persist merged with EFS, Modem no longer mounted, Backup/Restore/Flash Bluetooth/System Image added. LA.HB.1.3.1.c1-19500-8x96.0 + Linux 3.18.45.

v3.0.2-0 (twrp.me) - Initial release.

FEATURES

MTP support

USB OTG storage support

Legacy USB Mass Storage mode support - use your phone like an SDCard reader or flash drive!

Hardware Qualcomm-based full-disk encryption support

f2fs file system support (read, write, format, backup & restore)

exFAT file system support (read, write, format)

NTFS file system support (read, write, format)

ADB root

Full SELinux support

Built in android 6.0 tree

Allows ZTE full OTA flashing (only for A2017U firmware)

KNOWN ISSUES

F2FS takes a long time to boot, see below.

WHY DOES F2FS MAKE TWRP SO SLOW?

When TWRP boots up or wipes partitions and a few other scenarios, it checks each partition to see how much disk space is used. Ext4 handles disk usage calls quite efficiently and will finish this very fast. F2FS on the other hand is very slow when it comes to checking disk usage. We're unsure why this is. Every file on the F2FS formatted partition adds a little more time, and a device that is 30 GB full could take up to 10 minutes to boot TWRP!

I suggest switching your data partition to ext4 - all the f2fs hype is merely from benchmarks that don't actually represent real world use (ie. you're not writing thousands of files per second)

For someone who doesn't do lots of write access to their data partition, ext4 can actually be advantageous (it has faster access times and reads!)

HOW DO I GET LOGS SO WHEN I COMPLAIN I'M NOT COMPLETELY IGNORED OR SHAMED BY OTHER USERS?

To get logs while in TWRP, you should connect your device to your PC and use adb.

adb pull /tmp/recovery.log

adb exec-out dmesg > dmesg.log

This will create 2 files in the directory your shell is currently in, recovery.log and dmesg.log. You will need to upload these somewhere such as a pastebin or Google Drive. You can also attach it to your XDA post (recommended!)

If you are having an operating system boot issue, you should gather a ramoops log instead. Do this while in TWRP after the failed boot:

adb exec-out "tar c /sys/fs/pstore 2>/dev/null" > pstore.tar

CONTACT & SUPPORT

You can find us on IRC at #twrp on chat.freenode.net.

You can also post in this thread and I will attempt to answer any questions you may have.

SOURCE CODE

TWRP: https://github.com/omnirom/android_bootable_recovery (android-7.1)

Device tree: https://github.com/TeamWin/android_device_zte_ailsa_ii (android-6.0)

Kernel: https://github.com/jcadduono/android_kernel_oneplus_msm8996 (twrp-6.0)

CONTRIBUTIONS

Gerrit for TWRP: http://gerrit.omnirom.org/

Gerrit for officially supported devices: http://gerrit.twrp.me/

XDA:DevDB Information

Team Win Recovery Project for the ZTE Axon 7, Tool/Utility for the ZTE Axon 7

Contributors

jcadduono, Team Win

Source Code: https://github.com/TeamWin/android_device_zte_ailsa_ii

Version Information

Status: Stable

Current Stable Version: 3.0.4-1

Stable Release Date: 2017-02-08

Created 2016-12-09

Last Updated 2017-11-25