Closed GoogleCodeExporter closed 9 years ago
Please provide any additional information below.
root@android:/data # hexdump -C /dev/block/mtdblock12 | more
00000000 2d 72 6f 6d 31 66 73 2d 00 a0 00 a0 c7 82 ed 0e |-rom1fs-........|
00000010 72 6f 6d 20 35 32 61 66 31 62 61 32 00 00 00 00 |rom 52af1ba2....|
00000020 00 00 00 49 00 00 00 20 00 00 00 00 d1 ff ff 97 |...I... ........|
00000030 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 00 00 00 60 00 00 00 20 00 00 00 00 d1 d1 ff 80 |...`... ........|
00000050 2e 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060 00 50 00 82 00 00 00 00 00 50 00 00 31 c1 90 1b |.P.......P..1...|
00000070 62 6c 6f 63 6b 32 00 00 00 00 00 00 00 00 00 00 |block2..........|
00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00500080 00 00 00 02 00 00 00 00 00 50 00 00 32 12 90 9b |.........P..2...|
00500090 62 6c 6f 63 6b 31 00 00 00 00 00 00 00 00 00 00 |block1..........|
005000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00b00000 76 65 72 69 74 79 00 00 01 00 00 00 01 00 00 00 |verity..........|
00b00010 2f a8 e0 2c 8a b6 4b b8 a4 15 79 e9 34 70 01 83 |/..,..K...y.4p..|
00b00020 73 68 61 32 35 36 00 00 00 00 00 00 00 00 00 00 |sha256..........|
00b00030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00b00040 00 10 00 00 00 10 00 00 00 0b 00 00 00 00 00 00 |................|
00b00050 20 00 00 00 00 00 00 00 05 68 9d b3 10 51 d9 3a | ........h...Q.:|
00b00060 85 ed a5 eb d5 27 90 4b ac d7 de cb 8f f6 5f 34 |.....'.K......_4|
00b00070 5d ff 05 ad b2 cd 39 c2 00 00 00 00 00 00 00 00 |].....9.........|
00b00080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
--More--
Try to Match --data-blocks=2816 --hash-offset=00b00000 to use veritysetup, the
result:
root@android:/data/tmp # ls
attempt to access beyond end of device
dm-0: rw=0, want=40968, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=40968, limit=22528
block2
root@android:/data/tmp # hexdump -C block2 | more
attempt to access beyond end of device
dm-0: rw=0, want=22536, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22536, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22568, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22600, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22632, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22664, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22696, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22728, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22760, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22792, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22824, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22856, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22888, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22920, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22952, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22984, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23016, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23048, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23080, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23112, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23144, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23176, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23208, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23240, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23272, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23304, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23336, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23368, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23400, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23432, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23464, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23496, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23528, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23560, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23592, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23624, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23656, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23688, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23720, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23752, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23784, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23816, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23848, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23880, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23912, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23944, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=23976, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=24008, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=24040, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=24072, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=24104, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=24136, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=24168, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=24200, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=24232, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=24264, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=24296, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=24328, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=24360, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=24392, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=24424, limit=22528
attempt to access beyond end of device
dm-0: rw=0, want=22536, limit=22528
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00140000 00 00 00 02 00 00 00 00 00 50 00 00 32 12 90 9b |.........P..2...|
00140010 62 6c 6f 63 6b 31 00 00 00 00 00 00 00 00 00 00 |block1..........|
00140020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
hexdump: block2: Input/output error
002bf000
Original comment by askxia...@gmail.com
on 18 Dec 2013 at 2:57
> 5.dd if=romfs.img of=/dev/block/mtdblock12 bs1 count=12582912
syntax error. bs=1 ?
What has this bug common with veritysetup? It is miscalculation of underlying
bock device size.
>attempt to access beyond end of device
>dm-0: rw=0, want=23336, limit=22528
Please check your block device size.... best with blockdev --getsize64
</dev/...> and compare it with expected size. I think you are just simply
using too small mtd device here.
Original comment by gmazyl...@gmail.com
on 18 Dec 2013 at 5:52
Please check your block device size.... best with blockdev --getsize64
</dev/...> and compare it with expected size. I think you are just simply
using too small mtd device here.
Reply:
The flash is larger than 80M, in addition, I use U-disk(512M) to experiment
and the result is the same as before,but it is succeed on X86.
Where the problem may be?
Original comment by askxia...@gmail.com
on 24 Dec 2013 at 5:59
Original issue reported on code.google.com by
askxia...@gmail.com
on 18 Dec 2013 at 2:41