DRM Removal Tools for eBooks

Version 6.5.5 released on 20 October, 2017

Welcome to Apprentice Alf’s blog

This blog is intended to help anyone looking for free and simple software for removing DRM from their Kindle ebooks, stripping DRM from their Adobe Digital Editions ebooks, getting rid of DRM from their Barnes and Noble ebooks, freeing their Kobo ebooks of DRM, or decrypting their Fictionwise eReader ebooks.

If you want to find out more about ebooks, DRM and why you will probably want to remove the DRM from your ebooks, see this post:  Ebook Formats, DRM and You — A Guide for the Perplexed.

If you already know that you want to strip the DRM from your ebooks, you’ve found the right place.

The Tools

To get started on removing DRM from your ebooks, just download the tools archive from the link below. Unzip the archive, and start reading.

The latest release can be found at the top of this page:
https://github.com/apprenticeharper/DeDRM_tools/releases

Getting Help with the Tools

If you have any questions about the tools, ebooks, and DRM, check the FAQs at the GitHub repository:
https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md

If you have any problems with the current tools, please ask for help in a comment on this post or open a new issue at the GitHub repository. If you are having a problem with an older version of the tools, please first update to the current version, and see if that solves your problem.

Before commenting here, please check the ReadMe file and the FAQs (see link above).

In any bug report or help request, please include:

  • which tool was used
  • which OS you are using
  • where the ebook file came from (device or application)
  • any error messages
  • a log of the DRM-removal attempt (see the FAQs on how to get a log).

Anti-Piracy Notice

Please only use these tools for gaining full access to your own ebooks for archiving/conversion/convenience. De-drmed ebooks should not be uploaded to open servers, torrents, or other methods of mass distribution. No help will be given to people doing such things. Authors, retailers and publishers all need to make a living, so that they can continue to produce books for us to read. Don’t be a parasite.

Origin of the Tools

The tools for removing DRM from ePubs were originally posted at i♥cabbages’ blog. The tools for Kindle/Mobipocket were originally posted at The Dark Reverser’s blog.

They have since been improved by many people, but mostly some_updates, DiapDealer, Apprentice Alf, and Apprentice Harper. While there are many sites that redistribute these tools, the most up-to-date versions of the tools are currently released here.

Other Sources

Anyone trying to sell you ebook DRM removal tools for Adobe Adept ePub and PDFs, Barnes & Noble ePubs, Kindle ebooks, Kobo ebooks, or eReader ebooks has probably just repackaged (an earlier) version of the tools available here.

Advertisements

