Failed Boot after Flashing SuperSU - Nexus 5X Q&A, Help & Troubleshooting

I finally got around to rooting my 5x this last weekend. I flashed the latest version of the SuperSU update zip. After flashing I used the SafetyNet Helper to check if my phone successfully jumps through all of Google's hoops. I failed the test, so I went back to recovery and restored my boot partition from my nandroid backup, which I created immediately after flashing and booting to TWRP. When I tried rebooting system I got a message my software was corrupt and phone got stuck on boot screen (Google logo with annoying padlock to indicate bootloader is unlocked). Went back to TWRP and tried restoring both boot and system but it was still getting stuck on the boot screen. So I downloaded the factory images, flashed everything but userdata, and phone was working again.
After some digging I found that I failed to read the fine print for the newer versions of SuperSU, stating that if you want the systemless install you have to write a couple of settings to a file in /data that the installer checks. Did this and root worked and passed the SafetyNet checks and I was happy. Then I installed AdAway and flashed systemless hosts and I'm even happier. But I'm still wondering why it was saying my software was corrupted, even after I restored my nandroid backup. Any ideas?

jgummeson said:
I finally got around to rooting my 5x this last weekend. I flashed the latest version of the SuperSU update zip. After flashing I used the SafetyNet Helper to check if my phone successfully jumps through all of Google's hoops. I failed the test, so I went back to recovery and restored my boot partition from my nandroid backup, which I created immediately after flashing and booting to TWRP. When I tried rebooting system I got a message my software was corrupt and phone got stuck on boot screen (Google logo with annoying padlock to indicate bootloader is unlocked). Went back to TWRP and tried restoring both boot and system but it was still getting stuck on the boot screen. So I downloaded the factory images, flashed everything but userdata, and phone was working again.
After some digging I found that I failed to read the fine print for the newer versions of SuperSU, stating that if you want the systemless install you have to write a couple of settings to a file in /data that the installer checks. Did this and root worked and passed the SafetyNet checks and I was happy. Then I installed AdAway and flashed systemless hosts and I'm even happier. But I'm still wondering why it was saying my software was corrupted, even after I restored my nandroid backup. Any ideas?
Click to expand...
Click to collapse
In general, phones get messed up after flashing backups or changing through multiple ROMs. The backups like nandroid backup are primarily meant for immediate resolution and a full fresh install is always recommended for any device (be it a desktop, laptop or any mobile device). Its always better to find the best suited ROM as per your needs and stick with it rather than messing up by flashing different zips through TWRP. Cheers :good:

ultraquantum said:
In general, phones get messed up after flashing backups or changing through multiple ROMs. The backups like nandroid backup are primarily meant for immediate resolution and a full fresh install is always recommended for any device (be it a desktop, laptop or any mobile device). Its always better to find the best suited ROM as per your needs and stick with it rather than messing up by flashing different zips through TWRP. Cheers :good:
Click to expand...
Click to collapse
Right. Nandroid can quickly get you out of the most common sticky situations by restoring the most commonly messed with partitions (system, boot, data). There are a bunch of other partitions that can mess things up. The only things flashed though were TWRP and SuperSU (non-systemless by mistake). I'm just trying to understand what might've gone wrong. Something outside of system/boot must have been modified and broke the boot, only after restoring the boot partition. Think I figured it out though - I looked at the update script for SuperSU and it looks like it could be messing with the vendor partition (at least for non-systemless installs). When I flashed back the stock boot image a change in the vendor partition must have tripped dm-verity, which the SuperSU installer had disabled when it updated the boot image.

Related

[Help] Cannot flash, wipe, or nandroid

So, I've been using TWRP since I purchased this device. I did a TWRP backup today as usual since I wanted to flash back to TouchWiz to update my PRL. I did so, then went to restore my backup. Only part of the backup restored. Now, no matter what I do in TWRP, I get the same error:
E error opening 'data/data/com.newegg.app/share (there's more text here but it's truncated by the recovery)
E error: Not a directory
This happens when I try to wipe (any option), flash a ROM, create a backup, restore a backup, etc. I've updated from TWRP 2.5 to 2.6.3, still to no avail. I don't believe it's a recovery issue. Recoveries don't just stop working, especially after using Odin to write a new recovery partition.
My ROM is screwed up. It boots, but no apps open. The hardware keys don't work (except home).
Any ideas or suggestions? I don't really want to switch to CWM but will if absolutely necessary.
Thanks!
I would suggest doing an ODIN back to Stock. Make sure everything is working correctly. Then Root the Device again.
I did something similar. I used a flash to stock and reset counter .zip that worked. It still threw that newegg error, but once I rebooted, reinstalled twrp, rooted, flashed Slim 4.3 Stable 2 and did another nandroid, the weird error is now gone. So glad I didn't ruin my phone! Thanks!
Your welcome. Happy you got the issue resolved .
TEAM MiK
MikROMs Since 3/13/11

Messed up phone by backups! Much much better repost!

Okay let me start by saying that I have 3 backups of my entire phone made through TWRP. Yesterday I was configuring some flashable ZIPs to install a simple app like SMSgo through recovery. I then installed the ZIP. It was successful but the app was nowhere to be found so I decided to restore a backup. I restored the newest one, when I booted I ran into some problems, I was stuck in a loop of lock screen and boot animation. I then searched the web for solutions. On some forums somebody suggested to wipe internal storage and flash boot.emmc.win from my backup through fastboot. I did so and when I booted my phone was factory fresh and okay. But I didn't have my numbers and sms so I restored a backup... BAD idea. My phone was optimizing apps as I booted, it failed near the end, System UI has stopped it said and then threw me on setup screen without on screen buttons. I tried to restore every single backup I had, the same story with everyone, the best result I got was that it optimized all aps and then crashed system UI.
I went on web and searched for TWRP backups that fit my CID HTC__032 and restored. As I'm typing this I'm running factory fresh 4.4.4 from backup and only OTA I can download is 70mb fix. I didn't update yet cuz I dont have stock recovery.
I am currently not rooted as this downloaded backup wasn't but all backups I made myself are rooted. I have also unlocked bootloader and S-ON running TWRP.
What should i do now? I want to get to stock (preferably get one of my backups working) so I will be able to receive OTAs
The downloaded back is for HTC__032cid, 3.28.401.6 version as it was one of few which had working download links.
http://forum.gsmhosting.com/vbb/f485/htc-m8-collection-stock-backups-1882892/
Also worth mentioning that when I rooted before all this happened I had problems with crashing of TV app and I couldn't browse internal storage that I solved with:
adb shell
su
restorecon -FR /data/media/0
subcola said:
Okay let me start by saying that I have 3 backups of my entire phone made through TWRP. Yesterday I was configuring some flashable ZIPs to install a simple app like SMSgo through recovery. I then installed the ZIP. It was successful but the app was nowhere to be found so I decided to restore a backup. I restored the newest one, when I booted I ran into some problems, I was stuck in a loop of lock screen and boot animation. I then searched the web for solutions. On some forums somebody suggested to wipe internal storage and flash boot.emmc.win from my backup through fastboot. I did so and when I booted my phone was factory fresh and okay. But I didn't have my numbers and sms so I restored a backup... BAD idea. My phone was optimizing apps as I booted, it failed near the end, System UI has stopped it said and then threw me on setup screen without on screen buttons. I tried to restore every single backup I had, the same story with everyone, the best result I got was that it optimized all aps and then crashed system UI.
I went on web and searched for TWRP backups that fit my CID HTC__032 and restored. As I'm typing this I'm running factory fresh 4.4.4 from backup and only OTA I can download is 70mb fix. I didn't update yet cuz I dont have stock recovery.
I am currently not rooted as this downloaded backup wasn't but all backups I made myself are rooted. I have also unlocked bootloader and S-ON running TWRP.
What should i do now? I want to get to stock (preferably get one of my backups working) so I will be able to receive OTAs
The downloaded back is for HTC__032cid, 3.28.401.6 version as it was one of few which had working download links.
http://forum.gsmhosting.com/vbb/f485/htc-m8-collection-stock-backups-1882892/
Also worth mentioning that when I rooted before all this happened I had problems with crashing of TV app and I couldn't browse internal storage that I solved with:
adb shell
su
restorecon -FR /data/media/0
Click to expand...
Click to collapse
Here's a stock recovery download.
Here's a stock rooted backup. I'm not sure if that's really what you are looking for though.
You could also try running the 4.16.401.10 RUU to update. That would clean up your phone so that you can start with a fresh slate. The RUU download is here.
After the RUU, you should be able to restore your nandroids. Probably after the OTAs as well.
As I'm typing this I have successfully flashed stock recovery and made an OTA update with my phone from 3.28.401.6 on 4.16.401.10, what concerns me is that I cannot access internal storage and TV app is crashing.
Same problem as my previous post:
Also worth mentioning that when I rooted before all this happened I had problems with crashing of TV app and I couldn't browse internal storage that I solved with:
adb shell
su
restorecon -FR /data/media/0
Click to expand...
Click to collapse
Also I can't turn on WIFI after OTA so I'll try to run that RUU and report if the problem fixes itself. I don't really want to mess with root unless I have to.
EDIT: RUU fails with error code 155: UNKNOWN ERROR, shall I just do what used to work before? or you have other ideas?
Edit2: Did a factory reset and all problems are gone. Just obe more thing, the mobile signal seems weak, is it possible that my radio got messed up? Can I restore radio from one of my backups ?

