yashsingh1/xdaforums huggingface dataset:
[ZTE Axon 7 Guides, News, & Discussion] Flapjack:
Sorry for the missing explanation.

I had originally flashed the P996A01B20Fastboot_ssl.zip file, unlocked the bootloader, and installed TWRP. All was going well until I flashed SuperSU 2.67, which soft-bricked the phone. I followed the restore guide, and got it booted again, then could not get wifi working. I reflashed the stock recovery, locked the bootloader, and submitted an RMA request. I was about to send it off when I saw peramikic's post explaining why things were likely not working for me. Now, I am trying to get it back to TWRP and rooted.

I wiped out the Axon temp folder I had been working off of on my desktop to get on a clean slate. I downloaded TWRP and P996A01B20Fastboot_ssl.zip, thinking I needed to start from scratch. Well, the P996A01B20Fastboot_ssl.zip wouldn't flash, so I decided to try unlocking the bootloader anyway, and it unlocked just fine. I then put TWRP back on, and wanted to try and get wifi working again.

Since my last post, I believe the _Boot I needed is in sweshs post, but the download is crawling. I will try downloading yours instead.
[ZTE Axon 7 Guides, News, & Discussion] DrakenFX:
ok just to clarified something about sending your A7 for RMA, sense you flash P996A01B20Fastboot_ssl.zip meaning the B20_boot OTA they will see that and probably say something about that....either way try using my B20_boot boot+system backup and i don't know where you got the info about SuperSU 2.67 cuz what is been around including my thread is SuperSU 2.65 , + i believe i said something about flashing a no-verify-opt-encrypt.zip after you did the SuperSU 2.67...

good luck there
[ZTE Axon 7 Guides, News, & Discussion] Flapjack:
Just to be clear, no one told me to flash 2.67. I just downloaded the newest and flashed, so it's my own dumb mistake.

I downloaded your back and followed your steps, but it never finished booting. The animation would start, and it just sat at the ZTE with animated "Axon" logo for about 10 minutes.

I repeated your steps, but this time including system in the first wipe.
[ZTE Axon 7 Guides, News, & Discussion] DrakenFX:
try this after flashing boot+system ,

no-verity-opt-encrypt-2.1.zip

by the way it may take more than 10 mins the first boot so be patient if you see taking more than 20 mins yeah something is wrong
[ZTE Axon 7 Guides, News, & Discussion] Flapjack:
Ok, so I tried again, this time wiping system. Not sure why that worked, but it did. The only thing is, I still have no wifi and the two "no sim" icons (I never had those until I followed the restore thread).

Here are some pics.

**EDIT**

Since I posted the above, it's rebooted about three times on its own, just sitting there. :(
[ZTE Axon 7 Guides, News, & Discussion] DrakenFX:
FIRST OF ALL IF YOU DON'T KNOW HOW TO DO THE FOLLOWING STEPS , JUST DON'T DO IT

try flashing this Modem, using fastboot. (NEED DECOMPRESS FIRST)

http://www.mediafire.com/download/i0qr3iktzbau7k6/modem_a2017u.zip

fastboot flash modem modem_a2017u.img
[ZTE Axon 7 Guides, News, & Discussion] Flapjack:
Ok. Gotta get my PC back out. Fingers crossed!

---------- Post added 4th September 2016 at 12:02 AM ---------- Previous post was 3rd September 2016 at 11:54 PM ----------

Grrr.

c:\Users\chris\Desktop\Chris Phone\Axon\modem_a2017u>fastboot flash modem modem_a2017u.img
target reported max download size of 536870912 bytes
sending 'modem' (97280 KB)...
OKAY [ 2.143s]
writing 'modem'...
FAILED (remote: Critical partition flashing is not allowed)
finished. total time: 2.165s
[ZTE Axon 7 Guides, News, & Discussion] DrakenFX:
change the Extension from .img to .bin an try again, if doesn't work i'll see if i can create a flashable zip for TWRP
[ZTE Axon 7 Guides, News, & Discussion] Flapjack:
Same error message. :mad:

---------- Post added at 12:51 AM ---------- Previous post was at 12:09 AM ----------

@DrakenFX:

