[A2017U][TWRP System Image] Stock System Image of B20 for full stock restore and OTAs

peramikic

Senior Member
Nov 12, 2008
524
298
0
THIS APPLIES ONLY TO THE A2017U VARIANT, DO NOT USE THIS FILE ON OTHER VERSIONS
Disclaimer - don't blame me if something goes wrong

As title says, this is a full stock unmodified B20 TWRP system image. It kan be used in addition to stock boot and recovery images to restore the US A7 to conditions which will be like stock and allow to flash upcoming OTA. This was tested by @jkuczera here http://forum.xda-developers.com/showthread.php?t=3459107

Link to system image
https://cloud.swehes.com/index.php/s/31V7GgihohBCdfy

If you are BL unlocked, you will need to lock it before flashing old recovery and boot (this may not be necessary to get MR2 to flash, depending on what it checks, but the phone might not boot, unknown). This will make your phone verify boot, recovery and /system again, so flash TWRP from tenfar's thread to be able boot after relocking since his is signed

To restore, unzip the file above to TWRP folder on the SD Card, then in TWRP under mount points unmount /system and put check mark on mount system as read-only. The read-only part is important so that TWRP does not modify the /system apon exit. You can then restore boot, recovery and system image.

Another partition, fastboot, was altered if you applied B20_boot, but so far no OTA has check it so it should be fine as is. Chance is it will be just overwritten by next OTA, but in case that changes, info will be added. This step is more risky since it involves using dd command and has to be applied carefully.
EDIT: looks like @Unjustified Dev posted new build that will flash fastboot image http://forum.xda-developers.com/showpost.php?p=68677272&postcount=133

You should then boot to stock recovery and factory wipe

In case you did not dump your boot and recovery, they can be found in @rczrider's post here
http://forum.xda-developers.com/axon-7/development/untouched-b20-boot-recovery-files-t3443818

Thanks to @swehes for providing the space on his cloud for this file, @rczrider for rest of the files and @jkuczera for trying this all out
 
Last edited:
  • Like
Reactions: KyJelly69

runderekrun

Senior Member
Apr 28, 2009
975
152
0
Just for clarity sake these are the steps I need to take to get back to B20 from B20_Boot?

1. fastboot oem lock
2. put system image from OP's post AND stock_boot_backup.img AND stock_recovery_backup.img from rczrider's post into TWRP folder.
3. in TWRP unmount /system and check mark on mount system as read only.
4. Flash boot, recovery, and system image.
5. Wipe Data and Internal Storage.
6. Profit?
 
  • Like
Reactions: maxmotos

peramikic

Senior Member
Nov 12, 2008
524
298
0
Just for clarity sake these are the steps I need to take to get back to B20 from B20_Boot?

1. fastboot oem lock
2. put system image from OP's post AND stock_boot_backup.img AND stock_recovery_backup.img from rczrider's post into TWRP folder.
3. in TWRP unmount /system and check mark on mount system as read only.
4. Flash boot, recovery, and system image.
5. Wipe Data and Internal Storage.
6. Profit?
Pretty much. I would reboot to stock recovery after and factory wipe from there. you might wan't to flash fastboot from B20 OTA for extra profit but seems like it's a moot point so far if you have seen the Unjustified Devs trick for BL unlock via TWRP
 

runderekrun

Senior Member
Apr 28, 2009
975
152
0
Pretty much. I would reboot to stock recovery after and factory wipe from there. you might wan't to flash fastboot from B20 OTA for extra profit but seems like it's a moot point so far if you have seen the Unjustified Devs trick for BL unlock via TWRP
Thanks.

I'm having to do a warranty replacement on my device so i'll probably want to do the fastboot flash. Any idea where to get a fastboot image?
 

rczrider

Senior Member
May 20, 2015
680
511
0
Markarth

runderekrun

Senior Member
Apr 28, 2009
975
152
0
Alright I tried this and something went wrong.

First thing I did was copy all the files where they needed to be. Then I booted into fastboot and did a "fastboot oem lock".

Then my device would do nothing. I would boot up to the ZTE logo then go black a second later. I tried to force into recovery by selecting recovery in fastboot but same thing, ZTE logo then blackness.

I got it back by getting into fastboot and performing a "fastboot oem unlock" again. All it did was wipe data.

What did I do wrong? I thought I am supposed to lock bootloader first before I restore system and flash recover and boot????
 
Last edited:

peramikic

Senior Member
Nov 12, 2008
524
298
0
Alright I tried this and something went wrong.

First thing I did was copy all the files where they needed to be. Then I booted into fastboot and did a "fastboot oem lock".

Then my device would do nothing. I would boot up to the ZTE logo then go black a second later. I tried to force into recovery by selecting recovery in fastboot but same thing, ZTE logo then blackness.

I got it back by getting into fastboot and performing a "fastboot oem unlock" again. All it did was wipe data.

What did I do wrong? I thought I am supposed to lock bootloader first before I restore system and flash recover and boot????
Ok so if you modified boot, system or recovery in anyway then after BL lock it will not boot since it will fail secure boot, so you need to load the signed TWRP from tenfar's thread via EDL after locking. That will let you run TWRP with locked BL. Although ig you just want stock for upcoming OTA, then you might be good staying unlocked. If for return, then you should lock it
 

runderekrun

Senior Member
Apr 28, 2009
975
152
0
Ok so if you modified boot, system or recovery in anyway then after BL lock it will not boot since it will fail secure boot, so you need to load the signed TWRP from tenfar's thread via EDL after locking. That will let you run TWRP with locked BL. Although ig you just want stock for upcoming OTA, then you might be good staying unlocked. If for return, then you should lock it
I apologize if I am fundamentaly not understanding this but wouldn't it be easier to flash system, boot, recovery, and fastboot back to stock via my current twrp THEN relock bootloader?
 

peramikic

Senior Member
Nov 12, 2008
524
298
0
I apologize if I am fundamentaly not understanding this but wouldn't it be easier to flash system, boot, recovery, and fastboot back to stock via my current twrp THEN relock bootloader?
Yeah, now that we know fastboot will work even on stock boot that will work as well. The only thing you won't be able to do is flash back the B20 fastboot image that way, but enough to pass OTA most likely. The long way you can revert the fastboot image as well. I only wanted to post the image to begin with, but then wrote out instruction as they rolled around in my head. This will change soon anyways so a proper write-up will happen, just not by me, Documentation was never my forte ;)
 

justamar24

Member
Apr 1, 2011
25
1
23
My BL is unlocked from ZTE right now, If I want to get CM for future but also want upcoming update from ZTE? What are the exact steps that I need to follow to get future OTA but also keep the BL unlocked for future CM? Please help as I'm confused with all these instructions.
 

seby1234

Member
Oct 26, 2015
15
1
0
Falls Church
THIS APPLIES ONLY TO THE A2017U VARIANT, DO NOT USE THIS FILE ON OTHER VERSIONS
Disclaimer - don't blame me if something goes wrong

As title says, this is a full stock unmodified B20 TWRP system image. It kan be used in addition to stock boot and recovery images to restore the US A7 to conditions which will be like stock and allow to flash upcoming OTA. This was tested by @jkuczera here http://forum.xda-developers.com/showthread.php?t=3459107

Link to system image
https://cloud.swehes.com/index.php/s/31V7GgihohBCdfy

If you are BL unlocked, you will need to lock it before flashing old recovery and boot (this may not be necessary to get MR2 to flash, depending on what it checks, but the phone might not boot, unknown). This will make your phone verify boot, recovery and /system again, so flash TWRP from tenfar's thread to be able boot after relocking since his is signed

To restore, unzip the file above to TWRP folder on the SD Card, then in TWRP under mount points unmount /system and put check mark on mount system as read-only. The read-only part is important so that TWRP does not modify the /system apon exit. You can then restore boot, recovery and system image.

Another partition, fastboot, was altered if you applied B20_boot, but so far no OTA has check it so it should be fine as is. Chance is it will be just overwritten by next OTA, but in case that changes, info will be added. This step is more risky since it involves using dd command and has to be applied carefully.
EDIT: looks like @Unjustified Dev posted new build that will flash fastboot image http://forum.xda-developers.com/showpost.php?p=68677272&postcount=133

You should then boot to stock recovery and factory wipe

In case you did not dump your boot and recovery, they can be found in @rczrider's post here
http://forum.xda-developers.com/axon-7/development/untouched-b20-boot-recovery-files-t3443818

Thanks to @swehes for providing the space on his cloud for this file, @rczrider for rest of the files and @jkuczera for trying this all out
Can someone please explain exactly how to do this. I have an unofficial twrp on my phone and the bootloader is unlocked but after i tried to flash super su it got stuck on bootloop so I wiped every thing and I also accidentally wiped my os too. So now I don't have an os and I want to go back to stock. Can someone please explain step by step on how to fix this? I just got the phone.
 

bkores

Senior Member
Aug 12, 2016
813
614
0
Staten Island, NY
Can someone please explain exactly how to do this. I have an unofficial twrp on my phone and the bootloader is unlocked but after i tried to flash super su it got stuck on bootloop so I wiped every thing and I also accidentally wiped my os too. So now I don't have an os and I want to go back to stock. Can someone please explain step by step on how to fix this? I just got the phone.
All right I'm no expert either but I'll try to make this as straightforward as possible.
1) Format your SD card as exFAT. This is important as otherwise you will not be able to transfer the system image to your SD card since it is 6GB. To do this you can just plug it in to your PC, right click, Format and then select exFAT from the dropdown.
2) Download tenfar's tool for B20, rczrider's boot and recovery backup, and the system image backup from the link in the OP.
3) Create a new folder in /external_sd/TWRP/BACKUPS/serial_number/.Move the stock_boot_backup and stock_recovery backup into the folder.
4) Using a program such as 7zip, extract the 6GB system image file and move it to the same folder.
6) Go to into fastboot mode. Before you do anything you have to relock the bootloader otherwise the system will be modified and you want to be 100? stock. Execute 'fastboot oem lock'. You should then boot to a black screen.
7) Unzip tenfar's tool. Go to the unzipped folder, then hold down shift+right click and select 'Open command window here'. Execute 'axon7root.exe -p [COMPORT #] -r. To figure out your com port #, go to Device Manager, then go to down to where it says "Qualcomm Loader..." and your com port number is the number at the end. So for example if your com port number is 5, you should execute axon7root.exe -p 5 -r. Allow the program to do its thing.
5) Boot into TWRP. Do not swipe to allow modifications. Once in TWRP, go to "Install", "Install Image" at the bottom right hand corner, and then navigate to the stock_recovery_backup in the folder that you moved it to to. Select it and then choose the Recovery partition to flash it to. Do the same thing for stock_boot_backup.
6) Once you have flashed boot and recovery, go to the main menu, then "Restore" and then Restore the system image backup.
7) Go to wipe and then slide to factory reset. Finally, reboot system.

