FORUMS
Remove All Ads from XDA

[GUIDE] How to extract, create or edit android adb backups

1,700 posts
Thanks Meter: 911
 
By scandiun, XDA Ad-Free Senior Member on 24th November 2012, 09:51 PM
Post Reply Email Thread
17th November 2013, 01:54 PM |#101  
scandiun's Avatar
OP Senior Member
Thanks Meter: 911
 
More
Quote:
Originally Posted by JugglerLKR

This is exactly how I did it! I can send you the file it is very small, so you can examine it too. If you don't mind.

Rooting android x86 in vmware is not that simple. I still can't figure out why the root script from xda doesn't work for me.

Send me the file then privately.
 
 
21st November 2013, 04:44 PM |#102  
scandiun's Avatar
OP Senior Member
Thanks Meter: 911
 
More
Quote:
Originally Posted by JugglerLKR

They made some custom and probably more convinient way to backup using adb backup with tar files. The problem is that it is really hard to convert any backup (titanium or ultimate) for it to accept. I don't think it is bug, it is just some strange usage of adb backup. This means even if Helium creates .ab backup really it is not in that format... Or it is just unencrypted or uncompressed. And I don't have openssl and cygwin to confirm it.

---------- Post added at 01:20 AM ---------- Previous post was at 01:17 AM ----------

Yes. It looks like .ab created by Helium is just tar with ANDROID BACKUP header. Not encrypted, not compressed. Is it possible to create pack/unpack for such format?

I inform you that Fifa 14 1.3.0 is not compatible with adb backup, so isn't either with Carbon (Helium). You will see that restoring the backup just resets the progress. This happens with more games.

Titanium Backup is compatible and restores your savegame (I've checked it personally), so your only option is to root both devices.

You should send an email requesting support to help@eamobile.com and ask them the exact reason why fifa 14 it's not compatible with adb backup.
21st November 2013, 08:00 PM |#103  
Junior Member
Thanks Meter: 2
 
More
Good guide, I found this the most complete & informatice guide online. I had taken an ADB backup (with shared) (encrypted) on my Nexus 4 before unlocking and rooting, but I faced lot of issues while trying to restore. After lot of different tries (including buying Titanium Backup), I decided to give this a shot.. I was on windows the whole time, but the ABE utility would not work properly until I started using Linux. After another battle with the phone, I got the backup restored fully by the following strategy:

My backup of apps and shared storage was ~5.5GB, most of which is the shared storage. The Perl utility was much easier to setup and use compared to the Java one. I used that to pack and unpack (the other "quick" method failed always when I tried to restore). For packing the tar, I used pax in the end after trying star again and again. The only problem I faced, with pax, was the path length limit so some thumbnails were not included in the tar.

Note: Since I did a full backup which included some google apps causing issues when restored. I remove all such files by monitoring the restore process using `adb logcat | grep "Backup"`.

Hope this helps someone out

Cheers,
Prakhar
The Following 2 Users Say Thank You to prakharbirla For This Useful Post: [ View ] Gift prakharbirla Ad-Free
6th December 2013, 05:05 PM |#104  
Junior Member
Thanks Meter: 1
 
More
Prompt
Quote:
Originally Posted by prakharbirla

Note: Since I did a full backup which included some google apps causing issues when restored.

Thanks, I'm about to attempt the same, good to have reminder to stay away from system apps.

For anyone that does a lot of checking of their adb backups using dragomerlin's excellent Android Backup Extractor and are on windows may find this explorer shell extension I put together useful. It lets you quickly go from .ab file to .tar without messing with feeding paths into command line. Basically it consists of a reg file and corresponding batch file so you can just double click on the .ab file (or right click > extract) and a tar file will be produced in the same directory.
abextract.reg:
Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.ab]
@="adb backup"
[HKEY_CLASSES_ROOT\.ab\shell]
[HKEY_CLASSES_ROOT\.ab\shell\extract]
[HKEY_CLASSES_ROOT\.ab\shell\extract\command]
@="C:\\android\\tools\\android-backup-extractor-20130526-bin\\abextract.bat \"%1\""
abextract.bat:
Code:
@echo off
echo extracting %1...
set abfile=%1
set tarfile=%abfile:.ab=.tar%
java -jar C:\android\tools\android-backup-extractor-20130526-bin\abe.jar unpack %abfile% %tarfile%
Of course you may have to modify paths to the abe.jar and abextract.bat
And of course this doesn't take encryption into account but I think would be easy to modify for it (maybe even with user input)

First post on XDA woohoo! I thought I'd lurk until I had a grain of sand to give to the ocean of knowledge from which I've taken

