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

Search This thread

The-Droidster

Senior Member
May 27, 2012
1,295
892
XDA 24 x 7
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
 

Attachments

  • unyaffs-x86-win.zip
    903.4 KB · Views: 15,342
Last edited:

vbz89

Senior Member
Jan 11, 2012
589
171
Bangalore / Singapore
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..
 

dmarcelro

Member
Jan 30, 2013
9
2
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.
 

The-Droidster

Senior Member
May 27, 2012
1,295
892
XDA 24 x 7
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.
 
Last edited:

dmarcelro

Member
Jan 30, 2013
9
2
You can try these options: (Not tested).
["...sourceforge.net/projects/androidicsjbext/"]EXT4 imagefile unpacker

Doesn't work.

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

No more linux on my PC.... ufffffffff

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.
 

Joker87

Senior Member
Jun 24, 2011
541
59
Perugia
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. :confused:
 

Adam77Root

Inactive Recognized Developer
Jul 3, 2012
2,535
11,160
Did you read thrpugh the thread at least once? It's just one page, really not that hard.

Sent from my LG-P880
 

Joker87

Senior Member
Jun 24, 2011
541
59
Perugia
Ok, unyaffs won't work with newer versions of backup but I found out Titanium Backup can do that job.
 

jomara1611

New member
Mar 17, 2011
2
0
finding photos

I have a few backups and have looked through the files after running the command prompt. Is it possible to find any photos that may have been there and where would i look
 

iboursian

Member
Oct 21, 2014
11
0
Open image file failed

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

ERROR : Open image file failed..........is dat also work for cache.yaffs2 files ??
 

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    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
    3
    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.
    1
    nice find buddy...i was looking for a method to extract img files and fetch my backup data...thanks...:good:
    1
    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..??:p
    1
    No more linux on my PC.... ufffffffff

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

    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