Hope that helps! If you have any questions, feel free to ask me.
rczrider's stock boot and recovery thread
http://forum.xda-developers.com/axon-7/development/untouched-b20-boot-recovery-files-t3443818/page7

tenfar's tool thread: http://forum.xda-developers.com/axo...xon-7-root-bootloader-unlokced-t3441204/page1
 
Last edited:
  • Like
Reactions: troy5890 and sk0o

shifuharris

Senior Member
Aug 26, 2016
66
21
0
Has anyone who requested the bootloader unlock from ZTE (and mistakenly installed it) returned to stock and been able to get OTA's? I followed this guide and seemed to have returned to stock fine but the only OTA I can get now is the bootloader unlock OTA. I've downloaded and discarded it several times but that is the only one I can get. Anyone know of a way to bypass this OTA and get the new MR2 that was just released? I want to get OTA's until the custom roms start flowing.

Thanks!
 

xtermmin

Senior Member
Mar 27, 2011
1,325
542
0
Has anyone who requested the bootloader unlock from ZTE (and mistakenly installed it) returned to stock and been able to get OTA's? I followed this guide and seemed to have returned to stock fine but the only OTA I can get now is the bootloader unlock OTA. I've downloaded and discarded it several times but that is the only one I can get. Anyone know of a way to bypass this OTA and get the new MR2 that was just released? I want to get OTA's until the custom roms start flowing.

Thanks!
From what I can tell, once you apply for official bootloader unlock, your IMEI is placed on a list that will not get any future OTA updates set to it.

However, the OTA for B20 to B27 has been uploaded here: https://mega.nz/#F!kYtRAJjJ!5tD1zPpo0nw2tJwhANA9pQ

Try flashing that via stock recovery.
 

maxmotos

Senior Member
Mar 30, 2016
175
52
0
Washington DC
Quick question for anyone who might know.

The Link to system image which is : https://cloud.swehes.com/index.php/s/31V7GgihohBCdfy has the following;
1. system_image.emmc.win
2. system_image.emmc.win.md5

Am I suppose to rename system_image.emmc.win to system_image.emmc.img and load?

it's not as clear that's why I ask but I ended up downloading rczrider system.img and reflashed via TWRP since I was a bit confused.

Thanks!

***************

I simply just went into TWRP backed up by boot so it would create a directory that contains the info I needed copied the system_image.emmc.win and system_image.emmc.win.md5 and restored.
 
Last edited:
  • Like
Reactions: xxBrun0xx

shifuharris

Senior Member
Aug 26, 2016
66
21
0
From what I can tell, once you apply for official bootloader unlock, your IMEI is placed on a list that will not get any future OTA updates set to it.

However, the OTA for B20 to B27 has been uploaded here: https://mega.nz/#F!kYtRAJjJ!5tD1zPpo0nw2tJwhANA9pQ

Try flashing that via stock recovery.
I suspected as much. I downloaded the update and tried to flash it via the stock recovery using the update for ADB option but it fails saying that the package is not a ks package. Booooo. I really wanted this MR becasue they addressed the weak cell signal which I think contributes significantly to my battery drain. Not sure if there are any alternatives to get the update installed. Not very a happy about the ceased OTA's due to the bootloader unlock. Thinking the new Nexus (or whatever they are going to call them) is looking pretty good at the moment.
 

xtermmin

Senior Member
Mar 27, 2011
1,325
542
0
I suspected as much. I downloaded the update and tried to flash it via the stock recovery using the update for ADB option but it fails saying that the package is not a ks package. Booooo. I really wanted this MR becasue they addressed the weak cell signal which I think contributes significantly to my battery drain. Not sure if there are any alternatives to get the update installed. Not very a happy about the ceased OTA's due to the bootloader unlock. Thinking the new Nexus (or whatever they are going to call them) is looking pretty good at the moment.
Try the microSD card method instead.

First, make sure OEM Unlocking is checked in developer settings, rename the OTA to "update.zip", put on microSD, boot into stock recovery, and choose update from microSD.