Can't recover TWRP backup - any ideas? - General Questions and Answers

I had to send in my Galaxy S9+ (Android 9) for repair and backed to all partitions with TWRP. Then I factory reset it. After I got my repaired phone back I thought now it's time to update Android. I flashed to Android 10 with a new bootloader. Then I wanted to get my apps and data back from the backup from Android 9. I wanted to restore my full TWRP Android 9 backup. I could restore the backup, but the phone does not boot up.
Meanwhile I read that once updated a new bootloader one can't go back to a lower Android version. Can anyone tell me why? When I back up my PC (linux) partitions with dd and restore them, everything is as at the time the backup was done. Where is the difference between phone and PC? This is just for my understanding.
The main questions is what I can do to recover my TWRP backup done in Android 9:
Is there any way to recover my data from my backup images?
Do I have to buy another S9+ with Android 8 or 9 to be able to recover my backup and access my data?

Any backup created by TWRP is a TAR archive you can extract by Windows / Linux command line.

You can't rollback after updating the bootloader, because flashing the bootloader to a lower version isn't done in the usual ways.
Think of it as PC's BIOS, they both have similar functions. Can you update a BIOS normally?
So to answer your questions:
You can try a different version of TWRP, specifically v3.5.0+ as it supports dynamic/logical partitions of android 10.
You can also extract any backup done by TWRP.
Finally, you can always just flash a custom ROM and restore your backup.

Thanks a lot for your answers so far.
When I did the backup I chose all partitions to be backed up. When in my situation I cannot restore all partitions to not to soft-brick the phone, can you please tell me, which partitions of my Android 9 backup I have to choose in TWRP to restore in my Android 10 system?

Related

[Q] Non-Lollipop TWRP Restore issue

