Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-05-2016, 09:53 AM   #31
Whitefox
Member
Whitefox began at the beginning.
 
Posts: 13
Karma: 10
Join Date: May 2014
Device: kindle 4, kindle paperwhite
I tried the script on the kindle, it seems it works
Code:
[root@kindle root]# time ./copycmp.sh /dev/mmcblk0p2 /mnt/us/blk0p2.img
Termination on block boundary. (0+0.0+0)
Blocks: 16384, plus Bytes: 0, Total skips: 10804, Total bytes: 67108864
real    7m 27.90s
user    2m 35.82s
sys     3m 59.96s

[root@kindle root]# ./dc3dd if=/dev/mmcblk0p2 hof=/mnt/us/blk0p2.img hash=sha1 s
sz=4096 nwspc=on verb=on

dc3dd 7.1.614 started at 1970-01-01 03:05:26 +0200
compiled options:
command line: ./dc3dd if=/dev/mmcblk0p2 hof=/mnt/us/blk0p2.img hash=sha1 ssz=4096 nwspc=on verb=on
device size: 131072 sectors (probed)
sector size: 4096 bytes (set)
67108864 bytes (64 M) copied (100%), 19.9833 s, 3.2 M/s                       
output hashing (100%)                                                         
input results for device `/dev/mmcblk0p2':
   16384 sectors in
   0 bad sectors replaced by zeros
   9c43dafd7af42504b2684eeae838ced7e31b5eea (sha1)
output results for file `/mnt/us/blk0p2.img':
   16384 sectors out
   [ok] 9c43dafd7af42504b2684eeae838ced7e31b5eea (sha1)
dc3dd completed at 1970-01-01 03:05:46 +0200
Now should I try to do something like this?
Code:
./copycmp.sh /mnt/us/rootfs.img /dev/mmcblk0p1
and check it with
Code:
./dc3dd if=/mnt/us/rootfs.img hof=/dev/mmcblk0p1 hash=sha1 ssz=4096 nwspc=on verb=on
correct?

I got some problem coping the rootfs.img with usb, the file copied had a different md5 hash, so I had to split in a bunch of chunks, copy them(one at time), and join them using the serial console

Last edited by Whitefox; 02-05-2016 at 09:59 AM. Reason: Forget dc3dd parameters
Whitefox is offline   Reply With Quote
Old 02-05-2016, 10:10 AM   #32
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by Whitefox View Post
- - - -
Now should I try to do something like this?
Code:
./copycmp.sh /mnt/us/rootfs.img /dev/mmcblk0p1
and check it with
Code:
./dc3dd if=/mnt/us/rootfs.img hof=/dev/mmcblk0p1 hash=sha1 ssz=4096 nwspc=on verb=on
correct?

I got some problem coping the rootfs.img with usb, the file copied had a different md5 hash, so I had to split in a bunch of chunks, copy them(one at time), and join them using the serial console
Yes

Checking is optional - that was just to confirm script operation and demo dc3dd

ah - now that might be part of the problem.

= = = =

Sorry I haven't gotten the HowTo written yet -
Have to get my PW-3 re-assembled.

= = = =

dc3dd will do the splitting into chunks for you (dc3dd --help).
the one in x86/dc3dd might run on 32bit linux else install the copy from your linux distribution.

Last edited by knc1; 02-05-2016 at 10:23 AM.
knc1 is offline   Reply With Quote
Advert
Old 02-05-2016, 10:57 AM   #33
Whitefox
Member
Whitefox began at the beginning.
 
Posts: 13
Karma: 10
Join Date: May 2014
Device: kindle 4, kindle paperwhite
Ok, I think the memory is gone
Code:
./copycmp.sh /mnt/us/rootfs.img /dev/mmcblk0p1
INFO: task dd:26360 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
dd            D c0363c08     0 26360   1957 0x00000000
Backtrace: 
[<c03637e0>] (__schedule+0x0/0x450) from [<c0363d58>] (schedule+0x20/0x34)
 r8:00000004 r7:c6e95de4 r6:c0156888 r5:c0696628 r4:c6e94000
r3:c6e95d70
[<c0363d38>] (schedule+0x0/0x34) from [<c0363d94>] (io_schedule+0x28/0x44)
 r4:c0448458 r3:00000001
[<c0363d6c>] (io_schedule+0x0/0x44) from [<c01568dc>] (sync_page+0x54/0x60)
 r4:c6e95ddc r3:0000e081
[<c0156888>] (sync_page+0x0/0x60) from [<c03640b0>] (__wait_on_bit+0x5c/0xa8)
[<c0364054>] (__wait_on_bit+0x0/0xa8) from [<c0156af0>] (wait_on_page_bit+0x98/0xa8)
[<c0156a58>] (wait_on_page_bit+0x0/0xa8) from [<c0157630>] (wait_on_page_writeback_range+0x5c/0x120)
 r6:00015dff r5:cd002314 r4:00000000
[<c01575d4>] (wait_on_page_writeback_range+0x0/0x120) from [<c01586fc>] (filemap_fdatawait+0x3c/0x48)
[<c01586c0>] (filemap_fdatawait+0x0/0x48) from [<c015873c>] (filemap_write_and_wait+0x34/0x44)
 r5:cd002314 r4:00000000
[<c0158708>] (filemap_write_and_wait+0x0/0x44) from [<c01a07ac>] (__sync_blockdev+0x34/0x38)
 r5:00000000 r4:cd002200
[<c01a0778>] (__sync_blockdev+0x0/0x38) from [<c01a07c4>] (sync_blockdev+0x14/0x18)
[<c01a07b0>] (sync_blockdev+0x0/0x18) from [<c01a083c>] (__blkdev_put+0x54/0x124)
[<c01a07e8>] (__blkdev_put+0x0/0x124) from [<c01a0920>] (blkdev_put+0x14/0x18)
[<c01a090c>] (blkdev_put+0x0/0x18) from [<c01a0960>] (blkdev_close+0x3c/0x40)
[<c01a0924>] (blkdev_close+0x0/0x40) from [<c017cbd8>] (__fput+0x128/0x1e4)
 r5:00000008 r4:ce4073c0
[<c017cab0>] (__fput+0x0/0x1e4) from [<c017ccc4>] (fput+0x30/0x34)
[<c017cc94>] (fput+0x0/0x34) from [<c0179830>] (filp_close+0x6c/0x78)
[<c01797c4>] (filp_close+0x0/0x78) from [<c01798b8>] (sys_close+0x7c/0xb4)
 r6:0001d1a8 r5:ce4073c0 r4:ce2d5a40 r3:00000000
[<c017983c>] (sys_close+0x0/0xb4) from [<c0101e80>] (ret_fast_syscall+0x0/0x2c)
 r5:00000000 r4:00000000
INFO: task dd:26360 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
dd            D c0363c08     0 26360   1957 0x00000000
Backtrace: 
[<c03637e0>] (__schedule+0x0/0x450) from [<c0363d58>] (schedule+0x20/0x34)
 r8:00000004 r7:c6e95de4 r6:c0156888 r5:c0696628 r4:c6e94000
r3:c6e95d70
[<c0363d38>] (schedule+0x0/0x34) from [<c0363d94>] (io_schedule+0x28/0x44)
 r4:c0448458 r3:00000001
[<c0363d6c>] (io_schedule+0x0/0x44) from [<c01568dc>] (sync_page+0x54/0x60)
 r4:c6e95ddc r3:0000e081
[<c0156888>] (sync_page+0x0/0x60) from [<c03640b0>] (__wait_on_bit+0x5c/0xa8)
[<c0364054>] (__wait_on_bit+0x0/0xa8) from [<c0156af0>] (wait_on_page_bit+0x98/0xa8)
[<c0156a58>] (wait_on_page_bit+0x0/0xa8) from [<c0157630>] (wait_on_page_writeback_range+0x5c/0x120)
 r6:00015dff r5:cd002314 r4:00000000
[<c01575d4>] (wait_on_page_writeback_range+0x0/0x120) from [<c01586fc>] (filemap_fdatawait+0x3c/0x48)
[<c01586c0>] (filemap_fdatawait+0x0/0x48) from [<c015873c>] (filemap_write_and_wait+0x34/0x44)
 r5:cd002314 r4:00000000
[<c0158708>] (filemap_write_and_wait+0x0/0x44) from [<c01a07ac>] (__sync_blockdev+0x34/0x38)
 r5:00000000 r4:cd002200
[<c01a0778>] (__sync_blockdev+0x0/0x38) from [<c01a07c4>] (sync_blockdev+0x14/0x18)
[<c01a07b0>] (sync_blockdev+0x0/0x18) from [<c01a083c>] (__blkdev_put+0x54/0x124)
[<c01a07e8>] (__blkdev_put+0x0/0x124) from [<c01a0920>] (blkdev_put+0x14/0x18)
[<c01a090c>] (blkdev_put+0x0/0x18) from [<c01a0960>] (blkdev_close+0x3c/0x40)
[<c01a0924>] (blkdev_close+0x0/0x40) from [<c017cbd8>] (__fput+0x128/0x1e4)
 r5:00000008 r4:ce4073c0
[<c017cab0>] (__fput+0x0/0x1e4) from [<c017ccc4>] (fput+0x30/0x34)
[<c017cc94>] (fput+0x0/0x34) from [<c0179830>] (filp_close+0x6c/0x78)
[<c01797c4>] (filp_close+0x0/0x78) from [<c01798b8>] (sys_close+0x7c/0xb4)
 r6:0001d1a8 r5:ce4073c0 r4:ce2d5a40 r3:00000000
[<c017983c>] (sys_close+0x0/0xb4) from [<c0101e80>] (ret_fast_syscall+0x0/0x2c)
 r5:00000000 r4:00000000
INFO: task dd:26360 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
dd            D c0363c08     0 26360   1957 0x00000000
Backtrace: 
[<c03637e0>] (__schedule+0x0/0x450) from [<c0363d58>] (schedule+0x20/0x34)
 r8:00000004 r7:c6e95de4 r6:c0156888 r5:c0696628 r4:c6e94000
r3:c6e95d70
[<c0363d38>] (schedule+0x0/0x34) from [<c0363d94>] (io_schedule+0x28/0x44)
 r4:c0448458 r3:00000001
[<c0363d6c>] (io_schedule+0x0/0x44) from [<c01568dc>] (sync_page+0x54/0x60)
 r4:c6e95ddc r3:0000e081
[<c0156888>] (sync_page+0x0/0x60) from [<c03640b0>] (__wait_on_bit+0x5c/0xa8)
[<c0364054>] (__wait_on_bit+0x0/0xa8) from [<c0156af0>] (wait_on_page_bit+0x98/0xa8)
[<c0156a58>] (wait_on_page_bit+0x0/0xa8) from [<c0157630>] (wait_on_page_writeback_range+0x5c/0x120)
 r6:00015dff r5:cd002314 r4:00000000
[<c01575d4>] (wait_on_page_writeback_range+0x0/0x120) from [<c01586fc>] (filemap_fdatawait+0x3c/0x48)
[<c01586c0>] (filemap_fdatawait+0x0/0x48) from [<c015873c>] (filemap_write_and_wait+0x34/0x44)
 r5:cd002314 r4:00000000
[<c0158708>] (filemap_write_and_wait+0x0/0x44) from [<c01a07ac>] (__sync_blockdev+0x34/0x38)
 r5:00000000 r4:cd002200
[<c01a0778>] (__sync_blockdev+0x0/0x38) from [<c01a07c4>] (sync_blockdev+0x14/0x18)
[<c01a07b0>] (sync_blockdev+0x0/0x18) from [<c01a083c>] (__blkdev_put+0x54/0x124)
[<c01a07e8>] (__blkdev_put+0x0/0x124) from [<c01a0920>] (blkdev_put+0x14/0x18)
[<c01a090c>] (blkdev_put+0x0/0x18) from [<c01a0960>] (blkdev_close+0x3c/0x40)
[<c01a0924>] (blkdev_close+0x0/0x40) from [<c017cbd8>] (__fput+0x128/0x1e4)
 r5:00000008 r4:ce4073c0
[<c017cab0>] (__fput+0x0/0x1e4) from [<c017ccc4>] (fput+0x30/0x34)
[<c017cc94>] (fput+0x0/0x34) from [<c0179830>] (filp_close+0x6c/0x78)
[<c01797c4>] (filp_close+0x0/0x78) from [<c01798b8>] (sys_close+0x7c/0xb4)
 r6:0001d1a8 r5:ce4073c0 r4:ce2d5a40 r3:00000000
[<c017983c>] (sys_close+0x0/0xb4) from [<c0101e80>] (ret_fast_syscall+0x0/0x2c)
 r5:00000000 r4:00000000
INFO: task dd:26360 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
dd            D c0363c08     0 26360   1957 0x00000000
Backtrace: 
[<c03637e0>] (__schedule+0x0/0x450) from [<c0363d58>] (schedule+0x20/0x34)
 r8:00000004 r7:c6e95de4 r6:c0156888 r5:c0696628 r4:c6e94000
r3:c6e95d70
[<c0363d38>] (schedule+0x0/0x34) from [<c0363d94>] (io_schedule+0x28/0x44)
 r4:c0448458 r3:00000001
[<c0363d6c>] (io_schedule+0x0/0x44) from [<c01568dc>] (sync_page+0x54/0x60)
 r4:c6e95ddc r3:0000e081
[<c0156888>] (sync_page+0x0/0x60) from [<c03640b0>] (__wait_on_bit+0x5c/0xa8)
[<c0364054>] (__wait_on_bit+0x0/0xa8) from [<c0156af0>] (wait_on_page_bit+0x98/0xa8)
[<c0156a58>] (wait_on_page_bit+0x0/0xa8) from [<c0157630>] (wait_on_page_writeback_range+0x5c/0x120)
 r6:00015dff r5:cd002314 r4:00000000
[<c01575d4>] (wait_on_page_writeback_range+0x0/0x120) from [<c01586fc>] (filemap_fdatawait+0x3c/0x48)
[<c01586c0>] (filemap_fdatawait+0x0/0x48) from [<c015873c>] (filemap_write_and_wait+0x34/0x44)
 r5:cd002314 r4:00000000
[<c0158708>] (filemap_write_and_wait+0x0/0x44) from [<c01a07ac>] (__sync_blockdev+0x34/0x38)
 r5:00000000 r4:cd002200
[<c01a0778>] (__sync_blockdev+0x0/0x38) from [<c01a07c4>] (sync_blockdev+0x14/0x18)
[<c01a07b0>] (sync_blockdev+0x0/0x18) from [<c01a083c>] (__blkdev_put+0x54/0x124)
[<c01a07e8>] (__blkdev_put+0x0/0x124) from [<c01a0920>] (blkdev_put+0x14/0x18)
[<c01a090c>] (blkdev_put+0x0/0x18) from [<c01a0960>] (blkdev_close+0x3c/0x40)
[<c01a0924>] (blkdev_close+0x0/0x40) from [<c017cbd8>] (__fput+0x128/0x1e4)
 r5:00000008 r4:ce4073c0
[<c017cab0>] (__fput+0x0/0x1e4) from [<c017ccc4>] (fput+0x30/0x34)
[<c017cc94>] (fput+0x0/0x34) from [<c0179830>] (filp_close+0x6c/0x78)
[<c01797c4>] (filp_close+0x0/0x78) from [<c01798b8>] (sys_close+0x7c/0xb4)
 r6:0001d1a8 r5:ce4073c0 r4:ce2d5a40 r3:00000000
[<c017983c>] (sys_close+0x0/0xb4) from [<c0101e80>] (ret_fast_syscall+0x0/0x2c)
 r5:00000000 r4:00000000
INFO: task dd:26360 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
dd            D c0363c08     0 26360   1957 0x00000000
Backtrace: 
[<c03637e0>] (__schedule+0x0/0x450) from [<c0363d58>] (schedule+0x20/0x34)
 r8:00000004 r7:c6e95de4 r6:c0156888 r5:c0696628 r4:c6e94000
r3:c6e95d70
[<c0363d38>] (schedule+0x0/0x34) from [<c0363d94>] (io_schedule+0x28/0x44)
 r4:c0448458 r3:00000001
[<c0363d6c>] (io_schedule+0x0/0x44) from [<c01568dc>] (sync_page+0x54/0x60)
 r4:c6e95ddc r3:0000e081
[<c0156888>] (sync_page+0x0/0x60) from [<c03640b0>] (__wait_on_bit+0x5c/0xa8)
[<c0364054>] (__wait_on_bit+0x0/0xa8) from [<c0156af0>] (wait_on_page_bit+0x98/0xa8)
[<c0156a58>] (wait_on_page_bit+0x0/0xa8) from [<c0157630>] (wait_on_page_writeback_range+0x5c/0x120)
 r6:00015dff r5:cd002314 r4:00000000
[<c01575d4>] (wait_on_page_writeback_range+0x0/0x120) from [<c01586fc>] (filemap_fdatawait+0x3c/0x48)
[<c01586c0>] (filemap_fdatawait+0x0/0x48) from [<c015873c>] (filemap_write_and_wait+0x34/0x44)
 r5:cd002314 r4:00000000
[<c0158708>] (filemap_write_and_wait+0x0/0x44) from [<c01a07ac>] (__sync_blockdev+0x34/0x38)
 r5:00000000 r4:cd002200
[<c01a0778>] (__sync_blockdev+0x0/0x38) from [<c01a07c4>] (sync_blockdev+0x14/0x18)
[<c01a07b0>] (sync_blockdev+0x0/0x18) from [<c01a083c>] (__blkdev_put+0x54/0x124)
[<c01a07e8>] (__blkdev_put+0x0/0x124) from [<c01a0920>] (blkdev_put+0x14/0x18)
[<c01a090c>] (blkdev_put+0x0/0x18) from [<c01a0960>] (blkdev_close+0x3c/0x40)
[<c01a0924>] (blkdev_close+0x0/0x40) from [<c017cbd8>] (__fput+0x128/0x1e4)
 r5:00000008 r4:ce4073c0
[<c017cab0>] (__fput+0x0/0x1e4) from [<c017ccc4>] (fput+0x30/0x34)
[<c017cc94>] (fput+0x0/0x34) from [<c0179830>] (filp_close+0x6c/0x78)
[<c01797c4>] (filp_close+0x0/0x78) from [<c01798b8>] (sys_close+0x7c/0xb4)
 r6:0001d1a8 r5:ce4073c0 r4:ce2d5a40 r3:00000000
[<c017983c>] (sys_close+0x0/0xb4) from [<c0101e80>] (ret_fast_syscall+0x0/0x2c)
 r5:00000000 r4:00000000
Whitefox is offline   Reply With Quote
Old 02-05-2016, 11:05 AM   #34
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Not what I expected:
Code:
./copycmp.sh /mnt/us/rootfs.img /dev/mmcblk0p1
INFO: task dd:26360 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
dd            D c0363c08     0 26360   1957 0x00000000
But informative.

There is something certainly wrong inside that eMMC flash chip.

This is also probably why you had trouble transferring the file intact - that shouldn't have happened either.

- - - -

Thanks for your help - we now have some new tools and knowledge to deal with this sort of problem.
Something that will be showing up more and more often as the Kindles age.
knc1 is offline   Reply With Quote
Old 02-05-2016, 11:23 AM   #35
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by knc1 View Post
Not what I expected:
Code:
./copycmp.sh /mnt/us/rootfs.img /dev/mmcblk0p1
INFO: task dd:26360 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
dd            D c0363c08     0 26360   1957 0x00000000
But informative.

There is something certainly wrong inside that eMMC flash chip.

This is also probably why you had trouble transferring the file intact - that shouldn't have happened either.

- - - -

Thanks for your help - we now have some new tools and knowledge to deal with this sort of problem.
Something that will be showing up more and more often as the Kindles age.
In the function WriteBlock, just before the: set $($dd line, add:
echo "Writing block: $BLK"

Then run the same command more than once, see if it makes any progress (the already programmed blocks will be skipped).

You can also disable that 'info' message using the command mentioned in the message.

Last edited by knc1; 02-05-2016 at 11:28 AM.
knc1 is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle Paperwhite 1st Gen doesn't sleep? ForsCream Amazon Kindle 3 12-11-2013 09:49 AM
Kindle paperwhite doesn't recognize book tsumaster Amazon Kindle 2 07-22-2013 09:59 AM
Troubleshooting Kindle Paperwhite search doesn't find anything PeterBr Amazon Kindle 5 06-05-2013 04:30 PM
Troubleshooting Paperwhite doesn't display publisher font but Kindle 3 does EbokJunkie Amazon Kindle 6 04-16-2013 02:47 PM
Kindle Keyboard upgrade - Paperwhite laknights General Discussions 15 10-14-2012 05:45 AM


All times are GMT -4. The time now is 12:24 PM.


MobileRead.com is a privately owned, operated and funded community.