FORUMS

[Q] How to Extract data from .Backup file ? - Created with android system recovery

8 posts
Thanks Meter: 3
 
By reena0307, Junior Member on 16th November 2013, 12:16 AM
Post Reply Email Thread
12th October 2015, 01:45 PM |#11  
Junior Member
Thanks Meter: 0
 
More
Any solution?
6th November 2015, 09:28 AM |#12  
Junior Member
Thanks Meter: 0
 
More
I called Alcatel's technical service today and they told me that you can use the backup file only from the phone. Mine gives me the following error when I try to restore it: Error Magic header

If anyone knows how to unpack the backup file I would be more than grateful.
8th December 2015, 10:46 PM |#13  
Junior Member
Thanks Meter: 3
 
More
It's a 512 byte header in front of a "tar.gz"
hexdump -C userdata_xxxxxxxx_yyyyyy.backup | less
showed the magical zip header "1f8b0800 00000000" at offset 0x200
So, skipping 512 bytes, the rest can be gunzip | tar
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv
The Following 2 Users Say Thank You to ektoric For This Useful Post: [ View ] Gift ektoric Ad-Free
16th January 2016, 05:13 AM |#14  
Junior Member
Thanks Meter: 1
 
More
Sir ektoric what d u mean on ur post?
Sorry cant understand it..
Can u please d a step by step procedure? Please...pls...plss
Thanks in advance...
The Following User Says Thank You to killen00 For This Useful Post: [ View ] Gift killen00 Ad-Free
16th January 2016, 07:29 AM |#15  
Junior Member
Thanks Meter: 1
 
More
Steps?
@ektoric sir im a noob in this... Can u show a step by step procedure?
28th January 2016, 08:40 PM |#16  
Junior Member
Thanks Meter: 3
 
More
@killen00 sorry, I assume you have a linux machine (or have access to one). The command is actually all there is to it.

Code:
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv
If you don't have a linux machine available, might I suggest one of the many distros of your choice, most of which have LiveCDs which you can run without installing.
17th February 2016, 04:51 PM |#17  
Senior Member
Thanks Meter: 242
 
More
script for gunzip method
maybe on xda it is common sense, but for me it was necessary to know, that these stock android recovery extracted files can be restored with nandroid custom recovery, if you simply repack them into tar archive.

i put this two command lines in a dirty shell script (extract + repack as tar).
thanks to ektoric figuring out his gunzip method!

edit: notamamasboy's mount method added (but not tested yet). if script not works come back few days later, download again and check version, maybe it has changed meanwhile.

with this you're able to transfer data of non-rooted phone to (rooted) similar one.

this is useful in case touchscreen is broken, you haven't custom recovery installed, usb-debugging is disabled and connecting usb-otg-mouse doesn't work.

tested on my Archos 50 b Oxygen (Mediatek MT6582).
it works for me, feel free to improve, port to busybox and publish. no support. use at own risk.

edit: bckp2cwm.sh is deprecated it is FOR JELLY BEAN ONLY (no selinux support)
a newer (selinux) version bckp2win.sh for TWRP you can find here:
http://forum.xda-developers.com/show....php?t=3775129
Attached Files
File Type: zip bckp2cwm.zip - [Click for QR Code] (133.9 KB, 6478 views)
17th February 2016, 05:58 PM |#18  
Junior Member
Thanks Meter: 0
 
More
How did you go about determining the magic number found at 0x200? My hexdump output does not have that magic number (1f 8b) in any instance. Leads me to believe my backup is not a tar file. Any suggestions then?
17th February 2016, 08:06 PM |#19  
Junior Member
Thanks Meter: 3
 
More
@notamamasboy, you are unfortunately correct.

Someone else also mentioned that their
Code:
userdata_xxxxxxxx_yyyyyy.backup
file was not of the same format I tried some "known magic headers", and could not find anything tell-tale. In which case, without some clues, you are back at square one.
17th February 2016, 08:28 PM |#20  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by ektoric

@notamamasboy, you are unfortunately correct.

Someone else also mentioned that their

Code:
userdata_xxxxxxxx_yyyyyy.backup
file was not of the same format I tried some "known magic headers", and could not find anything tell-tale. In which case, without some clues, you are back at square one.

Even more peculiarly, two backups were created a .backup and a .backup2, I wonder if combining with cat I can get somewhere...
17th February 2016, 10:41 PM |#21  
Junior Member
Thanks Meter: 0
 
More
It appears just to be an .ext4 img. But I can't mount it, should I try fallocating?

---------- Post added at 05:41 PM ---------- Previous post was at 05:08 PM ----------

Huzzah! I was able to mount the img after stringing the backups and fallocating/mount loop. We are in business.
Post Reply Subscribe to Thread

Tags
android recovery manager, cwm, extract, extract backup

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes