DRM Removal Tools for eBooks

Version 6.6.3 released on 30 March, 2019

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

5,797 thoughts on “DRM Removal Tools for eBooks

  1. Help!
    The tools worked fine for me for years. But now they (both the Mac-standalone or the Calibre-Plugin) do not longer work on Kindle azw.files.
    Gives an error message in the log:
    “Content:B07C9Z5LMM_EBOK:B07C9Z5LMM_EBOK.azw is neither a Kindle not a Mobipocket file.”
    And its definitely a Kindle file, works with the Kindle App on the Mac.

    • Just to clarify one point: i did not input a kindle number. For the simple reason the Mac Kindle App doesn’t have one.
      And I cannot remember if years ago when I installed the old version of the tools I configured a kindle number (where could it come from anyway).

      • If you are using Kindle4Mac 1.17, then there isn’t a problem. If you are using Kindle4Mac 1.24, then the book is using a newer form of DRM called KFX but can be dealt with via a plug-in. If you are using Kindle4Mac 1.25 or later, then you are totally SOL!

        Now with K4M 1.17 my Kindle files are located at: ~/Library/Application Support/Kindle/My Kindle Content Don’t know if it is the same for K4M 1.24.

          • Oh, just checked, the current version (1.26.1 or greater) is 64-Bit. OK, then I suggest the modification from mobile-read.
            This results in a few crash-logs, but these pop up only after “Kindle for Mac” is used, when you quit it.
            If you can live with that, they go away after some time, I have not seen the crash-error for a few weeks.

            The modification has to be applied for each update, so the suggestion to turn of auto-update for Kindle is still advisable.

            Basically you drill into the App package. For safety reason you can duplicate the App before trying this.
            Kindle.App – Contents – MacOS – and set the renderer-test to non-executable. I used a NortonCommander like utility, but you can use the mentioned chmod on commandline, see the Link below, may need sudo ( Admin account and password ) to execute the chmod.
            chmod -x /Applications/Kindle.app/Contents/MacOS/renderer-test
            After this, test this with a few newly downloaded books, and try to DeDRM them. This newer version uses a new folder for each book under the “My Kindle Content” folder, where ever you have moved this.

            Link to the old suggestion for turning off KFX download:
            https://www.mobileread.com/forums/showthread.php?t=283371

            As far as I read here on this blog, the similar modification does not work anymore for the current Windows version for some reason, but I am not sure about that, I cannot try it without Windows.

              • Did you see the info at the link about getting it to work with the current version of Kindle for Mac? I believe it relies on updating from 1.23 or earlier. But I’m on Windows so I’m not sure. I just know that others have definitely been able to.

              • My guess is, you use Calibre. DeDRM happens on import into Calibre, not during conversion, just to be clear.
                And the books should be downloaded NEW, after changing something in the installation.

                Maybe it is some other problem (not finding the key?).
                As usual, a log is needed.

                I use both the Calibre Plugin and the Mac Standalone, but prefer to DeDRM one book at a time with the Standalone App, as the popup tells wether there was DRM or not (I live in Germany and a few great German publishers do not use DRM anymore) and I can look into the log which is easier to read then the Calibre Log (it is shorter, imho).

                If you are up to it, start fresh and then give is a log, if it is not working, I suggest the following:
                – create a new User
                – download Calibre
                – download DeDRM
                – install DeDRM plugin to Calibre
                – download Kindle for Mac
                – apply the chmod modification
                – Login to Kindle for Mac
                – download 2-3 ebooks
                – try to read them in Kindle for Mac, this must work for the DeDRM to work
                – start Calibre and turn logging on
                – Import the newly downloaded books to Calibre
                – quit Calibre and note where the log is
                – start Calibre again without logging
                – try to open them there with the Calibre reader
                If this does not work, there is a clear message the ebook (still) has DRM, when look into
                the log, and give is log, someone might be able to help.

    • Using DeDRM for years, I now have a Problem removing the DRM ON some epub books.

      calibre Fehlerdiagnoseprotokoll
      calibre 3.46 embedded-python: True is64bit: False
      Windows-10-10.0.17134-SP0 Windows (’32bit’, ‘WindowsPE’)
      32bit process running on 64bit windows
      (‘Windows’, ’10’, ‘10.0.17134’)
      Python 2.7.15+
      Windows: (’10’, ‘10.0.17134’, ‘SP0′, u’Multiprocessor Free’)
      Interface language: de
      Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 6, 1) && DeDRM (6, 6, 3) && Package KFX (from KFX Input) (1, 6, 1) && Obok DeDRM (6, 5, 4) && KFX metadata reader (from KFX Input) (1, 6, 1) && KFX Input (1, 6, 1) && Annotations (1, 9, 2) && ACE (1, 0, 6)
      calibre 3.46 embedded-python: True is64bit: False
      Windows-10-10.0.17134-SP0 Windows (’32bit’, ‘WindowsPE’)
      32bit process running on 64bit windows
      (‘Windows’, ’10’, ‘10.0.17134’)
      Python 2.7.15+
      Windows: (’10’, ‘10.0.17134’, ‘SP0′, u’Multiprocessor Free’)
      Interface language: de
      Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 6, 1) && DeDRM (6, 6, 3) && Package KFX (from KFX Input) (1, 6, 1) && Obok DeDRM (6, 5, 4) && KFX metadata reader (from KFX Input) (1, 6, 1) && KFX Input (1, 6, 1) && Annotations (1, 9, 2) && ACE (1, 0, 6)
      Turning on automatic hidpi scaling
      devicePixelRatio: 1.0
      logicalDpi: 120.0 x 120.0
      physicalDpi: 141.76744186 x 142.134715026
      Using calibre Qt style: True
      [0.00] Starting up…
      [0.01] Showing splash screen…
      [0.12] splash screen shown
      [0.12] Initializing db…
      [0.14] db initialized
      [0.14] Constructing main UI…
      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.0 obok::action_err.py – loading translations
      DEBUG: 0.0 Annotations plugin: Error loading libiMobileDevice. This hasn’t worked for a while, and is blacklisted in calibre v3.
      DEBUG: 0.0 Annotations plugin: Error is: No module named idevice.libimobiledevice
      DEBUG: 0.0 Annotations::reader_app_support.py – loading translations
      DEBUG: 0.0 Annotations::common_utils.py – loading translations
      DEBUG: 0.0 Annotations::appearance.py – loading translations
      DEBUG: 0.0 Annotations::config.py – loading translations
      DEBUG: 0.0 Annotations::annotated_books.py – loading translations
      DEBUG: 0.2 Annotations::action.py – loading translations
      [1.70] main UI initialized…
      [1.70] Hiding splash screen
      Storage number map:
      {(7L, 0L): [(3L, ‘C’)], (7L, 1L): [(1L, ‘D’)], (7L, 2L): [(1L, ‘E’)]}
      Storage number for USBSTOR\DISK&VEN_LINUX&PROD_FILE-CD_GADGET&REV_0000\6&22942EC6&0&86179131_126541F9432843EA92B8E7BF962F023D&0: StorageDeviceNumber(type=7L, number=2L, partition_number=0L)
      Drive letters for USBDevice(vendor_id=0x1f85 product_id=0x6053 bcd=0x9999 devid=usb\vid_1f85&pid_6053&rev_9999 devinst=6)
      {u’drive_letters’: [‘E’],
      u’pnp_id_map’: {‘E’: u’\\?\usbstor#disk&ven_linux&prod_file-cd_gadget&rev_0000#6&22942ec6&0&86179131_126541f9432843ea92b8e7bf962f023d&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}’},
      u’readonly_drives’: set([]),
      u’sort_map’: {‘E’: (2L, 1L)}}
      Shortcut for u’Interface Action: Annotations (Annotations) – Finde Annotationen’ already registered by Finde Annotationen
      Job: 0 Geräteinformationen abrufen started
      DeviceJob: 0 Geräteinformationen abrufen done, calling callback
      DeviceJob: 0 Geräteinformationen abrufen callback returned
      Job: 1 Bibliotheksinformationen festlegen started
      DeviceJob: 1 Bibliotheksinformationen festlegen done, calling callback
      DeviceJob: 1 Bibliotheksinformationen festlegen callback returned
      Job: 2 Gerätebücherliste abrufen started
      DEBUG: 5.7 USBMS: Fetching list of books from device. Device= TOLINO oncard= None
      DEBUG: 5.7 USBMS: dirs are: E:\
      DEBUG: 5.9 USBMS: scan from root False E:\
      DEBUG: 6.1 USBMS: count found in cache: 282, count of files in metadata: 282, need_sync: False
      DEBUG: 6.1 USBMS: Finished fetching list of books from device. oncard= None
      DEBUG: 6.1 USBMS: Fetching list of books from device. Device= TOLINO oncard= carda
      DEBUG: 6.1 USBMS: Fetching list of books from device. Device= TOLINO oncard= cardb
      DeviceJob: 2 Gerätebücherliste abrufen done, calling callback
      DeviceJob: metadata_downloaded: Starting set_books_in_library
      DeviceJob: set_books_in_library: books to process= 282
      DeviceJob: set_books_in_library finished: time= 0.0120000839233
      DeviceJob: metadata_downloaded: updating views
      DeviceJob: metadata_downloaded: syncing
      DeviceJob: metadata_downloaded: refreshing ondevice
      DeviceJob: metadata_downloaded: sending metadata_available signal
      DeviceJob: 2 Gerätebücherliste abrufen callback returned
      Job: 0 Geräteinformationen abrufen finished
      Keine Details verfügbar.
      Job: 1 Bibliotheksinformationen festlegen finished
      Keine Details verfügbar.
      Job: 2 Gerätebücherliste abrufen finished
      Keine Details verfügbar.
      [20.23] splash screen hidden
      [20.23] Started up in 20.23 seconds with 551 books
      Job: 3 Dateien zur Übertragung vom Gerät vorbereiten started
      DeviceJob: 3 Dateien zur Übertragung vom Gerät vorbereiten done, calling callback
      DeviceJob: 3 Dateien zur Übertragung vom Gerät vorbereiten callback returned
      Job: 3 Dateien zur Übertragung vom Gerät vorbereiten finished
      Keine Details verfügbar.
      DeDRM v6.6.3: Trying to decrypt Nach Ohio – Benedikt Meyer.epub
      DeDRM v6.6.3: Verifying zip archive integrity
      DeDRM v6.6.3: “Nach Ohio – Benedikt Meyer.epub” is neither an Adobe Adept nor a Barnes & Noble encrypted ePub
      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 635, in run
      File “calibre_plugins.dedrm.init“, line 411, in ePubDecrypt
      DeDRMError: DeDRM v6.6.3: Couldn’t decrypt after 0.5 seconds. DRM free perhaps?
      C:\Program Files (x86)\Calibre2\app\pylib.zip\dateutil\parser.py:601: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode – interpreting them as being unequal
      C:\Program Files (x86)\Calibre2\app\pylib.zip\dateutil\parser.py:601: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode – interpreting them as being unequal
      Added Nach Ohio to db in: 3.6
      Added 1 books in 4.6 seconds
      DeviceJob: set_books_in_library: books to process= 282
      DeviceJob: set_books_in_library finished: time= 0.0299999713898
      Job: 4 Buch auf Gerät anzeigen started
      DeviceJob: 4 Buch auf Gerät anzeigen done, calling callback
      DeviceJob: 4 Buch auf Gerät anzeigen callback returned
      Worker Launch took: 0.177999973297
      Job: 4 Buch auf Gerät anzeigen finished
      Keine Details verfügbar.

  2. After following the instructions to install the Kindle PC plugin, I have a kindle book that I purchased directly from Amazon, and downloaded to my PC using the Kindle PC program. Whent I try to convert the file to a pdf, I get a message that the file is still DRM protected. Computer is Win 7 Pro 64 bit. Her is a copy of the log:

    calibre Debug log
    calibre 3.46 embedded-python: True is64bit: False
    Windows-7-6.1.7601-SP1 Windows (’32bit’, ‘WindowsPE’)
    32bit process running on 64bit windows
    (‘Windows’, ‘7’, ‘6.1.7601’)
    Python 2.7.15+
    Windows: (‘7’, ‘6.1.7601’, ‘SP1′, u’Multiprocessor Free’)
    Interface language: None
    Successfully initialized third party plugins: DeDRM (6, 6, 3) && Kindle and Mobipocket DeDRM (0, 4, 13)
    calibre 3.46 embedded-python: True is64bit: False
    Windows-7-6.1.7601-SP1 Windows (’32bit’, ‘WindowsPE’)
    32bit process running on 64bit windows
    (‘Windows’, ‘7’, ‘6.1.7601’)
    Python 2.7.15+
    Windows: (‘7’, ‘6.1.7601’, ‘SP1′, u’Multiprocessor Free’)
    Interface language: None
    Successfully initialized third party plugins: DeDRM (6, 6, 3) && Kindle and Mobipocket DeDRM (0, 4, 13)
    Turning on automatic hidpi scaling
    devicePixelRatio: 1.0
    logicalDpi: 96.0 x 96.0
    physicalDpi: 72.035450517 x 72.0
    Using calibre Qt style: True
    [0.00] Starting up…
    [0.00] Showing splash screen…
    [0.06] splash screen shown
    [0.06] Initializing db…
    [0.08] db initialized
    [0.08] Constructing main UI…
    [1.47] main UI initialized…
    [1.47] Hiding splash screen
    [14.70] splash screen hidden
    [14.70] Started up in 14.70 seconds with 2 books
    stdout+stderr from file dialog helper: [”, ”]
    piped data from file dialog helper: [“e\xe0\xd7\xba\xb1p,\xc4\x89.J/{\xc6\xda\xe3H\x14v\x9d\x1d\x03:R\xc1n\xe9w=\x01\x87′”, ‘C:\Users\Russell\Documents\My Kindle Content\B0773SJYDC_EBOK\B0773SJYDC_EBOK.azw’]
    DeDRM v6.6.3: Trying to decrypt B0773SJYDC_EBOK.azw
    Using Library AlfCrypto DLL/DYLIB/SO
    MobiDeDrm v0.42.
    Copyright © 2008-2017 The Dark Reverser, Apprentice Harper et al.
    Decrypting Kindle Format 8 ebook: Camera Settings: Arizona-Sonora Desert Museum
    Found 0 keys to try after 0.1 seconds
    Crypto Type is: 2
    DeDRM v6.6.3: Failed to decrypt with error: No key found in 0 keys tried.
    DeDRM v6.6.3: Looking for new default Kindle Key after 0.1 seconds
    searching for kinfoFiles in C:\Users\Russell\AppData\Local
    Found K4PC 2.25+ kinf2018 file: C:\Users\Russell\AppData\Local\Amazon\Kindle\storage.kinf2018
    Decrypted key file using IDString ‘307636801’ and UserName ‘52757373656c6c’
    DeDRM v6.6.3: Found 1 new key
    MobiDeDrm v0.42.
    Copyright © 2008-2017 The Dark Reverser, Apprentice Harper et al.
    Decrypting Kindle Format 8 ebook: Camera Settings: Arizona-Sonora Desert Museum
    Got DSN key from database default_key_1
    Found 3 keys to try after 0.2 seconds
    Crypto Type is: 2
    DeDRM v6.6.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 172, in _run_filetype_plugins
    File “calibre_plugins.dedrm.init“, line 624, in run
    File “calibre_plugins.dedrm.init“, line 574, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.6.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
    Kindle and Mobipocket DeDRM v0.4.13: Trying to decrypt B0773SJYDC_EBOK.azw.
    Using Library AlfCrypto DLL/DYLIB/SO
    Running file type plugin Kindle and Mobipocket 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.k4mobidedrm.init“, line 116, in run
    File “calibre_plugins.k4mobidedrm.init“, line 249, in config
    File “site-packages\calibre\customize\zipplugin.py”, line 185, in load_module
    File “calibre_plugins.k4mobidedrm.config”, line 4, in
    ImportError: No module named PyQt4.Qt
    Added Camera Settings: Arizona-Sonora Desert Museum to db in: 0.1
    Added 1 books in 1.0 seconds

    Please advise,

    Russ

    • Briefly: Go to Kindle Preferences and turn off auto-updates. Delete the downloaded book from Kindle for PC (& calibre). Quit Kindle for PC.Download Kindle for PC 1.17 and install that instead. Download the book using Kindle for PC 1.17 and import into calibre.

  3. Thanks, for the reply, Paul. After posting this comment, I did some additional research on the web and discovered the issue with versions 1.25+ of Kindle. I uninstalled Kindle, downloaded and installed version 1.24.3. After downloading the azw file in Kindle, I was able to successfully remove the DRM with the Calibre plugin. Unfortunately, after converting the file to pdf, the formatting of the file got all discombobulated, rendering the pdf useless for any purpose. I can’t imagine what the cure for that might be, but I doubt it’s related to the removal of DRM. Geez, all I really want to do is to print the stupid file!

      • Thanks, Laura. Well, that was interesting. I converted to RTF, and opened the document in Word 2010. I got precisely the right number of pages, every one of them absolutely blank except for a page break.

          • It’s an azw file, Laura. 33 page document and the file size is 6.3MB. Not a big deal, but there is a good sized photograph on every page. It’s more like a series of 33 Powerpoint slides, than a text-driven book.

              • Sorry. As you can tell, I do almost nothing with Kindle files. Avoid them like the plague, for just this very reason. This particular eBook was not available for purchase in any other format. To answer your question, the file extension, per the file that has been saved in my Caliber Documents folder by the program, is az3.

                • If it’s mainly a series of images, I suggest you use the KindleUnpack plugin, which will extract the images (& html) from the azw3 file. You should be able to print the images easily.

                  • Thanks, Paul. The pursuit of a solution is mostly academic at this point. My time and effort on this has already gone way beyond the actual need to pull this off. I just don’t like to get beat on things like this, but I’m ready to throw in the towel. I’ve reached out to the author to see if she could possibly send me a pdf of the eBook.

    • “Geez, all I really want to do is to print the stupid file!”

      While DRM could prohibit printing a Kindle file, you should be able to print it after removing DRM be it from .

      From your description it sounds like a comic, art-book or a manual, it may be that the problem is with the printing, depending on your printer setup. As 33 pages is not that much, try printing one page at a time. This might help if it is a problem with converting to color to black/white or scaling for the printer.
      As you guessed, if DRM is removed, there is not a lot we can do to help here.

      • Thanks, Ingo. The problem isn’t with the printing, as the converted pdf file is a total mess when opened in Acrobat. The text is huge, photos are as well, and therefore pagination is all screwed up. When viewing the file in Acrobat it is completely unrecognizable before even thinking about printing it.

  4. I’m reposting my question as it was never originally published. Are there any known issues between Windows 10, Kindle for PC and the latest versions of Calibre and the tools? I’m looking to get a new pc and I want to know what problems I may encounter before I make the change. Thank you.

  5. Help please:
    Trying to De-DRM an ADE eBook (acsm -> epub). I’m using Linux and for the life of me cannot get ADE to work on there. As a workaround, I have now installed ADE on my Android phone. This way I could at least download the book I had paid for. I was hoping that I could now transfer the epub file to my computer and do the De-DRMing from there. Turns out I seem to need a ADE Key which the plugin will automatically find IF ADE is installed on the computer (it’s not!) Is there any way to find out my ADE Key and manually add it?

    P.S.: I’ve already spent 4 evenings to try and get ADE to work on Linux (through wine). My current problem is that I apparently need to download ADE 4.5.0, but I can’t find any versions below 4.5.8 or so.

  6. I’m trying to back up a pair of DRM-protected books purchased directly from the publisher to Calibre (vs 3.47.1 running on Windows 10) from my aging Kindle Paperwhite (5th gen, vs. 5.6.1.1). The Kindle is showing its age and I don’t want to lose these books when it gives up completely. I I followed your instructions (thanks for being so clear…much appreciated!) and the deDRM plugin shows up on the main Plugins popup as being installed. However, it doesn’t come up on the list of “user plugins” that are available to install. Not sure what my next step should be; nothing changes when I try to load the book file from the Kindle and open in Calbre. Still getting the DRM protected message. Thanks for any help you can offer.

  7. The Barnes & Noble Nook DeDRM tool does not appear to be working any longer as far as retrieving new decryption keys. I’ve used the same key for about seven years, but was recently forced by B&N to change my password, which broke my key. I’ve tried to use the Calibre plug-in to retrieve my key. I keep getting the error “Could not retrieve key. Check username, password and internet connectivity and try again.” I’ve verified that I have the correct information and I have internet access. The tool just isn’t working. I’ve been trying for several days now with no luck. Has anyone else experienced a similar issue or does anyone know anything about this? Thanks.

    • Yes, the key retrieval stopped working when B&N cut off their old Nook apps. I was forced to change my password a couple times in the past few months, but luckily my key remained the same. The only way I know to get the key now is from a rooted Nook device or a rooted Android device with the Nook app. This issue at GitHub has discussion on the process (read through the whole thread as things were slightly different in some cases):

      https://github.com/apprenticeharper/DeDRM_tools/issues/814

  8. Thank you for the tools. Very helpful.

    Here is one of my book and I am trying to deal with it.

    Can you help me to fix the problem?

    Thank you

    There is 1 ebook to be decrypted.
    Processing file: B007WQUCXK_EBOK.azw
    shellcommand: /usr/bin/python ‘/Users/setsutora/Desktop/DeDRM_tools_6.6.3/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/k4mobidedrm.py’ -s ‘BD1309074465029F’ ‘/Users/setsutora/Desktop/DeDRM_tools_6.6.3/DeDRM_Macintosh_Application/B007WQUCXK_EBOK.azw’ ‘/Users/setsutora/Desktop/’ > ‘/Users/setsutora/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
    shellresult: Using Library AlfCrypto DLL/DYLIB/SO
    K4MobiDeDrm v5.7.
    Copyright © 2008-2017 Apprentice Harper et al.
    MobiDeDrm v0.42.
    Copyright © 2008-2017 The Dark Reverser, Apprentice Harper et al.
    Decrypting Kindle Format 8 ebook: 易经入门(第3版)
    Found 2 keys to try after 0.0 seconds
    Crypto Type is: 2
    Error decrypting book after 0.0 seconds: No key found in 2 keys tried.
    Traceback (most recent call last):
    File “/Users/setsutora/Desktop/DeDRM_tools_6.6.3/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 265, in decryptBook
    book = GetDecryptedBook(infile, kDatabases, androidFiles, serials, pids, starttime)
    File “/Users/setsutora/Desktop/DeDRM_tools_6.6.3/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 239, in GetDecryptedBook
    mb.processBook(totalpids)
    File “/Users/setsutora/Desktop/DeDRM_tools_6.6.3/DeDRM_Macintosh_Application/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 2 keys tried.
    shellcommand: /usr/bin/python ‘/Users/setsutora/Desktop/DeDRM_tools_6.6.3/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/kindlekey.py’ ‘/Users/setsutora/Library/Preferences/com.apprenticealf.dedrm/newKeys/’ > ‘/Users/setsutora/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
    shellresult: kindlekey.py v2.6
    Copyright © 2010-2016 by some_updates, Apprentice Alf and Apprentice Harper
    No k4Mac kindle-info/rainier/kinf2011 files have been found.
    Could not retrieve Kindle for Mac/PC key.

    There was an error with 1 ebook:
    B007WQUCXK_EBOK.azw couldn’t be decrypted.

  9. Calibre version 4 is being worked on. It’s going to be making some big changes. Over at Mobileread is a thread on the beta that’s being tested. Can anyone who knows how to code plugins for Calibre please download the beta and text it with the DeDRM plugin and make sure it works and fix what needs fixing? This is one plugin I’m sure we don’t want to break when Calibre 4 is released. Thanks.

    • Downloaded Mac version 3.99.5 from today, put it in /Apps as Calibre 2, imported 8 ebooks, Kindle and EPub, all worked and opened without a problem.
      All had DRM, and would not have opened in Calibre Viewer.
      This is on a working Calibre installation, so nothing was changed, it found the plugins (DeDRM and others) and the settings, so imho currently nothing to fix there,
      But why did you not do it yourself?

      • I don’t know coding Calibre plugins well enough to fix anything that may be wrong. I’ve not had a chance to test the Calibre beta. One thing that also needs testing is the options dialog screens. Thanks for testing. I plan on testing later this week, but I’ve not been able to just yet.

      • Ingo, I’m guessing this version 3.99.5 is a Beta? The reason is because my Calibre install is telling me there is a new version available but it says it is version 3.48.0.

        • Yes, thats the beta, someone (Jon?) asked wether it worked with DeDRM, and I tested it.
          It shows how good the programmer of Calibre is, all settings and plugins where there – although I did not test much, so cannot confirm except for EPub (from German shops Thalia and ebook.de with Adobe DRM) and Kindle. Did not test Kobo.
          (A few minutes later). Yes, oBook Kobo DeDRM plugin continues to work. As expected after the test yesterday.

          As Barnes and Nobles recently forced me to change my password, I have yet to test an older Yosemite installation (with VPN as I am living in Germany) but guess Barnes & Nobles is now gone for me, good riddance, Kobo is getting better, and except for the Kobo changes to some EPub (enhancements?) I can live with that, but am not too fond of it, ok but I also was never with Barnes & Nobles, so nothing has changed really. Except, that Kobo knows I am German and does not sell me certain books they offer in USA.

          The problem with Barnes & Nobles for me, is, I found a free book and bought it, but after the password change, my old Barnes & Nobles App “Nook for Mac” does not start anymore. So while DeDRM might still work, the problem is the download. Some have a solution with Android, but it is from the description a near hack to get to the password, I am up to it, but currently have no real important books I need to DeDRM from B&N, the free one would be nice to have – and might even be without DRM.

  10. I returned an ebook that I purchased from Amazon. It was very easy to do, but I’m curious about how Amazon goes about taking the book back. Do they have access to the Kindle content on your computer??

    • While this is neither here not there, they sync Kindle for PC/Mac like they do your Kindle devices, if you have a working Internet connection. Books I give back – be it wrong purchases or Kindle Unlimited/Prime whatever lent are deleted with the next use of the Kindle or Kindle for PC/Mac (I do not have a Fire tablet, but guess it is the same there).

      • Thanks for that. It looks like anything I open with Kindle for PC winds up on their website as a list of my digital content. I don’t usually use it, but sometimes a book I open on Calibre defers to K for PC because of format AZW3, for example.I just deleted “my Kindle content” and all digital content on their website.

        • Just to be clear, it is not a bug, it is a feature.
          They will also be deleted from your Kindle devices and Apps, as soon as they connect to internet, if I guess right…
          And the ebooks you deleted are now gone without DeDRM backups, so why do it?

          As long as you have a working Amazon account, you could have downloaded the books again, they know what you bought or lent anyway, deleting them does not change that.
          Also, they still know what you read with the Kindle and Kindle Apps, as soon as you use them with a working internet.

          As soon as you log out of your Amazon account on your Kindle, Kindle ebooks with DRM will stop working.
          Only changing the setting to flight-mode (WLAN off) will help.
          If you care REALLY about privacy, bought ebooks are not for you.

          We live in a post-privacy world, so you have traded privacy for convenience.

  11. I’m really hoping someone can help me. TL;DR: downloaded library kindle book will expire before I need it, went to buy it on kindle and they aren’t selling it. I need to remove the DRM to use the book.

    I can’t believe this!! I borrowed a Kindle book from my local library about IDing edible mushrooms because I’m going on a trip. I had a hold on the book, and when it was ready I grabbed it – but it will expire before my trip, and there are already holds on it so I can’t just renew. It’s a large book with lots of pictures (46mb file). I know deDrm isn’t made to do borrowed books – I found that out after converting a few times (It took hours) and then the file wouldn’t open on the other device I have registered to a different email. I downloaded the file into the Kindle for PC – v 1.24.3. I have the deDrm tools installed on Calibre. The file opens as a mobi, I don’t get any error when I try to convert it to epub(although the formatting doesn’t convert well, so I keeping it a mobi is fine). I realize there is a problem being it is a borrowed book, so I went to Amazon to just purchase it for $15… and Amazon has this error: “Item Under Review This book is currently unavailable because there are significant quality issues with the source file supplied by the publisher.” The file looks fine on my device and on the PC. I really need a copy for my trip. Can anyone help me out?

          • PJ, you should be able to get it from Google Play, Apple Books, B&N Nook, or Kobo as an ebook, according to the publisher, University of Illinois Press, or as a paperback (new or used) from Amazon.

          • “Mushrooms of the Midwest” checking from Germany (!), not sure about the US, but it is available for Eur 11,10 from
            play.google.com so maybe other also have it (ebook.de dos not).
            1 Eur is 1.10 Us$ today, so maybe Us$ 12 or a little more.
            Listed as DRM protected. As I have bought a few ebooks from them, this the normal Adobe DRM, or was, the last time I bought from them. It is not said, wether you get the EPub, or a PDF or I overlooked it.
            Cannot remember how it works, but I have an Adobe ID for quite some time and if you have your credentials on hand, you can enter them somewhere, so Google play EPubs work with the older Adobe DRM for me.
            A sample is available.

    • Buying it somewhere else as an EPub with Adobe DRM and stripping DRM might be solution. It should then be able to convert, or maybe not (to it sounds like an embedded PDF, if it has lots of pictures). EPub without DRM is a ZIP-File wich can be opened and looked into, it is a variant of html, css and pictures, not that hard to understand if you have basic html knowledge and/or a programming language you know.

      Being that quite a few books are not available due to quality issues for a short or even longer time, it might also not be available as an epub.

      BUT: “The file opens as a mobi” as you said, it does so in Calibre?
      When you do not have any hard DRM on the file – some library ebooks might not have DRM, or soft DRM which is different, not identifying as a lent books to DeDRM, so DeDRM is working.
      As you said it “expires” I do not how that would work without DRM, as I have not lend an ebook from a library (yet).

      Ethical issues not withstanding, if the ebook really opens with the Calibre viewer and is useable, you can copy the Calibre Mobi-file to your Kindle and use it without having it expiring.

      In my view you have tried everything, so while it is still wrong …
      And it is not like you could easily look into the DeDRM code and change the statement for lent ebooks so it does not work anymore, which would be unethical too.

      • I should’ve been more clear. When I open the azw in Calibre, it appears as a Mobi. It looks good in Calibre’s viewer, but I can’t open it in the kindle app on a device not connected to my account. I did manage to look into the DeDrm code and it still does not take care of it. I also downloaded kindle for PC 1.17. I opened the file in a trial DRM software after also looking into the code and it quickly saved it as an azw3 with an “ok” status, but I cannot open any azw3 files in the kindle app. If I attempt to convert it to epub in Calibre, it takes about 3 hours and it’s very messed up 😦

        • As stated before, if you are able to open and read the file in Calibre, DeDRM has worked (or there was no DRM in the first place).

          Every other problem you have after that is a problem of the file (take it up with the publisher) or Calibre conversion.
          Conversion problems, as per your words: “it works, but looks pretty messed up” are outside the scope of this website, either the Bugtracker of Calibre (I have filed a bug or two there it is working) or the forum of Calibre or Mobileread might help.
          (Sorry for some left out words in the last few comments, I tend not to proofread, my bad).

          With Amazon not selling this file currently, it looks to me, as if at least the Kindle version had serious problems and someone took the time to report them.
          Given that it is a book about mushrooms and your life may depend on it, I would not trust the publishers, if they cannot even put out a simple correct ebook. It is a few years old, so may not even be a new problem.
          Wether the EPub is any better, is for you to find out.

          • Thank you. I can read the library book file on the kindle fine. It has a lot of formatting – it’s in columns and has tons of pictures. I had a feeling it wouldn’t convert well to a different format, I just hoped it would read as well as the original after stripping the DRM. Ingo, you make a good point about reliability of content!

            Initially, Calibre would throw an error when I tried to convert, so I think the plugin is working (even if the converted files are messy) correct? Does Calibre strip the drm from the original file once it’s in the Calibre folder? I’m very clumsy with this, I just have a large non drm Calibre library of normal, minimally formatted books to swap between ePub and mobi. I did strip drm from an Overdrive book years ago, but that doesn’t even exist anymore. Normally I just let the library books expire. I’ll check on google play. Thank you.

        • The Calibre mobi file opens the Kindle app, but then isn’t there. The drm-removed .azw3 file opens the app and immediately says “incompatible document type” and kindle for iPad then closes. Calibre’s reader opens azw3 files, but the app doesn’t recognize them. Is azw3 not an acceptable extension? The original file is .azw, but never stays that way after drm removal.

          • AZW is a generic extension Kindle for PC/Mac uses for any Amazon format. What you see after DRM removal is the extension for the specific Amazon format. I think Kindle for iPad uses different formats than the other Kindle apps. But I’m not sure as I’ve never bothered with Kindle for iPad.

  12. I m on Windows 7 and I am trying to remove the DRM from some Kindle books with Calibre as I have always done, but I am being stonewalled, even after down degrading the recent PC Kindle app to a previous version( 1,24) which is supposed to download Kindle books in the previous AZW format and and not the KFX.

    I installed the latest Calibre version ( 3.48) but still it doesn’t work.

    When I try to (re)install the DeDRM 6.6 plugin. in Caliber I get an error message

    Quote ERROR: Unhandled exception: InvalidPlugin:The plugin in u’C:\Users\vivona\Downloads\New folder\DeDRM_tools_6.6.3.zip’ is invalid. It does not contain a top-level init.py fileUnquote.

    The decryption and PDF conversion do work with the Epubor Ultimate but it is a trial version and we only get a uselss skeleton of the book . To get the complete PDF version we have to buy the software.
    I wonder why Calibre doesn’t work as it did before,It always returns the messages that the book is DRM covered.

    Can you help, please
    Thanks

    Ittiandro

    • Kindle for PC version 1.24 will still download KFX format (and it still uses the same AZW extension) unless you make a change to one of its files. See this post at MobileRead:

      https://www.mobileread.com/forums/showthread.php?t=283371

      You’re trying to load the whole archive instead of just the plugin. Unzip DeDRM_tools_6.6.3.zip. Look in the DeDRM calibre plugin folder for the zip file to load into calibre.

      Don’t waste money on Epubor. It cannot do anything these free tools can’t do.

      • Actually, Laura, back in June 2015 I had success using either Epubor or Epubsoft to remove DRM on three Nook books that DeDRM failed to do so. It was that experience caused me to swear off Barnes & Noble ebooks for good. I would not have had to use the commercial software if Amazon had the books in Mobi format or if the then current DeDRM version had worked.

      • You are absoluteky right, Kindle v.1.24 still downloads KFX, bu I had found this info on the Internet. In fact, I was able to solve the problem by fiuther degrading to v. 1.17 and it works beautifully on Calibre. thanks for your hint.

        Ittiandro

  13. Just installed the latest public macOS 10.15 beta in a Fusion VM. Although I did figure out how to enable unsigned apps (sudo spctl –master-disable will do the magic), I was still unable to start the DeDRM 6.6.3 application, even when right clicking to open (Message: The application “DeDRM” can’t be opened). The ReadMe states that this is a 64bit app, any ideas why it would not launch?

  14. Using a MacBook Air. Obtained the ebook using Kindle for Mac.

    calibre Debug log
    calibre 3.47.1 embedded-python: True is64bit: True
    Darwin-18.7.0-x86_64-i386-64bit Darwin (’64bit’, ”)
    (‘Darwin’, ‘18.7.0’, ‘Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64’)
    Python 2.7.15
    OSX: (‘10.14.6’, (”, ”, ”), ‘x86_64′)
    Interface language: None
    Successfully initialized third party plugins: DeDRM (6, 6, 3)
    calibre 3.47.1 embedded-python: True is64bit: True
    Darwin-18.7.0-x86_64-i386-64bit Darwin (’64bit’, ”)
    (‘Darwin’, ‘18.7.0’, ‘Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64’)
    Python 2.7.15
    OSX: (‘10.14.6’, (”, ”, ”), ‘x86_64’)
    Interface language: None
    Successfully initialized third party plugins: DeDRM (6, 6, 3)
    devicePixelRatio: 1.0
    logicalDpi: 72.0 x 72.0
    physicalDpi: 126.000001892 x 127.000001907
    Using calibre Qt style: True
    [0.00] Starting up…
    [0.03] Showing splash screen…
    [0.25] splash screen shown
    [0.25] Initializing db…
    [0.26] db initialized
    [0.26] Constructing main UI…
    [1.84] main UI initialized…
    [1.84] Hiding splash screen
    [1.87] splash screen hidden
    [1.87] Started up in 1.87 seconds with 4 books
    objc[11589]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fff8f16d3d8) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x11c00ff50). One of the two will be used. Which one is undefined.
    DeDRM v6.6.3: Trying to decrypt B004TRQAP4_EBOK.azw
    Using Library AlfCrypto DLL/DYLIB/SO
    DeDRM v6.6.3: Failed to decrypt with error: The .kfx DRMION file cannot be decrypted by itself. A .kfx-zip archive containing a DRM voucher is required.
    DeDRM v6.6.3: Looking for new default Kindle Key after 0.1 seconds
    No k4Mac kindle-info/rainier/kinf2011 files have been found.
    DeDRM v6.6.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 172, in _run_filetype_plugins
    File “calibre_plugins.dedrm.init“, line 624, in run
    File “calibre_plugins.dedrm.init“, line 574, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.6.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
    Traceback (most recent call last):
    File “site-packages/calibre/customize/ui.py”, line 428, in get_file_type_metadata
    File “site-packages/calibre/customize/builtins.py”, line 285, in get_metadata
    File “site-packages/calibre/ebooks/metadata/mobi.py”, line 498, in get_metadata
    File “site-packages/calibre/ebooks/mobi/reader/headers.py”, line 293, in init
    File “site-packages/calibre/ebooks/mobi/reader/headers.py”, line 321, in identity
    UnicodeDecodeError: ‘utf8’ codec can’t decode byte 0xa2 in position 1: invalid start byte
    Added B004TRQAP4 EBOK to db in: 0.0
    Added 1 books in 0.8 seconds

      • Here I copy the log:

        calibre Registro de depuración
        calibre 4.0 Portable embedded-python: True is64bit: False
        Windows-10-10.0.18362-SP0 Windows (’32bit’, ‘WindowsPE’)
        32bit process running on 64bit windows
        (‘Windows’, ’10’, ‘10.0.18362’)
        Python 2.7.16+
        Windows: (’10’, ‘10.0.18362’, ‘SP0′, u’Multiprocessor Free’)
        Interface language: es
        Successfully initialized third party plugins: DeDRM (6, 6, 3) && Prettify Cover 0.9.12
        calibre 4.0 Portable embedded-python: True is64bit: False
        Windows-10-10.0.18362-SP0 Windows (’32bit’, ‘WindowsPE’)
        32bit process running on 64bit windows
        (‘Windows’, ’10’, ‘10.0.18362’)
        Python 2.7.16+
        Windows: (’10’, ‘10.0.18362’, ‘SP0′, u’Multiprocessor Free’)
        Interface language: es
        Successfully initialized third party plugins: DeDRM (6, 6, 3) && Prettify Cover 0.9.12
        Turning on automatic hidpi scaling
        devicePixelRatio: 1.0
        logicalDpi: 96.0 x 96.0
        physicalDpi: 125.711594203 x 125.852903226
        Using calibre Qt style: True
        [0.00] Starting up…
        [0.00] Showing splash screen…
        [0.84] splash screen shown
        [0.84] Initializing db…
        [1.01] db initialized
        [1.01] Constructing main UI…
        Traceback (most recent call last):
        File “site-packages\calibre\gui2\ui.py”, line 157, in init
        File “site-packages\calibre\gui2\ui.py”, line 171, in init_iaction
        File “site-packages\calibre\customize__init__.py”, line 612, in load_actual_plugin
        File “importlib__init__.py”, line 37, in import_module
        File “site-packages\calibre\customize\zipplugin.py”, line 185, in load_module
        File “calibre_plugins.prettify_cover.action”, line 29, in
        File “site-packages\calibre\customize\zipplugin.py”, line 185, in load_module
        File “calibre_plugins.prettify_cover.dialogs”, line 30, in
        ImportError: cannot import name QWebPage
        [2.97] main UI initialized…
        [2.97] Hiding splash screen
        [21.48] splash screen hidden
        [21.48] Started up in 21.48 seconds with 3186 books
        DeDRM v6.6.3: Trying to decrypt Lo mucho que te amé.epub
        DeDRM v6.6.3: Verifying zip archive integrity
        DeDRM v6.6.3: Lo mucho que te amé.epub is a secure Adobe Adept ePub
        DeDRM v6.6.3: Looking for new default Adobe Digital Editions Keys after 1.7 seconds
        DeDRM v6.6.3: Exception when getting default Adobe Key after 1.8 seconds
        Traceback (most recent call last):
        File “calibre_plugins.dedrm.init“, line 349, in ePubDecrypt
        File “calibre_plugins.dedrm.adobekey”, line 378, in adeptkeys
        File “calibre_plugins.dedrm.adobekey”, line 358, in CryptUnprotectData
        ADEPTError: Failed to decrypt user key key (sic)
        DeDRM v6.6.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 172, in _run_filetype_plugins
        File “calibre_plugins.dedrm.init“, line 635, in run
        File “calibre_plugins.dedrm.init“, line 406, in ePubDecrypt
        DeDRMError: DeDRM v6.6.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
        C:\Mis archivos\Calibre\Calibre\app\pylib.zip\dateutil\parser_parser.py:1177: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode – interpreting them as being unequal
        Added Lo mucho que te amé to db in: 1.3
        Added 1 books in 4.3 seconds
        Exception TypeError: “‘NoneType’ object is not callable” in <bound method NativeFunction.__del__ of > ignored
        Exception TypeError: “‘NoneType’ object is not callable” in <bound method NativeFunction.__del__ of > ignored

  15. I just installed 6.6.3 and cannot remove the DRM. I downloaded the book I purchased from Amazon using the “Transfer by USB” option. I then drag it over the DeDRM app icon and the process begins, but then I get a message that there was an error. I’m using MacOS Mojave 10.14.6. I don’t use Kindle for Mac, I just like to read the books in iBooks on my iPad or iPhone. I’ve input my Kindle serial number into the app (it’s an old keyboard Kindle from 2012).

      • Pardon my ignorance, but how do I find the log? I just get a pop-up that there was an error or a warning opening one eBook and that’s it. I looked at the menus with the app open but don’t find a reference to the log.

        • The DeDRM app should leave a log file called “DeDRM.log” on your Desktop when it finishes. It’s a simple text file. Open it, copy the contents, then paste it here.

          • Here is the log:
            There is 1 ebook to be decrypted.
            Processing file: The Great Passage.azw
            shellcommand: /usr/bin/python ‘/private/var/folders/nq/t8gvstvc8xlf5q001s7ncxk00000gp/T/AppTranslocation/0A50AA0E-7126-4310-977E-E86D3F120805/d/DeDRM.app/Contents/Resources/k4mobidedrm.py’ -s ‘B008A0A003952331’ ‘/Users/rolandoG4/Downloads/BOOKS DIGITAL/The Great Passage.azw’ ‘/Users/rolandoG4/Downloads/BOOKS DIGITAL/DRM Removed Files/’ > ‘/Users/rolandoG4/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
            shellresult: Using Library AlfCrypto DLL/DYLIB/SO
            Traceback (most recent call last):
            File “/private/var/folders/nq/t8gvstvc8xlf5q001s7ncxk00000gp/T/AppTranslocation/0A50AA0E-7126-4310-977E-E86D3F120805/d/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 94, in
            import kfxdedrm
            File “/private/var/folders/nq/t8gvstvc8xlf5q001s7ncxk00000gp/T/AppTranslocation/0A50AA0E-7126-4310-977E-E86D3F120805/d/DeDRM.app/Contents/Resources/kfxdedrm.py”, line 20, in
            import ion
            File “/private/var/folders/nq/t8gvstvc8xlf5q001s7ncxk00000gp/T/AppTranslocation/0A50AA0E-7126-4310-977E-E86D3F120805/d/DeDRM.app/Contents/Resources/ion.py”, line 20, in
            from Crypto.Cipher import AES
            ImportError: No module named Crypto.Cipher
            shellcommand: /usr/bin/python ‘/private/var/folders/nq/t8gvstvc8xlf5q001s7ncxk00000gp/T/AppTranslocation/0A50AA0E-7126-4310-977E-E86D3F120805/d/DeDRM.app/Contents/Resources/kindlekey.py’ ‘/Users/rolandoG4/Library/Preferences/com.apprenticealf.dedrm/newKeys/’ > ‘/Users/rolandoG4/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
            shellresult: kindlekey.py v2.6
            Copyright © 2010-2016 by some_updates, Apprentice Alf and Apprentice Harper
            Found k4Mac kinf2011 file: /Users/rolandoG4/Library/Application Support/Kindle/storage/.kinf2011
            Couldn’t decrypt file.
            Could not retrieve Kindle for Mac/PC key.

            There was an error with 1 ebook:
            The Great Passage.azw couldn’t be decrypted.

          • I noticed that the log says it couldn’t find the Kindle for Mac/PC key. I don’t know how that figures into the process. I’ve always downloaded file from Amazon with the option ‘Transfer via USB’ then opened the file in iBooks. I’ve entered my Kindle serial number in DeDRM. If the problem is not having the Kindle for Mac/PC key, how do I find that key and how do I provide it to DeDRM?

            • If you have it in iBooks, why not just put that copy into Calibre? That’s what I did with all the ePubs in iBooks using iBookCopy.app

              • Sorry, xromad, I didn’t make myself clear. I do put all the books into Calibre, I just remove encryption before I do that, rather than doing it within Calibre. I didn’t try doing the decryption through Calibre with this new problem because I figured the drag and drop was a simpler process and it it didn’t work there, it probably wouldn’t work within Calibre either,

                • The Mac DeDRM standalone is known to not work properly all the time. The recommendation is to use the Calibre plug-in and let Calibre remove DRM on import. IIRC, iBookCopy MAY do the job first but since I just put its output into Calibre, I can’t confirm it.

                  • I use the Mac standalone app all the time without problem.

                    The key error in Roland’s log is: ImportError: No module named Crypto.Cipher

                    A workaround for this on Alf’s FAQ on GitHub, is to open a Terminal window and input:

                    sudo python -m pip install pycrypto

                    if error “No module named pip”, type:

                    sudo easy_install pip

                    try again: sudo python -m pip install pycrypto

                    if installation fails because “C compiler cannot create executables” and pop-up window asks you to install Command Line Tools for XCode, agree by clicking “Continue”

                    try again: sudo python -m pip install pycrypto

                    If after installing pycrypto decryption still fails with something about pylzma in error log, try:

                    sudo python -m pip install pylzma

                    (I tried to post a link, but it seems to have been caught in moderation)

                    • Thank you so much for the thought you put into this, Zola, but I don’t have the background to have enough confidence to work in the terminal this much. But on the bright side, I did install the Calibre plugin and DeDRM is successfully decrypting there. So I’ll modify my workflow to just import the books into Calibre for decrypting and then just import to iBooks from the Calibre library. I have to go into Calibre anyway to convert to epub, so no extra work, really. Thanks again.

                  • Thanks for the suggestion, xromad, I installed the Calibre plugin and it’s removing the DRM fine there. I collect all my books in Calibre anyway and use that to convert the Kindle files to epub, so no extra work. I then go to Apple Books and add the book from the Calibre library. Apple Books is syncing fine between devices now, so the book shows up on my iPad and iPhone without any other action needed. And if anyone is wondering why I’m going through this, I just like the Apple Books interface better than Kindle for iPad/iPhone, and the Kindle versions are usually less expensive than Apple’s. Thanks again.

                    • I dumped iBooks after an update totally screwed up my sort by author/series of the 1000+ books on my iPad. iBooks limited sort options require manually sorting your library which is very labor-intensive when you have large libraries. I now use MapleRead SE on my iPads for my almost 2K books.

      • It is probably not the normal DeDRM error, but a typical macOS safety feature which prevents download from unknown sources to run. There are a few things to allow this, I think both may be needed:
        Apple-Menu – System Preferences – Safety – Security & Privacy – Privacy,
        select “Full Disk Access” in the left list, klick the lock and input your Admin credentials, select the DeDRM.App in the right list and set (x) to allow full disk access.
        Klick the lock again to secure that setting, quit System Settings.

        Test again.
        (the following is another way to this but according to Google should do the same)
        – Control-click the app icon, then choose Open from the shortcut menu.
        – Click Open

        If all still fails, the log is needed.

        • Hi Ingo, I did as you suggested and gave DeDRM full disk access, but still got the error message. Here is the log from that event, in case it is any different from the log for the error prior to granting full disk access:

          There is 1 ebook to be decrypted.
          Processing file: The Great Passage.azw
          shellcommand: /usr/bin/python ‘/private/var/folders/nq/t8gvstvc8xlf5q001s7ncxk00000gp/T/AppTranslocation/F034B50A-334A-489F-9393-85FC3A85B628/d/DeDRM.app/Contents/Resources/k4mobidedrm.py’ -s ‘B008A0A003952331’ ‘/Users/rolandoG4/Downloads/BOOKS DIGITAL/The Great Passage.azw’ ‘/Users/rolandoG4/Downloads/BOOKS DIGITAL/DRM Removed Files/’ > ‘/Users/rolandoG4/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
          shellresult: Using Library AlfCrypto DLL/DYLIB/SO
          Traceback (most recent call last):
          File “/private/var/folders/nq/t8gvstvc8xlf5q001s7ncxk00000gp/T/AppTranslocation/F034B50A-334A-489F-9393-85FC3A85B628/d/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 94, in
          import kfxdedrm
          File “/private/var/folders/nq/t8gvstvc8xlf5q001s7ncxk00000gp/T/AppTranslocation/F034B50A-334A-489F-9393-85FC3A85B628/d/DeDRM.app/Contents/Resources/kfxdedrm.py”, line 20, in
          import ion
          File “/private/var/folders/nq/t8gvstvc8xlf5q001s7ncxk00000gp/T/AppTranslocation/F034B50A-334A-489F-9393-85FC3A85B628/d/DeDRM.app/Contents/Resources/ion.py”, line 20, in
          from Crypto.Cipher import AES
          ImportError: No module named Crypto.Cipher
          shellcommand: /usr/bin/python ‘/private/var/folders/nq/t8gvstvc8xlf5q001s7ncxk00000gp/T/AppTranslocation/F034B50A-334A-489F-9393-85FC3A85B628/d/DeDRM.app/Contents/Resources/kindlekey.py’ ‘/Users/rolandoG4/Library/Preferences/com.apprenticealf.dedrm/newKeys/’ > ‘/Users/rolandoG4/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
          shellresult: kindlekey.py v2.6
          Copyright © 2010-2016 by some_updates, Apprentice Alf and Apprentice Harper
          Found k4Mac kinf2011 file: /Users/rolandoG4/Library/Application Support/Kindle/storage/.kinf2011
          Couldn’t decrypt file.
          Could not retrieve Kindle for Mac/PC key.

          There was an error with 1 ebook:
          The Great Passage.azw couldn’t be decrypted.

        • Ingo, which MacOS version are you citing? None of my versions show a “Safety” tab; “Security & Privacy” are just in the main “System Preferences” window.

          • Oh, sorry, my bad. First I started with my own translation ( in German the System Setting is “Sicherheit”), when I remembered I have “language switcher” and launched the System settings in English (although titles remained in German) and forgot to change that in the text. Sorry for the confusion.

  16. General question concerning KFX from Amazon:
    For some time now several bypasses have been discussed here / used succesfully using old Kindle-versions etc. Which seem to work somehow (haven’t figured it out yet, but have still to try some variants) – but they will expire as new OS-versions etc. appear.

    Is there any idea or people working on a solution to directly deal with KFX and deDRM it like any other format?
    Or did everyone surrender to Amazons encrypting power?

    • The latest changes to the DRM used on KFX have not been figured out yet. This is an all volunteer operation — so no idea if someone is working on it until (or if) they decide to share it.

      To get KFX files which these tools can handle, you’ll need the older 32-bit Kindle for Mac/PC (versions 1.19 through 1.24). But for conversion, you’re probably better off sticking to the older (KF8/AZW3) format when possible. Those can be downloaded with the 64-bit Kindle for Mac 1.25 and later with the workaround Zola linked. Or from the Amazon website if you have an E-ink Kindle. PC users will be OK until Kindle for PC version 1.24 stops working (no imminent threat of 32-bit apps getting cut off), but right now version 1.17 is still fine.

  17. Update to 4.1 fails in DeDRM plugin, so I attempted to update to 6.3.3 and got following error:

    calibre, version 4.1.0
    ERROR: Unhandled exception: InvalidPlugin:The plugin in u’/Users/Paul/Downloads/DeDRM_tools_6.6.3.zip’ is invalid. It does not contain a top-level init.py file

    calibre 4.1 embedded-python: True is64bit: True
    Darwin-18.7.0-x86_64-i386-64bit Darwin (’64bit’, ”)
    (‘Darwin’, ‘18.7.0’, ‘Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64’)
    Python 2.7.16
    OSX: (‘10.14.6’, (”, ”, ”), ‘x86_64′)
    Interface language: None
    Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 20, 0) && DeDRM (6, 6, 3) && K4PC, K4Mac, Kindle Mobi and Topaz DeDRM (0, 2, 6) && Package KFX (from KFX Input) (1, 20, 0) && KFX metadata reader (from KFX Input) (1, 20, 0) && KFX Input (1, 20, 0) && eReader PDB 2 PML (0, 0, 4)
    Traceback (most recent call last):
    File “site-packages/calibre/gui2/preferences/plugins.py”, line 319, in add_plugin
    File “site-packages/calibre/customize/ui.py”, line 472, in add_plugin
    File “site-packages/calibre/customize/ui.py”, line 61, in load_plugin
    File “site-packages/calibre/customize/zipplugin.py”, line 194, in load
    File “site-packages/calibre/customize/zipplugin.py”, line 292, in _locate_code
    InvalidPlugin: The plugin in u’/Users/Paul/Downloads/DeDRM_tools_6.6.3.zip’ is invalid. It does not contain a top-level init.py file

    How do I fix this?

    • You are trying to add the tools archive (e.g. DeDRM_tools_6.5.3.zip) instead of the plugin. The tools archive is not the plugin. It is a collection of DRM removal tools which includes the plugin. You must unzip the archive, and install the calibre plugin (DeDRM_plugin.zip) from a folder called “DeDRM_calibre_plugin” in the unzipped archive.

      Please report back whether the Calibre plugin works in Calibre 4.1. Thanks!

      • I successfully installed the DeDRM plugin and restarted Calibre. When attempting to Convert a KFX-ZIP to MOBI, I received the following error:

        Regards, Paul

        >

      • Here is t he debug trace:

        > >> Begin forwarded message: >> >> From: Paul Maxfield <paulemaxfield@gmail.com > >> Subject: Re: [New comment] DRM Removal Tools for eBooks >> Date: October 9, 2019 at 10:15:46 AM EDT >> To: Apprentice Alf’s Blog <comment+e14bire5z2_frqf1xw059vhq8p3neeubacppdji8ncfu6xll@comment.wordpress.com > >> >> I successfully installed the DeDRM plugin and restarted Calibre. When attempting to Convert a KFX-ZIP to MOBI, I received the following error: >> >> >> >> Regards, >> Paul >> >>>

        • Darwin-18.7.0-x86_64-i386-64bit Darwin (’64bit’, ”)
          (‘Darwin’, ‘18.7.0’, ‘Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64’)
          Python 2.7.16
          OSX: (‘10.14.6’, (”, ”, ”), ‘x86_64′)
          Interface language: None
          Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 20, 0) && DeDRM (6, 6, 3) && K4PC, K4Mac, Kindle Mobi and Topaz DeDRM (0, 2, 6) && Package KFX (from KFX Input) (1, 20, 0) && KFX metadata reader (from KFX Input) (1, 20, 0) && KFX Input (1, 20, 0) && eReader PDB 2 PML (0, 0, 4)
          calibre 4.1 embedded-python: True is64bit: True
          Darwin-18.7.0-x86_64-i386-64bit Darwin (’64bit’, ”)
          (‘Darwin’, ‘18.7.0’, ‘Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64’)
          Python 2.7.16
          OSX: (‘10.14.6’, (”, ”, ”), ‘x86_64′)
          Interface language: None
          Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 20, 0) && DeDRM (6, 6, 3) && K4PC, K4Mac, Kindle Mobi and Topaz DeDRM (0, 2, 6) && Package KFX (from KFX Input) (1, 20, 0) && KFX metadata reader (from KFX Input) (1, 20, 0) && KFX Input (1, 20, 0) && eReader PDB 2 PML (0, 0, 4)
          devicePixelRatio: 2.0
          logicalDpi: 72.0 x 72.0
          physicalDpi: 86.5000012991 x 86.0000012916
          Using calibre Qt style: True
          [0.00] Starting up…
          [0.02] Showing splash screen…
          [0.21] splash screen shown
          [0.21] Initializing db…
          [0.25] db initialized
          [0.25] Constructing main UI…
          [0.94] main UI initialized…
          [0.94] Hiding splash screen
          [116.05] splash screen hidden
          [116.05] Started up in 116.05 seconds with 873 books
          Worker Launch took: 0.0763499736786
          Job: 0 Convert book 1 of 1 (A Stoneybrook Mystery Collection: A Cozy Mystery Box Set Books 1-3) finished
          Convert book 1 of 1 (A Stoneybrook Mystery Collection: A Cozy Mystery Box Set Books 1-3)
          Conversion options changed from defaults:
          read_metadata_from_opf: u’/var/folders/3n/hhtpb3ls27z575rhs57_p7pr0000gn/C/calibre_4.1.0_tmp_fVCwYM/2BTUt9.opf’
          output_profile: u’kindle_dx’
          verbose: 2
          cover: u’/var/folders/3n/hhtpb3ls27z575rhs57_p7pr0000gn/C/calibre_4.1.0_tmp_fVCwYM/x6itTB.jpeg’
          Resolved conversion options
          calibre version: 4.1.0
          {‘allow_conversion_with_errors’: False,
          ‘asciiize’: False,
          ‘author_sort’: None,
          ‘authors’: None,
          ‘base_font_size’: 0.0,
          ‘book_producer’: None,
          ‘change_justification’: u’original’,
          ‘chapter’: u”//[((name()=’h1′ or name()=’h2′) and re:test(., ‘\s((chapter|book|section|part)\s+)|((prolog|prologue|epilogue)(\s+|$))’, ‘i’)) or @class = ‘chapter’]”,
          ‘chapter_mark’: u’pagebreak’,
          ‘comments’: None,
          ‘cover’: u’/var/folders/3n/hhtpb3ls27z575rhs57_p7pr0000gn/C/calibre_4.1.0_tmp_fVCwYM/x6itTB.jpeg’,
          ‘debug_pipeline’: None,
          ‘dehyphenate’: True,
          ‘delete_blank_paragraphs’: True,
          ‘disable_font_rescaling’: False,
          ‘dont_compress’: False,
          ‘duplicate_links_in_toc’: False,
          ’embed_all_fonts’: False,
          ’embed_font_family’: None,
          ‘enable_heuristics’: False,
          ‘expand_css’: False,
          ‘extra_css’: None,
          ‘extract_to’: None,
          ‘filter_css’: u”,
          ‘fix_indents’: True,
          ‘font_size_mapping’: None,
          ‘format_scene_breaks’: True,
          ‘html_unwrap_factor’: 0.4,
          ‘input_encoding’: None,
          ‘input_profile’: <calibre.customize.profiles.InputProfile object at 0x109ecc950>,
          ‘insert_blank_line’: False,
          ‘insert_blank_line_size’: 0.5,
          ‘insert_metadata’: False,
          ‘isbn’: None,
          ‘italicize_common_cases’: True,
          ‘keep_ligatures’: False,
          ‘language’: None,
          ‘level1_toc’: None,
          ‘level2_toc’: None,
          ‘level3_toc’: None,
          ‘line_height’: 0.0,
          ‘linearize_tables’: False,
          ‘margin_bottom’: 5.0,
          ‘margin_left’: 5.0,
          ‘margin_right’: 5.0,
          ‘margin_top’: 5.0,
          ‘markup_chapter_headings’: True,
          ‘max_toc_links’: 50,
          ‘minimum_line_height’: 120.0,
          ‘mobi_file_type’: u’old’,
          ‘mobi_ignore_margins’: False,
          ‘mobi_keep_original_images’: False,
          ‘mobi_toc_at_start’: False,
          ‘no_chapters_in_toc’: False,
          ‘no_inline_navbars’: True,
          ‘no_inline_toc’: False,
          ‘output_profile’: <calibre.customize.profiles.KindleDXOutput object at 0x109edc090>,
          ‘page_breaks_before’: u’/’,
          ‘personal_doc’: u'[PDOC]’,
          ‘prefer_author_sort’: False,
          ‘prefer_metadata_cover’: False,
          ‘pretty_print’: False,
          ‘pubdate’: None,
          ‘publisher’: None,
          ‘rating’: None,
          ‘read_metadata_from_opf’: u’/var/folders/3n/hhtpb3ls27z575rhs57_p7pr0000gn/C/calibre_4.1.0_tmp_fVCwYM/2BTUt9.opf’,
          ‘remove_fake_margins’: True,
          ‘remove_first_image’: False,
          ‘remove_paragraph_spacing’: False,
          ‘remove_paragraph_spacing_indent_size’: 1.5,
          ‘renumber_headings’: True,
          ‘replace_scene_breaks’: u”,
          ‘search_replace’: ‘[]’,
          ‘series’: None,
          ‘series_index’: None,
          ‘share_not_sync’: False,
          ‘smarten_punctuation’: False,
          ‘sr1_replace’: None,
          ‘sr1_search’: None,
          ‘sr2_replace’: None,
          ‘sr2_search’: None,
          ‘sr3_replace’: None,
          ‘sr3_search’: None,
          ‘start_reading_at’: None,
          ‘subset_embedded_fonts’: False,
          ‘tags’: None,
          ‘timestamp’: None,
          ‘title’: None,
          ‘title_sort’: None,
          ‘toc_filter’: None,
          ‘toc_threshold’: 6,
          ‘toc_title’: None,
          ‘transform_css_rules’: ‘[]’,
          ‘unsmarten_punctuation’: False,
          ‘unwrap_lines’: True,
          ‘use_auto_toc’: False,
          ‘verbose’: 2}
          InputFormatPlugin: KFX Input running
          on /var/folders/3n/hhtpb3ls27z575rhs57_p7pr0000gn/C/calibre_4.1.0_tmp_fVCwYM/zzzd3W.kfx-zip
          Software versions: KFX Input 1.20.0, calibre 4.1, Darwin-18.7.0-x86_64-i386-64bit
          KFX Input plugin help is available at https://www.mobileread.com/forums/showthread.php?t=291290
          Converting /var/folders/3n/hhtpb3ls27z575rhs57_p7pr0000gn/C/calibre_4.1.0_tmp_fVCwYM/zzzd3W.kfx-zip
          Processing container: A Stoneybrook Mystery Collection_ A Cozy Mystery Box Set Books 1-3_B07PYT4XRY.kfx
          Traceback (most recent call last):
          File “calibre_plugins.kfx_input.init“, line 100, in convert
          File “calibre_plugins.kfx_input.init“, line 195, in convert_from_kfx
          File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 106, in convert_to_epub
          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 A Stoneybrook Mystery Collection_ A Cozy Mystery Box Set Books 1-3_B07PYT4XRY.kfx has DRM and cannot be converted
          Python function terminated unexpectedly: This book has DRM!
          Traceback (most recent call last):
          File “/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py”, line 163, in main
          return run_entry_point()
          File “/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py”, line 121, in run_entry_point
          return getattr(pmod, func)()
          File “site-packages/calibre/utils/ipc/worker.py”, line 208, in main
          File “site-packages/calibre/gui2/convert/gui_conversion.py”, line 43, in gui_convert_override
          File “site-packages/calibre/gui2/convert/gui_conversion.py”, line 28, in gui_convert
          File “site-packages/calibre/ebooks/conversion/plumber.py”, line 1110, in run
          File “site-packages/calibre/customize/conversion.py”, line 246, in call
          File “calibre_plugins.kfx_input.init“, line 103, in convert
          calibre.ebooks.DRMError: This book has DRM

          • DRM removal happens on import, not conversion. Try deleting your book then re-importing it. When you re-import, DRM removal should occur. After that, conversion should work.

            • Tried what you indicated and it didn’t work. Here is the debug file:

              calibre Debug log
              calibre 4.1 embedded-python: True is64bit: True
              Darwin-18.7.0-x86_64-i386-64bit Darwin (’64bit’, ”)
              (‘Darwin’, ‘18.7.0’, ‘Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64’)
              Python 2.7.16
              OSX: (‘10.14.6’, (”, ”, ”), ‘x86_64′)
              Interface language: None
              Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 20, 0) && DeDRM (6, 6, 3) && K4PC, K4Mac, Kindle Mobi and Topaz DeDRM (0, 2, 6) && Package KFX (from KFX Input) (1, 20, 0) && eReader PDB 2 PML (0, 0, 4) && KFX metadata reader (from KFX Input) (1, 20, 0) && KFX Input (1, 20, 0)
              calibre 4.1 embedded-python: True is64bit: True
              Darwin-18.7.0-x86_64-i386-64bit Darwin (’64bit’, ”)
              (‘Darwin’, ‘18.7.0’, ‘Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64’)
              Python 2.7.16
              OSX: (‘10.14.6’, (”, ”, ”), ‘x86_64’)
              Interface language: None
              Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 20, 0) && DeDRM (6, 6, 3) && K4PC, K4Mac, Kindle Mobi and Topaz DeDRM (0, 2, 6) && Package KFX (from KFX Input) (1, 20, 0) && eReader PDB 2 PML (0, 0, 4) && KFX metadata reader (from KFX Input) (1, 20, 0) && KFX Input (1, 20, 0)
              devicePixelRatio: 2.0
              logicalDpi: 72.0 x 72.0
              physicalDpi: 86.5000012991 x 86.0000012916
              Using calibre Qt style: True
              [0.00] Starting up…
              [0.01] Showing splash screen…
              [0.21] splash screen shown
              [0.21] Initializing db…
              [0.25] db initialized
              [0.25] Constructing main UI…
              [0.95] main UI initialized…
              [0.95] Hiding splash screen
              objc[69115]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fffafe113d8) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x113cd1f50). One of the two will be used. Which one is undefined.
              Gather KFX-ZIP (from KFX Input) 1.20.0: Importing /Volumes/Kindle/documents/Murder in Provence_ Book 3 of the Maggie Newberry Mysteries (The Maggie Newberry Mystery Series)B005H41EM2.kfx
              Gather KFX-ZIP (from KFX Input): Gathered 5 file(s) as /var/folders/3n/hhtpb3ls27z575rhs57_p7pr0000gn/C/calibre_4.1.0_tmp_Wyq3sd/fz9n2N.kfx-zip
              DeDRM v6.6.3: Trying to decrypt fz9n2N.kfx-zip
              Using Library AlfCrypto Python
              Decrypting KFX-ZIP ebook: fz9n2N
              Found 3 keys to try after 0.0 seconds
              Decrypting KFX DRM voucher: voucher
              DeDRM v6.6.3: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
              DeDRM v6.6.3: Looking for new default Kindle Key after 0.0 seconds
              No k4Mac kindle-info/rainier/kinf2011 files have been found.
              DeDRM v6.6.3: Ultimately failed to decrypt after 0.0 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 624, in run
              File “calibre_plugins.dedrm.init“, line 574, in KindleMobiDecrypt
              DeDRMError: DeDRM v6.6.3: Ultimately failed to decrypt after 0.0 seconds. Read the FAQs at Harper’s repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
              Package KFX (from KFX Input) 1.20.0: Packaging /var/folders/3n/hhtpb3ls27z575rhs57_p7pr0000gn/C/calibre_4.1.0_tmp_Wyq3sd/fz9n2N.kfx-zip
              Processing container: CR!BPGBSMNKYS4CFB7W430H82QRETZ5.kfx
              Processing container: CR!J4M8B1T9ZD2A31TAMT968TFE7F8C.kfx
              Processing container: Murder in Provence Book 3 of the Maggie Newberry Mysteries (The Maggie Newberry Mystery Series) B005H41EM2.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 Murder in Provence Book 3 of the Maggie Newberry Mysteries (The Maggie Newberry Mystery Series) B005H41EM2.kfx has DRM and cannot be converted
              KFX metadata reader (from KFX Input) activated for /var/folders/3n/hhtpb3ls27z575rhs57_p7pr0000gn/C/calibre_4.1.0_tmp_Wyq3sd/19TBwj_add_books/0/Murder in Provence Book 3 of the Maggie Newberry Mysteries (The Maggie Newberry Mystery Series)_B005H41EM2.kfx-zip

              {u’bsd_drives’: {u’main’: u’/dev/disk4s1′},
              u’drives’: {u’main’: ‘/Volumes/Kindle’},
              u’mount_map’: {‘/dev/disk2s1’: ‘/’,
              ‘/dev/disk2s4’: ‘/private/var/vm’,
              ‘/dev/disk3s2’: ‘/Volumes/My Passport’,
              ‘/dev/disk4s1’: ‘/Volumes/Kindle’,
              ‘devfs’: ‘/dev’,
              ‘map -hosts’: ‘/net’,
              ‘map auto_home’: ‘/home’}}
              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
              DEBUG: 0.0 USBMS: scan from root False /Volumes/Kindle/documents
              DEBUG: 0.1 USBMS: count found in cache: 74, count of files in metadata: 74, need_sync: False
              DEBUG: 0.1 USBMS: Finished fetching list of books from device. oncard= None
              DEBUG: 0.1 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= carda
              DEBUG: 0.1 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= 74
              DeviceJob: set_books_in_library finished: time= 0.00733494758606
              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: 0 Get device information finished
              No details available.
              Job: 1 Set library information finished
              No details available.
              Job: 2 Get list of books on device finished
              No details available.
              [125.20] splash screen hidden
              [125.20] Started up in 125.20 seconds with 843 books
              Added Murder in Provence: Book 3 of the Maggie Newberry Mysteries (The Maggie Newberry Mystery Series) to db in: 0.0
              Added 1 books in 0.7 seconds
              Worker Launch took: 0.0858898162842

  18. Just wanted to share this with everyone interested:

    I did a fresh install of macOS 10.15 (Catalina), Calibre 4.1. and DeDRM 6.6.3
    The Calibre plugin works smoothly (at least with the PDFs for Adobe Digital Edition)
    The DeDRM application is still 32bit as it has been reported before and will therefore not open on Catalina
    There is an open issue on Github for this. If it takes longer to fix, it might make sense to add something to the DeDRM app readme, which currently states that the app is 64 bit
    I used ADE (Adobe Digital Edition) 4.5.10, which is 64bit.
    Here is the catch: If the media is delivered with ADE 4.5.10 using the hardened DRM, which is up to the vendor of the media to decide, it cannot be decrypted
    There is a good chance (or maybe even guarantee) that the decrypt will still succeed using ADE 2.0.1 (32 bit) on 10.14 or older (e.g. in a VM), as ADE 2.0.1 does not support the hardened DRM
    Bottom line: upgrading to Catalina may make it impossible to decrypt files protected with Adobe DRM, regardless of 64bit support of DeDRM. This would only change if someone finds a way to break Adobes hardened DRM

    • Yes, this has been a concern of mine as well. When Adobe first introduced hardened DRM, there was talk about 3 settings available to vendors: 1) no hardened DRM regardless of ADE version, 2) hardened DRM on ADE 3 or 4, but regular DRM on ADE 2, and 3) hardened DRM required, which means user must use ADE 3 or 4 and book will fail to download on ADE 2. However adoption of hardened DRM has been limited so far.

  19. I’m getting a segmentation fault when I try to open calibre after updating and I think it’s related to the tools.

    calibre 4.1 embedded-python: True is64bit: True
    Linux-3.16.0-38-generic-x86_64-with-debian-jessie-sid Linux (’64bit’, ‘ELF’)
    (‘Linux’, ‘3.16.0-38-generic’, ‘#52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015’)
    Python 2.7.16
    Linux: (‘debian’, ‘jessie/sid’, ”)
    Interface language: None
    Failed to initialize plugin: u’/home/xxxxxx/.config/calibre/plugins/DeDRM.zip’
    Traceback (most recent call last):
    File “site-packages/calibre/customize/ui.py”, line 703, in initialize_plugins
    File “site-packages/calibre/customize/ui.py”, line 61, in load_plugin
    File “site-packages/calibre/customize/zipplugin.py”, line 203, in load
    File “importlib/init.py”, line 37, in import_module
    File “site-packages/calibre/customize/zipplugin.py”, line 185, in load_module
    File “calibre_plugins.dedrm.init“, line 83, in
    File “site-packages/calibre/gui2/init.py”, line 16, in
    ImportError: cannot import name QT_VERSION
    Successfully initialized third party plugins: EpubMerge (2, 1, 1) && Obok DeDRM (6, 5, 3) && EpubSplit (2, 2, 1) && Modify ePub (1, 3, 13) && Barnes & Noble (1, 2, 14)
    Segmentation fault

    Apologies if this has nothing to do with the tools, but I’m stumped. My only guess is that I’m using an old version of the plugin and it’s incompatible with the latest calibre, but that leaves me with the question of how to update the plugins when I can’t get into calibre.

    • Uninstall latest calibre and go back to previous? Remove or disable DeDRM. Then try installing latest calbre and loading latest DeDRM. I’m using calibre 4.1 and DeDRM 6.6.3 without issue on Windows. Haven’t seen anyone else with Linux report problems here yet.

      • Tried that and it didn’t work. Every time I install the latest version the errors start with failing to initialize the plugin. I’d ask on the calibre forums but I already know they’ll refuse to respond because of the deDRM.

        Thanks anyway.

  20. CARE by TEA/Vivlio is now commercially used, not just by libraries. Would appreciate if that DRM mechanism could be DeDRM’d in the near future 🙂

  21. There have been just a few posts about Catalina, and I wanted to add something and solicit additional feedback.
    I had run into the Kindle >1.24 issues and followed the recommended tactic (turning off auto upgrade, deleting and installing 1.23.1 (under High Sierra) and all is working (running 6.6.1)

    I have upgraded to Catalina and the conversion for adobe seems to be working fine, but of course Kindle does not work under Catalina. I saw that there has been a post (https://www.mobileread.com/forums/showpost.php?p=3819708&postcount=508) that Kindle for Mac 1.26 (version current in App Store) will work with Catalina, Kindle 1.26 and Tools 6.6.3 IF, as in my case apparently, things working with Kindle 1.23.1 before the upgrade.

    I am of course leery of moving forward with any changes less things break, so I am looking for any confirmations as to success or failure, and recommendations as to whether I should upgrade from 6.6.1 to 6.6.3 before or after upgrading to Kindle 1.26.

    In the past, I used Kindle to download the file, and then used calibre to add book from inside the Kindle directory on my Mac. Don’t know if this is what odamizu intended, and whether one needs to delete all old files, then close kindle, and then reopen, etc.

    Anyone else have any experience with Catalina?

    • For the best chance of success, you need to update to 1.26 and confirm it’s working with Alf BEFORE updating to Catalina.

      If you have already updated to Catalina while on 1.23.1, then the worse that will happen if you update to 1.26 is that it will continue to not work. However, if you’re lucky and there’s a kinf2011 key file leftover from when you were on High Sierra AND Amazon recognizes your device as the same on Catalina as it was on High Sierra, there’s a reasonable chance it will succeed.

      It would probably be best to leave Alf at 6.6.1 while you try this. If it succeeds, it will probably be safe update to 6.63, but no guarantees.

      Do NOT delete any old files in User > Library as that will almost guarantee failure. However, it is safe to remove individual ebooks from your Kindle Library while using Kindle for Mac. Just don’t delete files directly from any User > Library folders.

      • If that were the case, then what would be responsible for the plugin to begin working with Kindle 1.26? In other words, what would have generated the kinf2011 key file?

  22. kinf2011 is part of Kindle for Mac 1.23.1. Alf needs kinf2011 to create dedrm.json, which unlocks your books.

    1.26 does not use kinf2011. Instead it uses kinf2018, which Alf cannot handle (yet?).

    So you either need kinf2011 or dedrm.json leftover from 1.23.1 AND because keys are device-specific, Amazon must recognize 1.26 as being on the same device as 1.23.1.

    If kinf2011 or dedrm.json have been lost, or if Amazon treats 1.26 as being on a new device after upgrading to Catalina, Alf won’t work. This is why it’s best to get 1.26 working with Alf before upgrading to Catalina.

    • OK. I installed 1.26.1 and it recognizes the books already downloaded, I think. But when I right click in Kindle to download, and the app downloads, it does not seem to appear in the same directory as the rest of the books. Where should I look for the downloaded book using 1.26 and catalina?

      • Try:
        Users > Home > Library > Containers > com.amazon.Kindle > Data > Library > My Kindle Content
        – OR –
        Users > Home > Library > Application Support > Kindle > My Kindle Content

  23. oy…..
    found that kindle 1.26 had moved directory. tried pointing back to old directory.
    download produced the book there in azw format.
    attempt to add resulted in adding in KFX-ZIP file, which is useless.

      • Yes, the chmod command, but apparently I had done something else out of order. Removed the kfx-zip, removed the book from the kindle local lib, upgraded to 6.6.3 (already had both kfx plugins at current version), restarted calibre, and…..

        JOY!

        so, I was able to upgrade to catalina while at Kindle 1.23.1 ***, install Kindle 1.26.1, point kindle 1.26.1 to the 1.23.1 store, download the book using context menu in kindle 1.26.1, add the book to calibre, and have the book appear as an azw3, convertible to epub.

        Oh frabjous day!

        this demonstrates that one need not have upgraded from 1.23.1 to 1.26 before upgrading to catalina (though I did have 1.23.1` working before upgrading. Not sure what all the intricacies might be, but my sequence did apparently result in everything working (HUGE sigh of relief).

        Thanks.

        *** Note: I had kindle set to auto upgrade, so had had to delete the upgraded kindle and return to 1.23.1. That meant I had two stores on my computer, as the “new” kindle created a new store, but when I reinstalled 1.23.1 it went back to using the old location. I pointed the newly installed kindle back to the 1.23.1 store.

        • Ah, good to know. But you do need to having 1.23 working with the DeDRM plugin before upgrading to Catalina. And safest to also get 1.26 working beforehand because you can’t go back to 1.23 after.

        • Excellent! Can you explain how you “point kindle 1.26.1 to the 1.23.1 store”?

          Since decryption keys are device specific, knowing how to do this will increase the likelihood of 1.26.1 continuing to work if you have a valid kinf2011 or dedrm.json.

          • To change where Kindle points:
            Open Kindle 1.26.1.
            From the menu bar go Kindle -> Preferences
            Under “Content Folder” click on “Change” and select Library/Application Support/Kindle/My Kindle Content instead of Library/Containers/com.Amazon.Kindle/Data/Library/Application Support/My Kindle Content
            ( the latter being where 1.25 apparently set up the content folder )

            BTW, the Preferences panel also shows when the device was registered – in my case, in 2013 🙂 so it made the “leap”

            There is a checkup selection under help, and I ran that and kindle’s internals say it is healthy,
            BUT I have noticed that Kindle 1.26.1 crashes on exit now, though it appears to save all settings before doing so, lol.. I don’t know if this is in any way related to anything I have done, and frankly at this point don’t care because the crashing doesn;t seem to impact any functionality.

            • Thanks! This is very helpful in case things go awry through the upgrade process.

              As for the crash, that is an unfortunate side-effect of using chmod -x.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.