I shattered the screen on my Nexus 5, and G was kind enough to send a replacement (refurbished). Since I have TWRP Nandroid backups, I thought it would be an easy matter to unlock/root/TWRP the new replacement phone, copy over the backup files, then restore. However, TWRP does not seem to be working - I get a bootloop, with an android mascot with a red triangle and the words "no command" when I select "Recovery".
My original N5: unlocked, rooted, TWRP, Android 4.4.4
Replacement N5:
- originally with Android 4.4.0
- unlocked, rooted and TWRP installed with Nexus Root Toolkit (NRT)
- system was then upgraded to 4.4.2, 4.4.3, 4.4.4
- went into fastboot, tried to select Recovery....and nothing.
Is this an issue with TWRP? Should I try flashing a different version?
Is this an issue with the process? Should I use NRT to "Return to Stock", THEN let the system update itself to 4.4.4, THEN try unlock/root/TWRP and recovery?
Is this an issue with the root process? Should I use CF Auto Root and try to re-root, re-install SuperSU, etc. on the current system?
TIA
Ed
That's stock recovery. Do yourself a favour and flash recovery properly without using a toolkit.
Thank you - that was absolutely correct. Apparently NRT either didn't install TWRP, or didn't flash an error message saying TWRP install failed (or I missed it).
I downloaded a TWRP flash image, and after some tweaking with drivers, managed to flash it just fine.
I then copied over my original N5 TWRP backup, and restored it. Aside from some minor data location problems (e.g., Evernote detected new SD Card, re-sync'd all notes), it worked fine and the new phone is in the exact same state/configuration as the original phone.
Now to go track down the "TWRP restore to a different device" threads.
Thanks!
The rule really is never restore EFS from another device.
Old device, backup system, boot and data
New device, make a small backup to generate the serial number folder. Then copy the backup from the old device.

Can't boot after TWRP restore

Hi all,
A couple of days ago I flashed the OTA image for 8.1. Realising I don't have root and not finding a way to root 8.1 yet, I figured, hey, I'll go back to 8.0. Luckily I did a full backup using TWRP before upgrading.
TWRP 3.1.1 was unable to decrypt the filesystem and therefore restore anything (which I've read is a known issue). Neither could 3.2.1, and 3.2.1 couldn't see the OTG drive I have the backup on, either.
At this point I'd already wrecked the OS by trying to restore without first decrypting the filesystem (figured it'd just overwrite it so who cares). So I flashed the latest 8.0 factory image, started it up to make sure it boots, went back into TWRP and restored the full backup from the OTG drive.
This succeeds - but when rebooting all I get is the initial Google logo. Nothing else. No loop, no progress meter, nothing.
Am I missing a step? Anyone?
jethro1138 said:
Hi all,
A couple of days ago I flashed the OTA image for 8.1. Realising I don't have root and not finding a way to root 8.1 yet, I figured, hey, I'll go back to 8.0. Luckily I did a full backup using TWRP before upgrading.
TWRP 3.1.1 was unable to decrypt the filesystem and therefore restore anything (which I've read is a known issue). Neither could 3.2.1, and 3.2.1 couldn't see the OTG drive I have the backup on, either.
At this point I'd already wrecked the OS by trying to restore without first decrypting the filesystem (figured it'd just overwrite it so who cares). So I flashed the latest 8.0 factory image, started it up to make sure it boots, went back into TWRP and restored the full backup from the OTG drive.
This succeeds - but when rebooting all I get is the initial Google logo. Nothing else. No loop, no progress meter, nothing.
Am I missing a step? Anyone?
Click to expand...
Click to collapse
Had you ever tried restoring the backup before to verify it was stable? Perhaps there was some corruption in the backup file?
Well, it is able to restore the whole thing without an error. I think that counts as verifying that it's not corrupt...
I'm facing the same exact issue. I've got several previous backups of my Pixel, all of 8.1, and if I try restoring any partition except /data they restore successfully and boot as a fresh phone.
Now of course I need my data, but when I try to restore any of my previously backed up /data partitions, they either freeze during restoration or restore successfully. However if they do restore successfully, my phone won't boot anymore. After showing the Google logo, then animated G, it reboots back to recovery.
I tried most things as of now but to no avail. This really sucks!

There is apparently no way to restore a Nandroid backup under OOS 9.0.4...???

So I did what I thought was a routine thing, trying to restore system, boot, and data like I have on many phones before only to ended up in a bootloop or bootloader only not even able to boot a TWRP from fastboot.
After several hours of trying just about everything I finally faced the fact that I was not going to be able to restore any NANDROID backup I had do to A/B, encryption or the latest Android security patch?
However, you can get you phone running again quite easily with this thread: https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 and using the flash-all option from a WIndows 10 VM (I am a Mac/Linux guy, but this does work from a Windows VM and is quick).
Before I re-installed anything I wanted to just verify that I could do a simple NANDROID backup of an empty phone with twrp / blu_spark and I can't under any case. Here's what I tried (with latest stock TWRP and latest Blu_Spark TWRP):
1) simple restore of data, system, boot -- > boots only to fastboot, need to recover with thread above
2) Recover with thread above, re-root (Magisk 18.1) and reinstall TWRP, boot ROM, then try restoring just data -- > same as #1
3) Recover using thread above, re-install TWRP, restore NANDROID, and re-run Magisk (suggest by a few) --> same as #1
My device is encrypted, and I could turn off encryption, but that is somewhat scary on a daily driver.
So has anyone successfully restored a NANDROID on a 9.0.4 rooted phone with the latest Android security patch and if so, what's the trick?
Thanks,
MW
MetroWestMA said:
So I did what I thought was a routine thing, trying to restore system, boot, and data like I have on many phones before only to ended up in a bootloop or bootloader only not even able to boot a TWRP from fastboot.
After several hours of trying just about everything I finally faced the fact that I was not going to be able to restore any NANDROID backup I had do to A/B, encryption or the latest Android security patch?
However, you can get you phone running again quite easily with this thread: https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 and using the flash-all option from a WIndows 10 VM (I am a Mac/Linux guy, but this does work from a Windows VM and is quick).
Before I re-installed anything I wanted to just verify that I could do a simple NANDROID backup of an empty phone with twrp / blu_spark and I can't under any case. Here's what I tried (with latest stock TWRP and latest Blu_Spark TWRP):
1) simple restore of data, system, boot -- > boots only to fastboot, need to recover with thread above
2) Recover with thread above, re-root (Magisk 18.1) and reinstall TWRP, boot ROM, then try restoring just data -- > same as #1
3) Recover using thread above, re-install TWRP, restore NANDROID, and re-run Magisk (suggest by a few) --> same as #1
My device is encrypted, and I could turn off encryption, but that is somewhat scary on a daily driver.
So has anyone successfully restored a NANDROID on a 9.0.4 rooted phone with the latest Android security patch and if so, what's the trick?
Thanks,
MW
Click to expand...
Click to collapse
apparently is not matter of factly, i do nandroids and have restored from them various times with only 2-3 settings that i had to reset my way thereafter, hence it's apparently worth to retry, it works.
sometimes it helps to know that things are possible to put some more effort into something, knowing it can be worth it in case of success.
perhaps some remarks:
if your' phone is "empty" as you stated i recommend to first install factory image / stock rom latest OOS, i.e. 9.0.4
make nandroids of each partiton speparately and also restore them separately while don't nandroid the images, and cerrtainly don't restore those, only common partitions like system, boot, vendor, data.
system and vendor are present as normal partition as well as image partition, don't touch the later in any way.
all this only works if you restore on a phone that was bootable before you restore, for restoring to empty phones there are other procedures via fastboot commands and or stock rom via stock recovery if it's on device, else ADB comes in handy.
last but not least if you restore you have to restore everything, not only one partition especially not only system partition, won't work well or not at all depending.
1. Modem if corrupted, else not needed
2. EFS if corrupted, else not needed
3. Vendor start here if the previous rom was running well and make sure it's not been altered or you have to correct vendor backup in case you have more than one
4. System
5. Boot
6. Data
good luck
magnamentis said:
apparently is not matter of factly, i do nandroids and have restored from them various times with only 2-3 settings that i had to reset my way thereafter, hence it's apparently worth to retry, it works.
sometimes it helps to know that things are possible to put some more effort into something, knowing it can be worth it in case of success.
good luck
Click to expand...
Click to collapse
OK -- do tell, what settings did you use? And you have done this on OOS 9.0.4 with encryption, or did you disable decryption?
I'll happily delete or edit the post...it seems many are having problems with few solutions starting with 9.0.4...
Thanks,
MW
MetroWestMA said:
OK -- do tell, what settings did you use? And you have done this on OOS 9.0.4 with encryption, or did you disable decryption?
I'll happily delete or edit the post...it seems many are having problems with few solutions starting with 9.0.4...
Thanks,
MW
Click to expand...
Click to collapse
the last restore i did on 9.0.3, since then i gave up on custom roms since OOS rooted + a few useful apps make OOS close to perfect for me
i'd not delete the thread, many reported issues with nandroids because the normal procedure to take one single backup and restore from twrp to an empty device does not work, one always need to first flash stock OOS to a clean slate before installing anything else or restoring anything.
and backups should be in increments not one single backup like it was possible on single slot devices.
restoring one single partition usuelly ends up in a mess except boot partition, boot, efs and modem can be restored as standalone restores without issues in most cases while flashing a kernel + magisk is still easier and safer than restoring a boot partition.
as to setttings i dunno what you mean, exactly and as to encryption, my device is and has bee encrypted at all times.
it's most important to use twrp- recovery by blue_spark, official standard recovery has issues ( at least always had as long as i tried using it) especially with verification in TWRP on encrypted devices. there is a risk to end up encrypted without any way to boot back into system or into twrp menu, hence use blue_spark's and all is well, user error exempt of course
Since reinstalling everything is going to take forever (at least another 4 hours)...I am going to disable encryption and do some more testing. I am now more certain than ever, no-one has successfully restored a NANDROID on an encrypted OOS 9.0.4 phone ever.
I am going to disable Force Encryption and AVB 2.0/dm-verity and try my restore again -- maybe then I can use one of my NANDROIDS. But doing this on an encrypted phone seems impossible. I guess if you use a screen PIN you files are still vulnerable to someone that knows bootloader and / or recovery, but I'll have to live with that.... Not being able to NANDRIOD restore is a killer...
I know is an old discussion but I believe we still have this issue. I have a 6T, oos10.3.6 and neve succeeded to restore a nandroid backup. Does anyone found a working solution?
Thanks