Have you seen this? Sounds very plausible!

TWRP EFS fatal bug

http://xdaforums.com/showpost.php?p=68509232&postcount=107
[ZTE Axon 7 Guides, News, & Discussion] Flapjack:
Anyone who is having the no wifi/two sim icon issue, the following two commands after restore worked perfect. I'm not sure how to add them to the restore script, but you don't really need to, as long as you have a computer you can access the phone with adb on.

For me, the steps I took were to:

1) Restore using DrakenFX's uploaded TWRP backup (I also had to wipe system, otherwise it would not boot fully):

B20_Boot TWRP Backup Xposed+Root Edition Provided by DrakenFX

http://xdaforums.com/showpost.php?p=68206051&postcount=4

2) Enable USB debugging and boot into recovery

3) Type: "adb shell" and enter the following commands:

dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1 bs=16384

adb shell dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2 bs=16384

3) Wipe cache and dalvik, then reboot into system.

If all goes well, the output from the two commands should look like this:

/dev/block/platform/soc/624000.ufshc/by-name # dd if=/dev/zero of=/dev/block/boo
tdevice/by-name/modemst1 bs=16384
dd: writing '/dev/block/bootdevice/by-name/modemst1': No space left on device
129+0 records in
128+0 records out
2097152 bytes (2.0MB) copied, 0.001917 seconds, 1.0GB/s
/dev/block/platform/soc/624000.ufshc/by-name # dd if=/dev/zero of=/dev/block/boo
tdevice/by-name/modemst2 bs=16384
dd: writing '/dev/block/bootdevice/by-name/modemst2': No space left on device
129+0 records in
128+0 records out
2097152 bytes (2.0MB) copied, 0.001829 seconds, 1.1GB/s
/dev/block/platform/soc/624000.ufshc/by-name #
c:\Users\chris\Desktop\Chris Phone\Axon\modem_a2017u>

Hope this helps! Thanks to DrakenFX for the TWRP dump, and manu7irl for the idea that TWRP 3.0.2.0 was to blame for a corrupted EFS backup/restore. I could not have fixed my phone without either of them!
[ZTE Axon 7 Guides, News, & Discussion] peramikic:
So that's where the problem is. I read on the bug now, although I am surprised that phone works with zeroed out EFS partitions, they must get rebuilt on reboot and are temp/dynamic in nature and IMEI is stored somewhere else. I have dumped them via dd with all the other ones but did not take a look what's inside yet. The fastboot flashing modem partition would require "critical unlock" so to bypass that flash with dd via adb shell in TWRP if the need ever arises again
[ZTE Axon 7 Guides, News, & Discussion] Flapjack:
Yeah.... the modem seemed like the culprit to many, but it was just fine. Whatever was wrong in EFS just prevented it from working. Strange indeed.
[ZTE Axon 7 Guides, News, & Discussion] bkores:
I'm having a problem. I restored DrakenFX's TWRP backup but I cannot get ADB to work. I turned on USB debugging and when I do "adb devices" it shows my device is unauthorized but I get no prompt on the phone and it just reboots. All the necessary drivers and stuff are installed. Any suggestions?
[ZTE Axon 7 Guides, News, & Discussion] Flapjack:
Have you tried unplugging, clearing the saved authorizations, and plugging it back in? Is this with the phone fully booted, or in recovery?
[ZTE Axon 7 Guides, News, & Discussion] bkores:
I have done all of that and it is when the device is fully booted. When it is in TWRP, there are just not devices listed.
[ZTE Axon 7 Guides, News, & Discussion] DrakenFX:
what i would do in that case is

On Your Laptop / PC :

- Uninstall current drivers.

- Reboot you laptop / PC.

- Install Drivers.

Your Axon 7 (WHILE IS UNPLUG) :

- Turn Off USB Debugging

- Clearing the saved authorizations (as mention above)

- Reboot Axon 7

- Re-Enable USB Debugging

- and try again if ADB recognize your phone
[ZTE Axon 7 Guides, News, & Discussion] bkores:
Never mind it works now when I boot into TWRP. Turns out I was using the wrong drivers!

---------- Post added at 11:04 PM ---------- Previous post was at 10:14 PM ----------

OK so the two adb commands worked! My WiFi and cell is working now! However now I only have 4GB of storage instead of 64GB. I have already tried the resize function in TWRP but it's still 4GB. Help!
[ZTE Axon 7 Guides, News, & Discussion] tupirujp:
[MENTION=574279]Flapjack[/MENTION] r u the developer from years ago on the original Samsung note ?
[ZTE Axon 7 Guides, News, & Discussion] Flapjack:
No... not me. I haven't done any development in years, minus scripting and such for work (Citrix).

---------- Post added at 09:09 AM ---------- Previous post was at 09:07 AM ----------

Good to hear!!!

Unfortunately, I don't know how to fix that one. Do you have any idea what may have gotten you there? If you list your steps, to the best of your recollection, maybe I can compare with mine.
[ZTE Axon 7 Guides, News, & Discussion] bkores:
OK so I followed all the steps that you posted. I restored DrakenFX's backup in TWRP and then I executed the two adb commands. After that I wiped the davlik and cache and rebooted. That's pretty much it. Also I forgot to add that it also factory resets after every reboot.

Edit: Fixed it!! I flashed tenfar's b20_boot boot image(the crossed out one) and then restored DrakenFX's system backup in TWRP. Now I have Wi-Fi, cell, AND 64GB of storage!
[ZTE Axon 7 Guides, News, & Discussion] sacwoo:
I have followed the steps outlined above however I still can't get Wifi to work when using DrakenFX's System backup.

Any other idea's?
[ZTE Axon 7 Guides, News, & Discussion] bkores:
Did you clear out the efs partitions with adb? You have to clear out the efs otherwise it will prevent the modem from working.
[ZTE Axon 7 Guides, News, & Discussion] jkuczera:
Followed the restore to B20 guide. Now I have no wifi. This seems to be a common problem.

The interesting part is I have all partitions backed up and that failed too. I'll report back after efs wipe.
[ZTE Axon 7 Guides, News, & Discussion] bkores:
After you cleared out the efs partition trying doing what I did. It worked for me. Make sure you download the tenfar zip that's crossed out.
[ZTE Axon 7 Guides, News, & Discussion] sacwoo:
No I don't think I did, I just executed the code you listed in your thread.

One thing to note in TWRP, when I go to wipe, I get these errors

"E:Unable to find partition size for /efs1"

"E:Unable to find partition size for /efs2"

"E:Unable to find partition size for /efsg"

"Failed to mount '/firmware' (Invalid argument)

Do these errors help and how do I clear out the efs partition?
[ZTE Axon 7 Guides, News, & Discussion] bkores:
Boot into TWRP, then connect your phone to your computer making sure adb is working then execute:

adb shell dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1 bs=16384

adb shell dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2 bs=16384

This should be your output:

/dev/block/platform/soc/624000.ufshc/by-name # dd if=/dev/zero of=/dev/block/boo

tdevice/by-name/modemst1 bs=16384

dd: writing '/dev/block/bootdevice/by-name/modemst1': No space left on device

129+0 records in

128+0 records out

2097152 bytes (2.0MB) copied, 0.001917 seconds, 1.0GB/s

/dev/block/platform/soc/624000.ufshc/by-name # dd if=/dev/zero of=/dev/block/boo

tdevice/by-name/modemst2 bs=16384

dd: writing '/dev/block/bootdevice/by-name/modemst2': No space left on device

129+0 records in

128+0 records out

2097152 bytes (2.0MB) copied, 0.001829 seconds, 1.1GB/s

/dev/block/platform/soc/624000.ufshc/by-name #
[ZTE Axon 7 Guides, News, & Discussion] jkuczera:
Updating OP with working method; my wifi is now working. Thanks for the help [MENTION=7658623]bkores[/MENTION]
[ZTE Axon 7 Guides, News, & Discussion] sacwoo:
Yes, I completed this step already via ADP in TWRP. Before I cleared out the ecs I had cell phone but no wifi, after performing these scripts I no longer have cell or wifi working. I restored back to my personal TWRP backup and I have cell data working but no Wifi.

Any idea how to get this fixed if the scripts above don't work?
[ZTE Axon 7 Guides, News, & Discussion] DrakenFX:
Where you trying to go back to Stock B20?

or have you try going back to Stock B20?
[ZTE Axon 7 Guides, News, & Discussion] jkuczera:
Trying to go back to stock B20. The only system image failed. Need a byte for byte (DD) non modified B20 system image which will measure 6GB.
[ZTE Axon 7 Guides, News, & Discussion] bkores:
No problem :)

---------- Post added at 06:16 PM ---------- Previous post was at 06:10 PM ----------

No I have no idea since the commands worked for me. You're better off asking someone who has more knowledge than me. Maybe try factory resetting and clearing the cache?

---------- Post added at 06:18 PM ---------- Previous post was at 06:16 PM ----------

No I have no idea since the commands worked for me. You're better off asking someone who has more knowledge than me. Maybe try factory resetting and clearing the cache?
[ZTE Axon 7 Guides, News, & Discussion] DrakenFX:
What we need to get back to stock B20 is full system_image or factory image then, if anyone with stock b20 unmodified system can help us getting this will be awesome,

You were using [MENTION=6699128]rczrider[/MENTION] system backup by any change?
[ZTE Axon 7 Guides, News, & Discussion] jkuczera:
Yep.
[ZTE Axon 7 Guides, News, & Discussion] sacwoo:
Hopefully we can get something working by Monday, my 30 day return policy ends and I need to return this if I can't get the wifi to work.

I have a system image backup that was altered but it allowed wifi to work however in TWRP, when I go to restore, it doesn't give the option to restore the system image like it once did.
[ZTE Axon 7 Guides, News, & Discussion] bkores:
Try to install it instead. It should give you an option to install as system image.
[ZTE Axon 7 Guides, News, & Discussion] sacwoo:
Negative, it isn't an .img file so it doesn't recognize it as an image. The last time I restored the system image, it was one of the options in the restore along with all the other partitions. Now it just lists system, data, boot and recovery. It used to have system image along with those.

The file name is "system_image.emmc.win" along with the md5 file. The Image file is 6GB

Not sure why my phone is all jacked up but it seems the more I try and fix it, the worse it gets. I'll stick with no wifi until someone either comes up with a fix, an image or ZTE releases the Rom.

Thanks for everyone's help
[ZTE Axon 7 Guides, News, & Discussion] bkores:
Maybe try flashing an older version of TWRP (if you still have it)
[ZTE Axon 7 Guides, News, & Discussion] jkuczera:
If you have an A2017U, grab the crossed out boot.img here. If you're using an SD card, reboot your phone to TWRP. On your PC, in the folder where your downloaded and extracted the boot.img, type:

adb push boot.img /external_sd/b20b_boot.img
adb shell if=/dev/block/sde12 of=/external_sd/boot_backup.img
adb shell if=/external_sd/b20b_boot.img of=/dev/block/sde12
adb reboot
[ZTE Axon 7 Guides, News, & Discussion] sacwoo:
Followed the steps you outlined and Wifi still doesn't turn on, I still have the MAC address of 02:00:00:00:00:00 which leads me to believe that something is corrupted. I don't understand why that efs script didn't work. :(

Thanks anyway
[ZTE Axon 7 Guides, News, & Discussion] DrakenFX:
here is a Stock system image was pull a while back

http://xdaforums.com/showpost.php?p=68195475&postcount=17

i'll give it a try myself but been testing, kiling bugs ,fixes with CM builds, if you do keep up posted :)
[ZTE Axon 7 Guides, News, & Discussion] jkuczera:
Lol that's my B20_boot, I grabbed that for jcadduono.

Thanks for trying though
[ZTE Axon 7 Guides, News, & Discussion] DrakenFX:
Really? Man I'm cracking up here :silly::D

So you didn't like much B02G then....

I bet the Chinese software works the same way as B02/G
[ZTE Axon 7 Guides, News, & Discussion] sacwoo:
Just wanted to let you know I got it working. I downloaded the system image again from the main guide and upon restoring it, my wifi is back.

