Closed GoogleCodeExporter closed 9 years ago
Would you try to remove the "__HAVE_MMAP" option in the Makefile and try again?
The project unyaffs is another opensource project, but I will compare the
different between us and try to find the root cause.
Since your image contains the private data,
would you provide me some information about :
1. Which tool did you used to create the image?
2. Try to remove the "__HAVE_MMAP" option in the Makefile.
3. Using the option "-v" in the yaffs2utils-0.2 and send me the log on the
terminal.
Thanks a lot.
Original comment by penguin.lin
on 26 May 2011 at 2:35
Dear:
Would you please provide me more information about this issue (log on terminal).
I notice that the tool from official yaffs2 did not write the ROOT object into
the image, and the "unyaffs2" will show that "cannot find the root object, ..."
and the extraction will NOT processed.
Original comment by penguin.lin
on 8 Jun 2011 at 5:31
Hi,
I missed your comment in May. My apologies for that. Here's the information
you've requested:
1. The yaffs2 image was created as part of a backup by clockworkmod
(http://www.addictivetips.com/mobile/what-is-clockworkmod-recovery-and-how-to-us
e-it-on-android-complete-guide/) and is an image of the /data partition (also
yaffs2) of my phone.
2. Here's the output with "CFLAGS += -D_HAVE_MMAP" removed:
**
# ./src/unyaffs2 /home/greg.walters/android/data.img test/
unyaffs2-0.2.0: image extracting tool for YAFFS2
scanning image "/home/greg.walters/android/data.img"... [done]
scanning complete, total objects: 0
cannot find the root object, image broken?
building fs tree ... [done]
building complete, total valid objects: 0
extracting image into "test/"
modify files attributes... [done]
operation complete
files are extracted into test/
**
3. The "-v" option produces the same results.
Regarding comment #2 on this issue, it does look like the ROOT object is not
part of the image. Is there a way to work around or correct this issue?
Thanks,
Greg
Original comment by allright...@gmail.com
on 8 Jun 2011 at 12:47
Also, your comment at #1 is correct. I had the projects confused. I've build
the other unyaffs and found it to match the binary that I originally used.
Thanks,
Greg
Original comment by allright...@gmail.com
on 8 Jun 2011 at 12:52
Dear:
Thanks for your reply. ^^.
I thinks this problem can be divide into two parts :
1. The ROOT object is NOT found.
I notice the official mkyaffs2image didn't write the ROOT object into the image
for a long time. I will fix this issue.
2. "0" objects are scanned.
I thinks the oob layout in your image is differed from the default one in the
"unyafs2". The oob layout in the official mkyaffs2image is different from the
Linux MTD default settings.
This problem can be solved by:
(1) Using the tool "unspare2" to dump the oob layout information from your NAND
device, and the option "-o" can be used (unyaffs2) when you using unyaffs2 to
extract the image.
(2) Modifying the default oob layout in yaffs2utils (file: "yaffs2utils_ecc.h")
Thanks a lot!
Original comment by penguin.lin
on 9 Jun 2011 at 2:41
Thank you for your detailed workaround directions. Much appreciated.
Original comment by allright...@gmail.com
on 9 Jun 2011 at 1:59
Dear:
In the "yaffs2utils-0.2_pre3", I fixed the issue for "ROOT obj is NOT found".
The tool "unyaffs2" in this version will always ignore the ROOT object in the
image and use a pseudo root object for its internal algorithm.
For your problem #2, I think the oob layout of your original image is different
from the Linux MTD default (maybe I was wrong).
If your image is generated by the official mkyaffs2image, I think you can try:
(1) Modifying "yaffs2utils_ecc.h" by the patch:
++++++++++ PATCH ++++++++++
--- src.old/yaffs2utils_ecc.h 2011-06-20 16:23:45.000000000 +0800
+++ src.new/yaffs2utils_ecc.h 2011-06-20 16:22:55.000000000 +0800
@@ -32,7 +32,8 @@
.eccpos = {40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63},
- .oobfree = {{.offset = 2, .length = 38}},
+// .oobfree = {{.offset = 2, .length = 38}},
+ .oobfree = {{.offset = 0, .length = 38}},
};
static struct nand_ecclayout nand_oob_user = {0};
---------- PATCH ----------
(2) Using the tool "unspare2" to dump the oob layout information from your NAND
device (on the target), and the option "-o" can be used (unyaffs2) when you
using unyaffs2 to extract the image.
I thinks your problem can be solved.
Original comment by penguin.lin
on 20 Jun 2011 at 8:27
For this open issue:
(1) For "ROOT obj is NOT found", it is fixed.
(2) For others, it will be "won't fix".
Original comment by penguin.lin
on 7 Jul 2011 at 10:22
Hi, I've met the same issue here, while trying to expand the system.img created
with a generic AOSP build (2.3.6_r1):
------------------------------------
$ cd out/target/product/generic
$ mkdir sys
$ sudo unyaffs2 -o system.img sys
unyaffs2-0.2.4: image extracting tool for YAFFS2
scanning image 'system.img'... [done]
scanning complete, total objects: 0
building fs tree ... [done]
building complete, total valid objects: 0
extracting image into 'sys'
modify files attributes... [done]
operation complete
files are extracted into 'sys'
------------------------------------
Isn't unyaffs2 compatible with standard Android images?
thanks a lot!
Fabio
Original comment by ffum...@googlemail.com
on 23 Mar 2012 at 3:23
Sorry... wrong copy/paste. The command I usd did NOT include -o:
------------------------------------
$ cd out/target/product/generic
$ mkdir sys
$ sudo unyaffs2 system.img sys
unyaffs2-0.2.4: image extracting tool for YAFFS2
scanning image 'system.img'... [done]
scanning complete, total objects: 0
building fs tree ... [done]
building complete, total valid objects: 0
extracting image into 'sys'
modify files attributes... [done]
operation complete
files are extracted into 'sys'
------------------------------------
Original comment by ffum...@googlemail.com
on 23 Mar 2012 at 3:27
Original issue reported on code.google.com by
allright...@gmail.com
on 18 May 2011 at 12:57