[Q] adb restore doesn't restore everything - Samsung Galaxy Nexus

Hey,
I've created a backup with this command:
Code:
./adb backup -f fullbackup_2013-03-28.ab -apk -shared -all -system
The resulting file was 11 GB which was expected. After this I unlocked my bootloader. Restoring the backup hung two times. FIrst at com.android.chrome then at com.google.android.googlequicksearchbox. These two were also mentioned in Android issue report #34311 (sorry can't post link, I'm under 10 posts). Both times I rebooted my phone and restarted the restore. The third restore went through.
Now my problem is I'm missing a lot of data. My storage is only at 6 GB, that's at least 5 GB missing. My music folder for example was only partially restored. How can this be? Is there anything I can do?
I'm running 4.2.2 stock. My adb version is 1.0.31.
Update: I've now extracted the backup and I can say for sure that there are files in there that don't get restored.

Has nobody else experienced such a behavior?

AW: [Q] adb restore doesn't restore everything
yes i have done that with my nexus 7.. it seemed to restored my file structure but when i tried to open files nothing would happen... u really cant rely on that thing
Sent from my Galaxy Nexus using xda app-developers app

It's safer to use adb pull and adb push to backup and restore the sdcard, and only use adb backup for user apps and data. Also, it's not generally a good idea to backup and restore system apps and data. So -noshared and -nosystem for adb backup, and pull and push for the sdcard might work better. As for the data you already backed up, maybe Titanium Backup would help. I understand it can access adb .ab files, though I haven't used it for that myself.

Related

[Solved] Oxygen 2.0 - App+data restore fails

Since my post in the development thread has been kindly deleted after ****ing around the whole afternoon with ROM's and restoring, I'm going to post the question here.
Anyone else got the app+data restore working on Oxygen 2.0 final ?
I always wipe before flashing, I tried it with Titanium backup (2 versions) and Mybackup Pro. Backup & restore works fine on CM RC7, but when I try to restore on Oxygen, it's just missing data for some apps.
But some are successfully restored with data, that what's weird.
I first thought, it's an issue with a Dalvik2sd script, but then tried it in clean Oxygen 2.0 ROM. When i check /data/data with the Root explorer, I can see the app there, but it just isn't loaded properly (for instance Financisto, Runkeeper, AlarmClockPlus, Abduction).
So basically, what's different in new 2.3.3 OTA, or am I the only one with the issue ?
Haven't tried all my apps, but its worked fine for those which I have.
Thanks for the dalvik to SD zip btw
Sent from my HTC Desire using Tapatalk
Yeah np :]
Could you please check other apps if they're ok ? I got about 130 apps, so it's kinda annoying to don't get the data restored.
Having looked through the rest of my apps, there aren't any which had saved data. I can confirm data has been successfully restored for angry birds, flow, BBC news, your orange, tapatalk, bedside, crazy snowboard and im+
Sent from my HTC Desire using Tapatalk
I have been using the Oxygen 2.0 for a couple of hours now and I have to say it is nice, compact and fast.
However, I have noticed that "pm, am" indication are missing from the time notification bar. Also the "AUTOMATIC" on Date and Time settings are not getting any update from the network. Am I right? Or it is just me who has it?
Also tested a previous busybox version, still same issue. But backuping and restoring on Oxygen 2.0 works correctly. Also most apps have the data restored correctly only some have issues. Have no idea, I'll just have to live with some data missing then, the 2.0 ROM just rocks that much :]
I think the best way to reinstall all apps after flash is to let Google install them automatically through market.
i have upgraded my desire from DevNull yesterday after backing up all apps with data via Titanium backup and i didnt experienced any issues with any of my apps (around 80).
This supposed to be the fix, a sqlite lib -> http://forum.xda-developers.com/showpost.php?p=11729730&postcount=341
I think this is the solution to your problem :
http://forum.xda-developers.com/showpost.php?p=11729730&postcount=341
-orgler
Since "someone" deleted a correct fix from the Oxygen thread, I'm gonna repost the file here. Seriously uncool.
Replace the libsqlite.so in /system/lib. You're gonna need to be S-OFF or do it in recovery. Sqlite .db files for some apps that were missing data are readable after, so I can confirm it works.
I noticed the missing data problem almost immediately after installing the rom. Thanks for posting a fix. The "mood" in the new oxygen thread gets a bit tense compared to other desire threads.
If I remember ill hit the thanks button when I'm in on a PC.
sK
Sent from my HTC Desire using XDA Premium App
Np, please thank orgler, he found the fix and posted it. I just saved the answer and posted it here as a solution.
I saw your reply to me just after sending you a PM. Flashing the libsqlite.zip file on top of latest oxygen rom didn't work. No big deal as the app I really need data for backs up to sdcard. I'm sure this problem will get fixed soon enough.
sK
Sent from my HTC Desire using XDA Premium App
I just read your instructions again. I'm not s-off. Do you know how I can replace the lib with ADB?
sK
Sent from my HTC Desire using XDA Premium App
Em, its not a flashable .zip (I didn't state that, but sometimes it's good to open the .zip first )
Boot to recovery, mount the system partition, connect USB cable and go to adb shell (we're gonna backup the original lib first):
#cd system
#cd lib
#mv libsqlite.so libsqlite.so.orig
#exit
Make sure you're in the same directory as libsqlite.so, or copy the .so to the dir where adb is (if your var path isn't set). Then enter in command prompt:
adb push libsqlite.so /system/lib
adb shell
#cd system
#cd lib
#chmod libsqlite.so 640
Then reboot
thed0g said:
Since "someone" deleted a correct fix from the Oxygen thread, I'm gonna repost the file here. Seriously uncool.
Replace the libsqlite.so in /system/lib. You're gonna need to be S-OFF or do it in recovery. Sqlite .db files for some apps that were missing data are readable after, so I can confirm it works.
Click to expand...
Click to collapse
Thanks for your assistance with this it's appreciated. However, pushing it via adb didn't work for me either.
I have a full mybackup of data and .apk files. There is no error when I try to restore the missing applications, mybackup confirms it's been done and requests I reboot, but the application is never there.....
Any more ideas?
That seems to be unrelated, issue was only about data in the apps, app restore worked. I suggest trying to backup with Titanium backup and try to restore with it.
So: Im sure you kept the nandroid backup with all the apps and data. Restore it, pull free version of Titanium off the Market and backup some apps. Flash Oxygen (you can replace the .so file with opening oxygen.zip in Winrar and replacing it in /system/lib) then try restoring the apps. If it works, you'll know the issue is with MyBackupPro.
thed0g said:
That seems to be unrelated, issue was only about data in the apps, app restore worked. I suggest trying to backup with Titanium backup and try to restore with it.
So: Im sure you kept the nandroid backup with all the apps and data. Restore it, pull free version of Titanium off the Market and backup some apps. Flash Oxygen (you can replace the .so file with opening oxygen.zip in Winrar and replacing it in /system/lib) then try restoring the apps. If it works, you'll know the issue is with MyBackupPro.
Click to expand...
Click to collapse
I like your thinking... I did indeed keep the nandroid backup, so I'll give it a whirl.
Thank you.
Great. Solved the problems I had with Titanium.

