apprenticeharper / DeDRM_tools

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

Can not dedrm(from kindle) #1054

Open ArthurJay opened 4 years ago

ArthurJay commented 4 years ago

Can not unlocked the book which from my kindle machine,and my computer is Macbook Pro(Retina,13-inch,Early 2015),macOS Catalina 10.15.4.

calibre Debug log calibre 4.13 embedded-python: True is64bit: True Darwin-19.4.0-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '19.4.0', 'Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64') Python 2.7.16 OSX: ('10.15.4', ('', '', ''), 'x86_64') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 31, 0) && DeDRM (6, 7, 0) && Package KFX (from KFX Input) (1, 31, 0) && Set KFX metadata (from KFX Output) (1, 40, 0) && KFX Output (1, 40, 0) && KFX metadata reader (from KFX Input) (1, 31, 0) && KFX Input (1, 31, 0) calibre 4.13 embedded-python: True is64bit: True Darwin-19.4.0-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '19.4.0', 'Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64') Python 2.7.16 OSX: ('10.15.4', ('', '', ''), 'x86_64') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 31, 0) && DeDRM (6, 7, 0) && Package KFX (from KFX Input) (1, 31, 0) && Set KFX metadata (from KFX Output) (1, 40, 0) && KFX Output (1, 40, 0) && KFX metadata reader (from KFX Input) (1, 31, 0) && KFX Input (1, 31, 0) devicePixelRatio: 2.0 logicalDpi: 72.0 x 72.0 physicalDpi: 113.500001705 x 113.500001705 Using calibre Qt style: True [0.00] Starting up... [0.02] Showing splash screen... [0.24] splash screen shown [0.24] Initializing db... [0.25] db initialized [0.25] Constructing main UI... [1.22] main UI initialized... [1.22] Hiding splash screen Gather KFX-ZIP (from KFX Input) 1.31.0: Importing /Users/mac/Downloads/e.kfx Gather KFX-ZIP (from KFX Input): Cannot locate some files needed for the book. KFX files must remain in their original folder structure for successful import. Gather KFX-ZIP (from KFX Input): Gathered 1 file(s) as /var/folders/35/bgb2xhmd1071282k33ftx8280000gn/C/calibre_4.13.0_tmp_fUq4ha/LOWQyB.kfx-zip DeDRM v6.7.0: Trying to decrypt LOWQyB.kfx-zip Using Library AlfCrypto Python Decrypting KFX-ZIP ebook: LOWQyB Found 1 keys to try after 0.1 seconds DeDRM v6.7.0: Failed to decrypt with error: The .kfx-zip archive contains an encrypted DRMION file without a DRM voucher DeDRM v6.7.0: Looking for new default Kindle Key after 0.1 seconds No k4Mac kindle-info/rainier/kinf2011 files have been found. DeDRM v6.7.0: Ultimately failed to decrypt after 0.1 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.7.0: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Package KFX (from KFX Input) 1.31.0: Packaging /var/folders/35/bgb2xhmd1071282k33ftx8280000gn/C/calibre_4.13.0_tmp_fUq4ha/LOWQyB.kfx-zip Processing container: e.kfx 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 160, in decode_book File "calibre_plugins.kfx_input.kfxlib.yj_book", line 267, in get_container KFXDRMError: Book container e.kfx has DRM and cannot be converted KFX metadata reader (from KFX Input) activated for /var/folders/35/bgb2xhmd1071282k33ftx8280000gn/C/calibre_4.13.0_tmp_fUq4ha/YASFfY_add_books/0/e.kfx-zip Traceback (most recent call last): File "site-packages/calibre/customize/ui.py", line 428, in get_file_type_metadata File "calibre_plugins.kfx_input.metadata_reader", line 28, in get_metadata File "calibre_plugins.kfx_input.kfxlib.yj_book", line 132, in get_metadata Exception: Failed to locate a KFX container with metadata [11.24] splash screen hidden [11.24] Started up in 11.24 seconds with 19 books

{u'bsd_drives': {u'main': u'/dev/disk2s1'}, u'drives': {u'main': '/Volumes/Kindle'}, u'mount_map': {'/dev/disk1s1': '/System/Volumes/Data', '/dev/disk1s3': '/Volumes/Recovery', '/dev/disk1s4': '/private/var/vm', '/dev/disk1s5': '/', '/dev/disk2s1': '/Volumes/Kindle', 'devfs': '/dev', 'map auto_home': '/System/Volumes/Data/home'}} Added e to db in: 0.0 Added 1 books in 0.7 seconds Job: 0 Get device information started DeviceJob: 0 Get device information done, calling callback DeviceJob: 0 Get device information callback returned Job: 1 Set library information started DeviceJob: 1 Set library information done, calling callback DeviceJob: 1 Set library information callback returned Job: 2 Get list of books on device started DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= None DEBUG: 0.0 USBMS: dirs are: /Volumes/Kindle/ documents Job: 0 Get device information finished No details available. Job: 1 Set library information finished No details available. DEBUG: 0.2 USBMS: scan from root False /Volumes/Kindle/documents DEBUG: 0.4 USBMS: count found in cache: 294, count of files in metadata: 294, need_sync: False DEBUG: 0.4 USBMS: Finished fetching list of books from device. oncard= None DEBUG: 0.4 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= carda DEBUG: 0.4 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= cardb DeviceJob: 2 Get list of books on device done, calling callback DeviceJob: metadata_downloaded: Starting set_books_in_library DeviceJob: set_books_in_library: books to process= 294 DeviceJob: set_books_in_library finished: time= 0.0170679092407 DeviceJob: metadata_downloaded: updating views DeviceJob: metadata_downloaded: syncing DeviceJob: metadata_downloaded: refreshing ondevice DeviceJob: metadata_downloaded: sending metadata_available signal DeviceJob: 2 Get list of books on device callback returned Job: 2 Get list of books on device finished No details available.

ElleKayEm commented 4 years ago

If it is an E-ink Kindle (not a Fire), get the book from the website for "download & transfer via USB" and add that copy to calibre. You need to put your Kindle's serial number into the DeDRM plugin customization if you haven't already.

ArthurJay commented 4 years ago

it is an E-ink Kindle,what I need to unlock is a sample book,can not download from website,and I already put my kindle's serial number into the DeDRM plugin.I can unlock the purchased book but can not unlocked the new sample book from kindle(from kindle document folder).

ElleKayEm commented 4 years ago

Go to the book's page. Look for the "send free sample" section. In the Deliver to drop down, scroll down to the bottom and select "transfer via computer." Then choose your E-ink Kindle, and you'll get a file you can DeDRM.

ArthurJay commented 4 years ago

Go to the book's page. Look for the "send free sample" section. In the Deliver to drop down, scroll down to the bottom and select "transfer via computer." Then choose your E-ink Kindle, and you'll get a file you can DeDRM.

Thank you.I have take another book to try.It works.Although some books what I want still cannot download because unknown reason from Amazon,I think the technical problem have solved.Thanks a lot!

ElleKayEm commented 4 years ago

Could be a book that's only available in the KFX format. Right now the only way to decrypt that format is by downloading it with Kindle for PC/Mac older than version 1.25 which won't work on Catalina. If you previously had a working setup with DeDRM and Kindle for Mac 1.23 or earlier before updating to Catalina, you might be able to. But it doesn't look like you did since DeDRM didn't find a Kindle for Mac key.

ArthurJay commented 4 years ago

Could be a book that's only available in the KFX format. Right now the only way to decrypt that format is by downloading it with Kindle for PC/Mac older than version 1.25 which won't work on Catalina. If you previously had a working setup with DeDRM and Kindle for Mac 1.23 or earlier before updating to Catalina, you might be able to. But it doesn't look like you did since DeDRM didn't find a Kindle for Mac key.

So that will be success if I use a PC to decrypt the book by now in your way?

ArthurJay commented 4 years ago

I use version 1.20 Kindle for PC,the format is not compatible. Also could't download from website.

ElleKayEm commented 4 years ago

In order to work on Kindle for PC, it should be a version later than 1.17 and before 1.25. No modification to the renderer-test file. If you cannot download it that way, then it may only be available with a newer version of the KFX DRM which DeDRM cannot handle yet.