Jump to content

ZTE Axon 7 (zte-axon7): Difference between revisions

From postmarketOS Wiki
Ungeskriptet (talk | contribs)
Change "python edl.py" to "./edl"
Ungeskriptet (talk | contribs)
m Please hesitate to contact me.
 
(34 intermediate revisions by 5 users not shown)
Line 6: Line 6:
| imagecaption = ZTE Axon 7
| imagecaption = ZTE Axon 7
| releaseyear = 2016
| releaseyear = 2016
| originalsoftware = MiFavor 4.0 (Android 6.0.1)
| originalsoftware = Android
| chipset = Qualcomm MSM8996 Snapdragon 820
| originalversion = 6.0.1 (MiFavor 4.0)
| chipset = Qualcomm Snapdragon 820 (MSM8996)
| cpu = Quad-core (2x 2.15 GHz Kryo & 2x 1.6 GHz Kryo)
| cpu = Quad-core (2x 2.15 GHz Kryo & 2x 1.6 GHz Kryo)
| gpu = Adreno 530
| gpu = Adreno 530
Line 14: Line 15:
| memory = 4 GB
| memory = 4 GB
| architecture = aarch64
| architecture = aarch64
| type = handset
| status_usbnet =
| status_usbnet =
| status_flashing =
| status_flashing =
Line 21: Line 23:
| status_xwayland =
| status_xwayland =
| status_fde =
| status_fde =
| status_mainline =
| status_mainline = P
| status_battery =
| status_battery =
| status_3d =
| status_3d =
Line 32: Line 34:
| status_sms =
| status_sms =
| status_calls =
| status_calls =
| status =
| status_otg =
| status_otg =
| status_nfc =
| status_nfc =
| booting = no
| booting = yes
}}{{Based on SoC|Qualcomm_Snapdragon_820/821_(MSM8996)|Snapdragon 820}}
}}{{Based on SoC|Qualcomm_Snapdragon_820/821_(MSM8996)|Snapdragon 820}}


Line 44: Line 45:


== How to enter flash mode ==
== How to enter flash mode ==
* '''Fastboot''': Power on the device by pressing and holding {{Button|Power}} and {{Button|Volume Down}}.
{{Warning|Device may get stuck in EDL mode. To reset drain or disconnect the battery.}}
* '''Recovery''': Power on the device by pressing and holding {{Button|Power}} and {{Button|Volume Up}}.
{{Note|'''Note:''' Fastboot may not be available on latest stock firmware}}
* '''EDL Mode''': Hold down {{Button|Volume Up}} and {{Button|Volume Down}} while connecting the device to a computer with a USB cable.
* '''Bootloader''': Boot into recovery and select 'Reboot to bootloader' or run <code>adb reboot bootloader</code> on a computer from Android or factory test mode
* '''Recovery''': Power on the device by holding {{Button|Power}} and {{Button|Volume Up}}.
* '''Factory test mode (FTM)''': Power on the device by holding {{Button|Power}} and {{Button|Volume Down}}


