ADB Backup vs Recovery Backup; Which Backup Do You Prefer & Why? - Android Q&A, Help & Troubleshooting

What are the pros and cons of using ADB Backup vs Recovery Backup?
Is there any difference between the two?
ADB Backup seems to have a lot more flexibility in what you want to backup (apk, data, system, etc). Recovery Backup seems to be an all or nothing deal.
ADB Backup seems to be faster than Recovery Backup.
ADB Backup saves the file to your laptop, freeing up space on your phone. This can be good or bad depending on the situation.
ADB Backup requires an ADB connection, this can be a PITA depending on the situation.
ADB Backup doesn't generate md5 sum, AFAIK.
ADB Backups seem to be a lot smaller than Recovery Backups, mine was 265mb for ADB vs 1.12Gb for Recovery.
Which backup do you prefer and why?

I've never tried ADB backup but after reading your post I'll have to use it the next time I backup my data. I know there are a few GUI programs on Windows that I've tried that had those options.
One thing that is nice about backups from using a custom recovery is that it goes with you when you're away from a PC for any length of time. You can restore everything in one session.
Sent from my SPH-D710 using xda premium

Both!
Neo3D said:
ADB Backup seems to have a lot more flexibility in what you want to backup (apk, data, system, etc). Recovery Backup seems to be an all or nothing deal.
Click to expand...
Click to collapse
I take both. I'm not about to tamper with my cwm backups by removing the .imgs i don't want, so each backup works in its own context. I'm not sure many people even know they can do an adb backup..

If the size difference is so large, is it actually getting all the data? If it is, why aren't recoveries taking advantage of the same compression scheme?
I'll be honest; I was only vaguely aware that I could do backups via adb... I would imagine the biggest reason people don't do use it is the inconvenience of needing a computer to do one. Most people are pretty uncomfortable with ADB

Related

Android Backup/imaging Apps

Does anyone know of a backup or imaging program that will restore apps and screens without user input. I understand the donate version Titanium Backup will do this but it doesn't backup sms call logs etc.
Any assistace is appreciated.
You've probably heard of nandroid, which is a function of Clockwordmod. So Clockwork mod has a full imaging backup tool, nandroid. It makes a bit per bit copy of it. That's what I would suggest. You need root (but you have titanium backup, so I imagine you already have it).
Bernardos70 said:
You've probably heard of nandroid, which is a function of Clockwordmod. So Clockwork mod has a full imaging backup tool, nandroid. It makes a bit per bit copy of it. That's what I would suggest. You need root (but you have titanium backup, so I imagine you already have it).
Click to expand...
Click to collapse
+1 for nandroid, it does require you to manually back up. You can't set a schedule, but I like to think most people who have it are smart enough to backup before modding or changing roms. On a side note, I would copy said backup to a computer if you are going to mess with the file system like voodoo does.
Sent from my SGH-T959 using XDA App
mybackup pro will do this, it is a paid app, but it backs up mms and phone call log, will do apps, but not the data with them like titanium.

[Q] Problems restoring data (corrupt Nandroid backup?)

I wanna start by saying that I have been searching and I can't find a similar post...forgive me if I was simply unsuccessful :/
So here's what happened.
Me - "Hey! I've got a rooted phone, but no custom ROM? I think I'll download one!"
I performed a Nandroid backup.
Flashed Macnut 14.
"Awesome, it works. Now I'm gonna restore my data."
I tried doing an advanced Nandroid restore, but it hung at "dalvik-cache".
I then tried doing a full Nandroid retore, but it still hung at "dalvik-cahe".
I then flashed Stock JK6 and repeated steps 5 and 6 with the same results.
I then downloaded and compiled unyaffs in order to get files out of the Nandroid .img files.
I tried "adb install" for apps and "adb push" for both data and apps. I've been getting error messages for both approaches (not syntax errors, but things like "permission denied," "not enough space," etc.), both while the phone is booted and when it's in recovery.
I've also tried moving the files to my SD card and then using "adb shell" to move them to their appropriate folders, but that didn't work either.
Besides these errors, I also had a very hard time figuring out where to put certain things.
So that's what happened...you guys are my final hope. I'm trying to figure out a foolproof way to restore (in order of priority):
Application data (settings, high scores in games, etc.).
Applications themselves (.apk files, preferably not overwriting newer versions of things like GMail, Youtube, etc. included in Stock JK6).
Text messages.
Phone settings.
I've learned my lesson...next time, I should use Titanium Backup.
Thanks,
Gerard
Personally I would:
1. ODIN to JK6
2. Root and use the modified 3e recovery
3. Install ROM Manager from the market and flash CWM Recovery
4. Then attempt to Nandroid restore
If you're not comfortable with the above Step 2 you can:
1. ODIN to JFD and root
2. Install ROM Manager from the market and flash CWM Recovery
3. CWM Flash JK6
4. Attempt to Nandroid restore
You went from eclair to froyo and when you restored your backup, CWR does not restore the kernel.
Try flashing the stock 2.1 kernel and then restoring your backup.
And yes, titanium backup & SMS Backup+ are your friends.
hmm... re-read... it's odd that a restore started and didnt finish. Most people get hung at the vibrant screen when they do not restore the kernel.
Sounds like you nandroid is corrupt, and if that is the case I'm afraid that I do not know the answer you seek.
Yeah, I don't think that a Nandroid backup is gonna do the job...I just tried again after ODIN.
Any other ideas?
EDIT: I was finally able to push all my applications back...However, I'm having trouble pushing the contents of "data/data/" and "datadata/". I keep getting errors like:
failed to copy 'data/com.android.browser/app_appcache/ApplicationCache.db' to 'datadata/com.android.browser/app_appcache/ApplicationCache.db': No such file or directory
Click to expand...
Click to collapse
How can I evade this error? :/
You have to flash a kernel as well cause nandroid won't replace that
Sent from my GT-I9000 using XDA App
Are you trying to adb from linux or windows? If you are on linux try this:
1) sudo adb kill-server
2) sudo adb devices
3) now push your apps
Also I found out the hard way, do not restore apps or system data from nandroid backup, I always had a corrupted system with a lot of force closes. Always use Titanium Backup and SMS Backup.
Hope this helps
brnbock said:
Are you trying to adb from linux or windows? If you are on linux try this:
1) sudo adb kill-server
2) sudo adb devices
3) now push your apps
Also I found out the hard way, do not restore apps or system data from nandroid backup, I always had a corrupted system with a lot of force closes. Always use Titanium Backup and SMS Backup.
Hope this helps
Click to expand...
Click to collapse
I'm actually on a Mac. I tried your method but I still got the same results...is Mac close enough to Linux (since it's Unix), or do you think I should attempt it on Linux as well?
DEFINITIONOFREAL said:
You have to flash a kernel as well cause nandroid won't replace that
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
I don't mean to sound like a douche...but isn't that what s15274n was saying?
ya try it on linux, Mac is BSD based but I'm not sure how permissions are set. BSD is close to linux but there are some major diff and some commands are diff.
So far, for me Nandroid on the Vibrant has been completely useless. I don't even bother any more.
I use Titanium to back up my apps and my SMS messages, and it only takes a couple minutes to re-do the settings once I install a new ROM.
This is way different than my experience with the G1, where I could easily restore a Nandroid backup if I didn't like a new ROM install. On the Vibrant it's easier to just Odin back to a stock ROM and redo all my settings using TB.
brnbock said:
ya try it on linux, Mac is BSD based but I'm not sure how permissions are set. BSD is close to linux but there are some major diff and some commands are diff.
Click to expand...
Click to collapse
Yeah...tried this too after downloading and setting up everything on my Linux box (java, Android SDK, etc.). Same error as I got on my Mac
I think I'll take like one more suggestion from the community before I finally give up and start my phone from scratch...It's been like 3 days since I lost all my data, ugh.

[Q] Extracting CWM6 Backups

Hello, while I was using my phone it rebooted and aparrently someting from my /data got corupted disabling my Rom from booting ever again.
So I created a nandroid via CWM6, installed a new rom and I'm now scratching my head on how to extract certain apps from that backup. Using CWM5 I could do this via the use of Titanium Backup, but now it's more complex than that CWM6 nandroids are unreadable from anything that exists out there. The only app which could analyze the backup correctly was the latest beta of "app extractor" but even that could not extract the apks *with* their data.
Basically my apps' data is precious and I wish to restore it at all costs, I have a nandroid of them, but the format is so unspeakably complex that it is basically useless. So the other "solution" was restore the nandroid and pull the whole /data partition in my PC via ADB, but I'm not sure what I can do with it.
So as it stands I now have two copies of my apps, one in a nandroid format another as it was pulled from the phone but I'm not sure how I can go on and restore them in a new rom. As I have found out CWM6 was quite a downgrade for/to those who backup/recover frequently, it's sad that I have found about it in such a disastrous way

How to recover data from "adb backup --twrp" archive? Been through hell and back

How to recover data from "adb backup --twrp" archive? Been through hell and back
I have two backups I made using "adb backup --twrp" while my OnePlus one phone was in TWRP recovery 3.2.1-0 running LineageOS with a recent build (don't know exactly which one, but it was from Feb/March 2018). Each of the backups are about 6.0GB so they appear to be complete backups. I am trying to recover one app and its data (Signal/Textsecure) but the rest would be nice too. The backup files have .ab extensions. I am fairly android savvy and have been working on this for days, your help is VERY MUCH APPRECIATED! I have access to Windows and Linux.
I have tried the following:
-"adb restore filename.ab" while in TWRP recovery. It appears to restore (progress bar goes, it reports success, etc), but no apps are restored. I have tried this both with totally wiped partitions/system/data and with a fresh install of LineageOS. As far as I can tell, nothing happens. When doing a restore after a full wipe and trying to restart, TWRP warns that no OS is installed.
-Restoring using the restore menu in TWRP. Immediately upon clicking on the backup, the phone restarts and TWRP opens again. Not sure what's going on there.
-Opening the backups in Titanium Backup, Nandroid manager, and a few other apps. None of them worked. Titanium backup crashes instantly in recover from ADB, doesn't recognize the backups in nandroid recovery mode.
-Opening the .ab files in an archive manager, all of which report it isn't a valid tar archive. One time I was able to get a list of directories, and things looked pretty right, so I know at least some of the data should be there. Running variants of this command with different skip values, none of which produces a valid tar file dd if=file.ab bs=512 skip=1 of=test.tar
Questions:
- Is there a way to extract data from these backups in Linux or Windows outside of Android? From what I read, TWRP adds some stuff in the headers which makes them invalid tar files, and that doing "adb backup --twrp" is different from a regular TWRP backup.
- Why is TWRP crashing? Is there a log I can look at for this and how? Maybe i can find a way to diagnose it that way.
- Where does Signal store message data? I have a flat-file backup that may have this information depending on where it's stored.
- Can I somehow convert these backups to a different format that might be better-tolerated by TWRP or other apps?
- Any good utilities for reading a corrupted tar file? I think all this utility would need to do is skip through the junk at the start.

Using ADB to backup apps and data

I have used ADB to backup data and apps on all of my devices for a couple of years. It is very reliable and the backups for individual app can be restored across devices without issue. It is preferable to using Titanium Backup, especially since that program is no longer reliable since the inception of A12. It is especially handy when the device is not rooted. But until recently, it always worked whether the device is rooted or unrooted. Today, while preparing to install the latest A12 update on my T870, I attempted do a backup of my favorite game, it would go through the motions and create the backup file. However, I knew immediately that the file was not correct because it was only 1K in size. The same game on my phone creates a 500 Mb file. My tablet was rooted using the Magisk/boot.img method but that hasn't made a difference in the past on any device. I wasn't overly concerned because I tested restoring the phone version of the backup to my tablet and it worked just fine. I went ahead and did a clean install of the latest A12 update, debloated my tablet and restored my backups via. ADB. everything is copacetic. The only difference is I did not root my tablet this time. I suspect if I do I will have the same issue. Not a big deal since rooting holds much less importance for me than it once did.
Command used to backup - adb backup -apk com.crossword.bible.cookies.find.english -f com.crossword.bible.cookies.find.english.adb
Restore command - adb restore com.crossword.bible.cookies.find.english.adb
Same commands used in both the successful and unsuccessful backups.
Thoughts anybody?

Categories

Resources