apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.55k stars 1.52k forks source link

Kindle for Mac (1.28) deDRM 6.8 installs but doesn't decrypt book #1158

Open PhilipPeake opened 4 years ago

PhilipPeake commented 4 years ago

Subject line pretty much says it all. Book loads into Calibre fine, but trying to read or convert gets a message that the book is protected by DRM.

PhilipPeake commented 4 years ago

Debug log:

calibre Debug log calibre 4.20 embedded-python: True is64bit: True Darwin-19.5.0-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '19.5.0', 'Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64') Python 2.7.16 OSX: ('10.15.5', ('', '', ''), 'x86_64') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 33, 0) && DeDRM (6, 8, 0) && Package KFX (from KFX Input) (1, 33, 0) && KFX metadata reader (from KFX Input) (1, 33, 0) && KFX Input (1, 33, 0) calibre 4.20 embedded-python: True is64bit: True Darwin-19.5.0-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '19.5.0', 'Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64') Python 2.7.16 OSX: ('10.15.5', ('', '', ''), 'x86_64') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 33, 0) && DeDRM (6, 8, 0) && Package KFX (from KFX Input) (1, 33, 0) && KFX metadata reader (from KFX Input) (1, 33, 0) && KFX Input (1, 33, 0) devicePixelRatio: 2.0 logicalDpi: 72.0 x 72.0 physicalDpi: 147.500002215 x 147.000002208 Using calibre Qt style: True [0.00] Starting up... [0.02] Showing splash screen... [0.20] splash screen shown [0.20] Initializing db... [0.21] db initialized [0.21] Constructing main UI... [0.79] main UI initialized... [0.79] Hiding splash screen Gather KFX-ZIP (from KFX Input) 1.33.0: Importing /Users/philip/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/My Kindle Content/B078WBXBHY_EBOK/B078WBXBHY_EBOK.azw Gather KFX-ZIP (from KFX Input): Gathered 3 file(s) as /var/folders/wg/c2yd0wlx279426h0bbnq58840000gn/C/calibre_4.20.0_tmp_ciQarw/WNPcyQ.kfx-zip DeDRM v6.8.0: Trying to decrypt WNPcyQ.kfx-zip Using Library AlfCrypto Python Decrypting KFX-ZIP ebook: WNPcyQ Found 1 keys to try after 0.0 seconds Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.af42a5fe-2e46-4626-9bf9-5a318e7db031.voucher DeDRM v6.8.0: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key DeDRM v6.8.0: Looking for new default Kindle Key after 0.0 seconds Found k4Mac kinf2018 file: /Users/philip/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2018 [15.54] splash screen hidden [15.54] Started up in 15.54 seconds with 29 books Couldn't decrypt file. DeDRM v6.8.0: Ultimately failed to decrypt after 3.6 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "site-packages/calibre/customize/ui.py", line 172, in _run_filetype_plugins File "calibre_plugins.dedrm.init", line 625, in run File "calibre_plugins.dedrm.init", line 575, in KindleMobiDecrypt DeDRMError: DeDRM v6.8.0: Ultimately failed to decrypt after 3.6 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Package KFX (from KFX Input) 1.33.0: Packaging /var/folders/wg/c2yd0wlx279426h0bbnq58840000gn/C/calibre_4.20.0_tmp_ciQarw/WNPcyQ.kfx-zip Processing container: B078WBXBHY_EBOK.azw Running file type plugin Package KFX (from KFX Input) failed with traceback: Traceback (most recent call last): File "site-packages/calibre/customize/ui.py", line 172, in _run_filetype_plugins File "calibre_plugins.kfx_input.package_filetype", line 21, in run File "calibre_plugins.kfx_input.package_filetype", line 33, in run_kfx File "calibre_plugins.kfx_input.kfxlib.yj_book", line 87, in convert_to_single_kfx File "calibre_plugins.kfx_input.kfxlib.yj_book", line 184, in decode_book File "calibre_plugins.kfx_input.kfxlib.yj_book", line 291, in get_container KFXDRMError: Book container B078WBXBHY_EBOK.azw has DRM and cannot be converted KFX metadata reader (from KFX Input) activated for /var/folders/wg/c2yd0wlx279426h0bbnq58840000gn/C/calibre_4.20.0_tmp_ciQarw/LS0St1_add_books/0/B078WBXBHY_EBOK.kfx-zip

ElleKayEm commented 4 years ago

Use Kindle for Mac 1.26 or earlier. Alternatively, disable KFX format downloads. See Method 2 or 4 at this post:
https://www.mobileread.com/forums/showthread.php?t=283371

PhilipPeake commented 4 years ago

Older (32 bit) versions are not an option on Catalina. Taking the execute bit off the file (/Applications/Kindle.app/Contents/MacOS/renderer-test) does cause KFX files to be unusable in Kindle, but the re-downloaded file is in a format unknown by Calibre: .kcr

ElleKayEm commented 4 years ago

Version 1.26 is 64-bit. If turning off KFX downloads, make sure to follow the further instructions under Method 2 detailed here:

https://www.mobileread.com/forums/showpost.php?p=3819708&postcount=508