TitaniumBackup restore failed after flashing Oxygen

I've got a pretty strange problem over here.
I've just flashed Oxygen 2.1.2 and was trying to restore the data of my downloaded apps (of course not the system apps...) using TitaniumBackup. I was using InsertCoin2.1+3.0 v25 before. For some reason, the restore process did not finish correctly for some apps (Astrid Tasks, PocketCloud, 3g watchdog pro, and several other)
TitaniumBackup pretents the restore was successful but when I launch the app in question there's no data. Just like if i've installed it from the market.
I've done some research using adb.
I've installing the app (in this case 3g watchdog pro) from market and used it for a while.
Using adb shell i've navigated to /data/data/<app>/ and the data was there. (ls showed some stuff in there)
Then i've restored the backup of 3g watchdog pro. After that, ls pretends that the directory containing the data is empty and launching the app shows the welcome screen (=no data)
Something that is even more strange:
pwd returns the direcory i'm in.
So "cd <output of pwd>" should do nothing. After that, ls show the data restored by TitaniumBackup.
Any ideas what just went wrong?
That's weird. I assume you have rebooted at least once?
You could try restoring the apps and data via google cloud backup? When you flash a rom or restore a backup, during the registration process there is an option to backup and restore from google servers. Did you check that when registering?
I never used this feature and dont want to use it either.
Update: manually extracting the backup tar and copying it to the proper location does not help either. Same thing as described above.
Push your previous libsqlite.so file from your old ROM into /system/lib. Then reboot and repeat your restore w/data.
That did the job, thanks. Do I have to push that lib everytime I update Oxygen from now on?
rearwheeldriver said:
That did the job, thanks. Do I have to push that lib everytime I update Oxygen from now on?
Click to expand...
Click to collapse
Unfortunately yes. The library on your old rom is newer than the one used in your new and any stock rom.
Aright, thanks again =)

Full Backup / Restore for Pixel?