Stuck on boot after re-installing stock recovery

Hi, when I got the phone I rooted it by installing TWP recovery, it was all working fine after that until an OTA update popped up, after some research I learned that in order to install OTA updates you need to install stock recovery. Firstly, not knowing entirely what I was doing I installed the stock recovery for the wrong software version. The phone booted however and I tried to install the OTA update, upon restarting I was met with the "red triangle" error screen. I restarted the phone and it booted up fine.
Then having found the correct stock recovery (4.16.401.10) I installed it and ran the update again. It seemed to be going fine with the loading bars moving along nicely when it got stuck on the HTC bootup logo. From here I restarted it and now the phone turns on, shows the htc logo, then gets stuck on a black screen,
Please help, Thanks.
http://forum.xda-developers.com/htc-one-m8/help/boot-loop-problem-t3194508
ckpv5 said:
http://forum.xda-developers.com/htc-one-m8/help/boot-loop-problem-t3194508
Click to expand...
Click to collapse
Hi, thanks for that, I guess I should have searched around harder. One question though, you mention that there is a way to restore just system to keep your data, I don't wanna loose all of my data so I'd like to do that, I'm just not sure how to apply that to your guide, what is it that I have to do differently to keep my data?
Thanks.
DarwinW said:
Hi, thanks for that, I guess I should have searched around harder. One question though, you mention that there is a way to restore just system to keep your data, I don't wanna loose all of my data so I'd like to do that, I'm just not sure how to apply that to your guide, what is it that I have to do differently to keep my data?
Thanks.
Click to expand...
Click to collapse
2 options :
1.
In step 8, select dalvik cache, cache, system but don't select data
In step 9, tick only boot & system and don't tick data
or
2.
Make a nandroid backup of your current ROM
Do all the steps, once completed the OTA reinstall TWRP and restore only data from your earlier made nandroid backup
Thank you so much, you're amazing. Just creating a backup now. So once I've flashed the stock rom and the TWRP recovery to restore my data, if I then install the stock recovery again, should it all work fine? or does changing the recovery at any point stop OTA updates working?
The reason I rooted my phone to start with was to use titanium backup to restore apps from a previous phone, so if I can get the phone all stock just with my data, then I don't really need root.
Thanks!
DarwinW said:
Thank you so much, you're amazing. Just creating a backup now. So once I've flashed the stock rom and the TWRP recovery to restore my data, if I then install the stock recovery again, should it all work fine? or does changing the recovery at any point stop OTA updates working?
The reason I rooted my phone to start with was to use titanium backup to restore apps from a previous phone, so if I can get the phone all stock just with my data, then I don't really need root.
Thanks!
Click to expand...
Click to collapse
That's almost same as option 1 above. You need stock recovery for OTA to work.
Most important is the system part must be stock with nothing changed.
Personally, I always do option 2 to make sure OTA is successfully done .. then restore data.
One thing to note ... you don't need to relock bootloader doing all these process.
Also, now that I've created the backup (stored to the phones storage), how do I transfer that to my PC, since the phone doesn't boot, the computer doesn't recognize the storage.
Thanks.
In TWRP you have option to enable MTP then both your internal storage and microSD can be opened on PC
Make sure to use TWRP 2.8.4.0 or newer or latest. I'm still on TWRP 2.8.6.0
It seems I'm on an older version of twrp (2.7.0.2), I made the backup using this version. If I update to a newer version now will the restore work properly?
Thanks.
Usually yes we can restore a backup made with older TWRP version but I'm not so sure about 2.7.0.2 as that is the buggiest TWRP among all versions but very popular because it is included in one very old and not updated toolkit.
Why don't install latest/newer TWRP then redo the backup then transfer to PC.
I'm having trouble viewing files on my pc, I select "mount" from the main twrp menu, it then shows a screen to select which partitions to mount, I tick them, then nothing happens. There's no button to actually start the mount.
I did mentioned enable MTP function ... see below on the right side you should see Disable MTP or Enable MTP (beside Mount USB Storage) .. not those partitions to mount (but in the same screen)
I think you were right about that version being buggy. Those buttons on the bottom were missing. Just installed the latest twrp and I can mount now as the buttons to mount are showing up. Hopefully all will be fine now
Thanks.
Hi, I'm following the guide now and when I try to wipe the phone it doesn't work, I get:
Wipe Complete
Failed
"Unable to mount /cache
failed to wipe dalvik"
This error repeats a few times.
Thanks.
EDIT** scratch that, sorted it
Horray! Everything has now worked out and my phone is back to it's old self with the update, thank you so much ckpv5! you're the best.

Something i noticed with flashfire.

So ive been told flashfire cant flash roms or in g4s cases non bootloader unlocked versions cant flash systems cause it loads in a minimal state.
Well what i noticed is. I made a total backup with flashfire. And i toted my 991. Once i got rooted and reinstalled flashfire i restored the backup and it worked. So flashfire seems to be capable of flashing a system backup restore. So if i made a rom system only and as long as none of my personal info is in it would one be able to restore said system backup as there own on another respectable 991 ofcoarse. I also noticed it restored my boot partitions recovery carrier and all. So am i onto something or. pissing in the wind
If the bootloader doesnt get the right signature from the rom/img/zip . it will cause bootloop

Restore a TWRP backup with A/B system slots!

CHANGED: You must flash the dm-verity.zip on ROM install to use the backup/restore feature of TWRP. It won't work if /data is encrypted. I jumped the gun when making this thread.
EDIT2: I had also flashed dm-verity on install so /data wasn't encrypted.
Which Dm Verity did you use which version??
Does this mean even today with the latest versions of twrp and magisk you cant restore the backups made of an encrypted phone? I just got a new Moto G7 Power and got it setup with those two things and made a backup - havnt tried restoring yet. Does your solution of flashing the dm-verify.zip thing mean the phone will be unencryped then? Because I cant have that, I rather not have backups. What about the old "adb backup" type command line does that still work?
I've had my phone since the day they were available at metro and I can't and don't even try to backup or restore anything anymore. On roms it always has broken lockscreen where you cannot secure phone. Because of this I stay encrypted and setup my **** all over again when I change roms.
flash713 said:
I've had my phone since the day they were available at metro and I can't and don't even try to backup or restore anything anymore. On roms it always has broken lockscreen where you cannot secure phone. Because of this I stay encrypted and setup my **** all over again when I change roms.
Click to expand...
Click to collapse
I see, too bad it's a nice function to backup/restore I guess I'll just backup my important data individually and try not to mess up my Rom.
TaZeR369 said:
I see, too bad it's a nice function to backup/restore I guess I'll just backup my important data individually and try not to mess up my Rom.
Click to expand...
Click to collapse
Check this out. I haven't used it yet but I'm about to try it. Join «Migrate - Custom ROM Migration Tool» on Telegram: https://t.me/migrateApp
https://forum.xda-developers.com/android/apps-games/app-migrate-custom-rom-migration-tool-t3862763
There's a new add-on for it on telegram link
TaZeR369 said:
I see, too bad it's a nice function to backup/restore I guess I'll just backup my important data individually and try not to mess up my Rom.
Click to expand...
Click to collapse
Me too. I haven't a bit of luck with encrypted stock restores. I was told it would work if you don't restore /data, but when I made a backup without /data, it failed to restore. I HAVE been able to restore unencrypted customs though. I only backed up system, data, and boot when I succeeded. It's been a while. I think you have to wait a long time for the 1st boot after the restore, as if it were rebuilding ART or something. Haven't had any luck stopping stock from encrypting either. I hate not messing up my ROM. Boring.....
Perhaps I am missing a critical detail, but I just successfully restored my latest LOS(lineage-17.1-20200524-UNOFFICIAL-ocean) & older CRD(crDroidAndroid-10.0-20200405-ocean-v6.4) backups(*) using TWRP(twrp-installer-3.3.1-2-ocean).
SELinux is NOT enforced, but "Trust"(lulz) claims the phone is encrypted.
My methodology requires installing the same base f/w I used when originally installing the ROM(former newest RETAIL for CRD & newest RETUS for LOS), root, flash copy partitions zip, flash>factory reset>1st boot of the original ROM zip, enable debug, install TWRP, boot into TWRP, wipe all & restore backup(*).
I just restored successfully 2x's on my xt1955-5.
I loaded LOS 10 & 3rds from scratch, made all my settings tweaks & made Titanium b/u(JIC), made TWRP b/u(*) then restored my previous CRD daily install using steps above. Then I repeated the above steps(again) to go back to my new, fresh LOS. It is annoying to have to reload f/w, et al, but def easier than reloading & retweaking the OS & all 3rds from scratch... Titanium fails to restore most settings + other nits.
To restore a backup(*) of a ROM I am currently running, I just boot to TWRP, wipe all & restore.
*: To make the original TWRP backup, I will run it & it will fail. I open the log file and find the last file/folder that "error"ed, delete the offender & re-run backup(boot, data & system). It works for me, no DM-verity flash required.
As always, YMMV.
Edit: PS: The problems seem to be stemming from beta testing the new "Trust"(lulz) framework, on all 10 ROMs(?). Would be nice to get that ironed out. A new Recovery wouldn't hurt, either. AFAIK, these problems exist in OFR, too.
googleverifysux said:
Perhaps I am missing a critical detail, but I just successfully restored my latest LOS(lineage-17.1-20200524-UNOFFICIAL-ocean) & older CRD(crDroidAndroid-10.0-20200405-ocean-v6.4) backups(*) using TWRP(twrp-installer-3.3.1-2-ocean).
SELinux is NOT enforced, but "Trust"(lulz) claims the phone is encrypted.
My methodology requires installing the same base f/w I used when originally installing the ROM(former newest RETAIL for CRD & newest RETUS for LOS), root, flash copy partitions zip, flash>factory reset>1st boot of the original ROM zip, enable debug, install TWRP, boot into TWRP, wipe all & restore backup(*).
I just restored successfully 2x's on my xt1955-5.
I loaded LOS 10 & 3rds from scratch, made all my settings tweaks & made Titanium b/u(JIC), made TWRP b/u(*) then restored my previous CRD daily install using steps above. Then I repeated the above steps(again) to go back to my new, fresh LOS. It is annoying to have to reload f/w, et al, but def easier than reloading & retweaking the OS & all 3rds from scratch... Titanium fails to restore most settings + other nits.
To restore a backup(*) of a ROM I am currently running, I just boot to TWRP, wipe all & restore.
*: To make the original TWRP backup, I will run it & it will fail. I open the log file and find the last file/folder that "error"ed, delete the offender & re-run backup(boot, data & system). It works for me, no DM-verity flash required.
As always, YMMV.
Edit: PS: The problems seem to be stemming from beta testing the new "Trust"(lulz) framework, on all 10 ROMs(?). Would be nice to get that ironed out. A new Recovery wouldn't hurt, either. AFAIK, these problems exist in OFR, too.
Click to expand...
Click to collapse
Have u tried the new 3.5 twrp
Lol...and here it is a couple years later and I'm still searching whether a force-encrypted twrp backup of stock has been figured out how to restore...Pulled up my own thread. Lol.
i miss being able to backup android properly. it made me behave completely differently with my phone. it was a toy instead of just some tool. i'd just install every single rom, kernel modem operating system i could find or i'd just plagiarize the hell out of you guys for sh*ts and giggles and man i loved android so much back then but now its my cell phone. :\ i just liked the colorful language, i wasn't signing anybody else's code.
it's such a tedious thing now, even compared to before and i suppose that's their intention perhaps.

Categories

Resources