3,961 thoughts on “DRM Removal Tools for eBooks

  1. Here is how to decrypt the new KFX file format:

    Step 1: Download purchased books from Amazon website

    Enter Amazon website, log in it with your Amazon account. Then hover over the “Your Account” drop-down menu, select “Manage Your Content and Devices”, you can see all your Kindle content here. Just find the KFX books you have downloaded via Kindle device, then tap the button under “Actions”, click “Download & transfer via USB”.

    Then a window will pop up. Select the Kindle to which you want to transfer the book. Then click “Download” button to download the book to your computer.

    These downloaded files will be saved as AZW or AZW3 files..

    Step 2: Decrypt the AZW or AXW3 file with Calibre and the De-DRM plugin.

      • You can only download for transfer via USB to Kindle hardware. And it’s only useful for DRM removal purposes if that hardware is an E-Ink Kindle.

        For Kindle for Mac/PC, just install Kindle for Mac/PC 1.17 instead of 1.19, See the FAQs at the repository for download links for 1.17.

        • Thanks, Paul, for the clarification. I already have K4M 1.17 with auto update turned OFF; just wanted to know if this work-around might help in the future. Hmm, perhaps I should pick up a cheap E-Ink Kindle to have on hand “just in case”.

          • Thanks for the clue Laura. Just installed the downgraded one and found the box to disable updates.

            As noted, I also downloaded the latest load of tools. I’ve done this installation numerous times over the years and several machines. This time it did not work. I got the following message:

            calibre, version 2.58.0 ERROR: Unhandled exception: InvalidPlugin:The plugin in u’E:\Holding tank\Calibre_Plugins\DeDRM_tools_6.5.3.zip’ is invalid. It does not contain a top-level init.py file


            calibre 2.58 embedded-python: True is64bit: False Windows-8-6.2.9200 Windows (’32bit’, ‘WindowsPE’) 32bit process running on 64bit windows (‘Windows’, ‘8’, ‘6.2.9200’) Python 2.7.9 Windows: (‘8’, ‘6.2.9200’, ”, ‘Multiprocessor Free’) Successfully initialized third party plugins: DeDRM Traceback (most recent call last): File “site-packages\calibre\gui2\preferences\plugins.py”, line 316, in add_plugin File “site-packages\calibre\customize\ui.py”, line 415, in add_plugin File “site-packages\calibre\customize\ui.py”, line 55, in load_plugin File “site-packages\calibre\customize\zipplugin.py”, line 188, in load File “site-packages\calibre\customize\zipplugin.py”, line 286, in _locate_code InvalidPlugin: The plugin in u’E:\Holding tank\Calibre_Plugins\DeDRM_tools_6.5.3.zip’ is invalid. It does not contain a top-level init.py file ________

            I see a file, init.py, in the Calibre plugins folder. ???

            For now I think the tools are intact. I did not remove them from Calibre.

            Thanks for any information about this additional challenge.

            • Well shucks! Version 1.17 worked when I first installed it. As noted, the first thing I did was open Options and uncheck auto-updates, then saved the setting. I downloaded the book I wanted, then closed Kindle. When I opened it again, IT UPGRADED ITSELF WITHOUT ASKING! So I uninstalled and did it again. Same thing. Auto-update!

              Are others having this problem?

          • Right now you still get the older file formats from the website even for devices that receive KFX when the book is downloaded directly to the device. So you might think about looking for a 1st generation Paperwhite or earlier. Those haven’t been updated to support KFX, and it’s probably safe to assume they won’t be or can’t be. Then you can also decrypt books downloaded to the device itself too.

    • I found out about this tonight. The Calibre plugin works to strip the DRM from this format but the drag and drop De-DRM for Windows does not. Is there a plan to update the De-DRM for Windows? (I prefer to drag and drop because of the way I store my files.) Thx so much for your excellent work!

      • Actually, I’ve just seen the answer to the previous poster and I’ve downloaded the earlier version of Kindle for PC and that seems to have fixed the problem so the drag and drop De-DRM tool works again.

  2. I had a rude shock today. I downloaded a Kindle book and the AZW file was bundled inside a folder, B01E4AMR5W_EBOK. Besides an *_EBOK.azw file of 1,775, the folder contents include a voucher file, _EBOK.mbpV2, 1 KB, _EBOK.phl, 1 KB, azw.md, 2.941, and SIX azw.res files ranging from 1,234 to 3059 KB each. Calibre does not recognize that main azw file. I just downloaded the latest tools, but if Calibre doesn’t recognize the file, they are not likely to help. BTW, I’m using Windows 10 Pro, 64 bit, all up to date, and I just reinstalled Kindle with the DESKTOP app. Any info on this new format? The book was published by Simon & Schuster, for whatever that may be worth. Thanks for all your help!

  3. Thanks for the tip, Laura – but I tried that (I uninstalled 1,19 and reinstalled 1.17) and it’s still putting books in folders – the folder has a file with an .azw extension as in Sharon’s example, but the deDRM wouldn’t recognise it. I get an error saying:

    File “site-packages\calibre\ebooks\mobi\reader\mobi6.py”, line 79, in init
    calibre.ebooks.mobi.reader.mobi6.KFXError: This is an Amazon KFX book. It cannot be processed.

    • It may be that it auto-updated before you could stop it. Delete and re-install, and immediately go to preferences/updates and uncheck the ‘Automatically install updates’ checkbox.

      • Sometimes when I have an application that wants to auto-update immediately, I do this: Immediately after the download finishes, I turn off WiFi on the computer. I then install the app and set auto-update preference to either “Off” or “Manual”. I the turn the WiFi back on and go about my business.

        • One more gotcha. Make sure the installer for Kindle for PC 1.19 is not on the PC. I had the installer for 1.19 and 1.17 on the machine and even though I turned off updates in 1.17 after installing it, once when I started Kindle for PC it found the installer for 1.19 and installed it.

        • Thank you Romad! This suggestion worked, with a little finagling. I turned off WiFi before installing. Kindle kept nagging me to register before I could access options. They were grayed out. I finally did turn it on and managed to get to options before the Register window reappeared. I went back to options and opened the registration. Shortly after I got that security code entered on the fourth try, I got a message that an update is available. They asked. I said forget it. Looks like that bullet is dodged.

          I will definitely squirrel three or four copies of that installer around so I always have one should the need arise.

    • Might also be possible to uncheck auto-update in 1.19 before uninstalling it and then reinstall 1.17. Previous settings should be saved.

      Or what romad suggested is probably your best bet.

      • I did what romad and Laura suggested. It worked perfect. I did turn off auto updates option on Kindle 1.19 on my pc prior to uninstalling. I also turned off the wifi prior to installing the 1.17 and checked to make sure that auto updates option was turned off.

  4. Now, I have a debug log for a book that the DRM tools did not work on. I notice the log includes the name of the book. Will the log help debuggers if I change the book name. I do not want to post that for obvious reasons!

  5. FYI, the tool stopped working for me. When I checked, all books downloaded after the last update (1.19.2, I believe) failed. When I reverted to 1.17, deleted and re-downloaded the books, it worked again.

  6. Thanks for the suggestions – however, I don’t think it’s auto-updating, so that’s not the issue (when I go to About|Kindle it says I’m on version 1.17.1 (44183)).

  7. Using DeDRM Tools 6.5.3 plugin for Calibre 2.78.0 and adding ebook ‘Before The Fall.azw3’ got the following results:

    C:\Program Files (x86)\Calibre2)calibre—debug —g
    calibre 2.78 embedded—python: True is64bit: False
    Windows—8—6.2.9200 Windows (’32bit’, ‘WindowsPE’)
    32bit process running on 64bit windows
    (’Windows’, ‘8’, ’6.2.9200’)
    Python 2.7.9
    Windows: (‘8’, ‘6.2.9200’, “, ’Multiprocessor Free’)
    Successfully initialized third party plugins: DeDRM (6, 5, 3)
    devicePixelRatio: 1.0
    logicalDpi: 96.0 x 96.0
    physicalDpi: 100.861627907 x 101.07357513
    Starting up…
    Started up in 5.40 seconds with 1 books
    stdout+stderr from file dialog helper: [”, “]
    piped data from file dialog helper: [‘$\xcd\xe81\xec\xb4—\xf7\xbb\xb8\\xfep\xc3
    \xa4)X\n\xcdu)#\x97\x12@\x14\x07M\xce\xdal\xd1’, ‘\\JAN—PC\Users\Jan\Downloads\KINDLE\Downloads\Before the Fall.azw3’]
    DeDRM v6.5.3: Trying to decrypt Before the Fall.azw3
    Using Library AlfCrypto DLL/DYLIB/S0
    MobiDeDrm v0.41.
    Copyright xx 2008-2012 The Dark Reverser et al.
    MOBI header version 8, header length 264
    Extra Data Flags: 3
    Decrypting Kindle Format 8 ebook: Before the Fall
    Found 3 keys to try after 1.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 1.1 seconds
    Searching for kinfoFiles in C:\Users\kahuna\AppData\Local
    Found K4PC 1.9+ kinf2011 file: C:\Users\kahuna\AppData\Local\Amazon\Kindle\storage.kinf2011
    Decrypted key file using IDString ‘572267800’ and UserName ‘6b6168756e61’
    DeDRM v6.5.3: Found 1 new key
    MobiDeDrm v0.41.
    Copyright xx 2008-2012 The Dark Reverser et al.
    MOBI header version 8, header length 264
    Extra Data Flags: 3
    Decrypting Kindle Format 8 ebook: Before the Fall
    Found 4 keys to try after 1.8 seconds
    Crypto Type is: 2
    DeDrm v6.5.3: Ultimately failed to decrypt after 1.8 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 168, 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 1.8 seconds
    Added Before the Fall to db in: 2.8
    Added 1 books in 6.4 seconds
    Worker Launch took: 0.365999937057

    Is the problem in the azw3 file or in the method used to acquire it?
    Thank you for any help you can provide. I am a high tech person when it comes to computers but a real dummy when it comes to ebooks..

  8. A log from me having issues with DRM:

    calibre Fejlsøgningslog
    calibre 2.79 [64bit] embedded-python: True is64bit: True
    Windows-8-6.2.9200 Windows (’64bit’, ‘WindowsPE’)
    (‘Windows’, ‘8’, ‘6.2.9200’)
    Python 2.7.9
    Windows: (‘8’, ‘6.2.9200’, ”, ‘Multiprocessor Free’)
    Successfully initialized third party plugins: DeDRM (6, 5, 3)
    devicePixelRatio: 1.0
    logicalDpi: 120.0 x 120.0
    physicalDpi: 141.76744186 x 141.402061856
    Starting up…
    Started up in 6.46 seconds with 0 books
    stdout+stderr from file dialog helper: [”, ”]
    piped data from file dialog helper: [“\xa2\xfcGM\xf51T\xe8\e\xd5\xf4E\xb8/\xd5L\x9a\xecB\xf2\xa7\xc8\xc2\xc9\xddN\x94’\xe4k\xf4”, ‘C:\Users\mesjps\Downloads\Barkskins-A-Novel.azw3’]
    DeDRM v6.5.3: Trying to decrypt Barkskins-A-Novel.azw3
    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: Barkskins: A Novel
    Found 0 keys to try after 0.2 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.2 seconds
    searching for kinfoFiles in C:\Users\mesjps\AppData\Local
    No K4PC kindle.info/kinf/kinf2011 files have been found.
    DeDRM v6.5.3: Ultimately failed to decrypt after 0.2 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.2 seconds
    Added Barkskins: A Novel to db in: 0.4
    Added 1 books in 2.6 seconds
    Worker Launch took: 0.405999898911

      • Used KindleForPC-installer-1.13.42052.exe. Using Calibre v2.79 and DeDRM_tools_6.5.3 and entering Kindle serial number in Calibre Preferences/Plugins/Configuration for E-Ink Kindle still unable to read any DRM’ed ebooks. Any suggestions? 😦

        • Use Kindle for PC 1.17. I didn’t think anything earlier than 1.14 worked at all now.

          However, your simplest solution is to enter your Kindle’s serial number in the preferences, and download from the amazon web site ‘for transfer via USB’ to that Kindle, and import that downloaded file.

          If it doesn’t work, double-check the Kindle serial number.

          If it still doesn’t work, post the import log of it not working.

  9. Using Kindle for PC in PlayOnLinux, and upgraded tools DeDRM6.5.3 plugin for Calibre 2.79, now getting this result:
    calibre Debug log
    calibre 2.79 embedded-python: True is64bit: False
    Linux-4.8.0-37-generic-i686-athlon-with-debian-stretch-sid Linux (’32bit’, ‘ELF’)
    (‘Linux’, ‘4.8.0-37-generic’, ‘#39-Ubuntu SMP Thu Jan 26 02:25:32 UTC 2017’)
    Python 2.7.9
    Linux: (‘debian’, ‘stretch/sid’, ”)
    Successfully initialized third party plugins: DeDRM (6, 5, 3) && EpubMerge (2, 1, 0) && Webscription (1, 1, 0) && Modify ePub (1, 3, 13) && Quality Check (1, 9, 11) && Fantastic Fiction (1, 1, 6) && Goodreads (1, 1, 12) && Fantastic Fiction Adults (1, 0, 4) && Goodreads Sync (1, 10, 1) && Obok DeDRM (6, 3, 6) && FanFicFare (2, 8, 0)
    devicePixelRatio: 1.0
    logicalDpi: 96.0 x 96.0
    physicalDpi: 89.6470588235 x 89.6470588235
    Starting up…
    DEBUG: 0.0 obok::utilities.py – loading translations
    DEBUG: 0.0 obok::dialogs.py – loading translations
    DEBUG: 0.0 obok::config.py – loading translations
    DEBUG: 0.1 obok::action_err.py – loading translations
    Failed to load recipe from: u’Unknown News Source_1000.recipe’
    Traceback (most recent call last):
    File “site-packages/calibre/web/feeds/recipes/collection.py”, line 115, in get_custom_recipe_collection
    IOError: [Errno 2] No such file or directory: u’/home/brashley46/.config/calibre/custom_recipes/Unknown News Source_1000.recipe’
    EpubMerge: DEBUG: 2017-02-11 00:21:25,199: calibre_plugins.epubmerge.epubmerge_plugin(152): macmenuhack file_path:/home/brashley46/.config/calibre/plugins/fanficfare_macmenuhack.txt
    DEBUG: 0.0 HttpHelper::init: proxy=None
    FFF: DEBUG: 2017-02-11 00:21:25,265: calibre_plugins.fanficfare_plugin.fff_plugin(207): Plugin FanFicFare macmenuhack file_path:/home/brashley46/.config/calibre/plugins/fanficfare_macmenuhack.txt
    Started up in 16.29 seconds with 4297 books
    DeDRM v6.5.3: Trying to decrypt B01ICCQITE_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: How to Fool All of the People, All of the Time (Singles Classic)
    Found 16 keys to try after 0.1 seconds
    Crypto Type is: 2
    DeDRM v6.5.3: Failed to decrypt with error: No key found in 16 keys tried.
    DeDRM v6.5.3: Looking for new default Kindle Key after 0.1 seconds
    DeDRM v6.5.3: Running kindlekey.py under Wine
    DeDRM v6.5.3: Command line: ‘WINEPREFIX=”/home/brashley46/.PlayOnLinux/wineprefix/amazonkindle” wine python.exe “/home/brashley46/.config/calibre/plugins/DeDRM/libraryfiles/kindlekey.py” “/home/brashley46/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir”‘
    wine client error:0: version mismatch 460/490.
    Your wineserver binary was not upgraded correctly,
    or you have an older one somewhere in your PATH.
    Or maybe the wrong wineserver is still running?
    DeDRM v6.5.3: Found and decrypted 0 key files
    DeDRM v6.5.3: 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 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.1 seconds
    Added How to Fool All of the People, All of the Time (Singles Classic) to db in: 2.1
    Added 1 books in 3.1 seconds

    I’ve run into this with previous versions, but have forgotten what to do.

  10. Using Kindle for PC in Windows 10 / DeDRM6.5.3 plugin / Calibre 2.79
    (I’m on Windows 10, it says Windows 10 in System Information, but I don’t know why it’s showing up as Windows 8 in Calibre.)

    calibre Debug log
    calibre 2.79.1 [64bit] embedded-python: True is64bit: True
    Windows-8-6.2.9200 Windows (’64bit’, ‘WindowsPE’)
    (‘Windows’, ‘8’, ‘6.2.9200’)
    Python 2.7.9
    Windows: (‘8’, ‘6.2.9200’, ”, ‘Multiprocessor Free’)
    Successfully initialized third party plugins: DeDRM (6, 5, 3)
    devicePixelRatio: 1.0
    logicalDpi: 96.0 x 96.0
    physicalDpi: 99.5265306122 x 94.5931034483
    Starting up…
    Started up in 4.78 seconds with 1896 books
    DeDRM v6.5.3: Trying to decrypt B010913GO6_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: Depths
    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
    searching for kinfoFiles in C:\Users\user\AppData\Local
    Found K4PC 1.9+ kinf2011 file: C:\Users\user\AppData\Local\Amazon\Kindle\storage.kinf2011
    Decrypted key file using IDString ‘1445236950’ and UserName ‘56616c65726965200520fa’
    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: Depths
    Found 4 keys to try after 0.1 seconds
    Crypto Type is: 2
    DeDRM v6.5.3: 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 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.1 seconds
    C:\Program Files\Calibre2\pylib.zip\dateutil\parser.py:339: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode – interpreting them as being unequal
    Added Depths to db in: 1.5
    Added 1 books in 2.2 seconds

  11. Hi,
    I was having the same problem de-drm’ing the books I recently bought and d’loaded to my windows laptop, latest version windows/64bit…very frustrating…thought I screwed something up…
    Re-d’loaded and installed the latest calibre de-drm plugin…no help.
    Then I came here and read the comments…ah…check Kindle version…yup 1.19…removed and d’loaded/installed 1.17…d’loaded the latest books I purchased…started Calibre and imported…ahhhh there they are…converted to epub…all back to the normal working condition.

    Also made sure to save the copy of Kindle 1.17.
    Thanks to all for the info…

  12. First, I want to thank you for creating this plugin, and everyone who commented for all the helpful info. I’m a bit lost. I want to change my Amazon bought books to Epub, so I downloaded and installed your DeDRM plugin (note to anyone else, if you try to ‘extract’ the file via windows file manager, it will remove whatever critical file needed by Calibre and it will not install. I downloaded winrar for the extraction and it then installed fine).

    I see the book in Calibre 2.79.1 when I used the Add Books button on the downloaded book file. Its an azw3 file format. I then tried to open it in Calibre, but got the DRM warning. So I removed the book, then tried to add it in again after shutting down Calibre to make sure the plugin was active. The plugin shows in my Calibre Plugins as DeDRM (6.5.3).

    No matter how many times I remove the book and then Add Book in Calibre, I can’t get it to open/convert without the DRM warning. So I thought maybe there’s a different file I was supposed to download. I then downloaded Kindle for PC from the above link, ver. 1.17.1, and made sure the auto update button was unchecked. When I close and reopen the app, it’s still saying 1.17.1. I went on the Amazon site, and tried to download as USB for the Kindle to PC and It won’t let me, only offers my kindle (I have a Fire HDX) as an available “download for USB” device. I am able to ‘deliver’ it to either device, but ‘download to USB’ is only available for the Kindle.

    I can’t figure out how to add the book to Calibre so the DRM removal works? Is it just the Add Books or a different button or setting? I tried the “Control the adding of books” by checking everything and automatically converting to Epub. Adding the book after that continues to give me a ‘cannot convert the book, the book is locked by DRM” message. It still adds it as a AZW3 file, that can’t be opened (with another DRM message).

    Am I supposed to do something with the Kindle to PC? The Kindle to PC will open the book from the AWZ3 file I downloaded also. Any help would be appreciated, I’m really stumped.

    • Use Kindle for PC to download the book. Since you don’t have an E-Ink based Kindle, downloading the from the Amazon web site won’t work. Books downloaded using Kindle for PC are store in a folder, “My Kindle Content” in your Documents folder.

      • It may have been my malwarebytes or my Windows Firewall, I shouldn’t have blamed the extract tool, it could be a setting on my system. The winrar worked, but I may have done something wrong too.

  13. Thank you so much Paul Durrant! That made it clear, I had no idea why I needed the Kindle for PC before. I just wanted to be able to add the book back in to Calibre Companion via Calibre so I could sort the books I buy with my other books instead of searching for them. Thank you all!

    • I’m able to add books in Calibre and convert to Epub using my old Kindle Paperwhite but not my Fire HD. I have one of the earliest versions of Paperwhite though. I’m not sure if that makes a difference or not. Also, no problems using Kindle for PC 1.17.1. I hope Amazon doesn’t rock that boat for a while. I don’t really like the Kindle after discovering the Marvin app for my Ipad. To my knowledge Marvin doesn’t open Kindle Files so I convert to Epub. To me it’s worth the effort.

  14. I’m getting a conversion failure using the Calibre plugin 6.5.3, 1/12/2017. Windows 10 PC. A half dozen Kindle books purchased and then downloaded to the latest Kindle application for Windows. Here is the debug log:

    calibre Debug log
    calibre 2.77 [64bit] embedded-python: True is64bit: True
    Windows-8-6.2.9200 Windows (’64bit’, ‘WindowsPE’)
    (‘Windows’, ‘8’, ‘6.2.9200’)
    Python 2.7.9
    Windows: (‘8’, ‘6.2.9200’, ”, ‘Multiprocessor Free’)
    Successfully initialized third party plugins: DeDRM (6, 5, 3) && Kindle and Mobipocket DeDRM (0, 4, 5) && K4PC, K4Mac, Kindle Mobi and Topaz DeDRM (0, 3, 5) && Inept Epub DeDRM (0, 1, 7) && Ignoble Epub DeDRM (0, 1, 6) && KindleUnpack – The Plugin (0, 81, 2) && Manage Series (1, 2, 8) && Inept PDF DeDRM (0, 1, 5) && Reading List (1, 6, 6) && eReader PDB 2 PML (0, 0, 6) && APNX Generator (1, 1, 0) && Kobo Utilities (2, 5, 2)
    devicePixelRatio: 1.0
    logicalDpi: 120.0 x 120.0
    physicalDpi: 93.6046065259 x 93.6245733788
    Starting up…
    Traceback (most recent call last):
    File “site-packages\calibre\gui2\ui.py”, line 158, in init
    File “site-packages\calibre\gui2\ui.py”, line 172, in init_iaction
    File “site-packages\calibre\customize__init__.py”, line 611, in load_actual_plugin
    File “importlib__init__.py”, line 37, in import_module
    File “site-packages\calibre\customize\zipplugin.py”, line 183, in load_module
    File “calibre_plugins.apnx_generator.apnxaction”, line 14, in
    ImportError: No module named PyQt4.Qt
    DEBUG: 0.0 KoboUtilites::action.py – loading translations
    DEBUG: 0.0 KoboUtilites::dialogs.py – loading translations
    DEBUG: 0.0 KoboUtilites::action.py – loading translations
    INFO:cherrypy.error:[20/Feb/2017:18:09:30] ENGINE Bus STARTING
    INFO:cherrypy.error:[20/Feb/2017:18:09:30] ENGINE Started monitor thread ‘_TimeoutMonitor’.
    DEBUG: 1.9 No Kobo Touch, Glo or Mini appears to be connected
    DEBUG: 1.9 rebuild_menus – self.supports_ratings=None, self.supports_tiles=None
    DEBUG: 1.9 KoboUtilities:set_toolbar_button_tooltip – start: text=’None’
    DEBUG: 1.9 device_driver_name – could not load extended driver. Exception= No module named kobotouch_extended.device.driver
    DEBUG: 1.9 KoboUtilities:set_toolbar_button_tooltip – setting to text=’Utilities to use with Kobo ereaders

    Driver: KoboTouch’
    DEBUG: 1.9 device_driver_name – could not load extended driver. Exception= No module named kobotouch_extended.device.driver
    C:\Users\Rick\Documents\My Digital Editions is not a valid directory to watch for new ebooks, ignoring
    SMART_DEV ( 0.00: 0.001) _attach_to_port try ip address “” on port 9090
    INFO:cherrypy.error:[20/Feb/2017:18:09:30] ENGINE Serving on 0.0.0.0:8080
    SMART_DEV ( 0.93: 0.812) startup_on_demand listening on port 9090
    SMART_DEV ( 1.01: 0.002) _attach_to_port try ip address “” on port 54982
    SMART_DEV ( 1.05: 0.000) startup_on_demand broadcast socket listening on port 54982
    Started up in 3.64 seconds with 934 books
    INFO:cherrypy.error:[20/Feb/2017:18:09:32] ENGINE Bus STARTED
    SMART_DEV ( 2.10: 1.002) run All IP addresses {‘{34D4C249-B1B6-4DD5-BE8E-4D0644EE8C69}’: [{‘addr’: ‘169.254.4.132’}], ‘{A7AA8519-8F96-48BF-BA8E-309E517946CF}’: [{‘addr’: ‘169.254.34.144’}], ‘{648D3FFC-3DEC-44CB-93A7-382956B3046F}’: [{‘addr’: ‘169.254.103.10’}], ‘{44803047-82E7-4D15-A02A-0A0926DCEE31}’: [{‘netmask’: ‘255.255.255.0’, ‘broadcast’: ‘192.168.1.255’, ‘addr’: ‘192.168.1.82’}], ‘{485BDFAF-7FD8-11E6-950F-806E6F6E6963}’: [{‘netmask’: ‘255.0.0.0’, ‘broadcast’: ‘127.255.255.255’, ‘addr’: ‘127.0.0.1’}]}
    stdout+stderr from file dialog helper: [”, ”]
    piped data from file dialog helper: [‘\xef\x9cb\x9d\x01.2\n\x96\xff\xdd\x87\x08\xd0bf\x86\x9a\x1d{H\xdc\xecuP\xb0\x8ahV\xce\xd1\x95’, ‘E:\Data\Documents\My Kindle Content\B00GKNFZMO_EBOK\B00GKNFZMO_EBOK.azw’]
    DeDRM v6.5.3: Trying to decrypt B00GKNFZMO_EBOK.azw
    Using Library AlfCrypto DLL/DYLIB/SO
    DeDRM v6.5.3: Failed to decrypt with error: KFX format detected. This format cannot be decrypted yet.
    DeDRM v6.5.3: Looking for new default Kindle Key after 0.0 seconds
    searching for kinfoFiles in C:\Users\Rick\AppData\Local
    Found K4PC 1.9+ kinf2011 file: C:\Users\Rick\AppData\Local\Amazon\Kindle\storage.kinf2011
    Decrypted key file using IDString ‘2087790558’ and UserName ‘5269636b’
    DeDRM v6.5.3: Found 1 new key
    DeDRM v6.5.3: 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 168, 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.1 seconds
    Running file type plugin Kindle and Mobipocket DeDRM failed with traceback:
    Traceback (most recent call last):
    File “site-packages\calibre\customize\ui.py”, line 168, in _run_filetype_plugins
    File “calibre_plugins.k4mobidedrm.init“, line 68, in run
    File “calibre_plugins.k4mobidedrm.init“, line 239, in config
    File “site-packages\calibre\customize\zipplugin.py”, line 183, in load_module
    File “calibre_plugins.k4mobidedrm.config”, line 1, in
    ImportError: No module named PyQt4.Qt
    is not a valid Kindle serial number or PID.
    K4MobiDeDRM: Calibre configuration directory = C:\Users\Rick\AppData\Roaming\calibre
    Running file type plugin K4PC, K4Mac, Kindle Mobi and Topaz DeDRM failed with traceback:
    Traceback (most recent call last):
    File “site-packages\calibre\customize\ui.py”, line 168, in _run_filetype_plugins
    File “calibre_plugins.k4mobidedrm.init“, line 75, in run
    File “calibre_plugins.k4mobidedrm.mobidedrm”, line 170, in init
    DrmException: invalid file format
    Traceback (most recent call last):
    File “site-packages\calibre\customize\ui.py”, line 419, in get_file_type_metadata
    File “site-packages\calibre\customize\builtins.py”, line 283, in get_metadata
    File “site-packages\calibre\ebooks\metadata\mobi.py”, line 494, in get_metadata
    File “site-packages\calibre\ebooks\mobi\reader\headers.py”, line 276, in init
    File “site-packages\calibre\ebooks\mobi\reader\headers.py”, line 304, in identity
    MobiError: Unknown book type: ÄÞ|Œ”
    Added B00GKNFZMO EBOK to db in: 1.0
    Added 1 books in 2.0 seconds
    Worker Launch took: 0.112999916077

  15. I have a problem with the Mac application 6.5.3. on Sierra.

    When I select an epub (“foo.epub”) with DRM from Adobe Digital Editions and process it, nothing happens. The output folder stays empty.

    What is my mistake please?

    I copy the log:

    +++++++++++++++++++++
    There is 1 ebook to be decrypted.
    Processing file: foo.epub
    shellcommand: /usr/bin/python ‘/Applications/DeDRM.app/Contents/Resources/zipfix.py’ ‘/Users/****/Documents/Digital Editions/foo.epub’ ‘/Users/****/alfed/foo_fixed.epub’ > ‘/Users/****/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
    shellresult: sh: /Users/****/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log: No such file or directory
    There was an error with 1 ebook:
    foo.epub had a problem with ZipFix:
    sh: /Users/****/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log: No such file or directory
    +++++++++++++++++++++

    Thanks for your help.

    • It looks like there’s a bug in the application, although it works fine for me.

      Is there a folder on your system /Users/****/Library/Preferences/com.apprenticealf.dedrm/ ?

      If not, create it and see if that fixes things.

  16. @Paul Durrant
    Thanks for your help.

    That folder did not exist.
    After I created it I processed a book again and it worked fine 🙂

  17. Hi,
    For some reason my copy of DeDRM for Mac isn’t working on the PDF files I’m most recently getting, but still working on the less recent protected files I have from the same service. I updated to the latest version of DeDrm for Mac but it didn’t help.

    I thought the issue might have to do with the fact that I was dealing with the new DRM protocol for Adobe Digital editions. But the plug-in forCalibre DOES work for the recent PDF files that my DeDRM for Mac is not accepting. Is there a way I could debug my DeDRM for Mac, and if not, why is the Calibre plug-in working for all the PDFs?

    Thanks,
    Brian

      • @Paul Durrant

        Hi, Paul, here is an example of a log of a recent PDF that failed to get DRM removed. Thanks!

        There is 1 ebook to be decrypted.
        Processing file: The Royal Game.pdf
        shellcommand: /usr/bin/python ‘/Applications/DeDRM.app/Contents/Resources/ineptpdf.py’ ‘/Users/BSalinger1/Library/Preferences/com.apprenticealf.dedrm/Local Adept Key.der’ ‘/Users/BSalinger1/Desktop/The Royal Game.pdf’ ‘/Users/BSalinger1/Desktop/The Royal Game_nodrm.pdf’ > ‘/Users/BSalinger1/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
        shellresult: Traceback (most recent call last):
        File “/Applications/DeDRM.app/Contents/Resources/ineptpdf.py”, line 2341, in
        sys.exit(cli_main())
        File “/Applications/DeDRM.app/Contents/Resources/ineptpdf.py”, line 2211, in cli_main
        result = decryptBook(userkey, inpath, outpath)
        File “/Applications/DeDRM.app/Contents/Resources/ineptpdf.py”, line 2186, in decryptBook
        serializer = PDFSerializer(inf, userkey)
        File “/Applications/DeDRM.app/Contents/Resources/ineptpdf.py”, line 1996, in init
        doc.initialize(userkey)
        File “/Applications/DeDRM.app/Contents/Resources/ineptpdf.py”, line 1481, in initialize
        return self.initialize_ebx(password, docid, param)
        File “/Applications/DeDRM.app/Contents/Resources/ineptpdf.py”, line 1613, in initialize_ebx
        raise ADEPTError(‘error decrypting book session key’)
        main.ADEPTError: error decrypting book session key
        There was an error with 1 ebook:
        The Royal Game.pdf couldn’t be decoded:
        Traceback (most recent call last):
        File “/Applications/DeDRM.app/Contents/Resources/ineptpdf.py”, line 2341, in
        sys.exit(cli_main())
        File “/Applications/DeDRM.app/Contents/Resources/ineptpdf.py”, line 2211, in cli_main
        result = decryptBook(userkey, inpath, outpath)
        File “/Applications/DeDRM.app/Contents/Resources/ineptpdf.py”, line 2186, in decryptBook
        serializer = PDFSerializer(inf, userkey)
        File “/Applications/DeDRM.app/Contents/Resources/ineptpdf.py”, line 1996, in init
        doc.initialize(userkey)
        File “/Applications/DeDRM.app/Contents/Resources/ineptpdf.py”, line 1481, in initialize
        return self.initialize_ebx(password, docid, param)
        File “/Applications/DeDRM.app/Contents/Resources/ineptpdf.py”, line 1613, in initialize_ebx
        raise ADEPTError(‘error decrypting book session key’)
        main.ADEPTError: error decrypting book session key

        • It looks like the wrong key. If your calibre plugin is working, that must have the right key. Go to the calibre plugin’s preferences and export the Adobe keys from the plugin and import them into the application’s preferences. See if that works.

  18. Dear all, is there any way that I can remove the DRM of the PDF Ownerguard License Manager? I have bought my ebooks but I could only view it on my laptop which is a hustle for me.

    I have tried converting the PDF into ePub on Calibre but failed. Not sure whether it would works on the Python.

  19. Hiya, sorry to be yet another bother, but I’m encountering an issue with decrypting rented etextbooks on Kindle for Mac. These are .azw files with identically named .mbp, .apmx, and .phl files alongside. The Calibre plugin fails to decrypt them, and the Mac app says it encounters an error. The logs say that ‘library or rented ebooks’ are not able to be encrypted; is this a current missing feature or a fundamentally unsolvable problem? I’m actually really intrigued in how rentals might throw a wrench in the decryption works.

    For what it’s worth, here’s one of the logs:

    There is 1 ebook to be decrypted.
    Processing file: B00FKUPHPI_EBOK.azw
    shellcommand: /usr/bin/python ‘/private/var/folders/fh/3kktp5vn2fxgd0tp3gxm8znh0000gp/T/AppTranslocation/94E6D778-CF08-479F-B3E0-432BA0034F93/d/DeDRM.app/Contents/Resources/k4mobidedrm.py’ -k ‘/Users/nichov/Library/Preferences/com.apprenticealf.dedrm/KindleKey 4.der’ ‘/Users/nichov/Library/Application Support/Kindle/My Kindle Content/B00FKUPHPI_EBOK.azw’ ‘/Users/nichov/Desktop/’ > ‘/Users/nichov/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 264
    Extra Data Flags: 3
    Decrypting Kindle Format 8 ebook: The Twentieth Century Performance Reader
    Found 4 keys to try after 0.0 seconds
    Crypto Type is: 2
    Error decrypting book after 0.0 seconds: Cannot decode library or rented ebooks.
    Traceback (most recent call last):
    File “/private/var/folders/fh/3kktp5vn2fxgd0tp3gxm8znh0000gp/T/AppTranslocation/94E6D778-CF08-479F-B3E0-432BA0034F93/d/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 254, in decryptBook
    book = GetDecryptedBook(infile, kDatabases, androidFiles, serials, pids, starttime)
    File “/private/var/folders/fh/3kktp5vn2fxgd0tp3gxm8znh0000gp/T/AppTranslocation/94E6D778-CF08-479F-B3E0-432BA0034F93/d/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 228, in GetDecryptedBook
    mb.processBook(totalpids)
    File “/private/var/folders/fh/3kktp5vn2fxgd0tp3gxm8znh0000gp/T/AppTranslocation/94E6D778-CF08-479F-B3E0-432BA0034F93/d/DeDRM.app/Contents/Resources/mobidedrm.py”, line 441, in processBook
    raise DrmException(u”Cannot decode library or rented ebooks.”)
    DrmException: Cannot decode library or rented ebooks.
    shellcommand: /usr/bin/python ‘/private/var/folders/fh/3kktp5vn2fxgd0tp3gxm8znh0000gp/T/AppTranslocation/94E6D778-CF08-479F-B3E0-432BA0034F93/d/DeDRM.app/Contents/Resources/kindlekey.py’ ‘/Users/nichov/Library/Preferences/com.apprenticealf.dedrm/newKeys/’ > ‘/Users/nichov/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/nichov/Library/Application Support/Kindle/storage/.kinf2011
    Decrypted key file using IDString ‘3da402de2b3a’ and UserName ‘nichov’
    Saved a key to /Users/nichov/Library/Preferences/com.apprenticealf.dedrm/newKeys/kindlekey1.k4i

    shellcommand: /usr/bin/python ‘/private/var/folders/fh/3kktp5vn2fxgd0tp3gxm8znh0000gp/T/AppTranslocation/94E6D778-CF08-479F-B3E0-432BA0034F93/d/DeDRM.app/Contents/Resources/k4mobidedrm.py’ -k ‘/Users/nichov/Library/Preferences/com.apprenticealf.dedrm/KindleKey 5.der’ ‘/Users/nichov/Library/Application Support/Kindle/My Kindle Content/B00FKUPHPI_EBOK.azw’ ‘/Users/nichov/Desktop/’ > ‘/Users/nichov/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 264
    Extra Data Flags: 3
    Decrypting Kindle Format 8 ebook: The Twentieth Century Performance Reader
    Found 4 keys to try after 0.0 seconds
    Crypto Type is: 2
    Error decrypting book after 0.0 seconds: Cannot decode library or rented ebooks.
    Traceback (most recent call last):
    File “/private/var/folders/fh/3kktp5vn2fxgd0tp3gxm8znh0000gp/T/AppTranslocation/94E6D778-CF08-479F-B3E0-432BA0034F93/d/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 254, in decryptBook
    book = GetDecryptedBook(infile, kDatabases, androidFiles, serials, pids, starttime)
    File “/private/var/folders/fh/3kktp5vn2fxgd0tp3gxm8znh0000gp/T/AppTranslocation/94E6D778-CF08-479F-B3E0-432BA0034F93/d/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 228, in GetDecryptedBook
    mb.processBook(totalpids)
    File “/private/var/folders/fh/3kktp5vn2fxgd0tp3gxm8znh0000gp/T/AppTranslocation/94E6D778-CF08-479F-B3E0-432BA0034F93/d/DeDRM.app/Contents/Resources/mobidedrm.py”, line 441, in processBook
    raise DrmException(u”Cannot decode library or rented ebooks.”)
    DrmException: Cannot decode library or rented ebooks.
    There was an error with 1 ebook:
    B00FKUPHPI_EBOK.azw couldn’t be decrypted.

    Thanks so much!

    • Haha, I’m an idiot. Just checked the FAQs, rented and library ebook decryption is not supported. I’d assume this is more of an ethical issue than any kind of impossible decryption scheme. If not, I’d be really interested in what makes rented ebooks difficult to decrypt. Sorry for wasting everyone’s time!

      • For me, it’s not so much ethical as it is simply practical. Abuse of ebook rental and lending services would encourage increased efforts to harden DRM and discourage publishers from making their books available that way. So if you want to remove the DRM, buy the book.

  20. Tried to view with calibre viwer a PDF DRM file and receive:

    calibre, version 2.79.1
    ERROR: Could not open ebook: Failed to read book, C:\Users\User\Documents\Calibre\Unknown\XXXXX.pdf click “Show Details” for more information

    Traceback (most recent call last):
    File “site-packages\calibre\utils\ipc\simple_worker.py”, line 286, in main
    File “site-packages\calibre\ebooks\oeb\iterator\book.py”, line 64, in extract_book
    File “site-packages\calibre\customize\conversion.py”, line 245, in call
    File “site-packages\calibre\ebooks\conversion\plugins\pdf_input.py”, line 51, in convert
    File “site-packages\calibre\ebooks\pdf\pdftohtml.py”, line 92, in pdftohtml
    ConversionError: pdftohtml failed with return code: 1
    Syntax Error: Couldn’t find the ‘EBX_HANDLER’ security handler

          • hello!
            here is my log to import:

            calibre Debug log
            calibre 2.80 embedded-python: True is64bit: False
            Windows-8-6.2.9200 Windows (’32bit’, ‘WindowsPE’)
            32bit process running on 64bit windows
            (‘Windows’, ‘8’, ‘6.2.9200’)
            Python 2.7.9
            Windows: (‘8’, ‘6.2.9200’, ”, ‘Multiprocessor Free’)
            Successfully initialized third party plugins: DeDRM (6, 5, 3) && Inept PDF DeDRM (0, 1, 4)
            devicePixelRatio: 1.0
            logicalDpi: 96.0 x 96.0
            physicalDpi: 95.8113948919 x 95.9160839161
            Starting up…
            Started up in 13.31 seconds with 16 books
            DeDRM v6.5.3: Trying to decrypt XXXXX.pdf
            DeDRM v6.5.3: XXXXX.pdf is a PDF ebook
            DeDRM v6.5.3: Trying Encryption key adeptkey_rabocii
            DeDRM v6.5.3: Exception when decrypting after 0.2 seconds
            Traceback (most recent call last):
            File “calibre_plugins.dedrm.init“, line 413, in PDFDecrypt
            File “calibre_plugins.dedrm.ineptpdf”, line 2186, in decryptBook
            File “calibre_plugins.dedrm.ineptpdf”, line 1996, in init
            File “calibre_plugins.dedrm.ineptpdf”, line 1481, in initialize
            File “calibre_plugins.dedrm.ineptpdf”, line 1613, in initialize_ebx
            ADEPTError: error decrypting book session key
            DeDRM v6.5.3: Failed to decrypt with key adeptkey_rabocii after 0.2 seconds
            DeDRM v6.5.3: Trying Encryption key adeptkey_my
            DeDRM v6.5.3: Exception when decrypting after 0.4 seconds
            Traceback (most recent call last):
            File “calibre_plugins.dedrm.init“, line 413, in PDFDecrypt
            File “calibre_plugins.dedrm.ineptpdf”, line 2186, in decryptBook
            File “calibre_plugins.dedrm.ineptpdf”, line 1996, in init
            File “calibre_plugins.dedrm.ineptpdf”, line 1481, in initialize
            File “calibre_plugins.dedrm.ineptpdf”, line 1613, in initialize_ebx
            ADEPTError: error decrypting book session key
            DeDRM v6.5.3: Failed to decrypt with key adeptkey_my after 0.4 seconds
            DeDRM v6.5.3: Looking for new default Adobe Digital Editions Keys after 0.4 seconds
            Found 2 keys
            DeDRM v6.5.3: Ultimately failed to decrypt after 0.4 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 617, in run
            File “calibre_plugins.dedrm.init“, line 492, in PDFDecrypt
            DeDRMError: DeDRM v6.5.3: Ultimately failed to decrypt after 0.4 seconds.
            IneptPDF: Calibre configuration directory = C:\Users\User\AppData\Roaming\calibre
            IneptPDF: Keyfile adeptkey.der found in config folder.
            Ready to start decrypting.
            Error serializing pdf. Probably wrong key.
            IneptPDF: Encryption key invalid… trying others.
            Running file type plugin Inept PDF 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.ineptpdf.init“, line 2223, in run
            ADEPTError: IneptPDF – Ultimately failed to decrypt
            Syntax Error: Couldn’t find the ‘EBX_HANDLER’ security handler
            pdfinfo errored out with return code: 1
            Traceback (most recent call last):
            File “site-packages\calibre\customize\ui.py”, line 416, in get_file_type_metadata
            File “site-packages\calibre\customize\builtins.py”, line 342, in get_metadata
            File “site-packages\calibre\ebooks\metadata\pdf.py”, line 115, in get_metadata
            ValueError: Could not read info dict from PDF
            Added XXXXX to db in: 0.1
            Added 1 books in 1.6 seconds
            Worker Launch took: 0.107000112534

            • You can remove Inept PDF. It’s included in DeDRM.

              It looks like you don’t have the right key for that PDF. Can you read it in ADE 2.0.1? Is ADE 2.0.1 registered with your Adobe ID?

              • I removed Inept PDF, the error is the same.
                In ADE 2.0.1 there is my Adobe ID, but when I try to open URLLink.acsm there is an error:
                E_ADEPT_CORE_DECRYPT_LICENSE_KEY
                some information about this is here:
                http://feedback.datalogics.com/knowledgebase/articles/819852-e-adept-core-decrypt-license-key-error

                So, can I do something?

                calibre Debug log
                calibre 2.80 embedded-python: True is64bit: False
                Windows-8-6.2.9200 Windows (’32bit’, ‘WindowsPE’)
                32bit process running on 64bit windows
                (‘Windows’, ‘8’, ‘6.2.9200’)
                Python 2.7.9
                Windows: (‘8’, ‘6.2.9200’, ”, ‘Multiprocessor Free’)
                Successfully initialized third party plugins: DeDRM (6, 5, 3)
                devicePixelRatio: 1.0
                logicalDpi: 96.0 x 96.0
                physicalDpi: 95.8113948919 x 95.9160839161
                Starting up…
                Started up in 12.75 seconds with 15 books
                DeDRM v6.5.3: Trying to decrypt XXXXX.pdf
                DeDRM v6.5.3: XXXXX.pdf is a PDF ebook
                DeDRM v6.5.3: Trying Encryption key adeptkey_my
                DeDRM v6.5.3: Exception when decrypting after 0.3 seconds
                Traceback (most recent call last):
                File “calibre_plugins.dedrm.init“, line 413, in PDFDecrypt
                File “calibre_plugins.dedrm.ineptpdf”, line 2186, in decryptBook
                File “calibre_plugins.dedrm.ineptpdf”, line 1996, in init
                File “calibre_plugins.dedrm.ineptpdf”, line 1481, in initialize
                File “calibre_plugins.dedrm.ineptpdf”, line 1613, in initialize_ebx
                ADEPTError: error decrypting book session key
                DeDRM v6.5.3: Failed to decrypt with key adeptkey_my after 0.3 seconds
                DeDRM v6.5.3: Trying Encryption key adeptkey_rab
                DeDRM v6.5.3: Exception when decrypting after 0.4 seconds
                Traceback (most recent call last):
                File “calibre_plugins.dedrm.init“, line 413, in PDFDecrypt
                File “calibre_plugins.dedrm.ineptpdf”, line 2186, in decryptBook
                File “calibre_plugins.dedrm.ineptpdf”, line 1996, in init
                File “calibre_plugins.dedrm.ineptpdf”, line 1481, in initialize
                File “calibre_plugins.dedrm.ineptpdf”, line 1613, in initialize_ebx
                ADEPTError: error decrypting book session key
                DeDRM v6.5.3: Failed to decrypt with key adeptkey_rab after 0.4 seconds
                DeDRM v6.5.3: Looking for new default Adobe Digital Editions Keys after 0.4 seconds
                Found 2 keys
                DeDRM v6.5.3: Ultimately failed to decrypt after 0.4 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 617, in run
                File “calibre_plugins.dedrm.init“, line 492, in PDFDecrypt
                DeDRMError: DeDRM v6.5.3: Ultimately failed to decrypt after 0.4 seconds.
                Syntax Error: Couldn’t find the ‘EBX_HANDLER’ security handler
                pdfinfo errored out with return code: 1
                Traceback (most recent call last):
                File “site-packages\calibre\customize\ui.py”, line 416, in get_file_type_metadata
                File “site-packages\calibre\customize\builtins.py”, line 342, in get_metadata
                File “site-packages\calibre\ebooks\metadata\pdf.py”, line 115, in get_metadata
                ValueError: Could not read info dict from PDF
                Added XXXXX to db in: 0.1
                Added 1 books in 1.5 seconds
                Worker Launch took: 0.12700009346

                  • In ADE 2.0.1 I cannot read this PDF, because how you see later – in was an error before downloading the file.
                    Will be review your tool to be able to read this DRM files?
                    Thank you very much!

  21. I bought an ebook version of Classic Christianity by Thomas C Oden from Amazon. It is intended to be used on a Kindle. I want to have a PDF version that I can load into my Natually Speaking Software to have it read it to me. I can’t do this as it says it is DRM protected. I downloaded Calibre and attempted to install the plug in alfcrypto_src.zip and when I try to install that I get a message that says

    calibre, version 2.79.1
    ERROR: Unhandled exception: InvalidPlugin:The plugin in u’C:\Users\Timothy\Documents\DeDRM_plugin\alfcrypto_src.zip’ is invalid. It does not contain a top-level init.py file

    calibre 2.79.1 embedded-python: True is64bit: False
    Windows-8-6.2.9200 Windows (’32bit’, ‘WindowsPE’)
    32bit process running on 64bit windows
    (‘Windows’, ‘8’, ‘6.2.9200’)
    Python 2.7.9
    Windows: (‘8’, ‘6.2.9200’, ”, ‘Multiprocessor Free’)
    Traceback (most recent call last):
    File “site-packages\calibre\gui2\preferences\plugins.py”, line 317, in add_plugin
    File “site-packages\calibre\customize\ui.py”, line 460, in add_plugin
    File “site-packages\calibre\customize\ui.py”, line 59, in load_plugin
    File “site-packages\calibre\customize\zipplugin.py”, line 192, in load
    File “site-packages\calibre\customize\zipplugin.py”, line 290, in _locate_code
    InvalidPlugin: The plugin in u’C:\Users\Timothy\Documents\DeDRM_plugin\alfcrypto_src.zip’ is invalid. It does not contain a top-level init.py file

    What do I do? I need to be able to have the book read to me, but I can’t seem to accomplish that.

  22. is there some magic to replacing kindle 4 pc 1.19 with 1.17 (on a Win10 system)? yesterday I uninstalled 1.19 and installed 1.17. after that kindle 4 pc refused to log into Amazon. it kept asking for username, password, then a captcha. I entered the correct values about a thousand times and it kept failing. after uninstalling 1.17 and reinstalling 1.19 the problem is gone.

    thanks in advance!

      • Nope, cannot confirm that. There must be something other at play.
        I tried 1.19 on Mac (only Yosemite) as wanted to know what would be downloaded for KFX-ebooks. Did not delete anything and went back to 1.17 installing from the DMG I had downloaded a few days ago. Nothing to delete or register, just removing the mark for auto-update in 1.17 after installing. I still have the few KFX-Folders I downloaded with the “voucher” which looks like it has the DRM-Key.

        • But, if true, you can easily de-register your software “Kindle for Mac” or “Kindle for Windows” at the Webpage with the shortcut
          amazon.com/myk
          (or whatever country you are in) this stands for “Manage Your Content and Devices”
          (Login needed) the go to the tab titled “Your Devices”

    • Maybe follow the instructions for completely removing then reinstalling K4PC in this section of the FAQs:

      https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md#i-have-installed-the-calibre-plugin-and-the-book-is-not-already-in-calibre-but-the-drm-does-not-get-removed-it-is-a-kindle-book

      It seems like some people have had more trouble than others rolling back — no idea why. You might also want to temporarily disconnect from the internet when you first open 1.17 and make sure auto-update is unchecked before proceeding.

    • once I was pointed to instructions, and had some time, I was able to do the downgrade.

      still had some trouble when I clicked sync it gave me a login screen which always failed. drat! I clicked send new password, which never arrived. but after a while I clicked sync again and suddenly my books appeared!

      but even then they weren’t actually downloaded. pressing sync didn’t seem to cause them to download. what worked is opening each book, which then downloaded that book.

      So, after all that, I was able to import into Calibre even the newer books purchased while using 1.19.

      so despite the odd symptoms, it worked,and I thank you all for your kind advice!

      Fred

  23. Hello. I was trying to use this to remove the DRM from one of my text books from my class, but I cannot seem to get it to work.

    Steps I took.
    1) Downgrade to kindle for pc v 1.17 after deregistering
    2) Erase the My Kindle Directory
    3) Run Calibre in debug mode
    4) Uninstall and reinstall calibre and your removal tool

    http://pastebin.com/5Sh9M24b <– The Log file from debug mode

    http://pastebin.com/aksAzGw5 <– Error received when exporting

    If you could please help me it would be greatly appreciated
    Thank You,
    John Martincic

  24. I have discovered an easy way to force Kindle for PC 1.19 to download books in the formats supported by the DRM Tools instead of KFX format. If the file “%localappdata%\Amazon\Kindle\application\renderer-test.exe” is removed then KFX support is disabled. This will take effect the next time K4PC is launched. Any books already downloaded in KFX format will no longer open and will need to be removed and re-downloaded.

      • As I like to test such things and am not afraid to break something, I installed Kindle for Mac 1.19 (again). You can open the Kindle.App with a rightclick on the Kindle.App and selecting something like “show package (contents)” – I have a German GUI, so I do not know the exact wording, but it is obvious when you see it.
        There is a file inside with nearly the same name, but if you rename it, Kindle.App does not start anymore.

        Which is expected, as the checksum will change and certificates (if used) will be wrong. Maybe some developer with more knowledge may be able to manipulate the App in such a way as to get it working, but is it worth the trouble as long as 1.17 is usable?

        A better solution would be to analyze KFX and be able to strip DRM there.

        Anyway, nice try, but sorry, it does not work for Mac OS X. For Windows it does only work as it is a separate exe, if it was a DLL or integrated in the Kindle.exe, I would expect the same.

        Just a heads up, after that I installed Kindle for Mac 1.17 again and everything worked as expected.

        • Well, thanks for trying!

          From what I’ve been hearing though, it sounds like KF8 will always be better for conversion. So many people will still want KF8 files even when (if?) it’s possible to decrypt KFX.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s