All,
When I got my Verizon Pixel XL I did the sync with my Samsung S6 it was replacing and was surprised on how quickly it pulled almost everything over. The only parts that were missing were phone history and text messages which I then pulled over using the SMS Backup & Restore App.
I got everything setup and of course now realize I can root my Pixel using pixel8 but I have to unlock the bootloader which will wipe the device.
I have never had the best luck actually doing a full backup/restore without root on other devices like the S6 I had and the S5 before that. I usually loose something in the process.
I tried to do an ADB full backup with all data, system files and shared data: adb backup -f backups\backup-all-system-apk-shared-201611081225.ab -all -system -apk -shared it only came out to be 2.7GB. When I did the backup without shared data or system: adb backup -f backups\backup-all-nosystem-apk-noshared-201611081223.ab
-all -nosystem -apk -noshared it only came out to be about 720MB.
According to my storage, I have 35.15 GB used of 119GB. So even the full 2.7GB seems Quite low.
Does anyone have a method of Getting ALL Data from a non-rooted device, in my case all 35GB so I can restore the entire device and not loose anything once I unlock the bootloader?
I got it working after passing the -obb option too. Also, that size looks right; mine was 3.7GB. Most of your used storage is your read-only redundant OSes, recoveries, boot paraphernalia, etc., so most of that doesn't need to be backed up.
hth

If I TWRP backup everything except System will a Restore work later on?

I dont know what I did but I know it was my fault.
Whenever I try to create a full backup of all partitions I get "createTarFork() process ended with ERROR=255"
But when I exclude the System partition it works fine.
So if I restore everything else later on will everything work fine? I'm not exactly sure whats getting left out in the partition.
Btw, my bootloader is unlocked, I'm currently on FreedomOS 2.1, I have Magisk, Xposed, all the good stuff...
ALSO! I did an ADB backup on my computer with "adb backup -apk -shared -all -system -f"
I'd be fine with the ADB backup but "backup.ab is only 1.5 GB and my nandroid backups are usually around 11GB...
lit_lee said:
I dont know what I did but I know it was my fault.
Whenever I try to create a full backup of all partitions I get "createTarFork() process ended with ERROR=255"
But when I exclude the System partition it works fine.
So if I restore everything else later on will everything work fine? I'm not exactly sure whats getting left out in the partition.
Btw, my bootloader is unlocked, I'm currently on FreedomOS 2.1, I have Magisk, Xposed, all the good stuff...
ALSO! I did an ADB backup on my computer with "adb backup -apk -shared -all -system -f"
I'd be fine with the ADB backup but "backup.ab is only 1.5 GB and my nandroid backups are usually around 11GB...
Click to expand...
Click to collapse
Team Win recommends using the system image backup instead of just system for dm-verity devices, but I still get the same problem as you when trying to perform a backup. What you could try is clean flashing the ROM and then just restore data from ur backup. That should work.
Airwolf79 said:
Team Win recommends using the system image backup instead of just system for dm-verity devices, but I still get the same problem as you when trying to perform a backup. What you could try is clean flashing the ROM and then just restore data from ur backup. That should work.
Click to expand...
Click to collapse
Yeah I read in other places a fresh flash would work but I wanted to weight my options.
How does one go about doing the image backup? That sounds a lot better.
lit_lee said:
Yeah I read in other places a fresh flash would work but I wanted to weight my options.
How does one go about doing the image backup? That sounds a lot better.
Click to expand...
Click to collapse
When you select backup in TWRP, it's one of the available boxes to check. Uncheck system, check system image. This hasn't solved my problem of backups not completing though. I always remove my fingerprints and pin before a backup, and I've been able to complete backups before, but usually the problem lies in encrypting the backup itself. However, I've still had backups hang at 95% even without encryption. Maybe someone else can shed some light on to why this is happening.
the createTarFork() process ended with ERROR=255 is not from system its from data and issues with parallel apps on ur OP5T
download Android Terminal and type
Code:
su
pm remove-user 999
then u can backup with twrp, never tried to do a restore yet though

Best way to do a full backup (and restore it)?

Hi, on my previous phones I used TWRP to create full backups of my phone. My A2 lite is rooted with Magisk and I decided to keep the stock recovery to simplify OTA updates (also there is no official TWRP build available supporting encryption). The phone is already setup completely and I don't want to start all over again so formatting is not an option. Still I want to be able to create a full backup in case something goes wrong or the phone gets damaged. Is there a way to do this or do I have to continue with SD and TB backups? Thanks in advance.
nice q >>>waiting for an answer ???
I used Titanium Backup before. But now I'm using Migrate for backups.
My backup is TB and rsync of /sdcard to a server at home (automated overnight).
I never bothered getting anything else setup. I try not to brick my devices
I did have to restore a few times when I first got the phone, until I figures out how to recover from Magisk/xposed errors without factory reset.
i prefer Titanium Backup method with batch file to backup folders i need from phone memory to PC. of course i backup Titanium Backup folder too,
minimal adb&fastboot package is installed (portable) so i can perform below backup:
backup.bat
these example lines inside
adb pull /storage/emulated/0/DCIM
adb pull /storage/emulated/0/Download
adb pull /storage/emulated/0/Pictures
...

Categories

Resources