TWRP 2.6.0 restore data - Sprint Samsung Galaxy S 4 Q&A, Help & Troubleshoot

Ladies and gentlemen,
Recently, whilst flashing a new ROM, I had an issue. I tried to restore a backup that I created with TWRP 2.6.0 with the same version. I got to the "Restore data" stage in the logs, and it failed.
I have two data.ext4 files in my TWRP backup folder: the first is data.ext4.win000 and data.ext4.win001. I'm thinking this is the issue.
I have already flashed a ROM and booted, so I am out of the woods. Just wanted to know if anyone has had any success with split data files in a TWRP recovery.
Thanks for your time.

richardpunch said:
Ladies and gentlemen,
Recently, whilst flashing a new ROM, I had an issue. I tried to restore a backup that I created with TWRP 2.6.0 with the same version. I got to the "Restore data" stage in the logs, and it failed.
I have two data.ext4 files in my TWRP backup folder: the first is data.ext4.win000 and data.ext4.win001. I'm thinking this is the issue.
I have already flashed a ROM and booted, so I am out of the woods. Just wanted to know if anyone has had any success with split data files in a TWRP recovery.
Thanks for your time.
Click to expand...
Click to collapse
Look for TWRP-Recovery-jfltespr-2.5.0.2 seems to be the most reliable for backup and restores right now.
The 'splitting of the EXT/data is NOT the problem. That's the way twrp is compressing the images.
Also there are some ROMs that have partition problems with certain kernels, so take note of that.
I make a crap load of nandroids and switch back and forth pretty often. 2.5.0.2 has been the most reliable for me.
Once more thing I do is verify the nadroid via the AFV app. I boot to recovery, create backup (always of every partition) then boot to ROM and run the AFV app on the backup and make sure it verifies. Then I'll boot back to recovery and wipe/format and flash away according to the dev's instructions.

Leader,
Thanks for such an informative write up. I will check into rolling back to a different twrp build. It's an unpleasant solution, but if it works I'll have to bite the bullet.
Thanks again!
-Mobile post

Related

[Q] Does Acer Recovery Actually Back UP and Restore The ROMs?