== Unlocking the bootloader ==
== Unlocking the bootloader ==
{{note|'''Note:''' This has been only tested on A2017'''G''' version of the Axon 7}}
{{note|'''Note:''' This has been only tested on A2017'''G''' 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.
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.


# Download and Install the [https://github.com/bkerler/edl EDL tool] (follow the instrucitons on the GitHub page to install it)
# Download and Install the [https://github.com/bkerler/edl EDL tool] (follow the instrucitons on the GitHub page to install it)
# Boot into EDL mode: <code>adb reboot edl</code>
# Boot into EDL mode with <code>adb reboot edl</code> from Android or with the key combination
# Backup all partitions from the phone (without userdata):
# Backup all partitions from the phone (without userdata):
#:<code>./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs rl backup --skip=userdata --genxml</code>
#:<syntaxhighlight lang="shell-session">
# Downgrade the phone to B12 Nougat firmware from EDL mode from B04 Oreo (might not be necessary at all, not sure):
$ ./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs rl backup --skip=userdata --genxml
## Download the EDL mode compatible firmware from [https://androidfilehost.com/?fid=1322778262903993129 here] or [https://androidfilehost.com/?fid=7161016148664813849 here] and extract it
</syntaxhighlight>
# Downgrade the phone to Android 7 (Nougat) firmware:
## Download the Android 7 EDL flashable firmware from [https://androidfilehost.com/?w=files&flid=220826 here] and extract it
## Flash the firmware (Only proceed if partitions were backed up!)
## Flash the firmware (Only proceed if partitions were backed up!)
##:<syntaxhighlight lang="shell-session">
##:<syntaxhighlight lang="shell-session">
$ ./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/rawprogram*.xml A2017G_B12_NOUGAT_FULL_EDL/patch*.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
</syntaxhighlight>
</syntaxhighlight>
# Reboot the phone by just holding {{Button|Power}} for a few seconds
#* This step can also be done with <code>qdl</code> like [[ZTE_Axon_7_(zte-axon7)#Back_to_stock_firmware|this]]
# Boot into the stock Nougat system and enable "OEM Unlocking"
# Reboot the phone by holding down {{Button|Power}} for a few seconds
# Reboot into EDL mode again: <code>adb reboot edl</code>
# Boot into the stock Nougat ROM and enable OEM Unlocking in the developer settings
# Download and flash signed TWRP from [https://www.androidfilehost.com/?fid=7161016148664813848 here] or [https://androidfilehost.com/?fid=673956719939817588 here] (look for recovery.bin)
# Reboot into EDL mode again
#:<code>./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs w recovery twrp_signed-axon7.bin --lun=4</code>
# Download new bootloader files [https://www.androidfilehost.com/?fid=7161016148664813850 aboot_unlock.img] and [https://www.androidfilehost.com/?fid=7161016148664813851 fbop_unlock.img] to allow unlocking
# Reboot the phone into recovery (see above)
# Flash new bootloader files (these files will also restore access to fastboot)
# Download patched [https://www.androidfilehost.com/?fid=7161016148664813850 aboot.img] and [https://www.androidfilehost.com/?fid=7161016148664813851 fbop/fastboot_unlock.img] ([https://mega.nz/#F!rcFCQZ7C!vn457hU1zDwc0uVpvm5otw aboot.img mirror] and [https://androidfilehost.com/?fid=529152257862665656 fbop/fastboot_unlock.img mirror])
# Backup current partitions and flash the patched ones
#:<syntaxhighlight lang="shell-session">
#:<syntaxhighlight lang="shell-session">
$ adb push aboot.img fastboot_unlock.img /sdcard
$ ./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs --lun=4 w aboot aboot_unlock.img
$ adb shell dd if=/dev/block/bootdevice/by-name/fbop of=/sdcard/fbop_lock.img
$ ./edl --loader=Loaders/zte/009470e100040000_d1b89b1385b0db46_fhprg_peek.bin --memory=ufs --lun=0 w fbop fbop_unlock.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
</syntaxhighlight>
</syntaxhighlight>
# Unlock the bootloader (finally): <code>fastboot oem unlock</code>
# Unlock the bootloader: <code>fastboot oem unlock</code>
# Reboot back into the bootloader and flash the latest [https://twrp.me/zte/zteaxon7.html official TWRP]: <code>fastboot flash recovery twrp-3.5.2_9-0-ailsa_ii.img</code>


Your ZTE Axon 7 should now have an unlocked bootloader with latest TWRP, for questions ask @ungeskriptet:matrix.org on Matrix.
== Installation ==
== Installation ==
/* Not yet */
/* Not yet */
== Mainline status ==
{|class="wikitable feature-colors"
! 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 || <code>ak4961</code> codec
|-
| GPU || Qualcomm Adreno 530 || N ||
|-
| Wi-Fi || rowspan = 2 | Qualcomm qca6174 || Y || Connected through PCIe
|-
| Bluetooth || N || Connected through UART
|-
| Front camera || OmniVision ov8856 || N ||
|-
| Main camera || Samsung s5k2t8 || N ||
|-
| RAM console (<code>ramoops</code>) || - || Y ||
|-
| Panel power supply || Renesas isl98608 || -  || [https://www.renesas.com/us/en/document/dst/isl98608-datasheet Datasheet]
|}
== Back to stock firmware ==
Linux tutorial:
# [[ZTE_Axon_7_(zte-axon7)#How_to_enter_flash_mode|Enter EDL Mode]]
# Download the '''qdl''' tool from [https://www.96boards.org/documentation/consumer/guides/qdl.md.html here] and build it. Arch Linux users can simply install the '''[https://aur.archlinux.org/packages/qdl qdl]''' AUR package.
# Download firmware for your model from [https://androidfilehost.com/?w=files&flid=220826 here].
# Open a terminal inside the extracted ZIP directory
# Execute the following command: <code>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</code>
# 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 ==
== See also ==
* [https://www.gsmarena.com/zte_axon_7-8067.php GSMArena page]
* [https://www.gsmarena.com/zte_axon_7-8067.php GSMArena page]
* [https://forum.xda-developers.com/t/guide-a2017g-install-twrp-unlock-bl-flash-custom-rom.3517379/ How to unlock the bootloader]
* [https://github.com/ungeskriptet/linux/tree/msm8996 Mainline kernel fork]
* [http://deviceinfohw.ru/devices/item.php?item=85921 Device Info HW]

Latest revision as of 08:52, 22 March 2025

ZTE Axon 7
ZTE Axon 7
ZTE Axon 7
Manufacturer ZTE
Name Axon 7
Codename zte-axon7
Released 2016
Type handset
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
Software
Original software Android
Original version 6.0.1 (MiFavor 4.0)
postmarketOS
Category testing
Pre-built images no
Mainline partial
Features
Flashing
No data
USB Networking
No data
Internal storage
No data
SD card
No data
Battery
No data
Screen
No data
Touchscreen
No data
Multimedia
3D Acceleration
No data
Audio
No data
Camera
No data
Camera Flash
No data
Connectivity
WiFi
No data
Bluetooth
No data
GPS
No data
NFC
No data
Modem
Calls
No data
SMS
No data
Mobile data
No data
Miscellaneous
FDE
No data
USB OTG
No data
HDMI/DP
No data
Sensors
Accelerometer
No data
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data

Contributors

Users owning this device


How to enter flash mode

Warning 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

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