FORUMS
Remove All Ads from XDA

axon7tool: Flash and backup boot/recovery using EDL mode

73 posts
Thanks Meter: 105
 
By tennear, Member on 6th December 2016, 10:33 PM
Post Reply Email Thread
Note: This is an inherently dangerous tool. I have made every effort to make it as safe as possible. But there is always a risk of bricking your device. You assume all responsibility for the consequences. Proceed with caution.

Warning: To avoid bricking your device, NEVER write both boot and recovery in one session. ALWAYS write one partition, test, then write the other. This is why the tool will only write one partition at a time.

Warning: There are versions of TWRP for the Axon 7 that are known to erase your IMEI when doing a restore. Do NOT do a TWRP restore unless your are SURE that you have a good version of TWRP!

This tool will allow you to:
  • Backup your boot and recovery partitions.
  • Flash a boot or recovery image (including the signed TWRP image).

See following posts for operating system specific setup instructions.

Once your setup is complete, enter EDL mode:
1. Power off phone.
2. Hold both volume buttons.
3. Plug phone into computer.
4. For G models, you must "adb reboot edl" (see other threads).

Usage:
axon7tool <mode> <partition(s)>
Note: The tool name will vary depending on your operating system.

<mode> is -r for read, -w for write.

For read mode, <partition> is one or more of gpt, boot, recovery. Files will be created as <partition>-backup.bin

For write mode, <partition> is boot or recovery. File will be read from <partition>.bin

Examples:

To backup everything on Linux:
./axon7tool-1.5-linux -r gpt boot recovery

To write recovery on Win64:
Place file as recovery.bin
axon7tool-1.5-win64 -w recovery

Links to axon7tool:
axon7tool-1.5-linux (main)
axon7tool-1.5-linux (alternate)
axon7tool-1.5-win64.exe (main)
axon7tool-1.5-win64.exe (alternate)

Link to signed TWRP removed.

FAQ:

Q: Can you provide a signed boot image with root?
A: No. I do not have the ZTE signing key, and tenfar's images are not current.

Q: Can I have the source code for the tool?
A: No.

Q: Can you provide the programmer?
A: No.

Q: Do you accept donations?
A: No, all work is provided freely for community use.
The Following 31 Users Say Thank You to tennear For This Useful Post: [ View ] Gift tennear Ad-Free
 
 
6th December 2016, 10:33 PM |#2  
OP Member
Thanks Meter: 105
 
More
Setup instructions for Linux:

1. Ensure your login user is in the "plugdev" group.
$ id
You should see plugdev in the list. If not, add yourself to the group and logout/login to take effect.

2. Ensure your udev rules are setup.
Create a file eg. /etc/udev/rules.d/qcom.rules that contains:
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", GROUP="plugdev"
3. All done!
The Following 6 Users Say Thank You to tennear For This Useful Post: [ View ] Gift tennear Ad-Free
6th December 2016, 10:34 PM |#3  
OP Member
Thanks Meter: 105
 
More
Setup instructions for Win64:

1. Download zadig from http://zadig.akeo.ie/

2. Put device in EDL mode.

3. Run zadig. Select the WinUSB driver. If you have installed the Qualcomm EDL driver, you may need to tick "Edit" and find the device in the list.

4. All done!
The Following 7 Users Say Thank You to tennear For This Useful Post: [ View ] Gift tennear Ad-Free
6th December 2016, 10:35 PM |#4  
OP Member
Thanks Meter: 105
 
More
Reserved for Mac instructions.
The Following User Says Thank You to tennear For This Useful Post: [ View ] Gift tennear Ad-Free
6th December 2016, 11:36 PM |#5  
kgptzac's Avatar
Senior Member
Thanks Meter: 16
 
More
Questions:
1) Does the backup of boot and recovery partitions work like backing up through TWRP (if the recovery is already flashed to TWRP)
2) The signed TWRP image is by... ZTE?
6th December 2016, 11:42 PM |#6  
DrakenFX's Avatar
Senior Member
Flag Los Angeles
Thanks Meter: 2,391
 
Donate to Me
More
Quote:
Originally Posted by kgptzac

Questions:
1) Does the backup of boot and recovery partitions work like backing up through TWRP (if the recovery is already flashed to TWRP)
2) The signed TWRP image is by... ZTE?

1- No this doesn't work like backing up with TWRP, This tool is more powerful than Custom Recovery (TWRP), and you should be very careful on how to use it.
Like @tennear mention about try first by using -r (read) then just flash the sign TWRP.
I personally recommend just flash TWRP and DON'T mess with Boot image.

2- the Sign TWRP is not provided by ZTE, ZTE will NEVER release a Custom Recovery for us users.
The Following User Says Thank You to DrakenFX For This Useful Post: [ View ] Gift DrakenFX Ad-Free
6th December 2016, 11:44 PM |#7  
OP Member
Thanks Meter: 105
 
More
Quote:
Originally Posted by kgptzac

Questions:
1) Does the backup of boot and recovery partitions work like backing up through TWRP (if the recovery is already flashed to TWRP)
2) The signed TWRP image is by... ZTE?

1. The tool writes the raw partitions to your PC. Whatever you have in the partition is written out, whether it is stock recovery or TWRP or whatever.

2. The signed TWRP image is copied from the zip that tenfar provided in his post. I did not create it, and I cannot create signed images.
The Following User Says Thank You to tennear For This Useful Post: [ View ] Gift tennear Ad-Free
7th December 2016, 07:08 AM |#8  
Senior Member
Flag Ghent
Thanks Meter: 120
 
More
Forgive me my noobiness, but here’s a step-by-step-instruction list. Am I thinking right? I want to minimise the risk when I try your tool tomorrow.

Step 1: Enable Developer options in phone by tapping the build number
Step 2: Enable OEM Unlock in phone (is this needed?)
Step 3: Enable debugging (for adb)
Step 4: Connect phone to PC
Step 5: Download Zadig
Step 6: Install Zadig
Step 7: Open command in the folder in which you downloaded adb.exe (and the rest of the files that come with it) (Richt click while holding shift to get the option to open CMD in a folder)
Step 8: Enter the command “Adb Devices” to reassure your device is detected
Step 9: Enter the command “Adb reboot edl” to reboot the phone to EDL mode
Step 10: After phone has rebooted to EDL mode, run Zadig, select WInUSB driver and install it for your device
Step 11: Rename “axon7tool-1.5-win64.exe” to “axon7tool.exe”
Step 12: Download “axon7-2017u-twrp-signed.img” to the folder where axon7tool.exe is located
Step 13: Open command in the folder in which you have downloaded axon7tool-1.5-win64.exe (renamed to axon7tool.exe)
Step 14: Enter command “axon7tool -r gpt”.
Step 15: Enter command “axon7tool -r boot”
Step 16: Enter command “axon7tool -r recovery”
Step 17: Verify if the tool has created “gpt-backup.bin”, “boot-backup.bin”, “recovery-backup.bin”.
Step 18 (unsure): rename “axon7-2017u-twrp-signed.img” to “recovery.bin” ?
Step 19: enter “axon7tool -w recovery recovery.bin
Step 20: Wait for the command to finish
Step 21: Place the .zip file for Z.A.D. Mix7 or CM13 on your SD card via your PC or Axon 7. Also download Gapps.zip of your choice and place on SD card.
Step 22: Boot your Axon 7 to TWRP Recovery by holding the power button simultaneously with volume down (or is it volume up?)
Step 23: Perform a full wipe of Dalvik, Cache and Data in TWRP
Step 24: Flash the .zip of your custom ROM of choice in TWRP
Step 25: Flash the .zip of your Google Apps of choice in TWRP
Step 26: Perform a full wipe of Dalvik, Cache and Data in TWRP
Step 27: Reboot your phone, enjoy the custom ROM of your choice.

Is this the correct procedure?

I’m a bit unsure of step 18. Am I doing it right? Or do you need to unzip that .img somehow to find a recovery.bin file? Or do you need to get that file from somewhere else? Or do you need to rename “axon7-2017u-twrp-signed.zip” to “recovery.img”?

For Z.A.D. MIX7, I suppose you still need to flash a SuperSU version seperately? I heard in CM it's baked-in.

Thanks for the help.

Jan
The Following 4 Users Say Thank You to Controllerboy For This Useful Post: [ View ] Gift Controllerboy Ad-Free
7th December 2016, 07:37 AM |#9  
OP Member
Thanks Meter: 105
 
More
@Controllerboy close, but not quite. I'll attempt to provide detailed feedback on your step by step list tomorrow. Time for sleep now.
7th December 2016, 02:11 PM |#10  
OP Member
Thanks Meter: 105
 
More
Quote:
Originally Posted by Controllerboy

Step 1: Enable Developer options in phone by tapping the build number
Step 2: Enable OEM Unlock in phone (is this needed?)
Step 3: Enable debugging (for adb)

None of these steps should be necessary.
Quote:
Originally Posted by Controllerboy

Step 4: Connect phone to PC
Step 5: Download Zadig
Step 6: Install Zadig

I believe you just run zadig, I don't remember an installer.
Quote:
Originally Posted by Controllerboy

Step 7: Open command in the folder in which you downloaded adb.exe (and the rest of the files that come with it) (Richt click while holding shift to get the option to open CMD in a folder)
Step 8: Enter the command “Adb Devices” to reassure your device is detected
Step 9: Enter the command “Adb reboot edl” to reboot the phone to EDL mode
Step 10: After phone has rebooted to EDL mode, run Zadig, select WInUSB driver and install it for your device
Step 11: Rename “axon7tool-1.5-win64.exe” to “axon7tool.exe”

Renaming the tool is optional.
Quote:
Originally Posted by Controllerboy

Step 12: Download “axon7-2017u-twrp-signed.img” to the folder where axon7tool.exe is located
Step 13: Open command in the folder in which you have downloaded axon7tool-1.5-win64.exe (renamed to axon7tool.exe)
Step 14: Enter command “axon7tool -r gpt”.
Step 15: Enter command “axon7tool -r boot”
Step 16: Enter command “axon7tool -r recovery”

The tool is "one shot". You can read any combination of gpt, boot, and recovery in one session, then the tool will restart the phone.
Quote:
Originally Posted by Controllerboy

Step 17: Verify if the tool has created “gpt-backup.bin”, “boot-backup.bin”, “recovery-backup.bin”.
Step 18 (unsure): rename “axon7-2017u-twrp-signed.img” to “recovery.bin” ?

Yes, this is correct.
Quote:
Originally Posted by Controllerboy

Step 19: enter “axon7tool -w recovery recovery.bin
Step 20: Wait for the command to finish

Yes, this is correct. Writing boot or recovery takes about 30 seconds. Then the tool will reboot your phone. Be sure to hold the Vol+Up button to reboot into recovery.
Quote:
Originally Posted by Controllerboy

Step 21: Place the .zip file for Z.A.D. Mix7 or CM13 on your SD card via your PC or Axon 7. Also download Gapps.zip of your choice and place on SD card.
Step 22: Boot your Axon 7 to TWRP Recovery by holding the power button simultaneously with volume down (or is it volume up?)
Step 23: Perform a full wipe of Dalvik, Cache and Data in TWRP
Step 24: Flash the .zip of your custom ROM of choice in TWRP
Step 25: Flash the .zip of your Google Apps of choice in TWRP
Step 26: Perform a full wipe of Dalvik, Cache and Data in TWRP
Step 27: Reboot your phone, enjoy the custom ROM of your choice.

Everything past step 20 is up to you.
Quote:
Originally Posted by Controllerboy

Is this the correct procedure?

I’m a bit unsure of step 18. Am I doing it right? Or do you need to unzip that .img somehow to find a recovery.bin file? Or do you need to get that file from somewhere else? Or do you need to rename “axon7-2017u-twrp-signed.zip” to “recovery.img”?

For Z.A.D. MIX7, I suppose you still need to flash a SuperSU version seperately? I heard in CM it's baked-in.

Thanks for the help.

Jan

You cannot unzip an img file.

The TWRP image provided is just as tenfar provided for 2017u users. You only need to rename it to recovery.img for using the tool.

If someone has the 2017g TWRP file, I can upload and link it. The links in the tenfar post have been removed.
The Following User Says Thank You to tennear For This Useful Post: [ View ] Gift tennear Ad-Free
7th December 2016, 03:25 PM |#11  
rczrider's Avatar
Senior Member
Flag Markarth
Thanks Meter: 457
 
More
Folks who are able to use this new tool/method successfully, please report back with your variant. I can't test this myself, so I'm relying on some verification before I update the newbie guide to point here instead of tenfar's thread (which is outdated and no longer updated as tenfar is now inactive).
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes