[Q] Nandroid (Agat) backup/restore problems - Samsung Epic 4G Touch

So... I flashed AGAT_Recovery tREC_v0.2.2 and was intending to restore a "nandroid" backup from before I wiped my phone. First of course I made a backup (just Stock Rooted ROM I used to flash the recovery partition). I then tried to restore the previous image of my custom ROM and the restore failed. Investigated and found that the filenames in the nandroid backup folder were named differently from previous nandroid backups I had taken:
system.ext4.tar (0 bytes)
system.ext4.tar.a (large)
data.ext4.tar (0 bytes)
data.ext4.tar.a (large)
I'm not sure how the backup format changed as I don't recall updating the recovery partition, I'm wondering if some ROM I installed did this for me (if so thanks a lot). Looks like this:
http://forum.xda-developers.com/showthread.php?t=2194171
So trying to be clever, I deleted the 0 byte files and renamed all of the stupid .a files to the original (I had no .b, .c files etc.) Then I did a restore.
The restore completed successfully but com.android.Phone was crashing on startup repeatedly, the launcher wasn't working properly and basically the image wasn't usable.
I then decided that it wasn't worth all the trouble and I would just restore to the backup I had taken of the Stock Rooted ROM immediately prior to this whole mess starting (using AGAT_Recovery tREC_v0.2.2). The restore completed successfully but the O/S didn't boot at all (it just showed a black screen after POST of the Samsung logo).
For now I've reflashed stock using ODIN.
So basically my question is: why is this so complicated? Am I missing something here? Is AGAT_Recovery 0.2.2 not a good choice for a recovery partition?

Is the recovery you are trying to restore the sane recovery you are currently running.
I've gotten stuck by being in a different version of the same recovery and it just didn't work. I had to be in the same recovery in order to do a restore.
Just a thought

Bt is right. You should always use the same cwm to restore that you used on the backup. And the latest Agat recovery is essentially bugfree, which is 0.3.5. So I would use that. And it's not difficult, at all . Just takes a few "oh craps" to get it down pat!
Sent from my SPH-D710 using xda premium

thanks
jdsingle76 said:
Bt is right. You should always use the same cwm to restore that you used on the backup. And the latest Agat recovery is essentially bugfree, which is 0.3.5. So I would use that. And it's not difficult, at all . Just takes a few "oh craps" to get it down pat!
Click to expand...
Click to collapse
I suspect part of the reason I couldn't restore the one backup image was because I wasn't using the same version, or perhaps even product. Doesn't explain why the older version of Agat couldn't restore its own backup though. I'll try the newer version out. Thanks!
It's too bad the utilities don't write out some metadata about the format used, what product/version did the backup, etc.

philipdl71 said:
I suspect part of the reason I couldn't restore the one backup image was because I wasn't using the same version, or perhaps even product. Doesn't explain why the older version of Agat couldn't restore its own backup though. I'll try the newer version out. Thanks!
It's too bad the utilities don't write out some metadata about the format used, what product/version did the backup, etc.
Click to expand...
Click to collapse
That was an earlier kernel that probably still had bugs. Could have been a bad backup. It happens. The latest kernel will do solid backups/restores and serve as a very dependable dd. Good luck.
Sent from my SPH-D710 using xda premium

Related

HELP NEEDED with CWM "error while restoring /data!"

