By Jones


2016-04-07 19:09:28 8 Comments

I'm using Coolpad note 3 lite, running Android 5.1. I created internal memory backup using stock recovery. Files were created in this format:

  1. userdata_yyyymmdd_HHMMSS.backup = 2GB
  2. userdata_yyyymmdd_HHMMSS.backup1 = 2GB n. ...
  3. userdata_yyyymmdd_HHMMSS.backup5 = 1.53GB

Is there any way to extract the files to PC? I couldn't see file header mentioned here. Another user referred a method, which I couldn't understand.

  • Android 5.1
  • TWRP installed
  • Rooted
  • FAT32 internal & SD card.
  • Tried Titanium backup and it don't recognize the format.

Edit:

  1. Tried to do a stock recovery backup and replace the files. While trying to restore stock recovery not showing SD card, although it takes backup in SD card during backup in same session.
  2. 7Zip Windows opened the merged .backup file. It shows "2.ext". enter image description here
  3. Mounting 2.ext in Ubuntu shows nothing even though file space is occupied. enter image description here
  4. When trying to open 2.ext using 7zip, I see lot of files in similar name and opening them in 7zip again shows again same file names.... enter image description here

Now how do I recovery files from this 2.ext?

2 comments

@Justin2013 2016-08-24 21:24:20

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!

download on http://forum.xda-developers.com/showthread.php?p=65374561#post65374561

@alecxs 2019-11-27 21:38:33

i am neither Justin2013 nor ektoric and this answer is copy & paste

@Chahk 2016-04-07 19:49:34

As a first step, you will need to merge the various .backupN files into one by using the following command:

cat userdata_yyyymmdd_HHMMSS.backup* > userdata_yyyymmdd_HHMMSS.backup

It looks like the header size of 512 bytes is the same across many devices, so try to extract using the following command:

dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv

If this doesn't work, you can try the other method as described in this post:

  1. Download the simg2img tool from here.
  2. Convert the .backup file into an image using command simg2img userdata_xxxxxxxx_yyyyyy.backup userdata_xxxxxxxx_yyyyyy.backup.raw
  3. Mount the image using command mount -t ext4 -o loop,rw userdata_xxxxxxxx_yyyyyy.backup.raw "data".

You should now be able to copy the contents of the backup image.

Alternatively, you can download the simg2img binary along with the script that automates the above steps using the link from the above mentioned post.

@Jones 2016-04-07 19:54:28

Tried with Cygwin, unable to cat files (no space issue). Downloading ubuntu for VM and update the status.

@Jones 2016-04-08 11:21:59

First method didn't work because of "gzip: stdin: not in gzip format tar: This does not look like a tar archive". simg2img can't open the merged file. "Cannot open input file userdata.backup". Any other ideas? How to do with fallocate as another user mentioned?

@Death Mask Salesman 2016-04-08 12:20:06

@Jones Are you able to use md5sum? If yes, then try to issue md5sum -ve '1/1 "%02X "' userdata_yyyymmdd_HHMMSS.backup | head -n 10, then tell us the output. This way, we could try to identify the file type for you.

@Jones 2016-04-08 15:12:26

@DeathMaskSalesman - "md5sum: invalid option -- 'v'" I'm getting this error. Am I missing something?

@Death Mask Salesman 2016-04-08 15:15:28

@Jones No, it just means that your build of md5sum does not support the -v flag. You may want to skip the -e flag as well, and use md5sum -C instead. This will output both the hexadecimal code and its ASCII transliteration.

@Death Mask Salesman 2016-04-08 15:17:29

As an alternative to this manual procedure, you may also want to check if your Ubuntu distro has the file or the magic command, which are able to identify files by examining their header.

@Jones 2016-04-08 17:35:15

@DeathMaskSalesman - Used file with c flag. No patterns found.

@Death Mask Salesman 2016-04-08 17:37:23

@Jones Then we should perform an hexadecimal dump in order to manually analyze the file.

@Jones 2016-04-10 04:31:37

@DeathMaskSalesman - Now I'm able to see the internals of backup, although I couldn't retrieve anything yet.

Related Questions

Sponsored Content

1 Answered Questions

How to back up user data from recovery mode?

1 Answered Questions

Why does Android drop files I transfer to SDCard while in recovery mode?

1 Answered Questions

[SOLVED] Backup Link2sd ext4 partition, resize it and restore

4 Answered Questions

[SOLVED] ROMManager does not backup my sd-ext

1 Answered Questions

[SOLVED] How to extract sqlite file

Sponsored Content