Thread: Kindle backup
View Single Post
Old 08-18-2017, 06:08 PM   #1
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
Kindle backup

For touch screen Kindles, create a complete system's backup.
This does not include the USB storage area, which the user can backup over the USB cable to their PC.

Install:
Un-archive the attached compressed archive to the top level of visible USB storage.
Be sure your archive handling tool is set to re-create the directory structure.
There will be two directories (folders) added to the top of visible USB storage; 'unjail' and 'esys'.
The 'unjail' directory will contain the mkbackup.sh script.
The 'esys' directory (tree) will contain three of the GNU CoreUtils applications required.

'unjail' because this script is part of the new serial jail breaking procedure.
'esys' because that is our long established ARMel add-in tree.

No KUAL button (yet).
The script has to be run from the command line for this version.

The progress report given when run from the command line:
Spoiler:

Code:
[root@kindle root]# /mnt/us/unjail/mkbackup.sh

Copying partitioned area prefix.
33554432 bytes (32.0MB) copied, 2.660143 seconds, 12.0MB/s

Copying diag kernel block.
4194304 bytes (4.0MB) copied, 0.245116 seconds, 16.3MB/s

Copying main kernel block.
4194304 bytes (4.0MB) copied, 0.358442 seconds, 11.2MB/s

Extracting diagnostic uImage. 
2634796 bytes (2.5MB) copied, 0.203523 seconds, 12.3MB/s
Image Name:   Linux-3.0.35-lab126
Created:      Tue Mar 22 02:16:36 2016
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    2634732 Bytes = 2572.98 kB = 2.51 MB
Load Address: 80008000
Entry Point:  80008000

Extracting main uImage. 
2912428 bytes (2.8MB) copied, 0.175353 seconds, 15.8MB/s
Image Name:   Linux-3.0.35-lab126
Created:      Mon Jan 16 12:39:07 2017
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    2912364 Bytes = 2844.11 kB = 2.78 MB
Load Address: 80008000
Entry Point:  80008000

Copying main partition(2min).
471859200 bytes (450.0MB) copied, 122.171962 seconds, 3.7MB/s

Copying diag partition.
67108864 bytes (64.0MB) copied, 18.563725 seconds, 3.4MB/s

Copying local partition.
67108864 bytes (64.0MB) copied, 15.966005 seconds, 4.0MB/s

Copying boot0 partition.
2097152 bytes (2.0MB) copied, 3.684208 seconds, 555.9KB/s

Copying boot1 partition.
2097152 bytes (2.0MB) copied, 0.430499 seconds, 4.6MB/s


That script will create a directory (folder) in the top level of USB storage 'backups'.
The contents will be similar to this:
Spoiler:

Code:
[root@kindle us]# ls -lh backups
-rwxrwxrwx    1 root     root        2.0M Oct  3 00:27 boot0.bin
-rwxrwxrwx    1 root     root        2.0M Oct  3 00:27 boot1.bin
-rwxrwxrwx    1 root     root        2.5M Oct  3 00:24 diag-uImage
-rwxrwxrwx    1 root     root        4.0M Oct  3 00:24 diagkern.bin
-rwxrwxrwx    1 root     root       64.0M Oct  3 00:27 diagsys.bin
-rwxrwxrwx    1 root     root       64.0M Oct  3 00:27 localsys.bin
-rwxrwxrwx    1 root     root       13.6K Oct  3 00:24 main-config.gz
-rwxrwxrwx    1 root     root        2.8M Oct  3 00:24 main-uImage
-rwxrwxrwx    1 root     root        4.0M Oct  3 00:24 mainkern.bin
-rwxrwxrwx    1 root     root      450.0M Oct  3 00:26 mainsys.bin
-rwxrwxrwx    1 root     root       32.0M Oct  3 00:24 prefix.bin


The manual, command line, command to create a compressed archive:
Spoiler:

Code:
[root@kindle root]# cd /mnt/us
[root@kindle us]# tar -czf backups.tar.gz backups
* * * It takes awhile to create, so don't give up on it, the result is about 260Mbytes in the top level of USB visible storage. * * *


Connect the Kindle to your PC with the USB cable (after turning off USBnetworking if your using the cable for that).
From the top level of visible USB storage, copy the backups.tar.gz file to somewhere safe.
You can then delete from the Kindle both the archive file you just moved and the Kindle:\backups
directory (folder) tree.

Changes:
  • backup-0.3
    Now handles the older (larger) kernel format.
    Tested on: KT, fw: 5.3.7.3 and the PW3 below.
  • backup-0.2
    Extracts, tests and reports on uImage files.
    Tested on: PW3-4GB, fw: 5.8.7.0.1
  • backup
    I would like to forget I wrote this one.
Attached Files
File Type: gz backup-0.3.tar.gz (88.2 KB, 1278 views)

Last edited by knc1; 08-21-2017 at 05:42 PM.
knc1 is offline   Reply With Quote