Hey guys,
I have kind of a serious issue right now. I used Touch Recovery 5.8.0.2 and made a full backup today of my whole ROM (2.5GB) before trying out some mods which eventually didn't work. So I decided to wipe and restore the backup I made. No matter what I do I cannot get it to restore my data partition properly. I keep getting "Error while restoring /data!" message, however it does the boot image and system fine but doesn't continue to cache and sd-ext because of the failed data. Whenever I boot it up, some of my apps are missing from the home screen and practically all of them are not working when I launch them (force close). I also get boot up error of Google+ force close, among a bunch of other issues. This is happening even when I try to restore an older backup as well. My device is not working state right now and although I can just restore the stock images to get it working again, it is urgent that I restore my data ASAP! I tried wiping several times and even using the non-touch 5.5.0.4 recovery to restore and same thing keeps happening.
Any help would be highly appreciated!
Please don't tell me my backup is corrupt
Update 1: Eventually I gave up and started from scratch but I have confirmed already this happened on a fresh backup as well, at this time we are trying to figure out what is causing this so I can go back to safely backing up and restoring backups.
Update 2: We have test builds of TWRP Recovery that may have resolved this issue! We need testers!
Please see this post: Link Here
Update 3: We have test builds of ClockworkMod Recovery 6 that may have resolved this issue as well! We need testers!
Please see this post: Link Here
***Always see last few posts on the thread for updates on what we discovered just in case I don't update the OP***
Unfortunately I also have the same error today!
Please help us out.
JayantSparda said:
Unfortunately I also have the same error today!
Please help us out.
Click to expand...
Click to collapse
is your phone encrypted?
are you running stock recovery?
are you running a stock Rom?
have you done a factory reset yet?
Hi Spectre85,
My phone did fine yesterday, I was running AOPK Milestone 3 with FAUX123 kernel.
But when I woke up, my phone looked like it's battery was emtpy.
- When I plugged the phone with the charger, I started the phone again.
- Unfortunately my phone keep looping at the Google screen over and over.
So I pulled the battery and put the battery back again in the phone.
- I went to the bootloader and went to CWM recovery.
Deleted Data, Cache and Dalvike cache.
- Tried to retrieve my backup rom, but keep getting this "Error while restoring /data!" message.
I've tried to install other roms as well, but I still keep getting the bootloop at the Google screen.
Have you guys have any advice for me?
spectre85 said:
is your phone encrypted?
are you running stock recovery?
are you running a stock Rom?
have you done a factory reset yet?
Click to expand...
Click to collapse
For me, no, no (CWM Touch 5.8.0.2), yes (stock rooted 4.0.4), no but my goal is to restore my data not erase it.
I had this happen to me before, what I did was flash a factory image through fast boot and it was fine after.
Sent from my Galaxy Nexus using xda premium
Thanks guys..I flashed the factory image through Fastboot mode and the phone works perfectly again! Too bad I lost all my data, but I'm happier that I have my phone fully functional again
You can't access your backup right? There's no way you can copy the file to your desktop?
mohitrocks said:
You can't access your backup right? There's no way you can copy the file to your desktop?
Click to expand...
Click to collapse
I did copy it. I have full access to the file. Also, just fyi my goal here is not just to get to working state (I'm aware of the stock images) but to actually recover my data. My phone is currently on stock images completely blank and working now.
Fast boot flash the nand images just like u did the stock ones.
Sent from my Galaxy Nexus
bwcorvus said:
Fast boot flash the nand images just like u did the stock ones.
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
Nanadroid files can be flashed in fastboot? Are you sure? First time I'm hearing this. Doesn't fastboot need .img files? These are .tar files.
Open it up and see if its image...sorry all my recoveries use images.
Sent from my Galaxy Nexus
bwcorvus said:
Open it up and see if its image...sorry all my recoveries use images.
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
I guess it depends on the recovery version you use. I remember older versions actually had .img files. However 5.5.0.4 and Touch 5.8.0.2 both have ext4.tar files.
Which version of recovery do you use?
If you have root, you can restore your data partition using Titanium Backup. Use "Export from Nandroid Backup" within TB, select the nandroid backup and then select all apps that you want to restore
Immix said:
If you have root, you can restore your data partition using Titanium Backup. Use "Export from Nandroid Backup" within TB, select the nandroid backup and then select all apps that you want to restore
Click to expand...
Click to collapse
Interesting...will this include settings as well like my home screen icon/widget layout, wallpaper, etc?
open1your1eyes0 said:
Interesting...will this include settings as well like my home screen icon/widget layout, wallpaper, etc?
Click to expand...
Click to collapse
Yes. Titanium Backup can restore all your system apps as well as downloaded apps from a nandroid backup. Not as clean as a nandroid restore from CWM but essentially the same thing. But try to see if Titanium Backup can extract your nandroid backup. It all depends on what exactly went wrong with your nandroid backup to begin with. I don't think it restores cache. So not sure about wallpaper.
Immix said:
Yes. Titanium Backup can restore all your system apps as well as downloaded apps from a nandroid backup. Not as clean as a nandroid restore from CWM but essentially the same thing. But try to see if Titanium Backup can extract your nandroid backup. It all depends on what exactly went wrong with your nandroid backup to begin with. I don't think it restores cache. So not sure about wallpaper.
Click to expand...
Click to collapse
You're right. This works great for restore data to select apps (got my notes and game saves back). I think the icon layout is held in the launcher settings, I'm about to try and restore the data to the launcher app and see what happens. I'm making a CWM backup of first of my current state (that's assuming this backup will actually work).
EDIT: Yes! That did it! Widgets position weren't saved but it's ok I only had a few so I manually put them back. Thank you! I never knew TB had the ability to work with nandroid backups.
I guess this now just leaves me figuring out what went wrong with the CWM backup. It happened twice (I have two backups from the same day that won't restore). Does anyone else use CWM Touch 5.8.0.2 and have successful backups? I would experiment to see if it works now but I don't want to end up with a corrupt backup and redo everything again.
Yes with me its the same thing my data its corrupt is even worse every time I do a nanobackup and restarted my phone the phone freezes on the boot logo and I have to go back to recovery trying to use my backups but I can't so I have to flash a new from again and start from the beginning again!!!! Anybody here has the same experience with that ???
So AGAIN, I'm having the same issue. This time on a recovery 5.5.0.4 that used to work for me when I originally got my phone. I think either my data partition might be too big or something but this really needs to fixed pronto. Anyone know how to contact Koush directly in regards to this matter?

[Q] Can't restore nandroid after flashing PARANOIDANDROID 2.99BETA3

I flashed PARANOIDANDROID 2.99 BETA3 from stock DLK4, 4.1.1. It worked but I was ready to revert back to the stock using the nandroid I made before flashing and realized that I did a factory reset when flashing pdroid and lost my nandroid backups. Fortunately I have older Nandroids from 12.12 on my pc. I placed it into the clockworkmod directory, sdcard\clockworkmod\backups, as I normally would but when I reboot into recovery I don't see the nandroid that I placed there. What do I do from here? I tried to do a factory reset from kies of DLK4 but afterwards I get stuck on the "Samsung" loading screen.
Any help would be appreciated. I spent the last 4 hours going through treads as I normally do when having problems but I created my first thread because I screwed up beyond what I can repair myself
edit: while in recovery, I made a backup of pdroid2.99 to see where it saved. When I opened the directly using my pc, I couldn't find that backup I just made. I put the nandroid onto my external sd card and that I could see it in recovery but I get the following error "Error while restoring /system!"
michaeln91 said:
I flashed PARANOIDANDROID 2.99 BETA3 from stock DLK4, 4.1.1. It worked but I was ready to revert back to the stock using the nandroid I made before flashing and realized that I did a factory reset when flashing pdroid and lost my nandroid backups. Fortunately I have older Nandroids from 12.12 on my pc. I placed it into the clockworkmod directory, sdcard\clockworkmod\backups, as I normally would but when I reboot into recovery I don't see the nandroid that I placed there. What do I do from here? I tried to do a factory reset from kies of DLK4 but afterwards I get stuck on the "Samsung" loading screen.
Any help would be appreciated. I spent the last 4 hours going through treads as I normally do when having problems but I created my first thread because I screwed up beyond what I can repair myself
edit: while in recovery, I made a backup of pdroid2.99 to see where it saved. When I opened the directly using my pc, I couldn't find that backup I just made. I put the nandroid onto my external sd card and that I could see it in recovery but I get the following error "Error while restoring /system!"
Click to expand...
Click to collapse
You flashed a 4.2 ROM with an out of date recovery by the sound of it. 4.2 modifies the directory structure of you're phone which is unsupported in old recoveries. I run TWRP myself and I just moved my backups to my new root folder which can be found in: /storage/emulated/0
CWM stores recoveries in blobs and I'm unsure if this method will work for you. Your only option if that doesn't work is to ODIN back to stock. Once you've performed an ODIN back, go into your recovery and factory reset, wipe cache and wipe dalvik.
Then update your recovery for future flashes. I recommend TWRP. Overall an easier recovery.
Sent from my SGH-I747 using xda app-developers app
I successfully flashed back to stock 4.1.1 using ODIN using the rom I got from samsung-updates. I've lost IMEI so I have to inject l that back later on. I'm using CWM 6.0.1.2 and when in recovery when I try to restore my backup and get to "error while restoring /system!"
I've been trying to find other threads, tried what they suggested but no luck
edit: I've found TWRP v2.3.3.1 and but I don't see /storage/emulated/0 instead I put my backup in /storagr/TWRP/BACKUPS/911de9 and tried to restore but it fails
What I did was make a nandroid on the ROM you have and just copy and paste the old one into the new directory and you can flash that old nandroid. Worked perfect for me
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
hednik said:
What I did was make a nandroid on the ROM you have and just copy and paste the old one into the new directory and you can flash that old nandroid. Worked perfect for me
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
Click to expand...
Click to collapse
This is what I typically do but now I get "error while restoring /system!" when restoring any of my old nandroid backups!
Why I like twrp. Maybe most of it is just a placebo but it seems more stable and easier to navigate
Sent from my SAMSUNG-SGH-I747 using xda app-developers app

TWRP Restore Backup Fail

I've been running Task's latest build and I needed a number that was only in my text messages from my old stock rooted rom. So I backed up my AOKP, restored my old stock rom, got the number then booted into recovery to restore my AOKP. But upon boot it booted like a fresh install? I know I know i should've backed up messages and what not with TiBu but didn't think it would be a problem considering I was doing a fresh nandoid. I'm on TWRP 2.4.3.0. If anyone can shed some lite on why this happened so it doesn't happen again in the future or a way to recover my old data it would be greatly appriciated!
There should be a data.ext4 and data.ext4.win inside the TWRP folder where your backup was stored. That's where your user data should have been stored.
shortydoggg said:
There should be a data.ext4 and data.ext4.win inside the TWRP folder where your backup was stored. That's where your user data should have been stored.
Click to expand...
Click to collapse
All the correct data files are there. But for some reason it keeps booting like a fresh install. I'm absolutely baffled. I've never seen or heard of this.
Sent from my SGH-I747 using xda app-developers app

[Q] Anyone else having Nandroid restore problems?

HTC One V [CDMA], Virgin Mobile US, original (pre-OTA) radio version, TWRP recovery
Has anyone else experienced flakiness with Nandroid backups on this phone? All of them that I've done with major OS changes—even after factory reset—have failed to produce a working restore even though they were taken from a working state.
I'm also unable to get back my previously-working CM 10.1 ROM even though I followed the exact same procedures (with the same files) that I used to get it working before.
This has been happening since my first failed Nandroid restore trying to go back from CM 10.1 to the HTC Sense Nandroid backup I made before attempting CM 10.1 in the first place. I thought this was due to the Sense Nandroid having been made under the OTA-upgraded radio version (I had to use the stock rom.zip from the RUU to get CM 10.1 working at all), but now I'm not so sure. I get the HTC logo and angry red legal text indefinitely now with those setups.
I can't even get back to the Nandroid I made of the stock HTC Sense ROM right after I restored from the RUU's rom.zip.
Anyone have any idea what I'm doing wrong? Or is this model really just that much of a pain?
Are you flashing the correct kernel in fastboot after completing the restore? The recovery is not able to flash a kernel, that still needs to be done through fastboot, even with a nandroid restore.
riggerman0421 said:
Are you flashing the correct kernel in fastboot after completing the restore? The recovery is not able to flash a kernel, that still needs to be done through fastboot, even with a nandroid restore.
Click to expand...
Click to collapse
That's the boot.img, right? I did try flashing that after the restore didn't work the first time. No joy.
EDIT: Actually, that explains why some of my restores have failed, but not all of them.
EDIT 2: Mystery solved. I think. The Nandroid backup I took yesterday evening must be broken somehow. I noticed a few minutes ago that TWRP wasn't actually telling me that it finished restoring the backup—it was just taking me back to the home screen. I switched to CWM Recovery to grab a backup I took yesterday Morning, and that one worked.
So now I'm just left extremely disconcerted that I can't be certain my backups are reliable.
mynewshiny said:
That's the boot.img, right? I did try flashing that after the restore didn't work the first time. No joy.
EDIT: Actually, that explains why some of my restores have failed, but not all of them.
EDIT 2: Mystery solved. I think. The Nandroid backup I took yesterday evening must be broken somehow. I noticed a few minutes ago that TWRP wasn't actually telling me that it finished restoring the backup—it was just taking me back to the home screen. I switched to CWM Recovery to grab a backup I took yesterday Morning, and that one worked.
So now I'm just left extremely disconcerted that I can't be certain my backups are reliable.
Click to expand...
Click to collapse
I originally thought this was just an isolated incident, but it seems to be recurring. Several of the Nandroid backups I've made more recently, both within TWRP Recovery and via the Online Nandroid Backup app, seem to produce this result. (Fortunately, I have a known good backup that I've been able to use reliably.)
Is there a way to validate a Nandroid backup other than trying to restore from it? I don't mean comparing a hash (which is what I find using Google), but rather making sure that the original, uncorrupted file is valid for use as a backup.
As a side note, every backup I've done with CWM Recovery has been reliable, so my fallback plan is to switch to CWM. I just find TWRP easier to navigate.
mynewshiny said:
I originally thought this was just an isolated incident, but it seems to be recurring. Several of the Nandroid backups I've made more recently, both within TWRP Recovery and via the Online Nandroid Backup app, seem to produce this result. (Fortunately, I have a known good backup that I've been able to use reliably.)
Is there a way to validate a Nandroid backup other than trying to restore from it? I don't mean comparing a hash (which is what I find using Google), but rather making sure that the original, uncorrupted file is valid for use as a backup.
As a side note, every backup I've done with CWM Recovery has been reliable, so my fallback plan is to switch to CWM. I just find TWRP easier to navigate.
Click to expand...
Click to collapse
I've played with recovery files before (se my signature) when cwm wasn't working well.
Basicly if you want to know that the backup is correct, you can only compare the hash codes (nandroid.md5) which is practically useless, because hases are made only for the .img files, so the OS itself is not protected like this, which is somehow ok, because the files are compressed to a .tar file, which also means it has it's own validation algorithms itself. So you can validate it if you can decompress the file (don't ask that how it could be done under windows) without errors, it should be allright.
I personnaly can say only this: use CWM 6. i-don't-know-which version (which is online now). There is a possibility for cache not mounting, and of course a backup to not be full, but as you can see from my signature, it can be "bypassed" so the OS will be backed up, and because we don't have S-OFF, it doesn't really matters. All of my backups from CWM is working (have at least 10 gigs at the time, from stock to EV).
I always use android file verifier by scary Allen (free market download). It has saved me many times!
Sent from my HTC One V using xda app-developers app
so as a conclusion, nandroid backup won't restore boot image? and the option in cwm advance restore>restore boot is useless? Me also always got stuck using nandroid restore
Ken-Shi_Kun said:
I've played with recovery files before (se my signature) when cwm wasn't working well.
Basicly if you want to know that the backup is correct, you can only compare the hash codes (nandroid.md5) which is practically useless, because hases are made only for the .img files, so the OS itself is not protected like this, which is somehow ok, because the files are compressed to a .tar file, which also means it has it's own validation algorithms itself. So you can validate it if you can decompress the file (don't ask that how it could be done under windows) without errors, it should be allright.
I personnaly can say only this: use CWM 6. i-don't-know-which version (which is online now). There is a possibility for cache not mounting, and of course a backup to not be full, but as you can see from my signature, it can be "bypassed" so the OS will be backed up, and because we don't have S-OFF, it doesn't really matters. All of my backups from CWM is working (have at least 10 gigs at the time, from stock to EV).
Click to expand...
Click to collapse
sellersj27 said:
I always use android file verifier by scary Allen (free market download). It has saved me many times!
Sent from my HTC One V using xda app-developers app
Click to expand...
Click to collapse
Confirmed that comparing file hashes isn't helpful for this purpose—I just downloaded scaryalienware's AFV as suggested and ran it against several of my Nandroid backups. It said all of them succeeded, including at least one of which I know will not restore successfully. However, of interest is the fact that it took about half as much time to scan the known "bad" one, and further analysis shows that it's about half the size of the others. I'll have to make some more backups via the various mechanisms to confirm that the size is an indicator; it may be simply that I had fewer apps installed when making those backups.
Too bad there isn't some kind of Nandroid Restore Simulator. But even if there was, this phone probably wouldn't have enough memory to use it. Checking Nandroid backups in a VM would be awesome though!

[Q] How to flash a boot.img without fastboot?

Samsung apparently does not allow you to boot into the bootloader on their phones. I am trying to return to a different kernel I was using previously, which was contained in a nandroid backup. However, to my understanding, restoring a nandroid backup does not restore the kernel, and you have to extract the boot.img and flash that by itself.
What is the best way to go about doing this without fastboot?
Also, I don't suppose "restore boot" in nandroid advanced restore does this now, does it? Can't find anything on it online.
From what I recall, restoring the nandroid backup would restore the kernel. What recovery was used to create the nandroid?
audit13 said:
From what I recall, restoring the nandroid backup would restore the kernel. What recovery was used to create the nandroid?
Click to expand...
Click to collapse
I used CWM. I read in several places (forums) that it didn't....Hm. I mean I have the boot.img from the backup, so I have the kernel right there. I suppose I could find some way to make it into a flashable zip, but I was just wanting to see if anyone knew a way around that.
But if you are confident that the backup would restore the kernel, do you know if I could restore just the kernel from advanced restore? It'd be fab if I could keep /data the same, but not a must I suppose.
I use TWRP on an HTC and just restored a nandroid backup. After restoring the backup, the previous kernel was restored too.
I don't have any devices at the moment that use CWM.
Not sure about just restoring the kernel. Any particular reason you just want to restore the kernel?
audit13 said:
I use TWRP on an HTC and just restored a nandroid backup. After restoring the backup, the previous kernel was restored too.
I don't have any devices at the moment that use CWM.
Not sure about just restoring the kernel. Any particular reason you just want to restore the kernel?
Click to expand...
Click to collapse
I started getting some problems after flashing a custom kernel and I want to revert to the previous one, the default CM one, to test if my problems are related to that kernel or not. I suppose I'll look into making the .img a flashable zip then, unless anyone else knows of a better way. I'm not familiar enough with Odin to know if you can flash a .img in it.
There's that "restore boot" option in the advanced restore menu on CWM. Do you have any idea what that restores? I want to naturally say that it probably restores the boot.img, but I have searched and searched and just cannot find anything online about what that actually restores.
Nandroid backups created with CWM need to be restored using CWM.
Sorry, not sure what the advanced options will do but you could try different ones.
Restoring boot in advanced nandroid restore restores the zimage and initrd.gz. The kernel. Thus, I suppose a full restore will restore the kernel. Perhaps there are exceptions for certain devices. Restoring boot got me where I needed.
Sent from my SAMSUNG-SGH-I747 using XDA Free mobile app

Categories

Resources