yashsingh1/xdaforums huggingface dataset:
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
No, flash a Full OTA for your device. That's the first thing I would have tried. If you're really still having issues after all that then your problem might not even be software related.

Get a logcat of booting and connecting to network that I can look at that might lead me to whatever area of your device is not working right.

for logcat: adb wait-for-device; adb logcat > logcat.txt

(do it while your device is booting, and ctrl+C to stop it after you are connected to phone network)

in another terminal, at the same time, do: adb wait-for-device; adb shell "sleep 8; dmesg" > dmesg.txt

Send it to my email, jc@adduo_o.com (fill in the blank)
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Tebor:
I have tried all the ota's and nothing works. Phone is only 5 days old

Long story short, flashed twrp, made a full backup then tried to restore. Since the restore, I cannot connect to data. Sim card is recognised as it ask's for my pin. Have tried sim in another phone and it works

Any other ideas I could try?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
updated above post with more information, also, can you get me a full log of doing those commands i listed above in the code box (copy the terminal screen, including what was typed)

you also tried the [Format Data] button in twrp right, on the wipe page?

update: okay I noticed that fsg is not actually regenerating on the axon 7, I'm going to find a way to rebuild them (my telecom provider doesn't block IMEI 0)
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Tebor:
Email sent
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
well, it's definitely fsg partition related, you don't have a backup of that (from your own device) do you?

i have a good copy from another device but it's invalid on my device

if you do have a backup, the twrp build <hopefully> just improperly restored, didn't improperly backup, so it might be valid (you can send me fsg.emmc.win and i'll let you know if it's good)

i was able to force the imei on my sim slots using qualcomm's NV manager tool but it only allows a single write and then it's stuck forever, so if you make a typo you're screwed on that slot. it doesn't fix fsg though.

do not recommend that route.

i might even be sending my own device back now :|
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Tebor:
The twrp recovery listed at the start of this thread is what I used. All it had in the efs backup was efs1.emmc. No others. I had suspected this was the cause.

Perhaps a warning to other users about messing with efs is in order on the Axon 7 forums.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] gpz1100:
[MENTION=5672995]jcadduono[/MENTION],

How are you able to access anything NV related? The US version (A2017U) does not use the standard 000000 for the spc/msl. Figure out how to read the msl on this device?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
000000 worked for me :S I have the 6 GB A2017U using QPST 2.7 build 430

maybe the reason 000000 worked was because I had corrupted the configuration, dunno, I barely understand any of this stuff.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] gpz1100:
Interesting. How did you even get the phone into diag mode? There's a few settings under ##786# (or *#*#786#*#*, I can't remember, sprint sim) that require the msl to change. It would reject 000000.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
from adb shell/terminal emulator:

setprop sys.usb.config diag,serial_tty,serial_smd

(found it in /init.qcom.usb.rc)
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] tennear:
Sounds like we need to just kill this project. The signed TWRP is too dangerous.

I do have experience with efs, so it's possible that we can get these devices functional again.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] DrakenFX:
the Signed TWRP it may be trouble but, you/we can just flash the Un-Official ( [MENTION=4911249]Unjustified Dev[/MENTION] ) or Official TWRP ( [MENTION=5672995]jcadduono[/MENTION] ) to get the rest of the steps for ROOT or Unlock bootloader and [MENTION=7890973]tennear[/MENTION] your tool is needed for that. even just to pull partition we can use any of the TWRP but the sign one.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Tebor:
Tennear, your tool is fine. Its just the twrp recovery thats the issue. No need to stop

I used your tool to flash jcadduono's official twrp and it worked perfectly fine

---------- Post added at 08:14 AM ---------- Previous post was at 08:05 AM ----------

If it's any help to anyone

I found a program that successfully wrote back both imei's to my phone. To get the program to connect, all I had to do was boot into FTM mode by holding the volume down button

Tool is located here http://en.miui.com/thread-271552-1-1.html
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] jcadduono:
Nice find!

