apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.52k stars 1.51k forks source link

Cannot deDRM my downloaded kindle books (on Calibre with deDRM plugin) #263

Closed ebara527 closed 7 years ago

ebara527 commented 7 years ago

Caliber debug log for attempting to upload and convert two books below:

calibre Debug log calibre 2.83 embedded-python: True is64bit: True Darwin-16.5.0-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '16.5.0', 'Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64') Python 2.7.11 OSX: ('10.12.4', ('', '', ''), 'x86_64') Successfully initialized third party plugins: DeDRM (6, 5, 3) devicePixelRatio: 1.0 logicalDpi: 72.0 x 72.0 physicalDpi: 114.000001712 x 114.000001712 Starting up... Started up in 2.84 seconds with 0 books DeDRM v6.5.3: Trying to decrypt B00BAXFECK_EBOK.azw Using Library AlfCrypto DLL/DYLIB/SO MobiDeDrm v0.41. Copyright © 2008-2012 The Dark Reverser et al. MOBI header version 8, header length 264 Extra Data Flags: 3 Decrypting Kindle Format 8 ebook: The Goldfinch: A Novel (Pulitzer Prize for Fiction) Found 0 keys to try after 0.1 seconds Crypto Type is: 2 DeDRM v6.5.3: Failed to decrypt with error: No key found in 0 keys tried. DeDRM v6.5.3: Looking for new default Kindle Key after 0.1 seconds Found k4Mac kinf2011 file: /Users/dimitrybaranov/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2011 Decrypted key file using IDString '6d8fb1c7f7a2' and UserName 'dimitrybaranov' DeDRM v6.5.3: Found 1 new key MobiDeDrm v0.41. Copyright © 2008-2012 The Dark Reverser et al. MOBI header version 8, header length 264 Extra Data Flags: 3 Decrypting Kindle Format 8 ebook: The Goldfinch: A Novel (Pulitzer Prize for Fiction) Found 4 keys to try after 0.6 seconds Crypto Type is: 2 DeDRM v6.5.3: Ultimately failed to decrypt after 0.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 170, in _run_filetype_plugins File "calibre_plugins.dedrm.init", line 610, in run File "calibre_plugins.dedrm.init", line 560, in KindleMobiDecrypt DeDRMError: DeDRM v6.5.3: Ultimately failed to decrypt after 0.6 seconds 2017-04-23 15:27:58.143 Calibre[8028:44690] deliverNotificationWithTitle()

Added The Silver Linings Playbook: A Novel to db in: 0.1 Added 1 books in 1.1 seconds 2017-04-23 15:28:36.843 Calibre[8038:45017] deliverNotificationWithTitle()

Added Little Bee: A Novel to db in: 0.1 Added 1 books in 1.0 seconds 2017-04-23 15:29:12.244 Calibre[8045:45213] deliverNotificationWithTitle()

ebara527 commented 7 years ago

I also attempted to deDRM a book with the separate DRM application for Mac rather than through calibre and this also did not work. Below is the script:

There is 1 ebook to be decrypted. Processing file: B003TU29WU_EBOK.azw shellcommand: /usr/bin/python '/Applications/DeDRM.app/Contents/Resources/k4mobidedrm.py' '/Users/dimitrybaranov/Documents/My Kindle Content/B003TU29WU_EBOK.azw' '/Users/dimitrybaranov/deDRM books/' > '/Users/dimitrybaranov/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log' shellresult: Using Library AlfCrypto DLL/DYLIB/SO K4MobiDeDrm v5.4. Copyright © 2008-2013 The Dark Reverser et al. MobiDeDrm v0.41. Copyright © 2008-2012 The Dark Reverser et al. MOBI header version 8, header length 256 Extra Data Flags: 3 Decrypting Kindle Format 8 ebook: Buddha's Brain: The Practical Neuroscience of Happiness, Love, and Wisdom Found 0 keys to try after 0.0 seconds Crypto Type is: 2 Error decrypting book after 0.0 seconds: No key found in 0 keys tried. Traceback (most recent call last): File "/Applications/DeDRM.app/Contents/Resources/k4mobidedrm.py", line 254, in decryptBook book = GetDecryptedBook(infile, kDatabases, androidFiles, serials, pids, starttime) File "/Applications/DeDRM.app/Contents/Resources/k4mobidedrm.py", line 228, in GetDecryptedBook mb.processBook(totalpids) File "/Applications/DeDRM.app/Contents/Resources/mobidedrm.py", line 471, in processBook raise DrmException(u"No key found in {0:d} keys tried.".format(len(goodpids))) DrmException: No key found in 0 keys tried. shellcommand: /usr/bin/python '/Applications/DeDRM.app/Contents/Resources/kindlekey.py' '/Users/dimitrybaranov/Library/Preferences/com.apprenticealf.dedrm/newKeys/' > '/Users/dimitrybaranov/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log' shellresult: kindlekey.py v2.2 Copyright © 2010-2016 by some_updates, Apprentice Alf and Apprentice Harper Found k4Mac kinf2011 file: /Users/dimitrybaranov/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2011 Decrypted key file using IDString '6d8fb1c7f7a2' and UserName 'dimitrybaranov' Saved a key to /Users/dimitrybaranov/Library/Preferences/com.apprenticealf.dedrm/newKeys/kindlekey1.k4i

shellcommand: /usr/bin/python '/Applications/DeDRM.app/Contents/Resources/k4mobidedrm.py' -k '/Users/dimitrybaranov/Library/Preferences/com.apprenticealf.dedrm/KindleKey 24.der' '/Users/dimitrybaranov/Documents/My Kindle Content/B003TU29WU_EBOK.azw' '/Users/dimitrybaranov/deDRM books/' > '/Users/dimitrybaranov/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log' shellresult: Using Library AlfCrypto DLL/DYLIB/SO K4MobiDeDrm v5.4. Copyright © 2008-2013 The Dark Reverser et al. MobiDeDrm v0.41. Copyright © 2008-2012 The Dark Reverser et al. MOBI header version 8, header length 256 Extra Data Flags: 3 Decrypting Kindle Format 8 ebook: Buddha's Brain: The Practical Neuroscience of Happiness, Love, and Wisdom Found 4 keys to try after 0.0 seconds Crypto Type is: 2 Error decrypting book after 0.0 seconds: No key found in 4 keys tried. Traceback (most recent call last): File "/Applications/DeDRM.app/Contents/Resources/k4mobidedrm.py", line 254, in decryptBook book = GetDecryptedBook(infile, kDatabases, androidFiles, serials, pids, starttime) File "/Applications/DeDRM.app/Contents/Resources/k4mobidedrm.py", line 228, in GetDecryptedBook mb.processBook(totalpids) File "/Applications/DeDRM.app/Contents/Resources/mobidedrm.py", line 471, in processBook raise DrmException(u"No key found in {0:d} keys tried.".format(len(goodpids))) DrmException: No key found in 4 keys tried. There was an error with 1 ebook: B003TU29WU_EBOK.azw couldn't be decrypted.

ebara527 commented 7 years ago

UPDATE: I was actually able to fix this via an elaborate process. Essentially what I was trying to do in the first place was download my books from my one amazon account and convert them to de-dmr files so that when I delete that amazon account I won't lose all my books. (I have two amazon accounts and want to consolidate). So I initially downloaded the amazon books and saved them in a folder and de-registered my Kindle Mac Reader from the one account with books. Then I tried to use both calibre with plug-in and the de-drm program by themselves in order to convert the .azw files, which did not work as I stated above.

After reading the apprentice harper deDRM FAQs again, I decided to try re-registering to the one account with books on the Kindle Mac Reader because after having de-registered, my Kindle Mac Reader would not read the files. Then, while still registered, I found the Kindle Content folder and converted all the files to deDRM files using the deDRM program. Finally, I opened calibre and downloaded each deDRM'ed book file and converted all to epub and saved all to disc (harddrive).

Then, after all that I de-registered my Kindle Mac Reader from the account. I cannot directly open the epub files on Kindle Mac Reader, but I can open them on iBook and I'm assuming I can send them to myself through the calibre app.

ElleKayEm commented 7 years ago

Yes, the tools use the key tied to your account and app/device. So if you're not signed into Kindle for Mac, then they can't retrieve the correct key.

ElleKayEm commented 7 years ago

If you don't have any more questions, you can close this issue.

apprenticeharper commented 7 years ago

I'd think it was worth asking Amazon to consolidate the two accounts. But at least you have your ebooks De-DRMed now.

bandtank commented 7 years ago

@ElleKayEm where do you get the key? I'm signed in, but it's still not working.

ElleKayEm commented 7 years ago

If the book is from Kindle for PC/Mac (on the same machine and user), then the tools retrieve the key. If the book is from/for an E-ink Kindle (not a Fire), then you need to enter its serial number into DeDRM's configuration.

bandtank commented 7 years ago

That doesn't appear to be working or my book can't be processed by the DeDRM tools. I updated calibre to 3.4.0 and installed this plugin, but it keeps failing to strip the DRM. This is for Kindle on Windows 10.

ElleKayEm commented 7 years ago

Start your own issue, and post a log.