Is it possible to actually restore a TWRP backup on this phone?

Any time I've tried to restore a backup it has completely bricked my phone. I tried just backing up the default options and restoring bricked, so when I had my phone rooted and setup perfectly with XXX no limits on Android 10 and all my apps installed, I made a FULL backup in case I bricked it with smurf kernel or something. Long story short, I ended up bricking it via other methods and tried to restore my full backup only to be completely bricked again. Not even recovery works after installing a backup. I've found that no matter what I backup, if I restore it it completely bricks my phone to the point where it only automatically boots into fastboot and I have to install a system image and start over every time. Am I doing something wrong or does TWRP 3.3.1-70 not support restoring yet?
jld2k6 said:
Any time I've tried to restore a backup it has completely bricked my phone. I tried just backing up the default options and restoring bricked, so when I had my phone rooted and setup perfectly with XXX no limits on Android 10 and all my apps installed, I made a FULL backup in case I bricked it with smurf kernel or something. Long story short, I ended up bricking it via other methods and tried to restore my full backup only to be completely bricked again. Not even recovery works after installing a backup. I've found that no matter what I backup, if I restore it it completely bricks my phone to the point where it only automatically boots into fastboot and I have to install a system image and start over every time. Am I doing something wrong or does TWRP 3.3.1-70 not support restoring yet?
Click to expand...
Click to collapse
Stop trying to restore the complete backup.
Flash the ROM and restore data only.
I don't see a point in backing up the ROM, when you can just as easily flash it then restore data.
tech_head said:
Stop trying to restore the complete backup.
Flash the ROM and restore data only.
I don't see a point in backing up the ROM, when you can just as easily flash it then restore data.
Click to expand...
Click to collapse
It's just a hassle because installing Android 10 factory image via fastboot fails every time. If I fiddle around and brick, I have to fastboot install Android pie, root it and install twrp, download Android 10, install it via local updater then flash magic to the other slot then reboot and install my xxx no limits module before I can restore my data. Compared to just getting TWRP up and running and restoring my backup I'm looking at a time consuming process to get to that point. I wish I knew why flashing Android 10 via fastboot bricks every time because that's a major cause of this headache while figuring out what does and doesn't work on Android 10. I already have titanium backup backing up nightly to Google drive so by the time I get to the point I can flash my data I might as well just restore my apps + data in TB. If I could get TWRP to successfully restore my backups I'd be given a lot of freedom to tinker around freely without worry of this time consuming restoration. I think next time I'm gonna try backing up into a flashable zip and seeing if I can successfully restore my image via fastboot when I inevitably brick again while messing around
tech_head said:
Stop trying to restore the complete backup.
Flash the ROM and restore data only.
I don't see a point in backing up the ROM, when you can just as easily flash it then restore data.
Click to expand...
Click to collapse
I haven't actually tried this. Are you talking about flashing the rom, and (within the same instance of TWRP), then restoring? Or are you talking about flashing the ROM, booting it, then going back into TWRP and restoring data?
just a quick question?? why are you always downgrading to a9?? when you can simply
1. flash a10 ( i save one on my PC in case a problem arises)
2. set up the phone
3. in pc, open a10 rom, locate for its boot.img amd store in phone
4. install magisk.apk and patch boot img , then copy to pc
5. install patched boot.img via fastboot
congrats,, back on track.. it only took me about 10-15 min to restore a bricked device up to being rooted and twrp installation

