View Single Post
Old 10-11-2014, 11:31 PM   #2
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
The Button Gets Pushed

Then the "set-up" gets its "complete later" choice selected.
Then the USB cable gets plugged in.
Then the new "Kindle" device gets un-mounted (my desktop auto-mounts it in USBMS).

Which leaves the raw storage device accessible -
Code:
core2quad KT2 $ cat /proc/partitions
major minor  #blocks  name
- - - - -
   8       64    3192832 sde
   8       65    3192824 sde1
Since we want the entire device, including the MBR and Partition table areas, make a binary copy of the root device (not of the root device's fs partition 1) -
Code:
core2quad KT2 $ sudo dd if=/dev/sde of=sde.bin bs=4096
798208+0 records in
798208+0 records out
3269459968 bytes (3.3 GB) copied, 383.358 s, 8.5 MB/s

core2quad KT2 $ file sde.bin
sde.bin: x86 boot sector; partition 1: ID=0xb, starthead 1, startsector 16, 6385648 sectors, extended partition table (last)\011, code offset 0x0
There, that is as close to "as shipped" as we can get, short of unsoldering the flash chip before ever turning it on.

Just to be careful (after changing the ownership from root to myself) -
Make a copy of the original and set the original to read-only.
Code:
core2quad KT2 $ cp -a sde.bin kt2-sde.bin
core2quad KT2 $ chmod 444 sde.bin
Since we started at the backing device root, we must give an offset to the fs data area:
Code:
core2quad KT2 $ sudo losetup -f kt2-sde.bin -o 8192

core2quad KT2 $ sudo losetup -a
/dev/loop0: [0905]:5939212 (/var1/Kindle/KT2/kt2-sde.bin), offset 8192

core2quad KT2 $ sudo mount /dev/loop0 /mnt/tmp

core2quad KT2 $ ls -l /mnt/tmp
total 16
drwxr-xr-x 3 root root 8192 2014-06-12 22:54 documents
drwxr-xr-x 7 root root 8192 2014-06-12 22:54 system
That seems "good enough" for one night.
Unplug Kindle, power it down, will not be needed for awhile.
Like, however long it takes me to connect to the serial port.

Last edited by knc1; 07-26-2015 at 07:41 AM.
knc1 is offline   Reply With Quote