Thanks again everyone for their help
[ZTE Axon 7 Guides, News, & Discussion] JKSurf:
Which system image did you download? I have no wifi/cell/data
[ZTE Axon 7 Guides, News, & Discussion] bkores:
If you restored your EFS backup in TWRP, then the only way to get wifi/cell/data is to do the two adb shell DD commands to wipe out modemst1 and modemst2
[ZTE Axon 7 Guides, News, & Discussion] JKSurf:
Worked! Thank you so much! Did 2 ADB commands, rebooted.
[ZTE Axon 7 Guides, News, & Discussion] sipe1:
After running adb commands, I can't get OTA updates

This is error that I get

EMMC:/dev/block/bootdevice/by.name/modem:83963904:94139df3a0abb64235006eccbb65ef1e1343fd63:84013056:fbbbcafdba542f538b892db19e620b32834199fc"han unexpected contents.

Status 8

How can I fix it? I'm know full stock with locked bootloader and still can't get it.
[ZTE Axon 7 Guides, News, & Discussion] bkores:
Did you try flashing TWRP with tenfar's tool and then restoring rczrider's B27 files? It you can't update then this will definitely work
[ZTE Axon 7 Guides, News, & Discussion] sipe1:
Fixed.

Problem was in modem file. After running jkuczera's adb commands to restore wifi and cell connections, it changes modem data and it won't pass OTA integrity checks.

Here is quick tutorial how I fixed it.

Error messages was

EMMC:/dev/block/bootdevice/by-name/modem:83963904:94139df3a0abb64235006eccbb65ef1e134 3fd63:84013056:fbbbcafdba542f538b892db19e620b32834 199fc"han unexpected contents.

Key file is modem (bolded). So we need to restore stock modem file.

Stock modem file is downloaded here

http://xdaforums.com/axon-7/development/untouched-b20-boot-recovery-files-t3443818

After downloading first backup your modem file.

Boot to TWRP recovery and connect with usb to PC.

Run adb command to backup modem file to sdcard

dd if=/dev/block/bootdevice/by-name/modem of=/external_sd/modem.bin

After you backup, copy stock modem.bin to interal storage and run next command

dd if=/sdcard/modem.bin of=/dev/block/bootdevice/by-name/modem

That's it. You restored stock modem. After that I restored to stock with TWRP zip ZTE_A2017U_StockB20U_by_DrakenFX.zip

http://xdaforums.com/axon-7/how-to/how-to-safely-update-to-b27-rooted-t3466319

And updated OTA without any problems.

One more thing. After flashing modem.bin I got similar error with boot instead modem. Just flashed stock_boot_backup.

If you get another error (like boot or system) problem is in another part, same fix. For boot restore stock_boot_backup, for system flash ZIP with stock ZTE_A2017U_StockB20U_by_DrakenFX.zip

So that's it. Problem was in modem file that got changed and you just restore it to stock.

Thanks @rczrider for modem backup

Thanks @DrakenFX for TWRP stock restore

Thanks @jkuczera for fixing wifi and cell

Thanks @tenfar for awesome root and recovery tool

If you have any question feel free to ask :)
[ZTE Axon 7 Guides, News, & Discussion] JeromeLeung:
Worked like a charm. Just a headsup it's "by-name" in the command not "by.name" otherwise, this is spot on. Thanks!
[ZTE Axon 7 Guides, News, & Discussion] Locklear308:
All

I've been up late tonight for 4-5 hours now. I've tried every single solution to get Wifi and Bluetooth functional again and all have failed. What on earth does one have to do to get the freaking wifi and stuff to work? I strangely have LTE, just no Wifi and BT.

I have never struggled this hard to get an android phone unlocked and rooted. Well, I have those things... just no Wifi. O.O

What am I doing wrong?
[ZTE Axon 7 Guides, News, & Discussion] killathenoob:
Just wanted to say thanks. you helped me bring my phone back to life.

I unlocked my bootloader and rooted all went well. I flashed Z.A.D Rom and all was good. i decided to give CM 13 a try so I made a backup in TWRP (checked all boxes to back up everything) flashed CM13 played around with it for a bit didnt like it so I went back to TWRP wiped everything and restored my back up. When the phone booted back up got message NO SIM and my wifi wouldn't work. So I thought maybe a bad flash I'll try to restore my back up again. Same results no sim and no wifi. So I Tried to flash CM 13 again because that was the last thing that worked. That now freezes at boot then power downs the phone (tried everything to get it to boot). So I then tried to Flash the Boot stack again and stock rom. That will boot but again no sim and no wifi.

Thats what I did to cause the problem.

Thanks again.
[ZTE Axon 7 Guides, News, & Discussion] Flapjack:
It's hard to tell from your post... do you still need help?
[ZTE Axon 7 Guides, News, & Discussion] Tebor:
Hi all

Need some help with my A2017G. Used Tennear's tool to install twrp and all was fine. I backed up everything and tried to restore to make sure it would work. After a reboot, I had lost wifi and data.

I ran the adb code to clear efs as mentioned in this thread and now I have wifi but still no data.

I have tried reinstalling stock recovery and flashed B06 firmware. Still no data

Not sure what to try next
[ZTE Axon 7 Guides, News, & Discussion] Controllerboy:
ATM, I'm in the same situation.

A2017G, install TWRP, unlockBL, install CM13, liked it a lot. Tried to fix the sound by flashing a Dolby ATMOS file, didn't help one bit.

I had made a backup of "stock" CM13 with everything on it. Restored it only to find my phone in a bootloop. Installed stock A2017G B06 via TWRP, very unstable, random reboots,... AND two "no SIM found" icons. No Wi-FI as well (MAC Address was something like 2:000:000:000 which doesn't seem right as well.

What I did after this was

adb shell dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1 bs=16384
adb shell dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2 bs=16384

This fixed my Wi-Fi and made my phone detect the SIM. No mobile data though.

I decided to try CM one last time and what do you know, it installs and boots.

So for the moment, I have a working, stable CM13 unlocked rooted phone, detected SIM-card, but icon indicates I have no range/no data as well...

[MENTION=3044858]DrakenFX[/MENTION] is there a modem.bin file for A2017G? Would it perhaps fix my/our problem?

EDIT: strangely enough, when I go to "network providers" it does find most of the network providers in the area. i just can't connect to mine...
[ZTE Axon 7 Guides, News, & Discussion] Tebor:
Edit: was just a massive quote. Don't know what I did
[ZTE Axon 7 Guides, News, & Discussion] Znuf:
Same problem here :'(
[ZTE Axon 7 Guides, News, & Discussion] Controllerboy:
Damn. Welcome to the club. We're searching for solutions, but at the moment we're not able to fix a corrupt EFS partition and we might bever be able to...
[ZTE Axon 7 Guides, News, & Discussion] Znuf:
I flash my EFS backup and it's working.

Never forget to backup :D
[ZTE Axon 7 Guides, News, & Discussion] HALF_03:
Please help me! I'm almost breaking my phone. I followed the tutorial to update the ROM, and after that, my wifi lives desconecting, and this disrupts my life of online games and videos, for example. I've already returned to the stock ROM, I've cleaned everything and it's still the same. Please help me solve this problem.
[T-Mobile LG V10 Q&A, Help & Troubleshooting] phillo12345:
Used ADB to unlock bootloader but now ADB can't "see" the phone in download mode

I have a Windows 7 PC and I used that with Android SDK to unlock the bootloader and that worked. Now (trying to install recovery) I can put the phone (5.1.1) in download mode and the PC registers the phone in Device Manager but ADB doesn't see it. I've changed nothing with the PC since unlocking the bootloader and I've confirmed USB debugging is enabled on the phone but the command 'adb devices' lists nothing below 'List of Devices Attached'. Has anyone heard of this? Any troubleshooting suggestions?
[T-Mobile LG V10 Q&A, Help & Troubleshooting] dermk4:
Try go to device manage and look for a device with a strange name using the Android ADB device driver, choose update and look for a driver for LGE ADB device instead.
[T-Mobile LG V10 Q&A, Help & Troubleshooting] demkantor:
I did t think think adb works in download mode, and it sure won't work in bootloader

If you are on lollipop then use fastboot to flash TWRP

fastboot flash recovery nameofrecovery.img
[Android Apps and Games] Legionar1987:
Please help. I cannot root my s5 mini. It always reboot and upload stock android back on it.