[Xperia Arc General] scholbert:
... still trying to make a raw dump of boot section

Hi again,

just an update to my latest hacks ;)

In the meantime i tweaked kernel to include boot partion and used special recovery ramdisk.

Doing so, i found out that the busybox nanddump is missing some features to read out the boot blocks correctly.

There'd been error messages all the time and i couldn't get the real data...

Using dd brought no solution as well...

Aynway, i did cross compile my own static version of nanddump to use it in my recovery.

It's not completely solved and still the data is not correct.

BTW this is the output i got at this point:

./nanddump --bb=dumpbad -f /sdcard/s1boot.bin /dev/mtd/mtd4
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 8
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00100000...
ECC: 1 uncorrectable bitflip(s) at offset 0x00000000
ECC: 1 uncorrectable bitflip(s) at offset 0x00000800
ECC: 1 uncorrectable bitflip(s) at offset 0x00001000
ECC: 1 uncorrectable bitflip(s) at offset 0x00001800
ECC: 1 uncorrectable bitflip(s) at offset 0x00002000
ECC: 1 uncorrectable bitflip(s) at offset 0x00002800
ECC: 1 uncorrectable bitflip(s) at offset 0x00003000
ECC: 1 uncorrectable bitflip(s) at offset 0x00003800
ECC: 1 uncorrectable bitflip(s) at offset 0x00004000
ECC: 1 uncorrectable bitflip(s) at offset 0x00004800
ECC: 1 uncorrectable bitflip(s) at offset 0x00005000
ECC: 1 uncorrectable bitflip(s) at offset 0x00005800
ECC: 1 uncorrectable bitflip(s) at offset 0x00006000
ECC: 1 uncorrectable bitflip(s) at offset 0x00006800
ECC: 1 uncorrectable bitflip(s) at offset 0x00007000
ECC: 1 uncorrectable bitflip(s) at offset 0x00007800
ECC: 1 uncorrectable bitflip(s) at offset 0x00008000
ECC: 1 uncorrectable bitflip(s) at offset 0x00008800
ECC: 1 uncorrectable bitflip(s) at offset 0x00009000
ECC: 1 uncorrectable bitflip(s) at offset 0x00009800
ECC: 1 uncorrectable bitflip(s) at offset 0x0000a000
ECC: 1 uncorrectable bitflip(s) at offset 0x0000a800
ECC: 1 uncorrectable bitflip(s) at offset 0x0000b000
ECC: 1 uncorrectable bitflip(s) at offset 0x0000b800
ECC: 1 uncorrectable bitflip(s) at offset 0x0000c000
ECC: 1 uncorrectable bitflip(s) at offset 0x0000c800
ECC: 1 uncorrectable bitflip(s) at offset 0x0000d000
ECC: 1 uncorrectable bitflip(s) at offset 0x0000d800
ECC: 1 uncorrectable bitflip(s) at offset 0x0000e000
ECC: 1 uncorrectable bitflip(s) at offset 0x0000e800
ECC: 1 uncorrectable bitflip(s) at offset 0x0000f000
ECC: 1 uncorrectable bitflip(s) at offset 0x0000f800
ECC: 1 uncorrectable bitflip(s) at offset 0x00010000
ECC: 1 uncorrectable bitflip(s) at offset 0x00010800
ECC: 1 uncorrectable bitflip(s) at offset 0x00011000
ECC: 1 uncorrectable bitflip(s) at offset 0x00011800
ECC: 1 uncorrectable bitflip(s) at offset 0x00012000
ECC: 1 uncorrectable bitflip(s) at offset 0x00012800
ECC: 1 uncorrectable bitflip(s) at offset 0x00013000
ECC: 1 uncorrectable bitflip(s) at offset 0x00013800
ECC: 1 uncorrectable bitflip(s) at offset 0x00014000
ECC: 1 uncorrectable bitflip(s) at offset 0x00014800
ECC: 1 uncorrectable bitflip(s) at offset 0x00015000
ECC: 1 uncorrectable bitflip(s) at offset 0x00015800
ECC: 1 uncorrectable bitflip(s) at offset 0x00016000
ECC: 1 uncorrectable bitflip(s) at offset 0x00016800
ECC: 1 uncorrectable bitflip(s) at offset 0x00017000
ECC: 1 uncorrectable bitflip(s) at offset 0x00017800
ECC: 1 uncorrectable bitflip(s) at offset 0x00018000
ECC: 1 uncorrectable bitflip(s) at offset 0x00018800
ECC: 1 uncorrectable bitflip(s) at offset 0x00019000
ECC: 1 uncorrectable bitflip(s) at offset 0x00019800
ECC: 1 uncorrectable bitflip(s) at offset 0x0001a000
ECC: 1 uncorrectable bitflip(s) at offset 0x0001a800
ECC: 1 uncorrectable bitflip(s) at offset 0x0001b000
ECC: 1 uncorrectable bitflip(s) at offset 0x0001b800
ECC: 1 uncorrectable bitflip(s) at offset 0x0001c000
ECC: 1 uncorrectable bitflip(s) at offset 0x0001c800
ECC: 1 uncorrectable bitflip(s) at offset 0x0001d000
ECC: 1 uncorrectable bitflip(s) at offset 0x0001d800
ECC: 1 uncorrectable bitflip(s) at offset 0x0001e000
ECC: 1 uncorrectable bitflip(s) at offset 0x0001e800
ECC: 1 uncorrectable bitflip(s) at offset 0x0001f000
ECC: 1 uncorrectable bitflip(s) at offset 0x0001f800

From the kernel view (and nanddump using ioctl) all 8 blocks in the first 1MByte of NAND are marked as bad.

Obviously this is not correct, the bootloader is intact and seems to use its own management to handle these correctly.

Maybe i'll try again with dumping ECC parts as well, but it seems that there's no easy way to read out this data by hooking on the kernel's mtd device. Possibly some tweaked driver is needed here :o

EDIT:

Just tried with some different parameters makes it even clearer that bootcode handling is different to kernel.

Adding the -o parameter:

/nanddump --bb=dumpbad -o -f /sdcard/s1boot.bin /dev/mtd/mtd4
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 8
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00100000...
ECC: 1 uncorrectable bitflip(s) at offset 0x00000000
libmtd: error!: MEMREADOOB64 ioctl failed for mtd4, offset 0 (eraseblock 0)
error 74 (Bad message)
libmtd: error!: MEMREADOOB ioctl failed for mtd4, offset 0 (eraseblock 0)
error 74 (Bad message)
nanddump: error!: libmtd: mtd_read_oob

... and another one with the -n parameter:

./nanddump -n --bb=dumpbad -f /sdcard/s1boot.bin /dev/mtd/mtd4
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00100000...
libmtd: error!: cannot read 2048 bytes from mtd4 (eraseblock 0, offset 0)
error 22 (Invalid argument)
nanddump: error!: mtd_read

Don't know if i will spent more time hacking on these things... at least this is is just for education/investigation.

...and little bit of fun :D

That's just it again...

Stay tuned anyway!

scholbert