ZTE Axon 7 (zte-axon7)

From postmarketOS
ZTE Axon 7
ZTE Axon 7
ZTE Axon 7
Manufacturer ZTE
Name Axon 7
Codename zte-axon7
Released 2016
Category testing
Original software Android
Original version 6.0.1 (MiFavor 4.0)
Hardware
Chipset Qualcomm Snapdragon 820 (MSM8996)
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
Type handset
Features
USB Networking
Flashing
Touchscreen
Display
WiFi
FDE
Mainline
Partial
Battery
3D Acceleration
Audio
Bluetooth
Camera
GPS
Mobile data
Internal storage
SMS
Calls
USB OTG
NFC
Sensors
Accelerometer
Magnetometer
Ambient Light
Proximity
Hall Effect
Barometer
Power Sensor
Misc
Built-in DVB
Camera Flash
Keyboard
Touchpad
USB-A
HDMI/DP
Ir TX
Ir RX
Stylus
Memory Card
Haptics
Ethernet
FOSS bootloader
This device is based on the Snapdragon 820.
See the SoC page for common tips, guides and troubleshooting steps

Contributors

Users owning this device

  • DrGit (Notes: 64GB, needs new battery (bought, not installed yet), mainline port stalled due to dual-DSI panel driver regressions)
  • JuniorJPDJ (Notes: running own build of Lineage-microG)
  • Segfault (Notes: Bricked)
  • Ungeskriptet (Notes: stupid dual dsi)


How to enter flash mode

Icon WARNING: Device may get stuck in EDL mode. To reset drain or disconnect the battery.
Note Note: Fastboot may not be available on latest stock firmware
  • EDL Mode: Hold down Volume Up and Volume Down while connecting the device to a computer with a USB cable.
  • Bootloader: Boot into recovery and select 'Reboot to bootloader' or run adb reboot bootloader on a computer from Android or factory test mode
  • Recovery: Power on the device by holding Power and Volume Up.
  • Factory test mode (FTM): Power on the device by holding Power and Volume Down

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 with adb reboot edl from Android or with the key combination
  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 Android 7 (Nougat) firmware:
    1. Download the Android 7 EDL flashable firmware from 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/rawprogram*.xml A2017G_B12_NOUGAT_FULL_EDL/patch*.xml A2017G_B12_NOUGAT_FULL_EDL
      
    • This step can also be done with qdl like this
  5. Reboot the phone by holding down Power for a few seconds
  6. Boot into the stock Nougat ROM and enable OEM Unlocking in the developer settings
  7. Reboot into EDL mode again
  8. Download new bootloader files aboot_unlock.img and fbop_unlock.img to allow unlocking
  9. Flash new bootloader files (these files will also restore access to fastboot)
    $ ./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs --lun=4 w aboot aboot_unlock.img
    $ ./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs --lun=0 w fbop fbop_unlock.img
    
  10. Unlock the bootloader: fastboot oem unlock

Your ZTE Axon 7 should now have an unlocked bootloader. For questions ask @ungeskriptet:matrix.org on Matrix.

Installation

/* Not yet */

Mainline status

Component Model Status Notes
SoC Qualcomm MSM8996 Snapdragon 820 Y
USB TI hd3ss3220 P USB Type-C 3.0
UFS Samsung KLUCG4J1CB-B0B1 Y 64GB variant
Display Samsung s6e3ha3 P Using dual DSI
Touchscreen Synaptics rmi4 Y
Charging smb1351 N
Buttons - N GPIO
Accelerometer and gyroscope Bosh bmi160 N Driver available in mainline
Ambient light and proximity sensor ROHM rpr0521 N Driver available in mainline
Magnetometer AKM (Asahi Kasei Microdevices) ak09915 N
Audio AKM (Asahi Kasei Microdevices) ak4490 N ak4961 codec
GPU Qualcomm Adreno 530 N
Wi-Fi Qualcomm qca6174 Y Connected through PCIe
Bluetooth N Connected through UART
Front camera OmniVision ov8856 N
Main camera Samsung s5k2t8 N
RAM console (ramoops) - Y
Panel power supply Renesas isl98608 - Datasheet

Back to stock firmware

Linux tutorial:

  1. Enter EDL Mode
  2. Download the qdl tool from here and build it. Arch Linux users can simply install the qdl AUR package.
  3. Download firmware for your model from here.
  4. Open a terminal inside the extracted ZIP directory
  5. Execute the following command: qdl --storage ufs --include ./ ./prog_ufs_firehose_8996_ddr.elf ./rawprogram0.xml ./patch0.xml ./rawprogram1.xml ./patch1.xml ./rawprogram2.xml ./patch2.xml ./rawprogram3.xml ./patch3.xml ./rawprogram4.xml ./patch4.xml ./rawprogram5.xml ./patch5.xml
  6. After it has finished, the command will exit itself and the phone should reset. If it does not reset automatically, hold down the power button. Now you should be able to boot back into stock firmware.

See also