FORUMS
Remove All Ads from XDA

[HOW-TO/TOOL]Extract Nandroid images on a PC - unyaffs

1,267 posts
Thanks Meter: 891
 
By The-Droidster, Senior Member on 14th January 2013, 08:06 PM
Post Reply Email Thread
This guide is for MS Windows users!


For a long time, I have struggled to find a solution to a very basic question. How do I extract the files/apps from my Nandroid Backups directly on my PC?
If you have been wondering about this too and haven't found a solution yet, this guide is for you!

Tool (See Attachment) : Unyaffs: Unyaffs is a program/binary to extract files from a yaffs file system image. Now it can only extract images created by mkyaffs2image. To know more head here (Do not download anything from there)

Steps:
1. Copy your Nandroid backup image file/s(Eg system.img or data.img etc) to a suitable folder on your PC. (Keep the original copy intact, just duplicate any/all image files that you want to extract)
2. Download the attachment and extract its contents (unyaffs.exe and cywin1.dll) to the same folder as your Nandroid image file/s.
3. Open a command window in that folder (Shift + Right Click -->> open command window here)

4. Now type the following command to extract the desired image file.
Code:
unyaffs xxxx.img
Note: xxxx is any .img file you want to extract eg system.img, data.img etc etc

5. Wait. The tool will display "end of image" when it is done.
Done.
6. The extracted data should be in the same directory as the tool is.
Eg. If you want to restore/extract your contacts:
Extract the data.img
Code:
unyaffs data.img
Your contacts will be in:
Code:
\data\data\com.android.providers.contacts\databases
Attached Files
File Type: zip unyaffs-x86-win.zip - [Click for QR Code] (903.4 KB, 12608 views)
The Following 18 Users Say Thank You to The-Droidster For This Useful Post: [ View ] Gift The-Droidster Ad-Free
 
 
14th January 2013, 08:17 PM |#2  
Nikhil's Avatar
Senior Member
Flag Ahmedabad
Thanks Meter: 1,680
 
More
nice find buddy...i was looking for a method to extract img files and fetch my backup data...thanks...
The Following User Says Thank You to Nikhil For This Useful Post: [ View ] Gift Nikhil Ad-Free
15th January 2013, 04:56 AM |#3  
D™'s Avatar
Senior Member
Flag ▂ ▃ ▅ ▆ █ Watching You @!@
Thanks Meter: 4,513
 
Donate to Me
More
Great One buddy. Now I can extract these from my backup as well.
@Niks: buddy, mistakenly pressed thanks button for you. I m thinking, if you will it to be back..??
The Following User Says Thank You to D™ For This Useful Post: [ View ] Gift D™ Ad-Free
15th January 2013, 07:40 AM |#4  
Nikhil's Avatar
Senior Member
Flag Ahmedabad
Thanks Meter: 1,680
 
More
Quote:
Originally Posted by kataria.vikesh

Great One buddy. Now I can extract these from my backup as well.
@Niks: buddy, mistakenly pressed thanks button for you. I m thinking, if you will it to be back..??

lol...it happens sometimes...i am thanking you for thanking me by mistake..
18th January 2013, 01:32 PM |#5  
Senior Member
Flag Bangalore / Singapore
Thanks Meter: 169
 
More
this is a very very useful tool... once my room mate forgot to manually backup some data and had only taken a cwm, then i searched and searched online and finally found this somewhere.. mounted the data on pc and then totally forgot about it.. thanks so much for posting it here buddy..

I had done this about a year back... had really forgotten about sharing it with you all.. i was very new to xda then..
5th February 2013, 01:39 PM |#6  
Junior Member
Thanks Meter: 2
 
More
Question
Quote:
Originally Posted by vbz89

this is a very very useful tool... once my room mate forgot to manually backup some data and had only taken a cwm, then i searched and searched online and finally found this somewhere.. mounted the data on pc and then totally forgot about it.. thanks so much for posting it here buddy..

I had done this about a year back... had really forgotten about sharing it with you all.. i was very new to xda then..

The files in my backup are:
- boot.img - - - - - - - - - - (8,192 KB)
- chache.ext4.tar - - - - - (0 KB)
- chache.ext4.tar.a - - - - (108 KB)
- data.ext4.tar - - - - - - - (0 KB)
- data.ext4.tar.a - - - - - (820,985 KB)
- nandroid.md5 - - - - - - (1 KB)
- recovery.img - - - - - - - (8,192 KB)
- system.ext4.tar - - - - (0 KB)
- system.ext4.tar.a - - - ( 361,039 KB)

I can't open either of them with unyaffs. For the:

- ".img" and ".md5" files I get the message: broken image file
- ".tar" files I get: end of image, but no files in the folder (because the archives have 0KB, I guess)
- ".a" files I get the following:
Exception: STATUS_ACCESS_VIOLATION at eip=004010B0
eax=E3130040 ebx=00000000 ecx=00000000 edx=00DD1662 esi=0028CD34 edi=61179FC3
ebp=0028CCD8 esp=0028CCA0 program=C:\Users\Administrator\Desktop\2013-01-29.12.43.40\New
folder\unyaffs.exe, pid 1436, thread main
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame Function Args
0028CCD8 004010B0 (0028CD39, 00000000, 612058E8, 00401333)
0028CD08 004013AF (00000002, 00D98400, 00D982B0, 00000001)
0028CD68 61006CD3 (00000000, 0028CDA4, 61006570, 7EFDE000)
End of stack trace
My backup was made with CWM-Based Touch Recovery v6.0.1.2 (from SyiahKernel S2-v4.1.5).
Does anyone know if there is a way so I can extract a single file from this backup?

Thank you.
5th February 2013, 01:53 PM |#7  
The-Droidster's Avatar
OP Senior Member
XDA 24 x 7
Thanks Meter: 891
 
More
Quote:
Originally Posted by dmarcelro

The files in my backup are:
- boot.img - - - - - - - - - - (8,192 KB)
- chache.ext4.tar - - - - - (0 KB)
- chache.ext4.tar.a - - - - (108 KB)
- data.ext4.tar - - - - - - - (0 KB)
- data.ext4.tar.a - - - - - (820,985 KB)
- nandroid.md5 - - - - - - (1 KB)
- recovery.img - - - - - - - (8,192 KB)
- system.ext4.tar - - - - (0 KB)
- system.ext4.tar.a - - - ( 361,039 KB)

I can't open either of them with unyaffs. For the:

- ".img" and ".md5" files I get the message: broken image file
- ".tar" files I get: end of image, but no files in the folder (because the archives have 0KB, I guess)
- ".a" files I get the following:

My backup was made with CWM-Based Touch Recovery v6.0.1.2 (from SyiahKernel S2-v4.1.5).
Does anyone know if there is a way so I can extract a single file from this backup?

Thank you.

This will not work with newer recoveries because they use the newer ext4 filesystem for packaging/compressing instead of the older yaffs filesystem used by CWMv4. This will only work with yaffs filesystem recoveries. Only .android_secure.img, system.img, data.img, cache.img and hidden.img are supported. It cannot extract boot.img and recovery.img because these are not packaged/compressed by CWM. CWM just pulls these images from /dev/block and generates an md5 for them along with other packages. In short recovery and boot are not created by CWM, these are pre-compiled images and hence cannot be extracted using this tool.

You can try these options: (Not tested).
EXT4 imagefile unpacker

OR

If you have access to linux, try this.

OR

I assume Dsixda's Kitchen on XDA can help you. I can't remember but, I think it can handle ext4.tar files, give it a go. Search Dsixda's Kitchen on XDA.
The Following 3 Users Say Thank You to The-Droidster For This Useful Post: [ View ] Gift The-Droidster Ad-Free
5th February 2013, 03:43 PM |#8  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by The-Droidster


You can try these options: (Not tested).
["...sourceforge.net/projects/androidicsjbext/"]EXT4 imagefile unpacker

Doesn't work.

Quote:
Originally Posted by The-Droidster


OR
If you have access to linux, try ["...ubuntuforums.org/showthread.php?t=2103602"].

No more linux on my PC.... ufffffffff

Quote:
Originally Posted by The-Droidster


OR
I assume Dsixda's Kitchen on XDA can help you. I can't remember but, I think it can handle ext4.tar files, give it a go. Search Dsixda's Kitchen on XDA.

I'll check this, but it requires a lot of searching. Could not find what I want with few clicks.

Thank you.
5th February 2013, 04:51 PM |#9  
The-Droidster's Avatar
OP Senior Member
XDA 24 x 7
Thanks Meter: 891
 
More
Quote:

No more linux on my PC.... ufffffffff

You can use cygwin in windows if you don't have linux.

Quote:

I'll check this, but it requires a lot of searching. Could not find what I want with few clicks.

Thank you.

Dsixda's Kitchen
The Following User Says Thank You to The-Droidster For This Useful Post: [ View ] Gift The-Droidster Ad-Free
5th February 2013, 06:34 PM |#10  
Junior Member
Thanks Meter: 2
 
More
Thumbs up
Quote:
Originally Posted by The-Droidster

You can use cygwin in windows if you don't have linux.

Dsixda's Kitchen

Ok, you convinced me. I'll learn to cook my own ROM. Thanks once more.
8th July 2013, 01:03 AM |#11  
Joker87's Avatar
Senior Member
Flag Perugia
Thanks Meter: 58
 
More
Hi guys, I get this error message when tryin' this (Windows 7 - 64 bit, Clockworkmod backup)


Code:
unyaffs data.ext4.tar
    
1 [main] unyaffs 1044 exception::handle: Exception: STATUS_ACCESS_VIOLATION
   
1242 [main] unyaffs 1044 open_stackdumpfile: Dumping stack trace to unyaffs.e
xe.stackdump
The same with system.ext4.tar.
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes