ZTE Axon 7 (zte-axon7)

From postmarketOS
Jump to navigation Jump to search
ZTE Axon 7
ZTE Axon 7
ZTE Axon 7
Manufacturer ZTE
Name Axon 7
Codename zte-axon7
Released 2016
Category testing
Original software MiFavor 4.0 (Android 6.0.1)
Chipset Qualcomm MSM8996 Snapdragon 820
CPU Quad-core (2x 2.15 GHz Kryo & 2x 1.6 GHz Kryo)
GPU Adreno 530
Display 1440x2560 AMOLED
Storage 64 GB
Memory 4 GB
Architecture aarch64
USB Networking
3D Acceleration
Mobile data

This device is based on Snapdragon 820.
See the SoC page for common tips, guides and troubleshooting steps


Users owning this device

  • DrGit (Notes: 64GB, needs new battery (bought, not installed yet), mainline port stalled due to dual-DSI panel driver regressions)
  • Humanleftswatch (Notes: one with broken Screen cable, one mostly working)
  • JuniorJPDJ (Notes: running own build of Lineage-microG, my main phone)
  • Ungeskriptet (Notes: A2017G, Replaced panel & unlocked bootloader)

How to enter flash mode

  • Fastboot: Power on the device by pressing and holding Power and Volume Down.
  • Recovery: Power on the device by pressing and holding Power and Volume Up.

Unlocking the bootloader

Note Note: This has been only tested on A2017G version of the Axon 7

Unlocking the bootloader on this phone is quite complicated and dangerous so only proceed with caution. This will also wipe userdata so be sure to backup any important files.

  1. Download and Install the EDL tool (follow the instrucitons on the GitHub page to install it)
  2. Boot into EDL mode: adb reboot edl
  3. Backup all partitions from the phone (without userdata):
    ./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs rl backup --skip=userdata --genxml
  4. Downgrade the phone to B12 Nougat firmware from EDL mode from B04 Oreo (might not be necessary at all, not sure):
    1. Download the EDL mode compatible firmware from here or here and extract it
    2. Flash the firmware (Only proceed if partitions were backed up!)
      $ ./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs qfil A2017G_B12_NOUGAT_FULL_EDL/rawprogram0.xml A2017G_B12_NOUGAT_FULL_EDL/patch0.xml A2017G_B12_NOUGAT_FULL_EDL
      $ ./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs qfil A2017G_B12_NOUGAT_FULL_EDL/rawprogram1.xml A2017G_B12_NOUGAT_FULL_EDL/patch1.xml A2017G_B12_NOUGAT_FULL_EDL
      $ ./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs qfil A2017G_B12_NOUGAT_FULL_EDL/rawprogram2.xml A2017G_B12_NOUGAT_FULL_EDL/patch2.xml A2017G_B12_NOUGAT_FULL_EDL
      $ ./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs qfil A2017G_B12_NOUGAT_FULL_EDL/rawprogram3.xml A2017G_B12_NOUGAT_FULL_EDL/patch3.xml A2017G_B12_NOUGAT_FULL_EDL
      $ ./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs qfil A2017G_B12_NOUGAT_FULL_EDL/rawprogram4.xml A2017G_B12_NOUGAT_FULL_EDL/patch4.xml A2017G_B12_NOUGAT_FULL_EDL
      $ ./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs qfil A2017G_B12_NOUGAT_FULL_EDL/rawprogram5.xml A2017G_B12_NOUGAT_FULL_EDL/patch5.xml A2017G_B12_NOUGAT_FULL_EDL
  5. Reboot the phone by just holding Power for a few seconds
  6. Boot into the stock Nougat system and enable "OEM Unlocking"
  7. Reboot into EDL mode again: adb reboot edl
  8. Download and flash signed TWRP from here or here (look for recovery.bin)
    ./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs w recovery twrp_signed-axon7.bin --lun=4
  9. Reboot the phone into recovery (see above)
  10. Download patched aboot.img and fbop/fastboot_unlock.img (aboot.img mirror and fbop/fastboot_unlock.img mirror)
  11. Backup current partitions and flash the patched ones
    $ adb push aboot.img fastboot_unlock.img /sdcard
    $ adb shell dd if=/dev/block/bootdevice/by-name/fbop of=/sdcard/fbop_lock.img
    $ adb shell dd if=/dev/block/bootdevice/by-name/aboot of=/sdcard/aboot_lock.img
    $ adb pull /sdcard/fbop_lock.img /sdcard/aboot_lock.img . #save in safe place
    $ adb shell dd if=/sdcard/fastboot_unlock.img of=/dev/block/bootdevice/by-name/fbop
    $ adb shell dd if=/sdcard/aboot.img of=/dev/block/bootdevice/by-name/aboot
    $ adb reboot bootloader
  12. Unlock the bootloader (finally): fastboot oem unlock
  13. Reboot back into the bootloader and flash the latest official TWRP: fastboot flash recovery twrp-3.5.2_9-0-ailsa_ii.img

Your ZTE Axon 7 should now have an unlocked bootloader with latest TWRP, for questions ask @ungeskriptet:matrix.org on Matrix.


/* Not yet */

See also