Sure wish I actually knew my IMEIs lol, when I took the sticker off my phone I accidentally rolled it up and couldn't unroll it so I threw it out :x

Now all I've got is the primary IMEI from the back of the white box. Wonder if there's a method to calculate the 2nd SIM IMEI from the primary.

I actually called ZTE today about my IMEI issue and they're like "oh no problem just give us your first SIM IMEI and ZTE corporate will send an update to your phone in around 3 days from now that will configure your IMEIs for you"

I honestly can't tell if they are rolling that kind of voodoo QPST remote support magic or the girl on the phone just made that line up on the spot LOL
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Tebor:
Sorry, I should have typed, even though both my imei's are showing when I dial *#06#, I still cannot connect to mobile data.

Both my imei's are printed on the side of the box it came in
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] lafester:
Can anyone explain exactly how the fsg partition got wiped on these devices? Is it only on certain models using signed twrp to restore?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Tebor:
Ok here's story

I used Tennear's tool to install the TWRP at the beginning of this thread. I went to backup and selected everything that was showing.

After it ran, I went back to the start and selected restore. I just wanted to make sure I could restore if needed. Again, everything was selected to restore. The restore ran and I then rebooted to find I couldn't connect to Wifi and data and the phone was lagging and rebooting just sitting there.

Looking in the other thread about clearing modemst1 and modemst2, I ran those commands and at reboot I had Wifi back and no more rebooting but still no data connection

Looking in the backup twrp made, the only efs related files were efs1.emmc.win. Nothing else
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] lafester:
What model phone do you have?

I just looked through my backups and on the signed recovery I have efs1&2.emmc.win.

On official recovery I have those plus efsc&g.emmc.win.

This is on U model.

I made the full dump file when unlocking following the newbie guide but I have no idea where it is or how to use it.

I never flash efs backup unless I am having problems simply because its so easy to screw up that partition.

To be clear I'm not having any issues, just trying to understand whats going on.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Tebor:
I have the A2017G model.

I didn't think that EFS problems were and issue with this phone. I remember in years gone by when I owned a Galaxy S4 that efs was a big deal.

For the benefit of other user's, could someone maybe come up with or suggest a procedure to safely backup and restore if needed the EFS on the Axon 7 and sticky that thread?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] lafester:
I just tried out the partition backup tool (which has very little feedback/views) found a few posts down in this forum.

Successfully backed up every default partition and made a fsg partition backup as well. all looks good but I am hesitant to flash until I need to.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Tebor:
If I was to get access to a backup from another A2017G of efs1, efs2, efsc and efsg, restored these to my device, and used the imei program to write my own numbers back, would this maybe work?

If so, anyone out their with a backup willing to share?

Edit: would the backup even need to be from a G model?

Edit 2: Also just wanted to say sorry [MENTION=7890973]tennear[/MENTION] for filling up your thread with all this EFS talk
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] tennear:
QFIL should be able to backup and restore EFS, right?

I also have code to read and write QFIL compatible xqcn files... :D
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] gpz1100:
Good find. If anything, I'd add adb ( ' setprop sys.usb.config diag,serial_tty,serial_smd,adb ') to the end so that's accessible too.

This gets me one step closer, but the thing still needs a valid msl/spc code to do anything. I'm guessing that imei writer program does it's work on a lower level than regular phone flashing tools. Probably the only term really needed is diag (and adb).

I can't add much to the twrp discussion other than I had strange restore results with the unofficial twrp if the system partition was formatted rather than using rm -rf function. The phone would boot to the blue zte logo and just sit there. I could recover by reflashing the entire system image (ZTE_A2017U.B29_StockSystem_by_DrakenFX.zip). If I backed up the whole system_image instead that would restore ok but the resulting file was 1 1/2 times bigger and not compressed.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Controllerboy:
First of all, I want to thank everyone in the thread for their efforts in explaining/researching the EFS problems.

