Solved - see post #9
---------------------------
Stock/rooted/Bootloader unlocked B29
After doing a factory reset either in android itself, or TWRP, the phone does not boot properly. Zte logo comes on, then stuck at the axon 7 logo after a few minutes, force a reboot, then it boots up in under a minute.
What am I missing here?
What roms did you try flashing?
stevecaboose said:
What roms did you try flashing?
Click to expand...
Click to collapse
Who's flashing any roms? Factory reset != flashing roms
The os is fully stock except as specified.
Well what about restoring a back up. If that happened to me the first thing I would do is restore my backup and try reseting it and if the problem continues then flash a rom to maybe overwrite data that is causing issues
stevecaboose said:
Well what about restoring a back up. If that happened to me the first thing I would do is restore my backup and try reseting it and if the problem continues then flash a rom to maybe overwrite data that is causing issues
Click to expand...
Click to collapse
Restoring from a backup works depending if full or partial restore.
Full restore (system/boot/data) = success
partial restore - wipe data then select system/boot only for restore = same issue as in the OP
I've left for as long as 5 min or even longer. What's strange is after forcing a reboot, it boots up within 30-45 seconds. Someone said in a thread about it possibly taking 10 min to boot up on first boot. Seems excessive, esp given the above. I've repeated this several times and it seems to be consistent. Forced reboot during this boot loop results in a very quick subsequent boot.
I would try to unlock your bootloader and flash a rom just to see how it goes.
My bad, bootloader is already unlocked.
It's almost as though something on /data is corrupt the first time around.
Yeah that seems to be whats wrong.
I was hoping to avoid doing a full firmware restore.
I grabbed the b29 update from zte's site a while back.
Using 7zip, extracted the update script to remove the lines for recovery and fastboot partitions. Left everything else alone. Repackaged and crossed my fingers.
Tried sideloading it into twrp but no go. Had to be copied to the sdcard.
Afterward, it was at the zte logo for a good minute or so, then the axon 7 logo came on. Within ~45 seconds I was at the language screen. Immediately went to the factory reset option after the setup wizard completed. This time again it rebooted in about 30-45 seconds. Tried a few more times for good measure -- identical results. Rerooted the phone with supersu 2.79 and repeated the above. Again, no issues.
So, this is really odd. The phone came with B27. Took the OTA to B29 then unlocked the bootloader, rooted, xposed. No other changes. In trying to figure this out, I even reverted back to the stock unpatched kernel (due to supersu patching), just in case that had something to do with it. I suppose something might of glitched in the ota process but there no was indications of any failures.
gpz1100 said:
I was hoping to avoid doing a full firmware restore.
I grabbed the b29 update from zte's site a while back.
Using 7zip, extracted the update script to remove the lines for recovery and fastboot partitions. Left everything else alone. Repackaged and crossed my fingers.
...... snip .....
Click to expand...
Click to collapse
So if one wanted to "dirty flash" the original ROM, exactly what modifications (& what rename) to the OEM B29 ROM? Thanks.
amphi66 said:
So if one wanted to "dirty flash" the original ROM, exactly what modifications (& what rename) to the OEM B29 ROM? Thanks.
Click to expand...
Click to collapse
Other than the recovery and fastboot lines, there's a line towards the bottom about wiping user data. I'd remove that too.
There's nothing to rename, just removal of those lines, adding the update script back into the archive (in the same folder as original).
http://i.imgur.com/lZa4irW.png
Note: Unlike the ota updates, this script does no device validation at all (which is why it's twrp compatible).
Here's what the script looks like. Blank lines indicate lines I removed.
Code:
ui_print("Target: ZTE/P996A01/ailsa_ii:6.0.1/MMB29M/20161014.114339:user/release-keys");
show_progress(0.850000, 180);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
package_extract_file("ddr.img", "/dev/block/bootdevice/by-name/ddr");
package_extract_file("xbl.elf", "/dev/block/bootdevice/by-name/xblbak");
package_extract_file("lksecapp.mbn", "/dev/block/bootdevice/by-name/lksecapp");
package_extract_file("rpm.mbn", "/dev/block/bootdevice/by-name/rpm");
package_extract_file("tz.mbn", "/dev/block/bootdevice/by-name/tz");
package_extract_file("echarge.img", "/dev/block/bootdevice/by-name/echarge");
package_extract_file("mdtp.img", "/dev/block/bootdevice/by-name/mdtp");
package_extract_file("xbl.elf", "/dev/block/bootdevice/by-name/xbl");
package_extract_file("adspso.bin", "/dev/block/bootdevice/by-name/dsp");
package_extract_file("sec.dat", "/dev/block/bootdevice/by-name/sec");
package_extract_file("NON-HLOS.bin", "/dev/block/bootdevice/by-name/modem");
package_extract_file("pmic.elf", "/dev/block/bootdevice/by-name/pmic");
package_extract_file("devcfg.mbn", "/dev/block/bootdevice/by-name/devcfg");
package_extract_file("emmc_appsboot.mbn", "/dev/block/bootdevice/by-name/aboot");
package_extract_file("cmnlib64.mbn", "/dev/block/bootdevice/by-name/cmnlib64");
package_extract_file("keymaster.mbn", "/dev/block/bootdevice/by-name/keymaster");
package_extract_file("splash.img", "/dev/block/bootdevice/by-name/splash");
package_extract_file("hyp.mbn", "/dev/block/bootdevice/by-name/hyp");
package_extract_file("BTFM.bin", "/dev/block/bootdevice/by-name/bluetooth");
package_extract_file("cmnlib.mbn", "/dev/block/bootdevice/by-name/cmnlib");
show_progress(0.100000, 10);
format("ext4", "EMMC", "/dev/block/bootdevice/by-name/userdata", "0", "/data");
set_progress(1.000000);
Related
When I obtained the Lollipop image for the 2012 Wifi Nexus 7 (nakasi-lrx21p-factory-93daa4d3.tgz), I didn't want to lose my user data nor all the files on my media partition (TiBu backups, etc), so I unzipped all the images and flashed them manually so that it wouldn't erase the userdata partition.
First, I attempt to flash the bootloader, but using stupid auto-complete in the command window, I accidentally flashed boot.img instead of bootloader-grouper-4.23.img to the bootloader partition. I immediately saw what I did and panicked. I didn't reboot and then I tried to flash bootloader-grouper-4.23.img. Everytime that happens, this is what I get:
writing 'bootloader'...
FAILED (remote: (InvalidState))
finished. total time: 0.433s
rebooting into bootloader...
I decided to just go ahead and continue flashing everything else and it all seemed to be fine. I booted into Lollipop without any issues.
However, I was having some performance issues, so I decided to backup my media partition and go ahead and reflash it, having it wipe everything. This time, I used the enclosed flash-all.bat script and I noticed I still get the "InvalidState" when attempting to write to the bootloader.
When I flashed the boot.img to the bootloader partition, did I screw something up? Or, is there something wrong with the image Google provided and it's nothing to worry about?
I was able to install TWRP and root it, so obviously, there isn't that much of an issue, but I'm just wondering if everyone else is getting this message?
I am using the correct factory image from Google: nakasi-lrx21p-factory-93daa4d3.tgz
Thanks for any help with this. I guess I don't have anything to worry about since it flashes everything else fine and boots up, but I would like to make sure.
iBolski said:
When I obtained the Lollipop image for the 2012 Wifi Nexus 7 (nakasi-lrx21p-factory-93daa4d3.tgz), I didn't want to lose my user data nor all the files on my media partition (TiBu backups, etc), so I unzipped all the images and flashed them manually so that it wouldn't erase the userdata partition.
First, I attempt to flash the bootloader, but using stupid auto-complete in the command window, I accidentally flashed boot.img instead of bootloader-grouper-4.23.img to the bootloader partition. I immediately saw what I did and panicked. I didn't reboot and then I tried to flash bootloader-grouper-4.23.img. Everytime that happens, this is what I get:
writing 'bootloader'...
FAILED (remote: (InvalidState))
finished. total time: 0.433s
rebooting into bootloader...
I decided to just go ahead and continue flashing everything else and it all seemed to be fine. I booted into Lollipop without any issues.
However, I was having some performance issues, so I decided to backup my media partition and go ahead and reflash it, having it wipe everything. This time, I used the enclosed flash-all.bat script and I noticed I still get the "InvalidState" when attempting to write to the bootloader.
When I flashed the boot.img to the bootloader partition, did I screw something up? Or, is there something wrong with the image Google provided and it's nothing to worry about?
I was able to install TWRP and root it, so obviously, there isn't that much of an issue, but I'm just wondering if everyone else is getting this message?
I am using the correct factory image from Google: nakasi-lrx21p-factory-93daa4d3.tgz
Thanks for any help with this. I guess I don't have anything to worry about since it flashes everything else fine and boots up, but I would like to make sure.
Click to expand...
Click to collapse
I got the same 'Invalid State' error that you did although I didn't accidentally flash anything else.. I just ran through the ./flash-all.sh script and it just straightup failed while trying to flash the bootloader.. and then it just barreled ahead and deleted my recovery partition + everything else haha. So now I'm in a state where I can't boot at all, not even into recovery @[email protected]
Sorry, that was no help haha, just wanted to let you know that I've seen the Invalid State error as well.
I had that when I did a fastboot install of lollipop. Just ignored it and moved on as version was identical anyway
I had this same problem. What I ended up doing was downloading the Nexus Root Kit and then using that to flash the individual files and it worked fine for me. Though, now I got to figure out how to get the system to know there are actually 16GB of storage and not 6GB.
Edit: I found out what needed to be done. I just needed to do a factory reset.
This has been a known problem on Grouper for nearly a year now.
http://forum.xda-developers.com/showthread.php?t=2573015
SteveRiley said:
This has been a known problem on Grouper for nearly a year now.
http://forum.xda-developers.com/showthread.php?t=2573015
Click to expand...
Click to collapse
Thanks. I knew about that one on previous releases. I just wasn't sure if it was the same issue.
Nice to know it's nothing to worry about, but I just about had a heart attack when I realized that I flashed boot.img to the bootloader (or at least tried) and I wasn't sure if I had just perma-bricked my Nexus.
Thank goodness it didn't. I'm sure there are some safeguards from allowing that from happening and it's probably more it I were to flash something else to the boot partition that would cause an issue.
Anyways, thanks for the reminder.
iBolski said:
Nice to know it's nothing to worry about, but I just about had a heart attack when I realized that I flashed boot.img to the bootloader (or at least tried) and I wasn't sure if I had just perma-bricked my Nexus.
Thank goodness it didn't. I'm sure there are some safeguards from allowing that from happening and it's probably more it I were to flash something else to the boot partition that would cause an issue.
Click to expand...
Click to collapse
Well, when I first saw the error about the failed flash to the bootloader partition, I actually did flash the bootloader image to the boot partition. That appeared to work just fine -- no error, and the process finished with a success message. This would have most certainly rendered the OS unbootable, but it wouldn't have bricked the device. That's when I reminded myself that "boot" is not equivalent to "bootloader"! So I reflashed the correct bits to the boot partition.
Yesterday I wanted to update my Nexus 4 to the latest nightly cm-13.0-20160221-NIGHTLY-mako.zip using the built-in update tool. The old build was cm-13.0-20160209-NIGHTLY-mako.zip.
But after hitting reboot, the screen went off and on repeatedly (just plain black). I let it like this for the night. In the morning it was still turning the screen on and off. I was able to reboot to the bootloader. Apparently, the update deleted TWRP and installed Cyanogenmod Recovery. I re-flashed twrp.img, and now I'm stuck there: booting ALWAYS goes to TWRP (or the bootloader), I can't boot the system anymore. I tried re-flashing the old nightly, retried the new one, tried sideloading an even newer one (cm-13.0-20160222-NIGHTLY-mako.zip), wiped cache, wiped data - nothing helped.
What can I do to unbrick my phone?
Do u have a back up to your stock Rom or any other Rom aside from CM?
Flash back to stock and start over with twrp, cm, and gapps.
I just flashed back to stock, the problem persists: bootloop, the lying android with a red warning sign is showing up very briefly, then it reboots.
My first attempt to go go back to stock was manually. Now I tried again using the Nexus Root Toolkit. (Note: both time I flashed build LMY48T
After it finished flashing, the error message (lying android with red warning sign) appeared again, but this time it stayed - no bootloop anymore.
Then I rebooted into revovery mode, and there was some output:
Code:
Finding update package...
Opening update package...
E:unknown volume for path [/storage/emulated/0/cmupdater/cm-13.0-20160221-NIGHTLY-mako.zip]
E:failed to map file
Installation aborted.
OTA failed! Please power off the device to keep it in this state and file a bug report!
So, despite all flashing, apparently it is STILL looking for the - now missing - cm13 update. Where is this coming from? There must be some flag somewhere, some config file or whatever.
So, after the next reboot, the ominous boot parameters seem to be gone - I'm on a fresh 5.1.1, build LMY48T.
I'm still curious what happened here. I guess the whole flashing wasn't necessary, I just needed to get rid of the malicious boot parameter. Maybe a file or a file system was readonly?
Any idea how this happened?
Device: A2017U
Bootloader: unlocked
Twrp: 3.0.2-2
When creating a backup, there are 2 system options in twrp.
"System"
"System Image"
When selecting boot + data + system, the backup set does not appear to restore correctly. The phone boots, but is stuck at the ZTE logo indefinitely. Does not show the "axon" image.
Choosing boot + data + "system image" results in a backup that restores and boots. This backup however is larger in size.
Why does the latter work and former does not?
The former works great for me - but I make my backups with everything but system image (I also backup efs and cache)
Works for me as well.
I tried selecting and restoring everything, still no go. It gets stuck on the blue zte logo after rebooting. If I restore "system image", it stays on the blue logo for about 15 seconds, then displays the axon boot animation.
Is there more than one 3.0.2-2 twrp images?
Since you two above have success can you post or link to the download to exactly which recovery you used?
I used the one from the newbie bootloader unlock guide.
This thread?
http://forum.xda-developers.com/axon-7/how-to/newbies-guide-to-unlocking-rooting-axon-t3496234
That links to this thread:
http://forum.xda-developers.com/axon-7/development/wip-axon-7-root-bootloader-unlokced-t3441204
Which then links to this:
TWRP recovery 3.0.2-2 : http://d-h.st/dgWW
Assuming you still have the recovery.img file on your system what is the md5 hash?
Mine is
CRC-32: bb3748c1
MD4: 5f30d14d1d766d18f911d8eca14921f7
MD5: 6eeb1a9d02470a840bc68019184d9a72
SHA-1: 1117af42779048674db87da32681fc875907e572
If yours matches, then I don't know. Twrp loads and works fine in all other regards. I may just try reflashing it, but really don't expect a different outcome.
gpz1100 said:
I tried selecting and restoring everything, still no go. It gets stuck on the blue zte logo after rebooting. If I restore "system image", it stays on the blue logo for about 15 seconds, then displays the axon boot animation.
Is there more than one 3.0.2-2 twrp images?
Since you two above have success can you post or link to the download to exactly which recovery you used?
Click to expand...
Click to collapse
http://d-h.st/dgWW
I have been using TWRP since B20 - I only see two choices for you and I don't know if either will make any difference. You could download TWRP again and install the new download. It is possible something went wrong with your download. If that doesn't work and you are desperate to fix this, try using stock recovery to roll back to the B20 that ZTE posted on their website, use this http://forum.xda-developers.com/axon-7/development/wip-axon-7-root-bootloader-unlokced-t3441204 to flash TWRP and use this http://forum.xda-developers.com/axon-7/how-to/guide-how-to-unlock-bootloader-stay-t3461165 to unlock it. Then you can use DrakenFX files to update to B29. Again, I don't see either option producing much different results. Dumb question, have you tried a factory reset, and then make a TWRP backup? I have heard of some apps and xposed modules causing people weird problems with this phone.
^^Tried reflashing twrp from a new download, exact same results. Before even reflashing twrp, I made a back up of it (from within twrp), flashed a new recovery.img, created another backup. Md5 of both backups matched!
I did find something else out. Under settings, if I enabled the "Use rm -rf instead of formatting", then I can restore successfully.
This leads me to belief something goes wrong when the partition is formatted.
Trying to revert back to B20. Stock recovery doesn't seem to see it on the sd card.
So i just did the new update on my V20 and it sent me straight to TWRP and i cant get out of it. It always boots into TWRP. What can i do? ive already tried a factory reset and restoring my back up and nada. Help please.
Its now looking for stock boot image which on yours is currently modified with system rooted.
Try using lgbridge to repairs your boot image or if you have it flash the stock boot image using fast boot command or do a factory reset while in twrp then flash entire stock image with lgbridge.
Sent from my LG-H990 using XDA-Developers Legacy app
somemadcaaant said:
Its now looking for stock boot image which on yours is currently modified with system rooted.
Try using lgbridge to repairs your boot image or if you have it flash the stock boot image using fast boot command or do a factory while in twrp then flash entire stock image with lgbridge.
Sent from my LG-H990 using XDA-Developers Legacy app
Click to expand...
Click to collapse
Yeah none of those work. The OS is setting off some sort of flag that states it must go into recovery and wont stop going into recovery until that flag is changed which I assume is done by the update. I tried updating with UPPERCUT/LGUP and it errors out at 4%. So right now it's still stuck
It didnt install the update
type
Code:
fastboot erase fota
from bootloader and see if it boots after that.
This will for sure fix you up...
https://forum.xda-developers.com/v20/how-to/how-fixed-bricked-lg-v20-t3501310
listen to me2151
delete fota and then pull battery and reboot.
ota's downloaded to the fota folder will cause endless twrp loop.
freeze ota in system/privapps to avoid this again.
Sorry to post on here, but maybe we can get a few tips from each other.
Im also stuck at TWRP. I installed a ROM and went back and forth between both ROMS. After about 4 times of going back and forth between ROMS, my pattern didn't recognize on boot with my original backup and daily. I tried my pattern over 10 times and it wiped everything on me. The strange part was I was swiping my pattern 100% and it failed. Also, my tries were going up and down. It would say I have 6 tries left before my phone wipes, then I would stop anjd turn the screen off, and the screen would say I have 3 tries left, then 5 tries left. My tries were inconsistent, and it finally wiped everything.
I am now stuck on TWRP with no luck of restoring. I flashed the vs995 boot image and system image and it goes back to TWRP. I factory reset, wiped everything, made sure the system folder was clean, then flashed both images again and the same thing, no luck.
I also tried to restore with LGUP, but keeps stopping at 9%. I extracted the dll and copied it into the common folder and I get the same thing.
Error: Error Code = 0x2000, Flashing Fail
When I plug the phone into my computer it shows us996 and not vs995. Strange.
Any help would be amazing.
EDIT: Figured it out!
So, I extracted the dll file from the kdz file and I had to replace it with the one in the common folder. My error was not renaming the file, so the LGUP would stop at 9%. Make sure you pull the file, rename it, remove the old file from the folder, and flash on LGUP.
leyvatron said:
Sorry to post on here, but maybe we can get a few tips from each other.
Im also stuck at TWRP. I installed a ROM and went back and forth between both ROMS. After about 4 times of going back and forth between ROMS, my pattern didn't recognize on boot with my original backup and daily. I tried my pattern over 10 times and it wiped everything on me. The strange part was I was swiping my pattern 100% and it failed. Also, my tries were going up and down. It would say I have 6 tries left before my phone wipes, then I would stop anjd turn the screen off, and the screen would say I have 3 tries left, then 5 tries left. My tries were inconsistent, and it finally wiped everything.
I am now stuck on TWRP with no luck of restoring. I flashed the vs995 boot image and system image and it goes back to TWRP. I factory reset, wiped everything, made sure the system folder was clean, then flashed both images again and the same thing, no luck.
I also tried to restore with LGUP, but keeps stopping at 9%. I extracted the dll and copied it into the common folder and I get the same thing.
Error: Error Code = 0x2000, Flashing Fail
When I plug the phone into my computer it shows us996 and not vs995. Strange.
Any help would be amazing.
Click to expand...
Click to collapse
why dont you try flash custom rom?
rowihel2012 said:
why dont you try flash custom rom?
Click to expand...
Click to collapse
Tried and no luck. Stuck in TWRP.
akobirovruslan said:
So i just did the new update on my V20 and it sent me straight to TWRP and i cant get out of it. It always boots into TWRP. What can i do? ive already tried a factory reset and restoring my back up and nada. Help please.
Click to expand...
Click to collapse
Have you tried booting into twrp manually and reflashing twrp again? Try that
THIS WILL FIX YOUR TWRP BOOTLOOP. Tried and true. Follow step-by-step.
https://forum.xda-developers.com/v20/how-to/how-fixed-bricked-lg-v20-t3501310
i did this it worked https://forum.xda-developers.com/v20/help/lg-v20-access-to-fastboot-t3557328
Alright, so I don't know what happened, my axon 7 got bricked for no reason at all
I unlocked the bootloader using Axon7Toolkit v1.1.0 method here > https://forum.xda-developers.com/axon-7/development/tool-axon7toolkit-t3573108 it got unlocked and whenever I boot I get bootloader verifying, the screen that says "software corruption failed, please lock the bootloader"
I asked Bkores about it in zte community he said it was all normal
everything was good until I decided to flash twrp 3.1.0.0 official image using fastboot flash recovery command on bootloader, twrp was flashed successfully everything was fine till that moment
I reboot to twrp, twrp's working fine, i reboot the device using twrp, the bootloader verifying screen appears, I wait 5 seconds...NOTHING! No bootanimation, nothing just stuck on the bootloader verifying screen, can't use the volume buttons to navigate (unless I use it before the 5 sec. period to reboot to recovery, fastboot, etc)
I reboot to twrp, try to perform factory reset I see "can't mount /data device or resource is busy"
since I am very familiar with this error (due to my older experience with older devices ) I thought this was "lulzworthy" and I only needed to wipe data by advanced wipe (without changing the file system, kept it ext4)
data is usable now, I reboot to system...same issue...
I tried deleting cache, dalvik and internal, same thing, nothing changed
why is this happening and how to fixit? I am downloading the b19 bootstack and b19 system for flashing them, but that'll take a lot of time and maybe it's not a system issue at all can someone help?
That "Software corruption failed" message is NOT normal, but you should get a warning about "unable to check for corruption".
Had a similar issue after an unsuccessful attempt to flash TWRP 3.1. EDL was the answer. See HERE
I went through the process and even did not lose any data, to my surprise. Decided to stay with TWRP 3.0.4-1 .. .. ..
Good luck
I think you need to flash an su/root or the no-verity zip.
^^Ding ding ding. I mentioned in one of the other threads, there really needs to be a sticky about this.
The phone is not bricked, it's just not meeting certain security standards that the stock rom is checking for, so it halts before it even begins to boot. Flashing supersu patches the dm-verity check. Or if you don't want root, flash the no-verity zip.
amphi66 said:
That "Software corruption failed" message is NOT normal, but you should get a warning about "unable to check for corruption".
Had a similar issue after an unsuccessful attempt to flash TWRP 3.1. EDL was the answer. See HERE
I went through the process and even did not lose any data, to my surprise. Decided to stay with TWRP 3.0.4-1 .. .. ..
Good luck
Click to expand...
Click to collapse
Not really it was just the verity check >_> and yes it was "Unable to check for corruption"
StickMonster said:
I think you need to flash an su/root or the no-verity zip.
Click to expand...
Click to collapse
Yep
gpz1100 said:
^^Ding ding ding. I mentioned in one of the other threads, there really needs to be a sticky about this.
The phone is not bricked, it's just not meeting certain security standards that the stock rom is checking for, so it halts before it even begins to boot. Flashing supersu patches the dm-verity check. Or if you don't want root, flash the no-verity zip.
Click to expand...
Click to collapse
IT MUST BE A STICKY since I rushed downloading twrp from twrp.me and flashed it via Axon7tool thinking everything was fine, being unaware of verity check >_> but now flashed no verity zip and booted successfully
This is my first Arm64 device and things are a bit confusing for me, sorry for this post I should've searched about the twrp post >_>