noDRM / DeDRM_tools

DeDRM tools for ebooks
7.14k stars 319 forks source link

Kindle for Android book convert reports crypto type of 0 / book is not encrypted #657

Open benkaiser opened 22 hours ago

benkaiser commented 22 hours ago

Question / bug report

I managed to import the keys from the backup.ab file in the plugin customization. Then when I try to drop the book from the apps/com.amazon.kindle/ef/B0BY9RNGCL/B0BY9RNGCL_EBOK.prc file in backup.ab I see it land in calibre, and shows the cover art (giving me hope?) but then if I try to view the reader in calibre, or convert the book, I see the below log error which seems to report Crypto Type is: 0 which sounds wrong to me?

Is there a step I'm missing, am I pulling in the right file from the android backup?

Which version of Calibre are you running?

7.20.0

Which version of the DeDRM plugin are you running?

v10.0.9

If applicable, which version of the Kindle software are you running?

4.16.0.75

Log output

calibre, version 7.20.0
ERROR: Loading book failed: Failed to open the book at /Users/benkaiser/Calibre Library/John C. Lennox/A Good Return_ Biblical Principles for Work, Wealth and Wisdom (15)/A Good Return_ Biblical Principles for Wor - John C. Lennox.azw3. Click "Show details" for more info.

Failed to convert book: /<scrubbed>/Calibre Library/John C. Lennox/A Good Return_ Biblical Principles for Work, Wealth and Wisdom (15)/A Good Return_ Biblical Principles for Wor - John C. Lennox.azw3 with error:
DeDRM v10.0.9: Trying to decrypt A Good Return_ Biblical Principles for Wor - John C. Lennox.azw3
MobiDeDrm v1.1.
Copyright © 2008-2022 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: A Good Return: Biblical Principles for Work, Wealth and Wisdom
Found 6 keys to try after 0.3 seconds
Crypto Type is: 0
This book is not encrypted.
Decryption succeeded after 0.3 seconds
DeDRM v10.0.9: Finished after 0.3 seconds
InputFormatPlugin: MOBI Input running
on /var/folders/xq/tk9_0n1n39127d4j65lcvbm40000gn/C/calibre_7.20.0_tmp_3vm9b3ib/3qo335kq.azw3
Found KF8 MOBI of type 'standalone'
Failed to run pipe worker with command: from calibre.srv.render_book import viewer_main; viewer_main()
Traceback (most recent call last):
  File "runpy.py", line 198, in _run_module_as_main
  File "runpy.py", line 88, in _run_code
  File "site.py", line 42, in <module>
  File "site.py", line 38, in main
  File "calibre/utils/ipc/worker.py", line 196, in main
  File "<string>", line 1, in <module>
  File "calibre/srv/render_book.py", line 847, in viewer_main
  File "calibre/srv/render_book.py", line 838, in render_for_viewer
  File "calibre/srv/render_book.py", line 815, in render
  File "calibre/ebooks/oeb/iterator/book.py", line 64, in extract_book
  File "calibre/customize/conversion.py", line 245, in __call__
  File "calibre/ebooks/conversion/plugins/mobi_input.py", line 45, in convert
  File "calibre/ebooks/mobi/reader/mobi8.py", line 110, in __call__
  File "calibre/ebooks/mobi/reader/mobi8.py", line 124, in read_indices
ValueError: KF8 does not have a valid FDST record
ElleKayEm commented 21 hours ago

The problem seems to be this:

KF8 does not have a valid FDST record

Not DRM. I don't know how to resolve that.

benkaiser commented 12 hours ago

That comes later in the log as calibre is trying to render it. It seems to me like the root of the issue is the encryption isn't being detected and DeDRM is skipping it, when it is in fact encrypted.