Hi guys,
I'm just finalising restoring an A2017 (China) to stock for warranty exchange.
I have gone back to stock OS, locked bootloader but I still have the TWRP recovery.
I believe all I need to do is flash a stock recovery.img though TWRP and voila I should be finished, but I can't find a download link that definitely points me to what I should use.
Could someone point me in the right direction?
Thanks!
EDIT - Actually wait a minute can I just install full A2017 factory OTA update through MiFavor stock OS which I believe contains recovery, does that mean that everything goes back to stock (including recovery)?
https://forum.xda-developers.com/axon-7/development/axon-7-chinese-stock-roms-t3436817
EDIT2 - When I try to install the A2017 B13 update.zip through MiFavor it says update failed. Should I install it through TWRP?
EDIT3 - Refused to update the whole image (update.zip) through MiFavor within the ZTE OS. I flashed the default recovery.img through fastboot, then I used the MiFavor recovery (not in OS) to manually flash the full image.
Anyway, got it to stock!
Where did you got the recovery.img?
MagicSeeker said:
Where did you got the recovery.img?
Click to expand...
Click to collapse
In the link from my post above. Download the original stock ROM you want, unzip, one of the files is the recovery.img. FYI I had A2017 B11, installed B13 recovery.img and it worked fine.
I tried to flash recovery.img but it says: FAILED (remote: Partition flashing is not allowed)
What do I do? I'm on B13 stock with locked bootloader. I want to get rid of TWRP and back to stock recovery so I can get OTA updates again.
FuzzyDunlop9 said:
I tried to flash recovery.img but it says: FAILED (remote: Partition flashing is not allowed)
What do I do? I'm on B13 stock with locked bootloader. I want to get rid of TWRP and back to stock recovery so I can get OTA updates again.
Click to expand...
Click to collapse
The first step in flashing anything is to unlock the bootloader, flash TWRP recovery, root, custom ROM etc. The inverse is the same. You are trying to flash an image to the recovery partition with a locked bootloader, which isn't going to work. I'd suspect you need to unlock your bootloader again, flash the stock recovery from the B13 stock image, and re-lock the bootloader. I am fairly new to the Axon 7 but I would consider yourself lucky if your bootloader is in fact locked. Typically locking the bootloader with anything but stock recovery is messy...
jdgesmlls said:
The first step in flashing anything is to unlock the bootloader, flash TWRP recovery, root, custom ROM etc. The inverse is the same. You are trying to flash an image to the recovery partition with a locked bootloader, which isn't going to work. I'd suspect you need to unlock your bootloader again, flash the stock recovery from the B13 stock image, and re-lock the bootloader. I am fairly new to the Axon 7 but I would consider yourself lucky if your bootloader is in fact locked. Typically locking the bootloader with anything but stock recovery is messy...
Click to expand...
Click to collapse
You usually end up with a DFU brick, sometimes only with fastboot. Very messy
There are flashable recovery zips for the A2017G, maybe @tron1 can make you one?
Related
Hi,
is it possible to relock the bootloader to original factory mode.
fastboot oem lock (will erase userdata)
Also you should restore the fbop partition: /dev/block/bootdevice/by-name/fbop
For more reference see:
https://forum.xda-developers.com/axon-7/help/lock-unlocked-bootloader-t3444044
https://forum.xda-developers.com/showpost.php?p=68738854&postcount=100
Also please don't open a thread to a question that has already been answered several times.
After i unlocked bootloader my phone now is recognized as A2017U. When i relock it will it then recognized as original A2017G ?
I am interested in a tutorial about going back to stock for G model
The procedure for the g model is no different than the U model except you have to revert the bootloader (fbop partition) because the european model is quite restricted.
For making a tutorial I would need to know exactly what you modified.
There are already good step by step guides in this forum. All I could offer you are my backup files for the recovery and bootloader for the 2017G with update B08.
Bomberus said:
The procedure for the g model is no different than the U model except you have to revert the bootloader (fbop partition) because the european model is quite restricted.
For making a tutorial I would need to know exactly what you modified.
There are already good step by step guides in this forum. All I could offer you are my backup files for the recovery and bootloader for the 2017G with update B08.
Click to expand...
Click to collapse
At the moment i am on B09 rooted but I installed it via TWRP using DrakenFx's tutorial from here : https://forum.xda-developers.com/showpost.php?p=68873485&postcount=3
Futhermore when I unlocked the bootloader I was on B03 and I saved the aboot.img and fbop_lock.img .
Now I would like to go back to fully stock to prepare for the android N update.
I would highly appreciate it if you could offer me some directions for this matter.
Never tried this method (so I take no responsibility) but in order to receive ota you need an unmodified system with locked bootloader.
To lock your bootloader:
First backup all your apps, data and internal sdcard !
Connect your phone to a PC and start adb:
Type: "adb reboot bootloader"
Phone will restart: (if you are on linux, run fastboot with root permission)
Type: "fastboot oem device-info" (just to check things)
"fastboot oem lock" (will lock your bootloader)
According to DrakenFX you should have the stock recovery already installed. So you can flash a sd card upgrade from ZTE "http://www.ztedevice.com/support/detail?id=98CEB24F9FFD433EA99EC424163149A6" (to bring you back to stock)
If you still have TWRP use DrakenFX files to flash your system back to stock, but this time do not flash supersu.
You should be good to go and just have to wait for ZTE to release the update and apply it via the updater UI.
BTW this is my fastboot oem device-info output:
(bootloader) Device tampered: false
(bootloader) Device unlocked: true
(bootloader) Device critical unlocked: false
(bootloader) Charger screen enabled: true
(bootloader) Display panel:
OKAY [ 0.059s]
finished. total time: 0.059s
Click to expand...
Click to collapse
dodo34 said:
Hi,
is it possible to relock the bootloader to original factory mode.
Click to expand...
Click to collapse
You mind my asking the reason WHY you want to Relock?
If is cuz the N update , I'll rather keep it unlock base on @lokissmile thread and I'm 100% sure I'll be releasing N TWRP Flashable Zips for all variants when N is available.
i have G model and flashed the aboot of the U modell.
How to flash back now the aboot of the G modell back ?
Any help for the G modell ?
dodo34 said:
Any help for the G modell ?
Click to expand...
Click to collapse
as far my understanding the G model have factory images right? just download the one you were using and flash it using custom recovery.
LifeSupportZ said:
as far my understanding the G model have factory images right? just download the one you were using and flash it using custom recovery.
Click to expand...
Click to collapse
@dodo34
This is correct, the full image should be the one that contains both the emmc_appsboot.mbn (this is your aboot or bootloader partition) and the fastboot.img (the fbop or fastboot command partition) as well as recovery.img. This will set everything back to stock in one swoop. Otherwise you have to reflash the signed (tenfars) TWRP to flash back the fastboot image and then falsh back stock, since regular TWRP will either not be there anymore or will not run since BL is locked now
P.S, you can leave the fastboot alone for the purposes of OTA, no update so far hes checked on it and i am not sure if there is a G package with it since it has not changed from release, so as long as the image you flash has the bootloader and recover you should be good for N
P.S.2 Actually I see a little catch 22 here. If you lock the BL first, then you will not be able to run TWRP or boot into system if it was modified. You would need to flash the "signed" version of TWRP or flash stock recovery before locking the BL. Stock would be preferable since it can flash the factory package withouht modifications. If using TWRP i think you have to change updater-script to remove a .... and i just found another catch 22. The updater-script will look for product name P996A04 and if yours shows as 2017U the it will report back P996A01 so you will have to have a signed TWRP on there no matter what. Either to flash the backed up aboot fbop and recovery and then flash the full factory package through stock recovery or mod the updater-script and remove the assert line and flash the whole thing with TWRP. What do you get in TWRP shel when you run this "getprop ro.product.model"
peramikic said:
@dodo34
This is correct, the full image should be the one that contains both the emmc_appsboot.mbn (this is your aboot or bootloader partition) and the fastboot.img (the fbop or fastboot command partition) as well as recovery.img. This will set everything back to stock in one swoop. Otherwise you have to reflash the signed (tenfars) TWRP to flash back the fastboot image and then falsh back stock, since regular TWRP will either not be there anymore or will not run since BL is locked now
P.S, you can leave the fastboot alone for the purposes of OTA, no update so far hes checked on it and i am not sure if there is a G package with it since it has not changed from release, so as long as the image you flash has the bootloader and recover you should be good for N
P.S.2 Actually I see a little catch 22 here. If you lock the BL first, then you will not be able to run TWRP or boot into system if it was modified. You would need to flash the "signed" version of TWRP or flash stock recovery before locking the BL. Stock would be preferable since it can flash the factory package withouht modifications. If using TWRP i think you have to change updater-script to remove a .... and i just found another catch 22. The updater-script will look for product name P996A04 and if yours shows as 2017U the it will report back P996A01 so you will have to have a signed TWRP on there no matter what. Either to flash the backed up aboot fbop and recovery and then flash the full factory package through stock recovery or mod the updater-script and remove the assert line and flash the whole thing with TWRP. What do you get in TWRP shel when you run this "getprop ro.product.model"
Click to expand...
Click to collapse
if he mod the updater_script from official zte update to make it flash friendly, this is what i'll do,
* Mod updater script and remove aboot and recovery for now
* flash new zip without file mention above
* boot to bootloader while having custom recovery
* lock back the bootloader
* boot to custom recovery and perform " format data "
* create a flashable zip with stock aboot and recovery
* flash new zip with aboot and recovery
* reboot to recovery and check if boot to stock recovery and while in there perform a factory reset
i know is a lot of steps but, seems like is the way to go to get everything back in place without zte noticing anything.
Now i am on B06.
I put update.zip B08 and select update. But it boots to TWRP recovery and update fails.
@dodo34 If you are trying to restore from the OS system update you need to reflash your stock recovery for it to work properly. Wait for someone to confirm what I just said, but that's how it worked for me.
how can i flash my original recovery. what is the command for cmd ?
Please help restoring back original recovery.
dodo34 said:
Please help restoring back original recovery.
Click to expand...
Click to collapse
rczrider said:
Putting Your Axon 7 Back to Stock
If you want to revert back to stock and re-lock your bootloader (eg. sending the phone in for warranty work or are selling it), you should be able to do that using the steps below. It worked for me, anyway, exactly as written below.
Copy everything off your internal storage that you don't want to lose. If you're not rooted (so already stock, but with unlocked bootloader), skip to step 6 below. Otherwise, continue.
Grab the "StockSystem" zip for your variant from this thread and place on your microSD card: http://forum.xda-developers.com/axon-7/development/rom-guide-updates-to-stock-files-via-t3469484
Reboot into TWRP and wipe system, data, dalvik, and cache
Flash the StockSystem zip and power off (doing so will restore stock boot but does not appear to restore recovery)
Boot into EDL mode and flash stock recovery only: http://forum.xda-developers.com/axon-7/development/wip-axon-7-root-bootloader-unlokced-t3441204
Power off the phone, plug from computer, and then boot into stock recovery (hold Vol+ and press Pwr, continue holding Vol+ until recovery comes up)
Select "Wipe data / factory reset" and then "Yes"
After that finishes, select "Reboot to bootloader"
Plug in your phone into your computer and do: fastboot oem lock (see second post if this doesn't work and says <waiting for device>)
Your phone will reboot and should have been totally wiped (including internal storage) by doing the above
This should leave you with a stock, locked, and unrooted phone that can take OTAs. Note: it's possible (in fact, likely) that an OTA could break the ability to unlock your bootloader and gain root again, so be careful about going back to stock if you think you'll want to unlock/root later on!
If you need any stock files for B20 or B27 (stock recovery for re-locking, for example), you can get them here: http://forum.xda-developers.com/axon-7/development/untouched-b20-boot-recovery-files-t3443818
Click to expand...
Click to collapse
Try this guide from newbie unlock thread.
I get this error.
C:\Users\Intel\Downloads\Axon7\ADB>axon7tool -r
Usage:
axon7tool -r <boot|recovery|gpt> ...
axon7tool -w <boot|recovery>
C:\Users\Intel\Downloads\Axon7\ADB>axon7tool -r recovery
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.
what i did.
Flashed Draken TWRP System Image B06
Flashed Draken TWRP Stcok Recovery B06
Flashed full update.zip B08
Now my phone is recognized as A2017G on the PC
But when i reboot the phone i get a message that the phone is unlocked and not trusted ?
why ?
I wanted to unlock the bootloader and flash a custom rom, but I followed the wrong guide. I am or was running A2017U build 27 but I followed a guide for A2017G, here https://forum.xda-developers.com/axon-7/how-to/guide-install-twrp-unlock-bl-flash-t3517379.
My phone is stuck at the ZTE logo screen and will not proceed despite using TWRP to flash the backup image. Am I screwed?
project_86 said:
I wanted to unlock the bootloader and flash a custom rom, but I followed the wrong guide. I am or was running A2017U build 27 but I followed a guide for A2017G, here https://forum.xda-developers.com/axon-7/how-to/guide-install-twrp-unlock-bl-flash-t3517379.
My phone is stuck at the ZTE logo screen and will not proceed despite using TWRP to flash the backup image. Am I screwed?
Click to expand...
Click to collapse
If you still able to boot to TWRP, I recommend you flashing my B29 Bootstack + StockSystem from here : B29 Files Click Here , then you can flah Stock Recovery you'll be up and running again, i'll be uploading TWRP Flashable B29 recovery Here is the Stock Recovery Flashable Zip CLICK HERE ... YOU CAN UNLOCK using B20 Official ZIP + B20fastboot.zip (Official).
So here Steps:
1- Flash B29 Bootstack + StockSystem
2- Flash Stock Recovery
3- You'll have you device back and running
DrakenFX, thank you. Flashing the bootstack and stocksystem got me in working order. $20 coming your way as promised. Don't drink and flash folks. Lesson learned.
project_86 said:
DrakenFX, thank you. Flashing the bootstack and stocksystem got me in working order. $20 coming your way as promised. Don't drink and flash folks. Lesson learned.
Click to expand...
Click to collapse
you don't have to man, i'm just glad i'm here to help other. send me you hangouts via PM , i'll help you getting Unlock Bootloader before N get here,
Thanks I appreciate that.
***EDIT*** This was caused by the fastboot I had on my PC. Rebooting into Linux and using that fastboot worked fine.
I was able to downgrade to B20, however, flashing your P996A01B20Fastboot_ssl.zip file did not allow me to unlock the bootloader. After rebooting, going into the bootloader menu, and running "fastboot oem unlock" does nothing nor does "fastboot devices" see any device. Do you have any ideas why it is not working?
To be clear, when I ran the P996A01B20Fastboot_ssl.zip from stock recovery it said,
"script succeeded: result was [1.0000000] Install from SD card complete."
Long story short. I had an Axon 7 A2017 B11 which I updated to B13. I was able to unlock the bootloader, root the phone then flash a custom rom Z.A.D.Mix7_v0.3. I was having fun with the phone but I did something very stupid when I realised I could not use Android pay due to unlocked boot loader. Without doing enough research, I went to fastboot and did a fastboot oem lock. The command was successful but I could no longer boot into the system or recovery or fastboot. I tried MiFlash with B07 which was posted in this forum, but it did not work, came back an error of bad format. Then I used axon7tool to flash TWRP 3.0.2 and the boot.img which I extracted from B13. I am now able to boot into TWRP and fastboot. But I still do not have a working system. I tried fastboot oem unlock, it does not let me do it. I flash ZAD Mix7 again but once I flash that it does not boot anymore. I am now really stuck. What should I do to go back to stock then start everything again. Thanks a lot for the help.
I understand your device doesn't boot into system anymore, but can adb on your pc detect it at all? If so, you can try following all steps after "B)" in my tutorial. I think your aboot img and fbop partition are messed up. If you can use adb to replace the files in aboot and fbop with files that allow the fastboot oem unlock command to be executed, it should be unlockable again. After that, custom ROMs should boot.
Stock bootloader
Controllerboy said:
If you can use adb to replace the files in aboot and fbop with files that allow the fastboot oem unlock command to be executed, it should be unlockable again. After that, custom ROMs should boot.
Click to expand...
Click to collapse
I'm having a similar issue. Although my phone boots to stock rom I seem to have messed up my bootloader. I had TWRP and unlocked bootloader. I, similarly, locked the bootloader and things seemed to be fine. After attempting to install Nougat received from OTA I realized my bootloader is corrupted. When I hold the power and volume up the phone seems to just turn off (or go to EDL mode? I'm not sure) I can always just hold power and it'll boot up normally. Is there a way to get the stock bootloader to work and keep it locked?
I also bricked my A7 after relocking my bootloader. I used tenfar's tool to make TWRP my boot.img, then flashed ZTE's stock B20 image. Here's the thread where I found the file links.
From there I updated all the way up to the OTA Nougat, but I suppose you can decide where you want to go after it's unbricked. Hope this helps.
Why are so many people relocking bl? Regardless, always take an ota before locking to ensure you are completely shock.
Stock bootloader
lafester said:
Why are so many people relocking bl? Regardless, always take an ota before locking to ensure you are completely shock.
Click to expand...
Click to collapse
Don't you have to be running a locked bootloader in order to be able to install OTAs?
aabnamak said:
Don't you have to be running a locked bootloader in order to be able to install OTAs?
Click to expand...
Click to collapse
Of course not.
aabnamak said:
Don't you have to be running a locked bootloader in order to be able to install OTAs?
Click to expand...
Click to collapse
No, you do not. I thought that was the case at first as well, but I was mistaken. You do, however, need the stock recovery and an untouched system partition.
My problem is that I don't seem to have a recovery at all. I realized once the ZTE logo pops up I can hold down both volume keys and get to the bootloader. The bootloader is locked but does not display a bootloader version or basedband version. I tried the tenfar tool (axon7root.exe) and now my phone doesn't boot into the system either. I really need help...
Just an update to everyone that helped.
I finally managed to fix it.
I used axon7tool to flash a signed TWRP, so that i can boot into TWRP. The signed TWRP is the only way to make it work. Then I downloaded the A2017 B11 from this thread
https://forum.xda-developers.com/axon-7/development/rom-guide-updates-to-stock-files-via-t3469484
There are two zip files. The boot stack and the rom. Because it is a stock rom, I can boot into the system. The next thing I did was to enable the developer option and turn back on the option to allow OEM unlock.
I went back to TWRP. boot into the fastboot screen. Then I simply typed in 'fastboot oem unlock'.
I went back to TWRP, which says can't read encrypted device. I formated everything. mount the USB then flash the custom rom again.
Hola, phone fixed. Made me sweat for the whole day.
deleted...forgot I had a micro sd card. Flashed stock update from the card and it worked. Phew!
I just finished flashing the latest vendor image + dirty unicorns rom + root + gapps and made a reboot.
Then I decided to also update my bootloader and downloaded 3.68.
I went into TWRP, flash .img, boot, choose bootloader.img
Thw flash was successfull but since then i cant boot the rom anymore? I am only able too boot the recovery but not the rom.
Do I need to re-flash the rom now or what should I do?
Oh it seems like flashing "boot" in "TWRP" means that you will flash the boot.img and not the bootloader.
So I just flashed the bootloader via fastboot and I guess I will be just fine if I extract boot.img from the lates rom.zip and flash that in TWRP?
@edit: ye that fixed it.
Utini said:
Oh it seems like flashing "boot" in "TWRP" means that you will flash the boot.img and not the bootloader.
So I just flashed the bootloader via fastboot and I guess I will be just fine if I extract boot.img from the lates rom.zip and flash that in TWRP?
@edit: ye that fixed it.
Click to expand...
Click to collapse
Yep, never flash any images other than the vendor, bootloader and radio unless you are trying to restore to stock. Bootloader is the obvious area of the phone you can use to enter recovery but boot is the actual boot process of the phone so be careful there. Glad you got it sorted.:good:
Does anyone have stock rom npns25.137-93-14 for xt1685 for fastboot flash ???
I am trying to get oreo OTA update to work, and i had twrp installed, tried to flash stock recovery.img "not sure i got the right version" but update to oreo failed for some reason....
Think i maybe must flash the stock rom again and lock bootloader....
There is no image leak for 137-93-14, however using this tool on your pc you can download and flash the latest system images for your device. Install it, connect, select rescue and reboot your phone to fastboot. It will format the phone so make sure you have backups of your files.