Stuck upgrading from 9.05 to 10.3, restore with Nandroid backup possible ?

Tried to clean flash unlocked and rooted OP6 from OOS 9.05 to 10.3 and got stuck in "bootloader unlocked" (only later learned that I should have gone via 9.09 to 10). Tried to restore Nandroid, but this did not work either and even lost the recovery.
Now I can go to recovery only via "fastboot boot" and only using twrp-3.3.1-18-enchilada-Q-mauronofrio.img (none of the other recoveries I tried will boot). I tried to restore the backup (with and without reflashing twrp-3.3.1-18-Q zip afterwards) but never manage to boot back to system (maybe because the restore is 9.05 and the above TWRP is OOS10; it starts up with the ASOP10 log ?)
Is there a way to restore 9.05 with the nandroid without wiping the user data ?
(like flashing the nandroid twice on slot A and B and flashing the correct TWRP and/or Magisk afterwards) ?
ebar3 said:
Tried to clean flash unlocked and rooted OP6 from OOS 9.05 to 10.3 and got stuck in "bootloader unlocked" ?
Click to expand...
Click to collapse
Problem solved!
I followed this post https://forum.xda-developers.com/showpost.php?p=78915106&postcount=2
(reflash same ROM and Magisk versions as those originally installed, then restore nandroid backup).
3 things to note which were not obvious to me:
- Unzipp ALL files into one single folder (same ROMs have zips within zips)
- use the "flash-all-partitions-fastboot.bat" file,
- answer NO to the first question "Wipe all data (recommended)". If not, the internal data (data/media) will be wiped as well, including your nandroid backup and other info (music, photo..). If you have to wipe, make sure the backup is on the PC

Categories

Resources