Friday, February 25, 2011

Freecom MusicPal #3

$ hd -n 64 mpimage.bin
00000000 61 64 6d 61 31 2e 30 31 23 fd 68 e2 43 01 00 00 |adma1.01#ýhâC...|
00000010 4d 75 73 69 63 50 61 6c 20 56 65 72 73 69 6f 6e |MusicPal Version|
00000020 20 31 2e 36 37 00 00 00 00 00 00 00 00 00 00 00 | 1.67...........|
00000030 01 00 00 00 10 c0 67 00 85 19 01 e0 2b 00 00 00 |.....Àg....à+...|
00000040

$ LENGTH=$((0x0067c010))

$ SKIP=$((0x38))

$ dd if=mpimage.bin ibs=1 skip=$SKIP count=16 2> /dev/null | file -
/dev/stdin: Linux jffs2 filesystem data little endian

$ dd if=mpimage.bin of=rootfs.jffs2 ibs=1 skip=$SKIP count=$LENGTH
6799376+0 records in
13280+1 records out
6799376 bytes (6.8 MB) copied, 2.99535 s, 2.3 MB/s

$ echo $LENGTH
6799376

$ SKIP=$(($SKIP + $LENGTH))

$ dd if=mpimage.bin ibs=1 skip=$SKIP 2> /dev/null | hd -n 64
00000000 06 00 00 00 1c 09 00 00 85 19 01 e0 2b 00 00 00 |...........à+...|
00000010 e6 6e 26 7d 01 00 00 00 00 00 00 00 02 00 00 00 |æn&}............|
00000020 87 f9 29 4b 03 04 00 00 84 6c 78 3b db 85 f4 d1 |.ù)K.....lx;Û.ôÑ|
00000030 65 74 63 ff 85 19 02 e0 44 00 00 00 1d fb f7 98 |etcÿ...àD....û÷.|
00000040

$ LENGTH=$((0x0000091c))

$ SKIP=$(($SKIP + 8))

$ dd if=mpimage.bin ibs=1 skip=$SKIP count=16 2> /dev/null | file -
/dev/stdin: Linux jffs2 filesystem data little endian

$ dd if=mpimage.bin of=part2.jffs2 ibs=1 skip=$SKIP count=$((LENGTH))
2332+0 records in
4+1 records out
2332 bytes (2.3 kB) copied, 0.00115809 s, 2.0 MB/s

$ echo $LENGTH
2332

$ echo $(($SKIP + $LENGTH))
6801772

$ echo $SIZE
6801772

No comments:

Post a Comment