ps I'd attach the files but I'm probably not allowed yet
The Following User Says Thank You to wolfmaciek For This Useful Post: [ View ] Gift wolfmaciek Ad-Free
23rd December 2013, 12:54 AM |#105  
scandiun's Avatar
OP Senior Member
Thanks Meter: 911
 
More
Added warning about Helium or Carbon backup
10th May 2014, 09:47 AM |#106  
Junior Member
Flag San Francisco
Thanks Meter: 3
 
More
Can't seem to get .tar working...
For some reason, I can't get
Code:
tar -xvf nexus7.tar
to work. I always end up with the error "tar: Cannot connect to C: resolve failed." I'm using Cygwin on Win7, and had the perl package installed, and added Cygwin to my PATH, but I can't think of anything else to fix the problem.

I tried restarting my Nexus 7 (2013) and remaking the backup file, then converting it to tar, but I noticed that my archives are always damaged/corrupted (according to WinRAR). Any ideas?
10th May 2014, 10:05 AM |#107  
scandiun's Avatar
OP Senior Member
Thanks Meter: 911
 
More
Quote:
Originally Posted by klairvoiancy

For some reason, I can't get

Code:
tar -xvf nexus7.tar
to work. I always end up with the error "tar: Cannot connect to C: resolve failed." I'm using Cygwin on Win7, and had the perl package installed, and added Cygwin to my PATH, but I can't think of anything else to fix the problem.

I tried restarting my Nexus 7 (2013) and remaking the backup file, then converting it to tar, but I noticed that my archives are always damaged/corrupted (according to WinRAR). Any ideas?

It looks like latest 64 bits tar for cygwin is having issues. I recommend you to rename the cygwin folder and install it again but 32 bits.

64-bit TAR fails with "Cannot connect to e: resolve failed"
The Following User Says Thank You to scandiun For This Useful Post: [ View ] Gift scandiun Ad-Free
12th May 2014, 08:05 AM |#108  
Junior Member
Flag San Francisco
Thanks Meter: 3
 
More
Quote:
Originally Posted by scandiun

It looks like latest 64 bits tar for cygwin is having issues. I recommend you to rename the cygwin folder and install it again but 32 bits.

64-bit TAR fails with "Cannot connect to e: resolve failed"

Ah okay. Thanks for that. I'll re-install with the 32-bit version and report back.

EDIT: Okay, I uninstalled the 64-bit Cygwin (and completely removed it's root folder, shortcuts, etc.) and installed the 32-bit version. At first I was getting the same exact error as above when I used the following:

Code:
tar -xvf C:/Android/backup/nexus7_2.tar
So I decided instead to just make a copy of the .tar that was made in the root directory that contained "abe.jar" file. For some reason, I guess it didn't like that I tried to direct it to the where the file was located. I don't know if that made a difference, but it worked, and I was able to then make the .list out of the extracted .tar.

My follow-up question is however, is that in the example in the OP, they make an individual tar for gta3. Is there a way I can somehow batch all of the apps I want to backup in one line? Or do I have to repeat this for each app I want to backup? Sorry for all the questions, but I'm slowly getting the hang of this!
6th June 2014, 11:58 AM |#109  
geemaan's Avatar
Senior Member
Thanks Meter: 56
 
More
Just a heads-up:

I have a Nexus 5, I've just updated to 4.4.3 and the adb backup version was changed to 2! The backup extractor prints the message "Don't know how to process version 2"

I made a comment on nelenkov's related blogpost.
The Following User Says Thank You to geemaan For This Useful Post: [ View ] Gift geemaan Ad-Free
6th June 2014, 12:10 PM |#110  
scandiun's Avatar
OP Senior Member
Thanks Meter: 911
 
More
Quote:
Originally Posted by geemaan

Just a heads-up:

I have a Nexus 5, I've just updated to 4.4.3 and the adb backup version was changed to 2! The backup extractor prints the message "Don't know how to process version 2"

I made a comment on nelenkov's related blogpost.

Thanks for the heads up. There must be some incompatibility with version between version 1 and 2, since a new version is a mayor change. If that happened from 4.4.2 to 4.4.3 we should look to the changes between the two revisions.
6th June 2014, 12:15 PM |#111  
geemaan's Avatar
Senior Member
Thanks Meter: 56
 
More
Quote:
Originally Posted by scandiun

Thanks for the heads up. There must be some incompatibility with version between version 1 and 2, since a new version is a mayor change. If that happened from 4.4.2 to 4.4.3 we should look to the changes between the two revisions.

I think the only "documentation" is the source code for BackupManagerService.java starting with line 2792...
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes