Works: Kindle app on Android 11 - key extraction from encrypted backup with Linux #1821
rwingnut
started this conversation in
Show and tell
Replies: 1 comment
-
I'm surprised that version of Kindle for Android will still download books. Thanks for sharing this! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I got a new Samsung S6 lite tablet and spent some time working out the workflow to extract the key using Ubuntu 20. I don't have any Windows or Mac machines so I couldn't pursue any of the other solutions.
Here is what worked:
Setting Up Ubuntu 20
sudo apt-get install android-tools-adb
If you have problems with only getting a 41 byte download, here is the discussion of the problem:
https://android.stackexchange.com/questions/143367/creating-a-backup-with-adb-results-in-41-byte-file
So, replace the adb binary with version 1.0.31. The above link has a link to the download and the path is `usr/lib/android-sdk/platform-tools/adb
Backup tablet
Standard instructions you might find elsewhere:
Standard instruction for creating the backup:
adb backup com.amazon.kindle
When I run
adb backup com.amazon.kindle
it requires me to encrypt the backup since my tablet is encrypted. So, I need to decrypt the backup before I can use it with DeDRM_tools plugin in Calibre.Decrypt Backup
ab_decrypt provides the code to decrypt the backup, but it writes the results as an uncompressed
.tar
rather than a compressed.ab
.https://github.com/lclevy/ab_decrypt/blob/a7cac6f17e06da67041d9af8a737f137178e5d42/ab_decrypt.py
So, using the file linked above, I modify it to write the compressed file and re-add the backup header.
Replace the content of line 165 til the end with
Now, you can decrypt your backup using:
python ab_decrypt.py -b backup.encrypted.ab -p password -v 2
Now, when you load the backup into the DeDRM plugin in Calibre to extract the key, its happy sailing.
Thanks to everyone who has worked to build these tools.
Beta Was this translation helpful? Give feedback.
All reactions