Noob here. It doesn't "seem" like Acer Recovery is actually making backups of my ROMs. I'm really missing something either in terminology or execution and I'd like to understand what it is.
I don't know how to explain it other than to relate exactly what happened
I purchased one A500, but had to return it. I kept the backups taken with Acer Recovery, all Build A500_4.010.13_COM_GEN2
Got a new tab with Build Acer_A500_4.010.07_COM_GEN2
I immediately did a full backup:
Root (Iconiaroot 1.3)
Acer Recovery Installer
select "ClockworkMod Recovery rev1.3.4 by thor2002ro"
click "Install Recovery Image"
click "Yes" when asked to backup the current image!!!
Reboot into CW recovery.
Create a full backup: "backup and restore" -> "Full Backup"
The backup proceeded normally.
Rather than re-installing everything, I restored one of the backups from the old tab with Build A500_4.010.13_COM_GEN2
Backup installed fine, but instead of Build A500_4.010.13_COM_GEN2, I had Acer_A500_4.010.07_COM_GEN2, the same as the new tab.
I thought that was odd and I still don't know why it happened, but as I had just made a fresh new backup, I let the new tab go through the OTA updates to Build A500_4.010.13_COM_GEN2
Got everything working OK and decided to restore my new stock backup and make fresh incrementals of all the OTA updates.
Restored the original backup and now my original backup shows Build A500_4.010.13_COM_GEN2 instead of the original Build Acer_A500_4.010.07_COM_GEN2.
From these two instances, it doesn't "seem" like Acer Recovery is actually backing up or restoring the original ROM.
What is it that I'm either missing or don't understand about this process?
Thanks
If I understand the process, Acer Recovery will make backups of your recovery image. CWM does a full backup of ROM/kernel.
So, I'm not sure if I understand where you are restoring from.
If you restore through the Acer Recovery Installer, you should be just getting the old recovery image.
If you restore through the CWM menus after botting into recovery, then you are doing a full restore.
First.. it's not Acer recovery installer that's giving you the issue. The backup and restore are functions of clockworkmod.
The problem was that your flexrom did not get restored due to a bug that I demonstrated on thor's clockworkmod thread.
When doing a restore that restores data.img, it will also attempt to restore .android_secure.img and will fail, skipping flexrom which is supposed to follow. I bet you don't ever see the "Restore Successful" message after a full restore.
You need to either delete .android_secure.img from your backup set or restore flexrom separately.
Sent from my A500 using Tapatalk
PS. Clockworkmod does not backup anything from /data/media
Sent from my A500 using Tapatalk
So how to do a full backup of the image and restore if not from cwm.
Euclid's Brother said:
You need to either delete .android_secure.img from your backup set or restore flexrom separately.
Click to expand...
Click to collapse
Thanks Euclid,
Sorry about the confusion in the thread title. I thought Acer Recovery Installer had several functions: backup and restore recovery images and load CWM recovery to do the actual backup and recovery. Since I thought it did both, I assumed it was O.K. to use Acer Recovery Installer generically.
I did another restore to check what was done:
Fixing a500 Boot/recovery Checksums...
Running itsmagic
Done
Checking MD5 sums...
Erasing boot before restore
Restoring Boot Image
Restoring System
Restoring Data
Done
Screen refreshed to "Reboot Now".
As you said no "Restore Complete" message.
I wonder how many people including myself, assumed that the restore had completed successfully when they got the "done" message?
Both fixes worked well. I hope this helps someone else.
Below is the text from within CWM Recovery when .android_secure.img was deleted from the backup folder and a restore was run:
Fixing a500 Boot/recovery Checksums...
Running itsmagic
Done!
Checking MD5 sums...
Erasing boot before restore
Restoring Boot Image
Restoring System
Restoring Data
.android_secure.img not found, Skipping restore of /sdcard/.android_secure.
Restoring cache
Restoring flextrom
Restore Complete!
Restored my original stock ROM. So nice of it to ask me to update to a newer version immediately after the restore!
I did have one problem. I tried deleting .android_secure.img while rooted, using ES File Explorer with the Root Explorer and Mount File System options selected. I could never see the file on my external SD in the clockworkmod/backup
folder, so I pulled the card and manuall deleted it from my PC. I'm curios as to why this happened, but it didn't affect the result.
It was just as easy using backup and restore/advanced restore/your restore folder/ - Restore flexrom from within CWM Recovery.
I've read hundreds of post, in I don't know how many threads, sticky's included and never saw the advice about deleting .android_secure.img, manually restoring flexrom or even checking to make sure that you got "Restore Complete" I wish these things were part of an updated guide.
Lesson learned,
Thanks again
Just wondering, is there anyone working on a new recovery which will complete backups and restores without additional deletions, etc.?
bug was in thors post
The bug was mentioned.but I don't think there was much discussion about it.I don't think Thor acknowledged or tried ti fix.
With that said I could be incorrect. I however even with the bug think its a awesome tool.don't. Consider this as complaint.
Its like on page 3 or 4of the Thor recovery thread if im not mistaken
The blonde chic erica Renee
Yeah we need something reliable when restoring from backup. I tried once, cwm sees it but can't do the restore so I gave up even though I had all my apps backed up so did all one by one.
Sent from my SPH-D700 using XDA App

Stuck at boot screen after restoring ány Nandroid backup.

Hey,
I've had this problem for ages now, and always gave up on my data, but now I really want to fix this for good.
Yesterday I was ready to update my CM12 nightly to the lastest version (didn't see it was actually CM13), and did a backup in cwm before the update. The backup succeeded, but it gave the message that .android_secure couldn't be found and it didn't back that up. It always gives me this message after a backup and after google searching, it seems to me that it doesn't matter.
After installing the update, I noticed it was CM13, and my gapps wasn't updated to the marshmellow stock, as expected, so errors occured all the time.
I didn't want to upgrade to CM13 just yet, so I decided to restore my backup.
As always, the restore process goes without errors, but upon reboot I'm stuck at the CM logo. I can wait untill the battery is dead or ignites from the heat, but nothing happens. This has also happened to me every time I make a backup. I've watched about every video on youtube on how to do a proper backup and how to restore one, so I'm confident that I did it right.
For some reason, any backup I make, no matter what android version (didn't work with stock kitkat, either, before I switched to CM12) it never works and I'm forced to do a clean install and start over again.
I've tried to do partial restores from the backup file, and if I only restore the data partition (and wipe dalvik) It does boot, but gives me non stop errors that apps are crashing.
I've tried to do a dirty flash to no avail, always endless error messages.
When I do a clean install and check the MK5 of the backup with nandroid manager it gives no errors.
Is there anything wrong with my phone or something? I'm not making backups to be unable to restore them.
Can anyone help me out with this?
(I have a i9505)
Try a different recovery. CWM is outdated. TWRP is nice. Worked for ne every time. There are TWRP flashable zips so you won't have to mess around with Odin.
GDReaper said:
Try a different recovery. CWM is outdated. TWRP is nice. Worked for ne every time. There are TWRP flashable zips so you won't have to mess around with Odin.
Click to expand...
Click to collapse
Won't changing recovery make my old backups useless? I'm all for changing to TWRP, but first I'd love to restore my CWM backup...
Yes it will. Unfortunately I don't know what to suggest. Haven't used CWM since I switched to the S4.

SM-G900F with TWRP 2.7.1.0 - Nandroid restore resulting in all apps force stopping

Hi experts,
I would very much appreciate some help regarding the following:
I have a Samsung Galaxy S5 SM-G900F with factory installed stock rom G900FXXU1BPA2 (Android 5.0). I used the SkipSoft Unified Android Toolkit 1.4.5 to root the phone and install TWRP recovery (2.7.1.0-klte as recommended by Unified Android Toolkit). I made a first Nandroid Backup and was able to successfully restore this backup (I restored boot, system and data to verify that Nandroid restore works). I then used Titanium Backup to restore my apps from another phone, and all was well.
A week or so later I wanted to modify something I wasn't sure I wanted to keep (using apktool). I therefore made a second Nandroid backup and then proceeded to make modifications to the phone. After I saw the result, I didn't like it, and therefore restored the second Nandroid backup. After rebooting, the phone gave a flurry of forced stops ("Unfortunately XXX has stopped"). It is not a bootloop but I can't do anything meaningful with the phone other than restart it.
To try and resolve this, I used TWRP to wipe cache and dalvik cache and rebooted. The phone went through the lengthy "Android is upgrading" process but the result was the same: all my apps force stop.
I then decided to try and restore the original first Nandroid backup (which I had been able to restore successfully earlier), and this resulted in the same issue. Since I have several backups of this first backup I was able to verify that the files were good. Also did MD5 checksum verification in TWRP and it all checked out.
Using Odin, I was able to restore a stock ROM from SamMobile (G900FXXU1BOL1_G900FOJK1BOL1_ILO) and after restart, the phone works as usual, but of course all my apps and data were gone.
I was then able to use TWRP to restore only boot and system from the second backup, so I would be back on the exact same ROM that my phone came with, and this worked just fine; the phone started as if factory restored.
I then used TWRP to restore only data, and this resulted again in the same problem: all apps force close. Note that this is a restore of data only to the same phone running the exact same ROM that the Nandroid backup was made on, and it still did not work.
I have been thinking about this issue and searching through the various forums but I did not find anyone having this same exact issue. Here are some questions I came up with:
1. Is TWRP 2.7.1.0 completely compatible with this phone and with Android 5.0? Would it help if I installed a newer version of TWRP? Would I be able to restore Nandroid backups made with TWRP 2.7.1.0 with TWRP 3.X?
2. Assuming my second Nandroid backup is not corrupt, is there a better (less intrusive) restore I can do of the apps? Can Titanium Backup read TWRP 2.7.1.0 backups and restore them, including SMS?
3. What could be the reason for TWRP 2.7.1.0 restore not to be working properly? I did activate the fingerprint reader after the first Nandroid Backup, but if that is the issue I would have expected that first backup (in which fingerprints were not yet enabled) to restore properly and it doesn't.
Would appreciate any help!
Thanks,
AH
That version of TWRP is pretty old, possible it doesn't fully support 5.0
Grab 3.0.0.0 from here (newer versions are not fully bug free yet)
https://dl.twrp.me/klte/
Flash .tar version with ODIN 3.10.7
TiBu can read Nandroid backups and restore apps yes
Not sure about SMS
The method you used to root and flash TWRP is not a usual method used here, most of us use ODIN to flash TWRP and then flash SuperSU from recovery
or use CF Auto Root to root, and then flash TWRP with ODIN
I'd flash stock again, factory reset, and then flash TWRP and SuperSU, then try restoring your apps with TiBu
*Detection* said:
That version of TWRP is pretty old, possible it doesn't fully support 5.0
Grab 3.0.0.0 from here (newer versions are not fully bug free yet)
dl.twrp.me/klte
Flash .tar version with ODIN 3.10.7
Click to expand...
Click to collapse
Thanks *Detection*! I installed TWRP 3.0.0.0 as per your instructions and restored just data. Same result as before.
Then I used TWRP 3.0.0.0 to restore the entire backup including system, boot, recovery, and data. Same result (of course I lost TWRP 3.0.0.0 and was back on TWRP 2.7.1.0).
This exercise was useful for one reason: I now know that TWRP 3.0.0.0 is able to read Nandroid backups from TWRP 2.7.1.0.
This is quite crazy but I seem to be unable to restore a full Nandroid backup and get a working system.
Am going to try Titanium Backup.
Thanks again!
AH

twrp restored Samsung stock ROM backup won't boot

Hi,
I've flashed TWRP for a sm-G900f via heimdall, booted into TWRP-Recovery, made an backup from the working Stock ROM to sd card, flashed lineage open gapps etc., all works well.
Because of somtimes not working Sensors I've tried to test if the sensor problem is an hardware or an software issue, so recovered the stock rom backup using the installed twrp 3.2.1-0. Therefor I've made these steps :
Boot into recovery
Wipe cache, system, davlink-cache, format data
restore the stock rom backup
reboot
Every reboot results in booting to recovery, Samsung system won't start.
Tried to disconnect battery for a few minutes etc.
Where is my mistake ? Could someone give me an advice ?
Every restore of the lineage backups using this way works well.
Regards
Fred
fred06007 said:
Hi,
I've flashed TWRP for a sm-G900f via heimdall, booted into TWRP-Recovery, made an backup from the working Stock ROM to sd card, flashed lineage open gapps etc., all works well.
Because of somtimes not working Sensors I've tried to test if the sensor problem is an hardware or an software issue, so recovered the stock rom backup using the installed twrp 3.2.1-0. Therefor I've made these steps :
Boot into recovery
Wipe cache, system, davlink-cache, format data
restore the stock rom backup
reboot
Every reboot results in booting to recovery, Samsung system won't start.
Tried to disconnect battery for a few minutes etc.
Where is my mistake ? Could someone give me an advice ?
Every restore of the lineage backups using this way works well.
Regards
Fred
Click to expand...
Click to collapse
Corrupted backup maybe?
A long time ago I made a backup of stock and was able to go back and forth with no issues. You can try and go back to stock, root again and try another back up.
Corrupted backup ? It's the only one I've made after flashing TWRP and before installing Lineage.
fred06007 said:
Corrupted backup ? It's the only one I've made after flashing TWRP and before installing Lineage.
Click to expand...
Click to collapse
It happens sometimes, I had an SD card with a bad sector so every time I would make a back up it would get corrupted if I deleted the back up. I ended up leaving the backup so it will no longer write on the bad sectors.
fred06007 said:
Where is my mistake ? Could someone give me an advice ?
Click to expand...
Click to collapse
I think, you have to flash or restore the right kernel.
Which partitions have you backed up?
Sorry for the late response, the backup includes in my mind system, data and boot partition because the backup consit's of the following files:
boot.emmc.win
boot.emmc.win.sha2
data.ext4.win
data.ext4.win.sha2
data.info
recovery.log
system.ext4.win000
system.ext4.win000.sha2
system.ext4.win001
system.ext4.win001.sha2
system.info

Proper TWRP backup and restore procedures?

For the life of me I cant restore a backup of my current rom. What am I missing?
Ive tried backup on both slots and attempted to restore Individually.
enigma2446 said:
For the life of me I cant restore a backup of my current rom. What am I missing?
Ive tried backup on both slots and attempted to restore Individually.
Click to expand...
Click to collapse
Backing up with encryption is messy...
If you disable all security with the OS booted... And are on F2FS... You probably stand the best chance...
Otherwise... Might I recommend Migrate or Titanium Backup and forget about the backup feature in TWRP altogether...
Or use adb backup with your PC... But I don't know if that is restorable either
I'm not sure what goes wrong for people with TWRP backup's? I often see people talking here and on telegram about this. I didn't get my ph-1 till late September of last year so I missed the unofficial TWRP builds and I'm sure there were lots of improvement's made along the way. This being said, backup's work flawlessly for me and I use them almost daily since December when I started flashing lots of different ROMs. The only time I've run into a problem restoring a backup is from custom to stock or vice versa.
When I run into a backup not restoring I flash that ROM plus TWRP zip and then try again I don't even boot into the system just reboot and try again and it works for me. I hope this helps you.
I am encrypted on all my setups these days and always flash the exact same way from TWRP : select install , choose rom zip, select add more zips, select TWRP zip, flash/ select home button, select reboot, select recovery. Again from TWRP: select install, choose gapps (if needed), choose add more zips, select Magisk, flash and reboot into the system.
I stated the obvious above because I assume there must be either a subtle nuance btwn the way that people flash or something btwn the phone and twrp changed at some point before December (when I began using regularly)
@rignfool isn't alone in his belief that TWRP backup's don't work well. He is also one of many people that know more about Android development and the ph-1 then myself. However I disagree with anyone who would say TWRP backup's don't work well because I depend on them and they do work, precisely as they are supposed to.

Categories

Resources