Restore user data from userdata_#####_####.backup file using cwm

neerajlall

New member
Mar 22, 2015
1
0
0
Visit site
I did a user data backup on my xperia c using the android recovery menu. Then I installed cwm recovery and increase_App_space_storage.zip. Everything went fine. Now I want to restore the backup. When I try to restore from cwm I can't find the backup file (Userdataxxxx.xxx.backup) from inside the cwm. It's there on my SD card.
 

ektoric

New member
Dec 8, 2015
1
0
0
Visit site
I can't help with your unable to restore, but after much hairpulling, I was at least able to extract the data on my desktop and recover some data.

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
 

alecxs

New member
Feb 17, 2016
2
0
0
Visit site
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!

forum rules reject download links for new members, please download at
forum.xda-developers com /showthread.php?p=65374561#post65374561
 

alecxs

New member
Feb 17, 2016
2
0
0
Visit site
windows cannot handle unix permissions. you should unpack data to any ext4 formatted drive if you need to restore on phone later. easiest way to do it on windows pc is download "UNetbootin" and create a bootable usb-stick. boot from this without installing. then use linux' "gparted" (careful!) to format any sd-card or usb-stick to ext4.
 

Forum statistics

Threads
943,096
Messages
6,917,248
Members
3,158,819
Latest member
Nanran21