[GUIDE] [A2017G] Install TWRP, Unlock BL, Flash Custom ROM

Perhogan

New member
Mar 29, 2017
3
0
0
error while flashing Lineage OS

Similar to other users in the thread i got the error:
TZ version TZ.BF.4.0.1-00315 assert failed: axon7.verify_trustzone("TZ.BF.4.0.1-00315") == "1"
I am sure i installed the A2017G but then I got lost in the conversation and not sure what to do now :confused:

:( :crying: Additionally While trying different "wipe" i accidentally wiped the old System. so i am now stuck with a just bought phone with TWRP only ... can you help?

Thanks in Advance
Andrea
 

Mr.Sack

Member
Dec 26, 2015
17
3
0
@Controllerboy I've just rooted my phone and (no offense to you or anyone) from all the small bits of info that i found lacking over every post, it feels like I just installed iOS on a Nokia 1100...

So, could you add these things to the main post? Every problem I had on the way had already been asked to every OP on the other posts, so it would be more helpful if you just condensed all the steps in your post. BTW i have (had, more like it) an A2017G with B10:

- If your phone doesn't pop up as QUSB__BULK over EDL mode, then it's probably likely that you had installed the driver that came with the phone (there was an option to install a driver that seemingly did only dev features whenever you connected the USB wire). The device will pop up below Ports (COM & LPT) on the Device Manager (win10 ofc) as Qualcomm something-something USB device. You only have to uninstall the driver if this happens (Programs and Features - ZTE driver). I was dumbfounded when this happened to me :p After this, Zadig was needed in my case, because the icon had a yellow sign

-axon7tool fails with a what() and STD-exception and whatnot - if you installed the Zadig driver, do this:
>go to Device Manager, right click QUSB__BULK and Uninstall
>adb reboot edl
>install Zadig winUSB driver
>reboot phone via power button (~10 secs)
>adb reboot edl
>axon7tool -r gpt boot recovery
That should do the trick.

-after unlocking BL, installing TWRP and all, when you want to install LOS14.1, LOS refuses to install with error axon7.verify_trustzone - to fix this you have to install the UNIVERSAL BOOTLOADER BEFORE THE N MODEM. I didn't find any mention of the A2017X_B15_UniversalBootloader file in this post. So:
After you get access to TWRP you have to:
>Install univ. BL (A2017X_B15_... .zip)
>Install A2017G_N_modem.zip
>Install LOS14.1 zip
>Install optionally Gapps
>Flash TWRP img

I think that's all. Thank you for the really nice guide. I'm in no way criticizing your work or the devs' work here, but I want to help people who might have the same errors than me in the future. ;)
Thanks alot, this works to unbrick the A2017G version. Now I didn't waste 450 euros...
 

senny22

Senior Member
Mar 31, 2017
238
36
0
Uppsala
20) In command, type "axon7tool -w recovery"

This is were things stop working for me. I get the following error along with "axon7tool.exe" crashing:

C:\adb>axon7tool -w recovery
Connecting to device...
Sending programmer...
Connecting to programmer...
log: Supported Functions: program configure nop firmwarewrite patch setbootablestoragedrive ufs emmc power benchmark read getstorageinfo getsha256digest erase peek poke getnumdisksectors
log: Supported Functions: program configure nop firmwarewrite patch setbootablestoragedrive ufs emmc power benchmark read getstorageinfo getsha256digest erase peek poke getnumdisksectors
Writing recovery ...
F: failed to open recovery.bin
terminate called after throwing an instance of 'std::runtime_error'
what(): error: No error

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

What could be wrong here? I am on A2017G and B06.
 

dnlilas

Senior Member
Dec 27, 2010
416
74
0
@senny22

You were missing step 7):
"7) Place the TWRP .img file in the same folder as "adb.exe" and "axon7tool.exe", rename it to "recovery.img""
You must rename the twrp_rec_tenfar.img to recovery.bin, since the command "axon7tool -w recovery" expects to find recovery.bin file in the same directory.
 

senny22

Senior Member
Mar 31, 2017
238
36
0
Uppsala
@senny22

You were missing step 7):
"7) Place the TWRP .img file in the same folder as "adb.exe" and "axon7tool.exe", rename it to "recovery.img""
You must rename the twrp_rec_tenfar.img to recovery.bin, since the command "axon7tool -w recovery" expects to find recovery.bin file in the same directory.
I did put the following files in the adb folder: "recovery.img" and recovery.bin." see: "https://gyazo.com/5f5cf1b87ff4e325a05f5d0591b07cbe"

Is there something i'm missing here?

---------- Post added at 07:12 PM ---------- Previous post was at 07:03 PM ----------

Did you read the bottom of the OP before asking? I had the same problem, you simply have to uninstall
the drivers, then reboot a couple times or whatever. Just read the part where the error is mentioned
i've read through this whole thread without succes. I assume you were talking about this part?: If axon7tool fails with a what() and STD-exception and whatnot - if you installed the Zadig driver
Go to Device Manager, right click QUSB__BULK and Uninstall, then use the "adb reboot edl" command. Install the winUSB driver via Zadig. Reboot the phone by holding the power button about 10 seconds. Enter the command adb reboot edl again. Enter "axon7tool -r gpt boot recovery" in command.

In that case then i've tried reinstalling the drivers and rebooting as stated above and yet the problem persists.
 
Last edited:

Choose an username...

Senior Member
Oct 16, 2016
2,677
923
0
@senny22 What Android version are you running? The thread was written for Marshmallow, so it might not work with Nougat and the missing fastboot mode abd stuff. Try another computer if you can. Maybe try axon7toolkit from bkores (google it)
 

senny22

Senior Member
Mar 31, 2017
238
36
0
Uppsala
@senny22 What Android version are you running? The thread was written for Marshmallow, so it might not work with Nougat and the missing fastboot mode abd stuff. Try another computer if you can. Maybe try axon7toolkit from bkores (google it)
I'm running android 6.0.1. A.k.a marshmallow.

---------- Post added at 10:28 PM ---------- Previous post was at 10:05 PM ----------

16) In command, type "axon7tool -r gpt boot recovery" and hit enter

This is where my error occurs. The following is shown in command prompt:

F: failed to open recovery.bin
terminate called after throwing an instance of 'std::runtime_error'
what(): error: No error

The fix in the OP did not resolve my issue with this error. What could be the problem?
 

Choose an username...

Senior Member
Oct 16, 2016
2,677
923
0
I'm running android 6.0.1. A.k.a marshmallow.

---------- Post added at 10:28 PM ---------- Previous post was at 10:05 PM ----------

16) In command, type "axon7tool -r gpt boot recovery" and hit enter

This is where my error occurs. The following is shown in command prompt:

F: failed to open recovery.bin
terminate called after throwing an instance of 'std::runtime_error'
what(): error: No error

The fix in the OP did not resolve my issue with this error. What could be the problem?

Hmm. I don't know. Again, try another computer
 

dnlilas

Senior Member
Dec 27, 2010
416
74
0
I did put the following files in the adb folder: "recovery.img" and recovery.bin." see: "https://gyazo.com/5f5cf1b87ff4e325a05f5d0591b07cbe"

Is there something i'm missing here?

---------- Post added at 07:12 PM ---------- Previous post was at 07:03 PM ----------



Your Windows explorer settings hides file extension. From your screenshot, it appears that you have in fact the following 2 files:
- recovery.bin.img
- recovery.img
Both displayed as "Disc image file" type by Windows. This would explain that recovery.bin file is not found by axon7tool, and hence the command error.

You must uncheck file extension in your Windows explorer settings, and rename recovery.bin.img file to recovery.bin, i.e. filename = recovery,
file extension = bin.
 
  • Like
Reactions: lafester

senny22

Senior Member
Mar 31, 2017
238
36
0
Uppsala
Hmm. I don't know. Again, try another computer
I have tried it on my laptop with the same problem.

---------- Post added at 10:43 AM ---------- Previous post was at 09:59 AM ----------

I did put the following files in the adb folder: "recovery.img" and recovery.bin." see: "https://gyazo.com/5f5cf1b87ff4e325a05f5d0591b07cbe"

Is there something i'm missing here?

---------- Post added at 07:12 PM ---------- Previous post was at 07:03 PM ----------



Your Windows explorer settings hides file extension. From your screenshot, it appears that you have in fact the following 2 files:
- recovery.bin.img
- recovery.img
Both displayed as "Disc image file" type by Windows. This would explain that recovery.bin file is not found by axon7tool, and hence the command error.

You must uncheck file extension in your Windows explorer settings, and rename recovery.bin.img file to recovery.bin, i.e. filename = recovery,
file extension = bin.
A huge thanks @dnlilas ! This was my problem yet how silly it may have been. The rest of the guide worked like a charm.
 

chironfr

Senior Member
Feb 14, 2016
85
27
0
Chassieu
good afternoon.
I have an A2017G
Everything went fine.
TWRP is installed
I've flashed the proper modem A2017G_N_Modem.zip
I can't install lineage-14.1-20170327-nightly-axon7-signed
I have an error
Code:
checking for tz version TZ.BF.4.0.1-00315
assert failed: axon7.verify_trustzone("TZ.BF.4.0.1-00315") =="1"
update process ended with error 7
I'm puzzled...

I've tried first to install unofficial, same problem.
I've downloaded again the files, same problem.
What is wrong? Help...
 
Last edited:

chironfr

Senior Member
Feb 14, 2016
85
27
0
Chassieu
good afternoon.
I have an A2017G
Everything went fine.
TWRP is installed
I've flashed the proper modem A2017G_N_Modem.zip
I can't install lineage-14.1-20170327-nightly-axon7-signed
I have an error
Code:
checking for tz version TZ.BF.4.0.1-00315
assert failed: axon7.verify_trustzone("TZ.BF.4.0.1-00315") =="1"
update process ended with error 7
I'm puzzled...

I've tried first to install unofficial, same problem.
I've downloaded again the files, same problem.
What is wrong? Help...
Replying to myself.
I finally sorted it out
First I had to flash A2017X_B15_Universal_Bootloader.zip then I could flash Lineage
The next problem has been the request by lineage of a password I didn't have
Fixed in TWRP by formatting /data in ext4
FINALLY! IT WORKS! YESSSSSSS!!!! :D:D:D (sorry for the capital letters but I'm really very happy)
 

|Furō|

Senior Member
Mar 30, 2017
69
11
0
Stuck unlocking the bootloader

Hey everyone!
First of all thank you all for this guide! If I manage to get through all of this, it`s definitely thanks to you!

Well to get to the topic:
I managed to complete Step A) and flashed TWRP on my ZTE Axon 7 G, which is currently running Android 6 (B10) found on ZTEs Website (I downgraded from 7.1.1) I`m able to boot into TWRP and as far as I can tell, everything seems okay :) (kinda proud so far ^^)

So I started Step B) with my device still connected to the PC (as MTP) and everything went fine until I got to Step 8. There I would get the "permission denied" post. So I scrolled down, noticed the little "NOTE" and tried doing Step B) while in TWRP. But when doing so, I get stuck at point 6 with the following issue:

adb: error: connect failed: no devices/emulators found

I noticed that, when connecting my phone to the pc, while in TWRP it shows up as ZTE A2017U and is using Google Nexus ADB Interface.

Basically I don`t know what to do now. Since I get the "permission denied" issue when booted normally to stock and I get the "connect failed" issue when booted to TWRP.

Any help is greatly appreciated!! Sorry I really am a noob, but the guide seemed so detailed I decided to dare it :`) Hopefully we can get this to a good end. If you need more infomation, ask away!