I think I'm in about the same situation as [MENTION=6054963]Tebor[/MENTION]. I went very slow in installing TWRP, unlocking BL and flashing a custom ROM, because the last year, I've had too much bad luck with my phones (stolen, lost while drunk, water damage,...). When I finally took the leap, everything went buttery smooth thanks to [MENTION=7890973]tennear[/MENTION]'s EDL axon7tool and the efforts of other devs. However, about a week ago, I backed everything in the signed, unofficial TWRP before flashing a Dolby.zip I hoped would free me from the sound distortion in CM13. After restoring the backup, I was in a bootloop and after fixing that by flashing the full A2017G B06 Bootstack and full OTA by [MENTION=3044858]DrakenFX[/MENTION], I noticed cellular and Wi-Fi were missing. I could only restore Wi-Fi by erasing the modemst partitions and lettem them regenerate. Cellular was still missing.

A few months ago, several XDA users had noticed in the beginning of september that some versions of TWRP (including the unofficial one Tabor and I installed) have a fatal bug. (Source). Sadly, this information didn't seem to have been passed on to the Axon 7 subforums.

This flaw makes TWRP only backup "efs1.emmc" and "efs1.emmc.md5" files... Which seem to be useless without efs2, efsc and efsg. When restoring the TWRP backup, your phone ends up bricked and EFS corrupted. After a few hours of reading and searching I installed both qualcomm drivers and QPST, but even that doesn't work. Off course I realise even if that worked, I would need a QPST backup file (which I don't have) to fix my device, but QPST doesn't even connect to my device (see screenshot). Even after entering the "setprop sys.usb.config diag,serial_tty,serial_smd,adb" command in command (didn't work, see screenshot) and TWRP terminal (does seem to work), it doesn't detect my phone. Same goes for Tebor's tool, I tried that the day before yesterday and that doesn't work as well...

TL;DR I think the only thing that might help us are valid (as in: not taken by the unofficial TWRP) backups of an A2017G user's efs1.emmc, efs2.emmc, efsc.emmc and efsg.emmc which are somehow modified to include our IMEI numbers. I don't know if there are other differences between the EFS partitions besides the IMEI's? If so, that renders them useless to us. Maybe an altered QPST backup could also help [MENTION=6054963]Tebor[/MENTION], but since I can't seem to connect to it, it's of no use to me.

[MENTION=3044858]DrakenFX[/MENTION] I saw you warn other users against restoring the EFS backups from other phones, why is that? Are there additional differences other than the IMEI number and device ID? Why would it prevent your phone from booting?

[MENTION=5672995]jcadduono[/MENTION] do you still need additional logs?

Thanks again.

Attachements: composite screenshot image of errors
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] tennear:
I'll create a new thread for the EFS/IMEI discussion.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] tennear:
TWRP restore discussion: http://xdaforums.com/axon-7/how-to/investigation-recovering-efs-twrp-t3522171
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] LuneTech:
Does this work with the b29 build? I'm having so much trouble unlocking the b29 bootloader. And when I reboot into edl mode it just stays on a black screen and nothing happens. I don't even see the red blinking light
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] amphi66:
Yes it works with B29. You will only see 1 quick, red blink as it first goes into EDL mode. That's it & just a black screen thereafter.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] corpdecker:
Hi! Thanks for taking the time and effort to make this tool for us. I'm trying to get this working but am hitting a roadblock on the first step.

I'm using Arch Linux, I put the phone in edl mode and can see the following:

: lsusb
Bus 004 Device 009: ID 05c6:9008 Qualcomm, Inc. Gobi Wireless Modem (QDL mode)

When I try to run the program it says it times out connecting:

: gdb --args ./axon7tool-1.5-linux -r gpt
(snip)
(gdb) r
Starting program: /home/decker/Downloads/axon/axon7tool-1.5-linux -r gpt
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff6336700 (LWP 1916)]
Connecting to device...
S: failed to read command
S: Failed to receive hello
terminate called after throwing an instance of 'std::runtime_error'
what(): error: Connection timed out

Thread 1 "axon7tool-1.5-l" received signal SIGABRT, Aborted.
0x00007ffff72d104f in raise () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff72d104f in raise () from /usr/lib/libc.so.6
#1 0x00007ffff72d247a in abort () from /usr/lib/libc.so.6
#2 0x00000000004c8b3d in __gnu_cxx::__verbose_terminate_handler() ()
#3 0x0000000000455246 in ?? ()
#4 0x0000000000455291 in std::terminate() ()
#5 0x0000000000453f59 in __cxa_throw ()
#6 0x000000000044c492 in ?? ()
#7 0x000000000044a58a in ?? ()
#8 0x000000000044a114 in ?? ()
#9 0x000000000044a747 in ?? ()
#10 0x00007ffff72be291 in __libc_start_main () from /usr/lib/libc.so.6
#11 0x0000000000449999 in ?? ()
(gdb) k

Stracing it shows it connecting to what appears to be the right thing, here's the full output in plain text:

http://n3t.net/axon7tool.strace.txt

I'm running it as root (hey, I trust you!) so permissions shouldn't be an issue.

Arch doesn't have a plugdev group like debian/ubuntu, so I created the same file you suggested and just gave it a fairly random group that seemed somewhat related (lol?) and restarted udev and udev-trigger via systemd.

: cat /usr/lib/udev/rules.d/qcom.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", GROUP="usbmux"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", GROUP="usbmux"

Any idea what I'm doing wrong ?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] MetalinatoR:
Cant get to TWRP

I flashed the TWRP image but i cant get to TWRP. My pc says that phone is in DFU mode when i try to do it. Backed up gpt , boot and recovery. Phone works fine actually.

What should i do ?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Controllerboy:
Did you try booting your device, connecting it to your pc, setting it as "debug mode" in "about phone" tap build number 7 times to enable developer options and in developer options, enable "usb debugging". Then, download minimal adb and fastboot from somewhere and open command window in the folder where adb.exe is stored. Type "adb reboot recovery" and hit enter to get to recovery. Still DFU?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] MetalinatoR:
I have whole android sdk at my pc and yes i have developer options open, debug mode enabled and oem unlocking enabled.

Problem is not that i am stuck at DFU mode. My phone works just fine. But i followed the steps to install twrp and axon7tool told me that my installation was successful. I cant get to recovery now. Its stuck at black screen.

When it is in black screen my pc tells me tha the phone is in DFU mode. Otherwise my phone works perfectly.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Controllerboy:
Are you 100% certain you flashed the signed tenfar A2017U TWRP? Any other version won't work. You need to flash that version first, then update it to 3.0.2-2 to fix the EFS backup issue.

The link has been removed from this thread because the signed tenfar version is really dangerous if you decide to backup and restore EFS partitions with it (I have to RMA my device because I unknowingly made that mistake). But I'm certain you can find in elsewhere in this forum. Just keep in mind you shouldn't use it to backup EFS.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] MetalinatoR:
I'm not certain if i flashed the signed tenfar twrp since i couldnt find it. Only version numbers are the same.

I read about the EFS partitions thing and following its respective discussion. Thanks for your consideration.

So using axon7tool and flashing the right version of TWRP will solve my problem.

Thx.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] MetalinatoR:
Well , i found tenfar's TWRP.

Link -->https://www.androidfilehost.com/?fid=24723757092307091

Flashed it with axon7tool. When i try to get to recovery , ZTE logo shows up for a sec then gets stuck at black screen. I found someone who had the same problem and solved it through flashing with axon7root. I did that too but problem did not go away.

Long story short , i cant get to twrp. It shows the ZTE logo for a sec and then black screen (DFU MODE). Is there a way for me to find and send you some logs so you can look it up maybe ?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] shia786:
Do you have an unlocked bootloader, and you on b29?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] MetalinatoR:
I'm not on B29 and i dont have an unlocked bootloader. My only wish is to root my phone. Nothing more :).

I was following steps in here --> http://xdaforums.com/axon-7/development/axon7tool-flash-backup-boot-recovery-t3514254

Maybe i got lost in the process i dont know.

I have a2017g B06 right now.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] shia786:
If you PM me I will be able to help you more
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] tennear:
You should really be on the latest ZTE OTA. There are fixes for both security and battery life. Unfortunately, the latest ZTE OTA does not have a matching signed/rooted boot image. So I cannot recommend this procedure. You should choose between locked/unrooted or unlocked/rooted.

Having said that, it does appear that your phone is rejecting the TWRP image as invalid. The TWRP that I have is:

size=50447650

md5=cacae7daa5da8f342db5b3373b965226

This booted fine on my locked A2017U model. I have since unlocked it, so I cannot test signed images anymore. But I am sure plenty of others can.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Loader009:
That's kind of sad...

None of your tools worked for me.

I am also using ArchLinux like another guy in this thread (he has by far more knowledge than me because I have no knowledge of debugging) and I had also an error.

Tried with Windows 10 but it didn't recognize the Axon7. Using the Zadig tool to install the driver made no difference.

Since it worked earlier with tenfars tool, I reversed all my changes with that before I tried your tool (but forgot fastboot oem lock), after realizing that it doesn't work with your tool, I made anything again with tenfars tool...
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] inks:
Failed to read command / Failed to receive hello

I can confirm the following:

Windows 10 (tried 2 systems) + on A2017G with B08 + Zadig (QUSB__BULK device using WinUSB (v6.1.7600.16385)), tennear's tool fails with the following error: [edit, it DOES work, see below]

Connecting to device...
S: failed to read command
S: Failed to receive hello
terminate called after throwing an instance of 'std::runtime_error'
what(): error: Unknown error

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

I have managed to get tennear's axon7tool to work with both A2017G B06 and B08. You need to do the following:

adb reboot edl

use zadig to replace the QUSB__BULK device driver to WinUSB

reboot the phone

adb reboot edl (again)

then the tool works.

My guess is that replacing the drivers mucks up the state that the EDL is in, and tenfar's + tennear's axon7backup/tool exploit then fails.

For the record, I got the following working too:

Tenfar's axon7backup + A2017/B06 + Tenfar's linked qualcomm drivers

Tenfar's axon7backup + A2017/B06 + stock windows (Microsoft Windows Hardware Compatibility Publisher) drivers

Tenfar's axon7backup + A2017/B08 + stock windows drivers

The main issue is that both tools seem to attempt an exploit and need a fresh EDL state. You need to reboot the phone between tool attempts/failures or driver changes.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Loader009:
I am using A2017G/B03 (never upgraded). I suppose that this is the last version which tenfars tool supports...

On Windows10+Zadig the device is not even recognized... maybe I had to restart at least once?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] inks:
Ah in the time that you wrote that reply, I got tenfar's tool working on B06 and B08. With both his supplied Qualcomm drivers and the stock windows drivers. Had to reboot phone and re-enter edl mode between attempts.

Also confirmed that the boot and recovery images are identical between both tools.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Loader009:
The fastest way to do the reboots is to boot into FTM-Mode (Power+VolDOWN), then do adb reboot edl.

Maybe it helps you the "next time" (if it is needed ever again).

edit: Be aware that tenfar's tool can damage your phone, the reason is stated on the first page...

I know that it's risky to use tenfar's tool but if it worked before and it's the only thing I could get to work. I think for me it was worth the (second) shot.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] djkuz:
Guys i need help!

I need backup gpt-backup.bin

Please upload for me!

I look forward to any help!
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] messi2050:
[MENTION=7890973]tennear[/MENTION] can you modify the script to work with the zte zmax pro z981
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] amphi66:
which phone do you have?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] djkuz:
A2017, China, 4/128GB
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] amphi66:
Sorry, don't have backup for that.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] djkuz:
Please give me any that you have!
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] tennear:
No sorry
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Twiggy000b:
Anyone got the gpt-backup.bin for A2017U? Please upload if you got it :D
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] shia786:
I have for the G variant but it's the same pretty much

https://mega.nz/#!w1kTGbyJ!k60IcrrrpRlSb3fyiPZbleQQ4IDLZ8vMh6LNEJyT5yA