Hello everybody, I want to get the flash data. But it can't get the OOB data using the command "dd". So i need to rewrite it. I try to use "ioctl" function with "MEMREADOOB" to get the oob data, but the data seems wrong. Here is my operating information:
1.My mobile's info: 1-1.kernel version: # cat version cat version Linux version 2.6.27-8dd6deee (htc-kernel@and18-2) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #722 PREEMPT Wed Aug 19 18:12:40 CST 2009 1-2. filesystem info: # cat /proc/yaffs cat /proc/yaffs YAFFS built:Aug 19 2009 18:09:44 $Id$ $Id$ Device 0 "system" startBlock......... 0 endBlock........... 1359 totalBytesPerChunk. 2048 nDataBytesPerChunk. 2048 2.My test Code: char buff[64]; struct mtd_oob_buf oob; oob.length = 64; oob.ptr = buff; oob.start = page * 2048; int ifd = open(dev_name, O_RDONLY, 0666); int r_oob = ioctl(ifd, MEMREADOOB, &oob); 3.Output result: Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F page 0: 00000000 FA 99 79 CC EF DF B1 F4 77 1C 02 16 E1 CA B3 10 00000010 00 7B 53 70 1D 50 26 58 2D 70 3A 21 7E B6 44 26 00000020 00 00 CF 02 00 00 01 00 00 00 00 08 00 00 4D CF 00000030 B4 2C 94 4A B8 37 75 C4 FF FF FF FF FF FF FF FF page 1: 00000040 C8 3A 13 C7 12 AA 20 73 69 47 26 C3 3A A9 E5 BB 00000050 84 41 39 ED F3 44 D2 87 C9 E3 D5 54 B6 CD 44 26 00000060 00 00 55 0D 00 00 2F 04 00 00 00 08 00 00 70 F1 00000070 7D 77 FC D8 28 09 D1 9C FF FF FF FF FF FF FF FF It seems unmatch the struct yaffs_PackedTags2 Is there any wrong? Thanks! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

