DRM Removal Tools for eBooks

Version 7.2.1 released on 11 April, 2021

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 in the Discussions area of Apprentice Harper’s GitHub repository.  If you would like to report a bug, please 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.

7,459 thoughts on “DRM Removal Tools for eBooks

  1. I am trying to help someone strip the DRM from Kindle books, but she does not own an actual Kindle and only reads her books via Kindle for PC and Kindle for Android. From what I can tell, neither of these display a serial number on Amazon Content and Devices in the way that a serial number is displayed for an actual Kindle. For my own books, I am using the Download for USB option to get a book copy in a version I can decrypt, but I have an actual Kindle so I have a serial number. How does one get a serial number to use when one does not own an actual Kindle?

    • None needed. As long as the Kindle for PC app where the books are downloaded and calibre with the DeDRM plugin are on the same computer and user, then the key will automatically be retrieved.

    • Just download the book to Kindle for PC on her computer, then import the book into Calibre (assuming you have installed the DeDRM plugin) ON THE SAME COMPUTER.

      • The one problem with this is that some of us are more technical than others … if you know what I mean … and she lives quite a ways away, so tech support is difficult. Once it retrieves the key, can we then inspect the list of serial numbers and add it to my machine?

            • If she’s the one removing DRM from her own books for her own use, then the easiest thing to do is point her to this website.

              • The goal is to allow bi-directional sharing between sisters who are separated geographically. At our end, the DRM is being stripped on the load to Calibre, so the files are ready to share. What we are looking for is a way for her to share selected books with my wife. Because of the lack of technical expertise at the remote end, the ideal would be for me to be able to remove the DRM. If she had an actual Kindle, then she could merely send me the USB download file and I could load it into Calibre using her serial number, which would be ideal since I would be the one doing all updates and the like. Getting her set up to be able to strip the DRM is a possible solution, but more complex because it has to happen outside of my control.

                • The only way to get the Kindle for PC key is to have it and calibre with DeDRM on the same machine. And that key will only work with books downloaded to that installation of Kindle for PC. If she ever switched computers or even re-installed it on the same PC, the key would be different.

                  Another possible solution is for the two sisters to link their accounts with Amazon Family. No DRM removal necessary. This only allows 2 adult accounts to share though.

                  • The Amazon books published here are actually bought under my account because I happened to be the one that started using an e-reader first. I will have to look up about Amazon Family since I know nothing about it.

                    I understand about the Kindle for PC key … but, does this even matter if we go the route of the KFX plugin?

                    • To help your wifes sister to install you can use Teamviewer.com to remote control her computer and do the setup for her. That is saving me many hours of phone-bills and hair-tearing each month helping family in different countries with their computers.

                    • We are familiar with Teamviewer as my wife uses it a lot to support a friend. Sister is here right now, so we don’t need remote tools.

          • Hi! I have some recent tech issues and would greatly appreciate help. What is the address or link which I should use?
            Thanks! Robert

          • Not sure, how it would be of much use, but:
            The keys for Kindle for PC/Mac can be exported from the plugin on her (!) computer.
            The ebooks must be downloaded (fresh, after installing DeDRM) on her computer, and then DeDRM should work on her computer.
            As far as I have learned, the Key for each installation (device) is different, so when you try to DeDRM the ebooks on your computer, you must use the freshly downloaded from her, adding to the hastle, you already have.

            As I have worked in an IT-Helpdesk, the simpler solution would be to both install TeamViewer and configure everything for her on her computer with TeamViewer.
            If it does not work, get back to us with a log or more questions.

            Also, Kindle for PC/Mac in the newer versions loads KFX, which adds to the problem, the support is now there, but does not always work, imho. If possible, use a older Kindle for PC/Mac Version 1.17.1, which only loads the simpler, older filetypes. Install that, turn of “check for updates” in the settings. A word of warning, a quick search for the version only found saved ones, without being really sure, wether it was with added SPAM/Trojan/Virus. Be careful what you get, if it is not available on Amazon anymore (not sure).

            She should then login with her Amazon credentials and download the books fresh and DeDRM should retrive the key from the setting on import (Calibre-Plugin) or selecting the file for DeDRM (standalone app).

            • What I have been doing for my own books is going to Devices and Content and downloading each new title with the upload via USB option to get a file that does not have the KFX format. This has worked on my own books so far, while neither the copy in the Kindle itself nor the one in Kindle for PC (prior solution) works.

                • So, if I get this KFX conversion input plugin and install it in my copy of Calibre, I should be able to load the Kindle for PC files from her machine and convert them to other formats? If so, that sounds best.

                  Do I understand that, in the Kindle for PC directory on her machine, some files are in the directory itself (no DRM or old format?) and some are in subdirectories by book (KFX?).

                  • KFX books are multiple files. When you add the main file to calibre, the KFX Input plugin gathers up all the related files. Might work if you had the whole folder. I don’t know if later versions of Kindle for PC put the old format in the main folder and only KFX in their own folder. I think it puts all formats in their own folder. But I’ve stuck with 1.17 myself so I don’t know.

                    • So, to try this out we would need here to send the whole folders. Seems doable.
                      She has 1.23.1
                      I have only had a quick look at her machine (she is currently here visiting), but I think the ones not in subfolders were books that were unlikely to have DRM and likely to be old. She doesn’t actually have very many books, unlike our 1400.

    • OK, let me back up and try again … we just had a conversation about all of this over lunch and the target has moved. She is now uninterested in having Caliber on her machine and does not want a large volume of books. So, for the us to her direction, I can easily e-mail her a copy of any of our books which has already had the DRM removed.

      What we need to test now is sending her a copy of a book and see whether it works to simply put it in the Kindle for PC Content directory. I am fairly sure that will work for Kindle for PC, but she doesn’t actually read books there. She reads on an Android phone. There is some setup, which I know nothing about such that any new books added to the Kindle for PC sync to her phone. If this happens with us just copying a book into the Content directory, then we are set for the us to her direction.

      What remains, however, is the her to us direction. I had been thinking that the KFX plugin would allow me to read a copy of the contents of her Contents directory, but I gather from the discussion that it won’t handle the DRM so I still won’t be able to convert it to EPUB for my wife to use. So, is there any way to handle the DRM at my end? Or can she use the USB download? Or what?

      • Note, have tried Download for USB on her account and it is not available since she has no applicable devices.

        • Yes, it’s only available for Kindle devices. And the key is only tied to the serial number on E-ink Kindles, not Fires. You could keep an eye out for a cheap, refurbished E-ink Kindle (any generation) and link it to her account.

          • On second thought, not any generation. You wouldn’t want it to be too old. Do you have an old Kindle you’re not using anymore?

            • Well, not doing well. We tried emailing the file to gmail, but can’t seem to control the download location or move the file. I attached my phone via USB and found the attachment and found the folder which appeared to be for the Kindle books and moved the file there, but it doesn’t show in Kindle for Android the way it does in Kindle for PC. Looking further, I see that the books in Kindle for Android are .prc files, not .azw files, so I don’t know that it is even in the right format.

              • I was able to sideload AZW3 files to Kindle for Android on my phone. I was able to do it by downloading one from gmail and transferring another by connecting to my PC via USB. To move files around on the phone itself, you need some kind of file explorer app. I just used the built-in Samsung one on my phone. Once you put them in the Kindle folder, open the Kindle app and tap On Device.

      • Seriously sounds like Amazon Family Library would be a better solution than all of this:

        https://www.amazon.com/gp/help/customer/display.html?nodeId=201620400

        Then if your wife needs it in epub format, you can DeDRM it just as if it was from your own account.

        Back to without Family Library…
        She could open DRM-free Kindle files on her computer with Kindle for PC, but they wouldn’t sync with her account. You could look at the “send to kindle” email option.

        The KFX Input plugin just allows you to use DeDRM with KFX books.

        • The household thing appears to share all credit and debit info which, as Amazon themselves says, may not be something you want to do.

          I was avoiding the send to kindle idea because it seemed like a bad idea to send back a title which had the DRM removed … sort of giving them the evidence, if you know what I mean.

          • Oh, I had forgotten about that. I share with my husband so not a problem. I think you still have to explicitly say which if any cc you want to share. But it may be a little too easy – I don’t remember.

            Anything that syncs to her account would probably be “giving them the evidence.”

          • Just so you know, a Kindle eInk which has WiFi set up (as most people will do) phones regularly home, as I recently verified, even daily when Sleepcover is closed and the Kindle is supposed to be in Sleep-Mode. Also a reason why an unused Kindle does not stay charged for more than a few weeks. I was rather surprised by that, and my guess is most people do not know it.

            The Apps are linked to the Cloud at Amazon. So they already know anyway, Send to Kindle will not make a difference. My guess is, they do not care (yet?).

            • We have solved the us to her part by connecting the phone with a USB and copying the DeDRMed file from the PC to the phone.

              We are stumped on the her to us part for the present. Since we can handle us to her without using Calibre and she has no interest in learning another program and the volume of books will be small, this means no tools on her PC. So, short of adding a device which will allow USB downloads, I’m not clear where to go from here.

              • Do you ever use Kindle for PC yourself? If not, you could install it on your computer and have it logged into her account. Or you could add another Windows user and set everything up there. That’s the only other way I can think of.

                • Interesting… I was going to say that I had Kindle for PC on my computer, but that it was only there because for a period after I got my new Paperwhite I loaded Calibre from the Kindle for PC. That, of course, stopped working with the move to 1.19 and I switched to the Download for USB approach. But, when I went to check on the version number, I discovered that I have switched PCs a while back and there is no Kindle for PC on this new box. So, I guess I could download a copy of 1.17 and use that.

                • So, to be sure, if I install Kindle for PC 1.17 on the machine where I use Calibre, all I need to do is to download all of her titles and then load these into Calibre and the DeDRM software will automatically detect the key. Since this will be using 1.17, I assume I will not need the KFX plugin. Right?

            • All that said above and by others re Kindle. Is it absolutely necessary for people to use any kind of Kindle reader? I have never owned one and will never ever. I buy books quite often from Amazon and DeDRMed them with this tool and Calibre and load them on my preferred reader. Never had an issue.

              So having a Kindle reader must be for more than just reading. What don’t I know about having a Kindle reader?

              • I agree with DRMfreed’s comments. I use Kindle for PC v1.17 to download my ebooks (which I assume she/he is also using). No need for an actual physical Kindle Reader. What are we missing?

              • For me, the Kindle is a preferred reading mechanism. The phone is too small and the computer to large or heavy. I have a strong preference for the PaperWhite screen, even over many books, as a image for reading.

                • Fancy that! To each, his own for sure. Thanks for sharing that tamhas.

                  @SJL, I do use K for PC v1.17 as well and will forever do as as long it works.

                  Peace all

                • To me the Kindle format sucks big time! I prefer ePub and use MapleRead SE on my iPad Mini. I use Kindle for Mac 1.17 to get books, then convert them in Calibre to ePub.

  2. hi Alf

    this is the message i get when clicking yes on installing the DMr plugin:

    calibre, version 3.24.1
    ERROR: Unhandled exception: InvalidPlugin:The plugin in u’C:\Users\Feeroz\Downloads\DeDRM_tools_6.6.0 (1)\DeDRM_calibre_plugin\DeDRM_plugin\alfcrypto_src.zip’ is invalid. It does not contain a top-level init.py file

    calibre 3.24.1 embedded-python: True is64bit: False
    Windows-10-10.0.10586-SP0 Windows (’32bit’, ‘WindowsPE’)
    32bit process running on 64bit windows
    (‘Windows’, ’10’, ‘10.0.10586’)
    Python 2.7.12+
    Windows: (’10’, ‘10.0.10586’, ‘SP0′, u’Multiprocessor Free’)
    Interface language: None
    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 471, in add_plugin
    File “site-packages\calibre\customize\ui.py”, line 60, 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\Feeroz\Downloads\DeDRM_tools_6.6.0 (1)\DeDRM_calibre_plugin\DeDRM_plugin\alfcrypto_src.zip’ is invalid. It does not contain a top-level init.py file

    • Looks like you trying to install the wrong file. You only unzip DeDRM_tools_6.60.zip. Make sure you haven’t unzipped any of the files inside it. Look in the DeDRM_calibre_plugin folder. Load DeDRM_plugin.zip into calibre.

  3. Hi, I tried to import a Kindle book into Calibre, using both the Kindle on PC method and the actual Kindle device. No joy both times. Here is the debug log, can you take a look? I noticed the book is 1000’s of pages in Kindle, but the AZW file on the PC or the KFX file on the Kindle are both very small…

    calibre Debug log
    calibre 3.24.2 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.12+
    Windows: (’10’, ‘10.0.17134’, ‘SP0′, u’Multiprocessor Free’)
    Interface language: None
    Successfully initialized third party plugins: DeDRM (6, 6, 0)
    calibre 3.24.2 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.12+
    Windows: (’10’, ‘10.0.17134’, ‘SP0′, u’Multiprocessor Free’)
    Interface language: None
    Successfully initialized third party plugins: DeDRM (6, 6, 0)
    Turning on automatic hidpi scaling
    devicePixelRatio: 1.0
    logicalDpi: 96.0 x 96.0
    physicalDpi: 92.0150943396 x 91.44
    Using calibre Qt style: True
    [0.00] Starting up…
    [0.00] Showing splash screen…
    [0.08] splash screen shown
    [0.08] Initializing db…
    [0.12] db initialized
    [0.12] Constructing main UI…
    [1.92] main UI initialized…
    [1.92] Hiding splash screen
    Storage number map:
    {(7L, 0L): [(2L, ‘C’)], (7L, 1L): [(1L, ‘D’)], (7L, 2L): [(1L, ‘E’)]}
    Storage number for USBSTOR\DISK&VEN_KINDLE&PROD_INTERNAL_STORAGE&REV_0310\7&2D48883B&0: StorageDeviceNumber(type=7L, number=2L, partition_number=0L)
    Drive letters for USBDevice(vendor_id=0x1949 product_id=0x4 bcd=0x310 devid=usb\vid_1949&pid_0004&rev_0310 devinst=3)
    {u’drive_letters’: [‘E’],
    u’pnp_id_map’: {‘E’: u’\\?\usbstor#disk&ven_kindle&prod_internal_storage&rev_0310#7&2d48883b&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}’},
    u’readonly_drives’: set([]),
    u’sort_map’: {‘E’: (2L, 1L)}}
    Job: 1 Get device information started
    DeviceJob: 1 Get device information done, calling callback
    DeviceJob: 1 Get device information callback returned
    Job: 2 Set library information started
    DeviceJob: 2 Set library information done, calling callback
    DeviceJob: 2 Set library information callback returned
    Job: 3 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: E:\ documents
    DEBUG: 0.1 USBMS: scan from root False E:\documents
    DEBUG: 0.1 USBMS: count found in cache: 104, count of files in metadata: 104, 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: 3 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= 104
    DeviceJob: set_books_in_library finished: time= 0.00600004196167
    DeviceJob: metadata_downloaded: updating views
    DeviceJob: metadata_downloaded: syncing
    DeviceJob: metadata_downloaded: refreshing ondevice
    DeviceJob: metadata_downloaded: sending metadata_available signal
    DeviceJob: 3 Get list of books on device callback returned
    Job: 1 Get device information finished
    No details available.
    Job: 3 Get list of books on device finished
    No details available.
    Job: 2 Set library information finished
    No details available.
    [16.17] splash screen hidden
    [16.17] Started up in 16.17 seconds with 757 books
    stdout+stderr from file dialog helper: [”, ”]
    piped data from file dialog helper: [‘\x9fZ\x89\xe2\t=\xdb\xbc;\x987ac\x1fn\x96\x05\x8f\xef\x1bP\xbc\xee+\x11{dX\xafNp\xca’, ‘C:\Users\Windows\Documents\My Kindle Content\B0018BN7JG_EBOK\B0018BN7JG_EBOK.azw’]
    DeDRM v6.6.0: Trying to decrypt B0018BN7JG_EBOK.azw
    Using Library AlfCrypto Python
    DeDRM v6.6.0: 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.0: Looking for new default Kindle Key after 0.0 seconds
    searching for kinfoFiles in C:\Users\Windows\AppData\Local
    Found K4PC 1.9+ kinf2011 file: C:\Users\Windows\AppData\Local\Amazon\Kindle\storage.kinf2011
    Decrypted key file using IDString ‘1050809182’ and UserName ‘57696e646f7773’
    DeDRM v6.6.0: Found 1 new key
    DeDRM v6.6.0: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper’s repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
    Running file type plugin DeDRM failed with traceback:
    Traceback (most recent call last):
    File “site-packages\calibre\customize\ui.py”, line 171, in run_filetype_plugins
    File “calibre_plugins.dedrm.init“, line 620, in run
    File “calibre_plugins.dedrm.init“, line 570, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.6.0: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper’s repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
    Traceback (most recent call last):
    File “site-packages\calibre\customize\ui.py”, line 427, in get_file_type_metadata
    File “site-packages\calibre\customize\builtins.py”, line 284, 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 284, in init
    File “site-packages\calibre\ebooks\mobi\reader\headers.py”, line 312, in identity
    MobiError: Unknown book type: ÄÞ|Œ”
    Added B0018BN7JG EBOK to db in: 1.6
    Added 1 books in 2.1 seconds
    stdout+stderr from file dialog helper: [”, ”]
    piped data from file dialog helper: [‘\xa7}\xff\x1b\x8b\xef\x15\xd8K\x17\xad\xeeP\xccE\x16{\x88[JASt*YFs\x8a4\xb1c\xfb’, ‘E:\documents\Introduction to Derivative Financial Instruments
    Bonds, Swaps, Options, and Hedging_B0018BN7JG.kfx’]
    DeDRM v6.6.0: Trying to decrypt Introduction to Derivative Financial Instruments_ Bonds, Swaps, Options, and Hedging_B0018BN7JG.kfx
    Unknown booktype kfx. Passing back to calibre unchanged
    Added Introduction to Derivative Financial Instruments Bonds, Swaps, Options, and Hedging B0018BN7JG to db in: 1.2
    Added 1 books in 1.6 seconds

      • Thanks for the reply. I installed the KFX plugin, but only get KFX-ZIP file, which still can not open… can someone explain what I should do?

        calibre Debug log
        calibre 3.24.2 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.12+
        Windows: (’10’, ‘10.0.17134’, ‘SP0′, u’Multiprocessor Free’)
        Interface language: None
        Successfully initialized third party plugins: Gather KFX-ZIP File Type (from KFX Input) (1, 4, 0) && DeDRM (6, 6, 0) && Package KFX File Type (from KFX Input) (1, 4, 0) && Job Spy (1, 0, 116) && KFX metadata reader (from KFX Input) (1, 4, 0) && KFX Input (1, 4, 0)
        calibre 3.24.2 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.12+
        Windows: (’10’, ‘10.0.17134’, ‘SP0′, u’Multiprocessor Free’)
        Interface language: None
        Successfully initialized third party plugins: Gather KFX-ZIP File Type (from KFX Input) (1, 4, 0) && DeDRM (6, 6, 0) && Package KFX File Type (from KFX Input) (1, 4, 0) && Job Spy (1, 0, 116) && KFX metadata reader (from KFX Input) (1, 4, 0) && KFX Input (1, 4, 0)
        Turning on automatic hidpi scaling
        devicePixelRatio: 1.0
        logicalDpi: 96.0 x 96.0
        physicalDpi: 92.0150943396 x 91.44
        Using calibre Qt style: True

  4. I’ve used this tool several times before without issue. Now I’m getting errors:

    There is 1 ebook to be decrypted.
    Processing file: B06XKN9G27_EBOK.azw
    There was an error with 1 ebook:
    Macintosh HD:My Kindle Content:B06XKN9G27_EBOK:B06XKN9G27_EBOK.azw is neither a Kindle not a Mobipocket file.

      • I don’t know whether or not the stand-alone tools can deal with it, but you can create a KFX-ZIP file by creating a ZIP archive of all of the files in a book subfolder within the main Kindle for PC/Mac content folder and then changing the file extension from “.zip” to “.kfx-zip”. (If the book folder has a file whose name starts with “amzn1.drm-voucher” then it is in KFX format.)

    • Sounds like it’s probably a KFX book which is made up of multiple files. So the azw file is only part of the book. There’s a calibre plugin (KFX Input) to gather up the required files into a zip archive. I’m not sure how you can deal with KFX books with the stand-alone apps.

      There are ways to get the book in the old format. See this post:

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

  5. Hey guys,
    It’s the first time I’m using this tool, i got both plugins and they’re up to date, but my ebook still seems to be unconvertable…

    here is the log :

    calibre, version 3.24.2
    FEHLER: Konvertierung fehlgeschlagen:

    Fehler beim Konvertieren von: B075MHX9Z9 EBOK) konvertiere

    Dies ist ein Amazon KFX-Buch. Es kann nicht verarbeitet werden. Weitere Informationen zum Umgang mit KFX-Büchern finden Sie unter hier

    Buch 1 von 1 (B075MHX9Z9 EBOK) konvertieren
    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
    Conversion options changed from defaults:
    verbose: 2
    read_metadata_from_opf: u’C:\Users\Soufian\AppData\Local\Temp\calibre_x7iyhv\72xdac.opf’
    output_profile: ‘cybook_opus’
    Resolved conversion options
    calibre version: 3.24.2
    {‘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’: None,
    ‘debug_pipeline’: None,
    ‘dehyphenate’: True,
    ‘delete_blank_paragraphs’: True,
    ‘disable_font_rescaling’: False,
    ‘dont_split_on_page_breaks’: False,
    ‘duplicate_links_in_toc’: False,
    ’embed_all_fonts’: False,
    ’embed_font_family’: None,
    ‘enable_heuristics’: False,
    ‘epub_flatten’: False,
    ‘epub_inline_toc’: False,
    ‘epub_toc_at_end’: False,
    ‘epub_version’: u’2′,
    ‘expand_css’: False,
    ‘extra_css’: None,
    ‘extract_to’: None,
    ‘filter_css’: u”,
    ‘fix_indents’: True,
    ‘flow_size’: 260,
    ‘font_size_mapping’: None,
    ‘format_scene_breaks’: True,
    ‘html_unwrap_factor’: 0.4,
    ‘input_encoding’: None,
    ‘input_profile’: <calibre.customize.profiles.InputProfile object at 0x0746DA10>,
    ‘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,
    ‘no_chapters_in_toc’: False,
    ‘no_default_epub_cover’: False,
    ‘no_inline_navbars’: False,
    ‘no_svg_cover’: False,
    ‘output_profile’: <calibre.customize.profiles.CybookOpusOutput object at 0x0746DBD0>,
    ‘page_breaks_before’: u”//*[name()=’h1′ or name()=’h2′]”,
    ‘prefer_metadata_cover’: False,
    ‘preserve_cover_aspect_ratio’: False,
    ‘pretty_print’: True,
    ‘pubdate’: None,
    ‘publisher’: None,
    ‘rating’: None,
    ‘read_metadata_from_opf’: u’C:\Users\Soufian\AppData\Local\Temp\calibre_x7iyhv\72xdac.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,
    ‘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: MOBI Input running
    on C:\Users\Soufian\AppData\Local\Temp\calibre_x7iyhv\zgjrbn.azw
    Python function terminated unexpectedly
    Dies ist ein Amazon KFX-Buch. Es kann nicht verarbeitet werden. Weitere Informationen zum Umgang mit KFX-Büchern finden Sie unter https://www.mobileread.com/forums/showthread.php?t=283371. (Error Code: 1)
    Traceback (most recent call last):
    File “site.py”, line 101, in main
    File “site.py”, line 78, in run_entry_point
    File “site-packages\calibre\utils\ipc\worker.py”, line 195, in main
    File “site-packages\calibre\gui2\convert\gui_conversion.py”, line 33, in gui_convert_override
    File “site-packages\calibre\gui2\convert\gui_conversion.py”, line 26, in gui_convert
    File “site-packages\calibre\ebooks\conversion\plumber.py”, line 1087, in run
    File “site-packages\calibre\customize\conversion.py”, line 245, in call
    File “site-packages\calibre\ebooks\conversion\plugins\mobi_input.py”, line 34, in convert
    File “site-packages\calibre\ebooks\mobi\reader\mobi6.py”, line 84, in init
    calibre.ebooks.mobi.reader.mobi6.KFXError: Dies ist ein Amazon KFX-Buch. Es kann nicht verarbeitet werden. Weitere Informationen zum Umgang mit KFX-Büchern finden Sie unter https://www.mobileread.com/forums/showthread.php?t=283371.

      • calibre Fehlerdiagnoseprotokoll
        calibre 3.24.2 embedded-python: True is64bit: False
        Windows-10-10.0.16299-SP0 Windows (’32bit’, ‘WindowsPE’)
        32bit process running on 64bit windows
        (‘Windows’, ’10’, ‘10.0.16299’)
        Python 2.7.12+
        Windows: (’10’, ‘10.0.16299’, ‘SP0′, u’Multiprocessor Free’)
        Interface language: de
        Successfully initialized third party plugins: Gather KFX-ZIP File Type (from KFX Input) (1, 4, 0) && DeDRM (6, 6, 0) && Package KFX File Type (from KFX Input) (1, 4, 0) && KFX metadata reader (from KFX Input) (1, 4, 0) && KFX Input (1, 4, 0)
        calibre 3.24.2 embedded-python: True is64bit: False
        Windows-10-10.0.16299-SP0 Windows (’32bit’, ‘WindowsPE’)
        32bit process running on 64bit windows
        (‘Windows’, ’10’, ‘10.0.16299’)
        Python 2.7.12+
        Windows: (’10’, ‘10.0.16299’, ‘SP0′, u’Multiprocessor Free’)
        Interface language: de
        Successfully initialized third party plugins: Gather KFX-ZIP File Type (from KFX Input) (1, 4, 0) && DeDRM (6, 6, 0) && Package KFX File Type (from KFX Input) (1, 4, 0) && KFX metadata reader (from KFX Input) (1, 4, 0) && KFX Input (1, 4, 0)
        Turning on automatic hidpi scaling
        devicePixelRatio: 1.0
        logicalDpi: 96.0 x 96.0
        physicalDpi: 95.6235294118 x 94.5931034483
        Using calibre Qt style: True
        [0.00] Starting up…
        [0.00] Showing splash screen…
        [0.09] splash screen shown
        [0.09] Initializing db…
        [0.11] db initialized
        [0.11] Constructing main UI…
        [2.27] main UI initialized…
        [2.27] Hiding splash screen
        [4.06] splash screen hidden
        [4.06] Started up in 4.06 seconds with 2 books
        Worker Launch took: 0.251999855042
        Job: 1 Buch 1 von 1 (Die Ermordung des Commendatore Band 1: Eine Idee erscheint. Roman (German Edition)) konvertieren finished
        Buch 1 von 1 (Die Ermordung des Commendatore Band 1: Eine Idee erscheint. Roman (German Edition)) konvertieren
        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
        Conversion options changed from defaults:
        cover: u’C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\lapakw.jpeg’
        verbose: 2
        read_metadata_from_opf: u’C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\akuz1b.opf’
        output_profile: ‘cybook_opus’
        Resolved conversion options
        calibre version: 3.24.2
        {‘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’C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\lapakw.jpeg’,
        ‘debug_pipeline’: None,
        ‘dehyphenate’: True,
        ‘delete_blank_paragraphs’: True,
        ‘disable_font_rescaling’: False,
        ‘dont_split_on_page_breaks’: False,
        ‘duplicate_links_in_toc’: False,
        ’embed_all_fonts’: False,
        ’embed_font_family’: None,
        ‘enable_heuristics’: False,
        ‘epub_flatten’: False,
        ‘epub_inline_toc’: False,
        ‘epub_toc_at_end’: False,
        ‘epub_version’: u’2′,
        ‘expand_css’: False,
        ‘extra_css’: None,
        ‘extract_to’: None,
        ‘filter_css’: u”,
        ‘fix_indents’: True,
        ‘flow_size’: 260,
        ‘font_size_mapping’: None,
        ‘format_scene_breaks’: True,
        ‘html_unwrap_factor’: 0.4,
        ‘input_encoding’: None,
        ‘input_profile’: <calibre.customize.profiles.InputProfile object at 0x074CFA30>,
        ‘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,
        ‘no_chapters_in_toc’: False,
        ‘no_default_epub_cover’: False,
        ‘no_inline_navbars’: False,
        ‘no_svg_cover’: False,
        ‘output_profile’: <calibre.customize.profiles.CybookOpusOutput object at 0x074CFBF0>,
        ‘page_breaks_before’: u’/’,
        ‘prefer_metadata_cover’: False,
        ‘preserve_cover_aspect_ratio’: False,
        ‘pretty_print’: True,
        ‘pubdate’: None,
        ‘publisher’: None,
        ‘rating’: None,
        ‘read_metadata_from_opf’: u’C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\akuz1b.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,
        ‘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 C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6_5wfnz.kfx-zip
        Software versions: KFX Input 1.4.0, calibre 3.24.2, Windows-10-10.0.16299-SP0
        KFX Input plugin help is available at https://www.mobileread.com/forums/showthread.php?t=291290
        Converting C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6_5wfnz.kfx-zip
        Processing container: B075MHX9Z9_EBOK.azw
        Traceback (most recent call last):
        File “calibre_plugins.kfx_input.init“, line 97, in convert
        File “calibre_plugins.kfx_input.init“, line 191, in convert_from_kfx
        File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 71, in convert_to_epub
        File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 118, in decode_book
        File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 205, in get_container
        KFXDRMError: Book container B075MHX9Z9_EBOK.azw has DRM and cannot be converted
        Python function terminated unexpectedly
        This book has DRM! (Error Code: 1)
        Traceback (most recent call last):
        File “site.py”, line 101, in main
        File “site.py”, line 78, in run_entry_point
        File “site-packages\calibre\utils\ipc\worker.py”, line 195, in main
        File “site-packages\calibre\gui2\convert\gui_conversion.py”, line 33, in gui_convert_override
        File “site-packages\calibre\gui2\convert\gui_conversion.py”, line 26, in gui_convert
        File “site-packages\calibre\ebooks\conversion\plumber.py”, line 1087, in run
        File “site-packages\calibre\customize\conversion.py”, line 245, in call
        File “calibre_plugins.kfx_input.init“, line 100, in convert
        calibre.ebooks.DRMError: This book has DRM!

        Gather KFX-ZIP File Type (from KFX Input) 1.4.0: Importing C:/Users/Soufian/Desktop/My Kindle Content/B075MHX9Z9_EBOK/B075MHX9Z9_EBOK.azw
        Gather KFX-ZIP File Type (from KFX Input): Gathered 4 files as C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\d3skmh.kfx-zip
        DeDRM v6.6.0: Trying to decrypt d3skmh.kfx-zip
        Using Library AlfCrypto Python
        Decrypting KFX-ZIP ebook: d3skmh
        Found 0 keys to try after 0.1 seconds
        Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.90313755-582f-43b4-926e-b71d69e00deb.voucher
        DeDRM v6.6.0: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
        DeDRM v6.6.0: Looking for new default Kindle Key after 0.1 seconds
        searching for kinfoFiles in C:\Users\Soufian\AppData\Local
        No K4PC kindle.info/kinf/kinf2011 files have been found.
        DeDRM v6.6.0: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper’s repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
        Running file type plugin DeDRM failed with traceback:
        Traceback (most recent call last):
        File “site-packages\calibre\customize\ui.py”, line 171, in _run_filetype_plugins
        File “calibre_plugins.dedrm.init“, line 620, in run
        File “calibre_plugins.dedrm.init“, line 570, in KindleMobiDecrypt
        DeDRMError: DeDRM v6.6.0: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper’s repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
        Package KFX File Type (from KFX Input) 1.4.0: Packaging C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\d3skmh.kfx-zip
        Processing container: B075MHX9Z9_EBOK.azw
        Running file type plugin Package KFX File Type (from KFX Input) failed with traceback:
        Traceback (most recent call last):
        File “site-packages\calibre\customize\ui.py”, line 171, in _run_filetype_plugins
        File “calibre_plugins.kfx_input.package_filetype”, line 22, in run
        File “calibre_plugins.kfx_input.package_filetype”, line 35, in run_kfx
        File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 52, in convert_to_single_kfx
        File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 118, in decode_book
        File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 205, in get_container
        KFXDRMError: Book container B075MHX9Z9_EBOK.azw has DRM and cannot be converted
        KFX metadata reader (from KFX Input) activated for C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\lgrfhb_add_books\0\B075MHX9Z9_EBOK.kfx-zip
        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 Die Ermordung des Commendatore Band 1: Eine Idee erscheint. Roman (German Edition) to db in: 0.2
        Added 1 books in 1.1 seconds
        Worker Launch took: 0.274999856949
        Job: 2 Buch 1 von 1 (Die Ermordung des Commendatore Band 1: Eine Idee erscheint. Roman (German Edition)) konvertieren finished
        Buch 1 von 1 (Die Ermordung des Commendatore Band 1: Eine Idee erscheint. Roman (German Edition)) konvertieren
        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
        Conversion options changed from defaults:
        cover: u’C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\8myczb.jpeg’
        verbose: 2
        read_metadata_from_opf: u’C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\sxbfmy.opf’
        output_profile: ‘cybook_opus’
        Resolved conversion options
        calibre version: 3.24.2
        {‘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’C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\8myczb.jpeg’,
        ‘debug_pipeline’: None,
        ‘dehyphenate’: True,
        ‘delete_blank_paragraphs’: True,
        ‘disable_font_rescaling’: False,
        ‘dont_split_on_page_breaks’: False,
        ‘duplicate_links_in_toc’: False,
        ’embed_all_fonts’: False,
        ’embed_font_family’: None,
        ‘enable_heuristics’: False,
        ‘epub_flatten’: False,
        ‘epub_inline_toc’: False,
        ‘epub_toc_at_end’: False,
        ‘epub_version’: u’2′,
        ‘expand_css’: False,
        ‘extra_css’: None,
        ‘extract_to’: None,
        ‘filter_css’: u”,
        ‘fix_indents’: True,
        ‘flow_size’: 260,
        ‘font_size_mapping’: None,
        ‘format_scene_breaks’: True,
        ‘html_unwrap_factor’: 0.4,
        ‘input_encoding’: None,
        ‘input_profile’: <calibre.customize.profiles.InputProfile object at 0x07EE6A70>,
        ‘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,
        ‘no_chapters_in_toc’: False,
        ‘no_default_epub_cover’: False,
        ‘no_inline_navbars’: False,
        ‘no_svg_cover’: False,
        ‘output_profile’: <calibre.customize.profiles.CybookOpusOutput object at 0x07EE6C30>,
        ‘page_breaks_before’: u’/’,
        ‘prefer_metadata_cover’: False,
        ‘preserve_cover_aspect_ratio’: False,
        ‘pretty_print’: True,
        ‘pubdate’: None,
        ‘publisher’: None,
        ‘rating’: None,
        ‘read_metadata_from_opf’: u’C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\sxbfmy.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,
        ‘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 C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\9vuc8i.kfx-zip
        Software versions: KFX Input 1.4.0, calibre 3.24.2, Windows-10-10.0.16299-SP0
        KFX Input plugin help is available at https://www.mobileread.com/forums/showthread.php?t=291290
        Converting C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\9vuc8i.kfx-zip
        Processing container: B075MHX9Z9_EBOK.azw
        Traceback (most recent call last):
        File “calibre_plugins.kfx_input.init“, line 97, in convert
        File “calibre_plugins.kfx_input.init“, line 191, in convert_from_kfx
        File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 71, in convert_to_epub
        File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 118, in decode_book
        File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 205, in get_container
        KFXDRMError: Book container B075MHX9Z9_EBOK.azw has DRM and cannot be converted
        Python function terminated unexpectedly
        This book has DRM! (Error Code: 1)
        Traceback (most recent call last):
        File “site.py”, line 101, in main
        File “site.py”, line 78, in run_entry_point
        File “site-packages\calibre\utils\ipc\worker.py”, line 195, in main
        File “site-packages\calibre\gui2\convert\gui_conversion.py”, line 33, in gui_convert_override
        File “site-packages\calibre\gui2\convert\gui_conversion.py”, line 26, in gui_convert
        File “site-packages\calibre\ebooks\conversion\plumber.py”, line 1087, in run
        File “site-packages\calibre\customize\conversion.py”, line 245, in call
        File “calibre_plugins.kfx_input.init“, line 100, in convert
        calibre.ebooks.DRMError: This book has DRM!

        Gather KFX-ZIP File Type (from KFX Input) 1.4.0: Importing C:/Users/Soufian/Desktop/My Kindle Content/B075MHX9Z9_EBOK/B075MHX9Z9_EBOK.azw
        Gather KFX-ZIP File Type (from KFX Input): Gathered 4 files as C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\c3y6dm.kfx-zip
        DeDRM v6.6.0: Trying to decrypt c3y6dm.kfx-zip
        Using Library AlfCrypto Python
        Decrypting KFX-ZIP ebook: c3y6dm
        Found 0 keys to try after 0.1 seconds
        Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.90313755-582f-43b4-926e-b71d69e00deb.voucher
        DeDRM v6.6.0: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
        DeDRM v6.6.0: Looking for new default Kindle Key after 0.1 seconds
        searching for kinfoFiles in C:\Users\Soufian\AppData\Local
        No K4PC kindle.info/kinf/kinf2011 files have been found.
        DeDRM v6.6.0: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper’s repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
        Running file type plugin DeDRM failed with traceback:
        Traceback (most recent call last):
        File “site-packages\calibre\customize\ui.py”, line 171, in _run_filetype_plugins
        File “calibre_plugins.dedrm.init“, line 620, in run
        File “calibre_plugins.dedrm.init“, line 570, in KindleMobiDecrypt
        DeDRMError: DeDRM v6.6.0: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper’s repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
        Package KFX File Type (from KFX Input) 1.4.0: Packaging C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\c3y6dm.kfx-zip
        Processing container: B075MHX9Z9_EBOK.azw
        Running file type plugin Package KFX File Type (from KFX Input) failed with traceback:
        Traceback (most recent call last):
        File “site-packages\calibre\customize\ui.py”, line 171, in _run_filetype_plugins
        File “calibre_plugins.kfx_input.package_filetype”, line 22, in run
        File “calibre_plugins.kfx_input.package_filetype”, line 35, in run_kfx
        File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 52, in convert_to_single_kfx
        File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 118, in decode_book
        File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 205, in get_container
        KFXDRMError: Book container B075MHX9Z9_EBOK.azw has DRM and cannot be converted
        KFX metadata reader (from KFX Input) activated for C:\Users\Soufian\AppData\Local\Temp\calibre_bdtlm6\kgyjqb_add_books\0\B075MHX9Z9_EBOK.kfx-zip
        Added Die Ermordung des Commendatore Band 1: Eine Idee erscheint. Roman (German Edition) to db in: 0.2
        Added 1 books in 1.1 seconds

        Thats the log 🙂

        • searching for kinfoFiles in C:\Users\Soufian\AppData\Local
          No K4PC kindle.info/kinf/kinf2011 files have been found.

          That book appears to come from Kindle for PC. DeDRM needs a file that should be present if K4PC is installed, but it was not found.

  6. I’ve given the kfx functionality a try. Importing a kfx book is working flawlessly so far on Windows 10, but is failing to decrypt with any of the eink keys entered into Linux. Am importing directly from a Kindle Oasis. The log shows that the voucher is found but can’t be decrypted with any keys. It then proceeds to try to extract a key with wine, which of course is not configured. I have not posted a log because I gather this is not intended to be working with Linux at this stage? Is this correct? Would a log be helpful? Or a bug report?

    • I believe it should work if you have your Oasis serial number entered into the E-ink Kindle section of the plugin correctly. It’s only trying to get keys out of Kindle for PC under Wine that gets tricky.

      • Thanks Laura. Interesting. I checked the key is correct by way of importing an .azw3 which works normally. It’s actually the decryption step that seems to be failing. I’ll investigate a little further and post a bug report if I think it is in fact a bug. Do you know if anyone has had success on Linux?

  7. Are there any plans to DeDRM audio files, specifically Audible files? I have accumulated a large Audible library over the years. Unfortunately, the newer versions of the Audible player overload my phone and I can’t use it to access them.

  8. Are there any plans to update the deDRM tools to 64-bit on macOS? I’m currently on 10.13.5 with ADE 2.0.1, KindleForMac 1.17 and version 6.60 of the tools, which will probably stop working, after 10.14 is released later this year. I also use inAudible to deDRM my Audible audiobooks (which is probably also 32-bit).

    • I know that the Mac application is done with AppleScript. If the AppleScript editor supports 64-bit, you could just re-save it as a 64-bit application.

      • Thanks for the tip, Paul! I’ve tried saving opening the Mac application in AppleScript and then re-saving it, but when I do that, I can no longer de-crypt Kindle books. (“The was an error with one book; could not decrypt”). Decrypting .epub files seems to work. I’ll try again at the end of the week.

    • Is there any difference in .kfx format and .azw3? You know I used that method to keep Kindle PC making in .kfx before this new update rolled.

      • Yes, azw3 is the older kf8 format that these tools have been able to DeDRM for a long time. The ability to DeDRM the multi-file kfx format was just incorporated into the tools a couple months ago.

        • No, I mean if it makes any difference to the DRM’ing at all. Should I keep my modified Kindle for PC that turns kfx into epub or something or reinstall it and use the new release

          • From what I understand, if you’re converting to epub, you’re better off sticking with the methods of getting the older Kindle format because they’re more alike.

  9. I suspect I’m just hosed, but thought I’d ask before I gave up…

    I have a number of old PDB Fictionwise books. To modify the DeDRM plugin so that it has a key to decrypt the PDB book, I need to enter three pieces of info:

    an identifier for the key
    my name
    the last eight digits of the credit card

    What does one do if one can’t remember a specific credit card number from eight years or more ago? Or am I just, ya know, hosed?

    • And it must be the name exactly as associated with that account too. Unless you have some old emails from that era with the information, you might be out of luck. Although I suspect that the key length for PDB encryption (which I don’t know, but is probably quite small) might make brute-forcing the key possible with a modern computer and compiled code (rather than interpreted python).

      • Luckily it turns out that not only did I save all the receipts, I also saved all the credit card numbers associate with the Fictionwise books, and so was able to generate the decryption codes. I remember starting to do that before B&N purchased Fictionwise because under the PalmOS, when Fictionwise upgraded the eReader app, you had to re-enter the card numbers to unlock your books, so I started keeping a record of the old numbers every time I was issued a new card.

        Saved by Nerd Paranoia once again!

        • And free new purchases soon after you get them! I try to keep on top of my own…although the only one I’d expect to lose access to any time soon is B&N who I don’t really buy from anymore anyway.

  10. I’m unable to open the DeDRM Tools 6.6.1 on my macOS High Sierra 10.13.4. If I right click (or control click) the icon, all I get is a warning that “The application “DeDRM” can’t be opened.” Same thing if I hold down the option key when double-clicking on the icon. I’ve tried to change my security settings, but the only options I have are to open apps from the App Store or from Identified Developers. There are no options to open “any”, which is supposed to be an available option when trying to open software from an unidentified developer. Would love it if you could please give me some advice as to what to try next? Thank you!

    • It doesn’t work for me either, while 6.6.0 does. I’m guessing that the new packaging script has gone something slightly wrong. You’ll just have to wait for 6.6.2. (I use the calibre plugin. Mind you – I haven’t tested that yet, either.)

      • I noticed that in the 6.6.1 calibre plugin the line endings of the files changed from Unix style to Windows style. Perhaps the Mac problem is a result of that.

  11. I downloaded the new 6.6.1 but my calibre cant read the kindle books. I am using a mac os high sierra and I keep getting this message: calibre, version 3.7.0
    ERROR: Could not open e-book: Failed to read book, /Users/mikaylagreenwell/Calibre Library/Unknown/B00DB32SR6 EBOK (48)/B00DB32SR6 EBOK – Unknown.azw click “Show Details” for more information

    Traceback (most recent call last):
    File “site-packages/calibre/utils/ipc/simple_worker.py”, line 284, 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/mobi_input.py”, line 34, in convert
    File “site-packages/calibre/ebooks/mobi/reader/mobi6.py”, line 84, in init
    KFXError: This is an Amazon KFX book. It cannot be processed. See https://www.mobileread.com/forums/showthread.php?t=283371 for information on how to handle KFX books.

    It worked for one book I had on my kindle on my mac but it wont work for any others. What can I do to fix this?

  12. I installed kfx input plugin + de-drm tools 6.6.0 but calibre still gives me an error message – ‘This book is locked by DRM’. Help?

  13. For the record, does this drm removal tool work on kfx books that I got through my Amazon Prime Membership? If I am on Amazon Prime, do I own the book that I get to read on my ‘Kindle for PC ‘ or technically is it rented out to me ? Appreciate any advice.

    • If you’re talking about the Prime Reading program, then those are borrowed (only so many at a time, not yours if you cancel Prime). There’s also Amazon First Reads — Prime members get one of those for free per month. Those are yours to keep and will work with DeDRM.

  14. Please help me debug.

    which tool was used — DeDRM_calibre_plugin from DeDRM_tools_6.6.1, along with the KFX input plugin
    which OS you are using — Windows 10 Home, version 1803, OS build 17134.48
    where the ebook file came from (device or application) — Kindle Voyage
    any error messages

    Error – KFX conversion failed

    Book is incomplete. All of the KFX container files that make up the book must be combined into a KFX-ZIP file four successful conversion (Missing fragments $258, $264, $265, $3, $389, $419, $ 490, $538, $550)

    And here’s the log:

    calibre 3.25 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.12+
    Windows: (’10’, ‘10.0.17134’, ‘SP0′, u’Multiprocessor Free’)
    Interface language: None
    Successfully initialized third party plugins: Gather KFX-ZIP File Type (from KFX Input) (1, 4, 0) && DeDRM (6, 6, 1) && Package KFX File Type (from KFX Input) (1, 4, 0) && KFX metadata reader (from KFX Input) (1, 4, 0) && KFX Input (1, 4, 0)
    calibre 3.25 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.12+
    Windows: (’10’, ‘10.0.17134’, ‘SP0′, u’Multiprocessor Free’)
    Interface language: None
    Successfully initialized third party plugins: Gather KFX-ZIP File Type (from KFX Input) (1, 4, 0) && DeDRM (6, 6, 1) && Package KFX File Type (from KFX Input) (1, 4, 0) && KFX metadata reader (from KFX Input) (1, 4, 0) && KFX Input (1, 4, 0)
    Turning on automatic hidpi scaling
    devicePixelRatio: 2.0
    logicalDpi: 72.0 x 72.0
    physicalDpi: 82.9387755102 x 83.1272727273
    Using calibre Qt style: True
    [0.00] Starting up…
    [0.00] Showing splash screen…
    [0.05] splash screen shown
    [0.05] Initializing db…
    [0.05] db initialized
    [0.05] Constructing main UI…
    [1.25] main UI initialized…
    [1.25] Hiding splash screen
    Storage number map:
    {(7L, 0L): [(3L, ‘C’)], (7L, 1L): [(1L, ‘D’)]}
    Storage number for USBSTOR\DISK&VEN_KINDLE&PROD_INTERNAL_STORAGE&REV_0100\B013090750370084&0: StorageDeviceNumber(type=7L, number=1L, partition_number=0L)
    Drive letters for USBDevice(vendor_id=0x1949 product_id=0x4 bcd=0x100 devid=usb\vid_1949&pid_0004&rev_0100 devinst=11)
    {u’drive_letters’: [‘D’],
    u’pnp_id_map’: {‘D’: u’\\?\usbstor#disk&ven_kindle&prod_internal_storage&rev_0100#b013090750370084&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}’},
    u’readonly_drives’: set([]),
    u’sort_map’: {‘D’: (1L, 1L)}}
    Job: 1 Get device information started
    DeviceJob: 1 Get device information done, calling callback
    DeviceJob: 1 Get device information callback returned
    Job: 2 Set library information started
    DeviceJob: 2 Set library information done, calling callback
    DeviceJob: 2 Set library information callback returned
    Job: 3 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: D:\ documents
    Job: 1 Get device information finished
    No details available.
    Job: 2 Set library information finished
    No details available.
    DEBUG: 0.7 USBMS: scan from root False D:\documents
    DEBUG: 9.1 USBMS: count found in cache: 913, count of files in metadata: 913, need_sync: False
    DEBUG: 9.1 USBMS: Finished fetching list of books from device. oncard= None
    DEBUG: 9.1 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= carda
    DEBUG: 9.1 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= cardb
    DeviceJob: 3 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= 913
    DeviceJob: set_books_in_library finished: time= 0.0139999389648
    DeviceJob: metadata_downloaded: updating views
    DeviceJob: metadata_downloaded: syncing
    DeviceJob: metadata_downloaded: refreshing ondevice
    DeviceJob: metadata_downloaded: sending metadata_available signal
    DeviceJob: 3 Get list of books on device callback returned
    Job: 3 Get list of books on device finished
    No details available.
    [42.81] splash screen hidden
    [42.81] Started up in 42.81 seconds with 1 books

    • This log doesn’t show you adding the book to calibre so we can’t tell what went wrong with DRM removal. But it sounds like KFX Input wasn’t able to gather all the necessary files for the book. Try adding the book directly from the Voyage.

  15. Okay, this is from the kindle directly. Here’s what I got:

    calibre Debug log
    calibre 3.25 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.12+
    Windows: (’10’, ‘10.0.17134’, ‘SP0′, u’Multiprocessor Free’)
    Interface language: None
    Successfully initialized third party plugins: Gather KFX-ZIP File Type (from KFX Input) (1, 4, 0) && DeDRM (6, 6, 1) && Package KFX File Type (from KFX Input) (1, 4, 0) && KFX metadata reader (from KFX Input) (1, 4, 0) && KFX Input (1, 4, 0)
    calibre 3.25 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.12+
    Windows: (’10’, ‘10.0.17134’, ‘SP0′, u’Multiprocessor Free’)
    Interface language: None
    Successfully initialized third party plugins: Gather KFX-ZIP File Type (from KFX Input) (1, 4, 0) && DeDRM (6, 6, 1) && Package KFX File Type (from KFX Input) (1, 4, 0) && KFX metadata reader (from KFX Input) (1, 4, 0) && KFX Input (1, 4, 0)
    Turning on automatic hidpi scaling
    devicePixelRatio: 2.0
    logicalDpi: 72.0 x 72.0
    physicalDpi: 82.9387755102 x 83.1272727273
    Using calibre Qt style: True
    [0.00] Starting up…
    [0.00] Showing splash screen…
    [0.05] splash screen shown
    [0.05] Initializing db…
    [0.05] db initialized
    [0.05] Constructing main UI…
    [1.28] main UI initialized…
    [1.28] Hiding splash screen
    Storage number map:
    {(7L, 0L): [(3L, ‘C’)], (7L, 1L): [(1L, ‘D’)]}
    Storage number for USBSTOR\DISK&VEN_KINDLE&PROD_INTERNAL_STORAGE&REV_0100\B013090750370084&0: StorageDeviceNumber(type=7L, number=1L, partition_number=0L)
    Drive letters for USBDevice(vendor_id=0x1949 product_id=0x4 bcd=0x100 devid=usb\vid_1949&pid_0004&rev_0100 devinst=11)
    {u’drive_letters’: [‘D’],
    u’pnp_id_map’: {‘D’: u’\\?\usbstor#disk&ven_kindle&prod_internal_storage&rev_0100#b013090750370084&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}’},
    u’readonly_drives’: set([]),
    u’sort_map’: {‘D’: (1L, 1L)}}
    [6.08] splash screen hidden
    [6.08] Started up in 6.08 seconds with 0 books
    Job: 1 Get device information started
    DeviceJob: 1 Get device information done, calling callback
    DeviceJob: 1 Get device information callback returned
    Job: 2 Set library information started
    DeviceJob: 2 Set library information done, calling callback
    DeviceJob: 2 Set library information callback returned
    Job: 3 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: D:\ documents
    DEBUG: 0.5 USBMS: scan from root False D:\documents
    Job: 2 Set library information finished
    No details available.
    Job: 1 Get device information finished
    No details available.
    DEBUG: 1.8 USBMS: count found in cache: 913, count of files in metadata: 913, need_sync: False
    DEBUG: 1.8 USBMS: Finished fetching list of books from device. oncard= None
    DEBUG: 1.8 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= carda
    DEBUG: 1.8 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= cardb
    DeviceJob: 3 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= 913
    DeviceJob: set_books_in_library finished: time= 0.0139999389648
    DeviceJob: metadata_downloaded: updating views
    DeviceJob: metadata_downloaded: syncing
    DeviceJob: metadata_downloaded: refreshing ondevice
    DeviceJob: metadata_downloaded: sending metadata_available signal
    DeviceJob: 3 Get list of books on device callback returned
    Job: 3 Get list of books on device finished
    No details available.
    stdout+stderr from file dialog helper: [”, ”]
    piped data from file dialog helper: [‘\xeb\xae\xae\x9d[%\xbd\xff\x95\xd5Y\xc2\xf3\xaa\xe2\xe86O\xfb\xb4\x1e\x0bDMA\xb5\xee\x13\xfe\x8d\xa2\xca’, ‘D:\documents\All Systems Red (Kindle Single) (The Murderbot Diaries)_B01MYZ8X5C.sdr\assets\attachables\CR!WHGSXZ1RW153X123W87VPCV66C2X.kfx’]
    Gather KFX-ZIP File Type (from KFX Input) 1.4.0: Importing D:\documents\All Systems Red (Kindle Single) (The Murderbot Diaries)_B01MYZ8X5C.sdr\assets\attachables\CR!WHGSXZ1RW153X123W87VPCV66C2X.kfx
    Gather KFX-ZIP File Type (from KFX Input): Ignoring file not in a recognized directory structure
    DeDRM v6.6.1: Trying to decrypt CR!WHGSXZ1RW153X123W87VPCV66C2X.kfx
    Unknown booktype kfx. Passing back to calibre unchanged
    KFX metadata reader (from KFX Input) activated for D:\documents\All Systems Red (Kindle Single) (The Murderbot Diaries)_B01MYZ8X5C.sdr\assets\attachables\CR!WHGSXZ1RW153X123W87VPCV66C2X.kfx
    Traceback (most recent call last):
    File “site-packages\calibre\customize\ui.py”, line 427, in get_file_type_metadata
    File “calibre_plugins.kfx_input.metadata_reader”, line 28, in get_metadata
    File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 97, in get_metadata
    Exception: Failed to locate a KFX container with metadata
    Added CR!WHGSXZ1RW153X123W87VPCV66C2X to db in: 0.1
    Added 1 books in 0.5 seconds

  16. I also got the same message. The book that I’m trying to import is in a subfolder within another subfolder. The inner subfolder is called attachables. The metadata is in the outer subfolder, called assets. The assets subfolder is in a folder named after the book, along with a bunch of other files. Am I grabbing the wrong thing? This and the metadata are the only kfx files. The rest are other kinds of files.

    • You need to locate the main KFX file for the book and import that. It will be a file in the “documents” folder of the kindle with a “.kfx” extension. It will not be in any of the “.sdr” subfolders.

  17. I can’t seem to remove the DRM from a Nook comic. I’m using the Windows Nook app on Windows 10 since I can’t get Nook Study to connect anymore. Now, I can download a regular book, try opening it with Sigil and it tells me that the book has DRM. I import the book into Calibre and can open the book, so deDRM seems to work.

    I just bought a comic. It downloads as an EPUB, but when I drag it into Calibre and try to open it, I get the ‘This book has DRM message’ in both Calibre and Sigil.

    • I don’t think you can download Nook comics to Nookstudy (or Nook for PC) anyway. Their DRM is set up differently from regular nook books with the information from the “rights.xml” stored in a separate database instead of inside the epub. The database is inside the same hidden folder where the Nook app puts the epubs, and it’s called NookDownloads.db3. The info you need from there is in plain text. So you can copy it out, name it “rights.xml” and stick it in the epub. Then DeDRM will work on them. The resulting file will be DRM-free, but not really readable in anything but the Nook app. Although you can pull the images out, and make a regular digital comic since they are just a series of full page images. For more details see this comment:

      https://apprenticealf.wordpress.com/2012/09/10/drm-removal-tools-for-ebooks/comment-page-38/#comment-62274

      Happy to help if you questions. Needless to say, the lesson from this is don’t buy comics from B&N!

      • Hi Laura, thanks for the response. I followed your directions and when I import to Calibre and try to open the EPUB, I still get the DRM message. Any other ideas? At this point, I feel like I wasted $22.00.

        I’d bought comics from B&N years ago and before purchasing this one, I tried downloading one of the old comics and it worked. But the one I bought last night, no dice.

        As an experiment, I thought I’d try and install Calibre on a new computer. But since I can’t run Nook Study, is there a way to get the Barnes and Noble key from the Nook Windows app?

        • Just go into the plugin customization and enter your B&N account email and password to retrieve your current key.

          When you are copying the info for the rights.xml file, be sure to copy all the way to the closing “/adept:rights” tag with the forward slash.

          If it still doesn’t work, post a log. We’ll figure it out.

          • Okay, I did manage to generate a key on the new PC and I know the key works, because I downloaded a traditional book I’d bought from B&N. I couldn’t open the book in the B&N ePub folder, but I could open it after importing to Calibre. So I tried with the new graphic novel and I get the same results. DRM is not removed.

            When I copy the info for the rights.xml, I am copying everything from “?xml version=”1.0″?” to “/adept:rights” (including the brackets that I can’t post here).

            When you say ‘post a log’, how do I generate a log?

              • Okay. Here’s the log:

                calibre Debug log
                calibre 3.25 [64bit] embedded-python: True is64bit: True
                Windows-10-10.0.16299-SP0 Windows (’64bit’, ‘WindowsPE’)
                (‘Windows’, ’10’, ‘10.0.16299’)
                Python 2.7.12+
                Windows: (’10’, ‘10.0.16299’, ‘SP0′, u’Multiprocessor Free’)
                Interface language: None
                Successfully initialized third party plugins: DeDRM (6, 6, 1) && Obok DeDRM (6, 5, 4) && KoboTouchExtended (3, 0, 2)
                calibre 3.25 [64bit] embedded-python: True is64bit: True
                Windows-10-10.0.16299-SP0 Windows (’64bit’, ‘WindowsPE’)
                (‘Windows’, ’10’, ‘10.0.16299’)
                Python 2.7.12+
                Windows: (’10’, ‘10.0.16299’, ‘SP0′, u’Multiprocessor Free’)
                Interface language: None
                Successfully initialized third party plugins: DeDRM (6, 6, 1) && Obok DeDRM (6, 5, 4) && KoboTouchExtended (3, 0, 2)
                Turning on automatic hidpi scaling
                devicePixelRatio: 1.0
                logicalDpi: 96.0 x 96.0
                physicalDpi: 135.5328125 x 135.466666667
                Using calibre Qt style: True
                [0.00] Starting up…
                [0.01] Showing splash screen…
                [0.26] splash screen shown
                [0.26] Initializing db…
                [1.36] db initialized
                [1.36] 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
                [5.98] main UI initialized…
                [5.98] Hiding splash screen
                [68.95] splash screen hidden
                [68.95] Started up in 68.95 seconds with 6812 books
                DeDRM v6.6.1: Trying to decrypt 9781506705392.epub
                DeDRM v6.6.1: Verifying zip archive integrity
                DeDRM v6.6.1: “9781506705392.epub” is a secure Barnes & Noble ePub
                DeDRM v6.6.1: Trying Encryption key nook_Study_key
                Could not decrypt fnqbtr.epub because of an exception:
                Traceback (most recent call last):
                File “calibre_plugins.dedrm.ignobleepub”, line 270, in decryptBook
                File “xml\etree\ElementTree.py”, line 1311, in XML
                File “xml\etree\ElementTree.py”, line 1653, in feed
                File “xml\etree\ElementTree.py”, line 1517, in _raiseerror
                ParseError: not well-formed (invalid token): line 1, column 0

                DeDRM v6.6.1: Failed to decrypt with key nook_Study_key after 17.8 seconds
                DeDRM v6.6.1: Looking for new NOOK Study Keys after 17.8 seconds
                No nook Study log files have been found.
                DeDRM v6.6.1: Ultimately failed to decrypt after 17.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 171, in _run_filetype_plugins
                File “calibre_plugins.dedrm.init“, line 632, in run
                File “calibre_plugins.dedrm.init“, line 301, in ePubDecrypt
                DeDRMError: DeDRM v6.6.1: Ultimately failed to decrypt after 17.8 seconds. Read the FAQs at Harper’s repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
                Added The Life and Times of Martha Washington in the Twenty-first Century (Second Edition) to db in: 18.5
                Added 1 books in 181.6 seconds
                Worker Launch took: 0.298000097275

                • Okay, something’s off with the rights.xml file. Take one of your regular Nook epubs before DRM removal, unzip it, and look at its rights.xml. Compare its general format to what you’re copying out of the database. See if you’re missing something or have something extra in there.

                  • Success! And in the end it was so simple. There’s a section in rights.xml that should be (all brackets replaced with quotation marks):

                    “permissions”
                    “display””/display”
                    “excerpt””/excerpt”
                    “print””/print”
                    “/permissions”

                    But copying from NookDownloads.db3, it looked like this:

                    “permissions”
                    “display/”
                    “excerpt/”
                    “print/”
                    “/permissions”

                    Correcting that fixed everything.

  18. Hi Laura,

    Could you please help me out? I downloaded a book from Amazon into my kindle and opened it in my Calibre to get DRM removed. Unfortunately it isn’t working. I’m using the latest de-DRM plugin 6.6.1 so that I can convert the DRM’d source file into drm-free epub but no luck. The file I am getting is a kfx-zip file which still has the DRM and cannot be converterd or opened in calibre book viewer 😦

    Here is the debug log –

    calibre Debug log
    calibre 3.23 [64bit] embedded-python: True is64bit: True
    Windows-10-10.0.17134-SP0 Windows (’64bit’, ‘WindowsPE’)
    (‘Windows’, ’10’, ‘10.0.17134’)
    Python 2.7.12+
    Windows: (’10’, ‘10.0.17134’, ‘SP0′, u’Multiprocessor Free’)
    Interface language: None
    Successfully initialized third party plugins: Gather KFX-ZIP File Type (from KFX Input) (1, 4, 0) && DeDRM (6, 6, 1) && Package KFX File Type (from KFX Input) (1, 4, 0) && KFX metadata reader (from KFX Input) (1, 4, 0) && KFX Input (1, 4, 0)
    calibre 3.23 [64bit] embedded-python: True is64bit: True
    Windows-10-10.0.17134-SP0 Windows (’64bit’, ‘WindowsPE’)
    (‘Windows’, ’10’, ‘10.0.17134’)
    Python 2.7.12+
    Windows: (’10’, ‘10.0.17134’, ‘SP0′, u’Multiprocessor Free’)
    Interface language: None
    Successfully initialized third party plugins: Gather KFX-ZIP File Type (from KFX Input) (1, 4, 0) && DeDRM (6, 6, 1) && Package KFX File Type (from KFX Input) (1, 4, 0) && KFX metadata reader (from KFX Input) (1, 4, 0) && KFX Input (1, 4, 0)
    Turning on automatic hidpi scaling
    devicePixelRatio: 1.0
    logicalDpi: 96.0 x 96.0
    physicalDpi: 112.286084142 x 112.758381503
    Using calibre Qt style: True
    [0.00] Starting up…
    [0.00] Showing splash screen…
    [0.16] splash screen shown
    [0.16] Initializing db…
    [0.17] db initialized
    [0.17] Constructing main UI…
    [2.77] main UI initialized…
    [2.77] Hiding splash screen
    [15.53] splash screen hidden
    [15.53] Started up in 15.53 seconds with 0 books
    stdout+stderr from file dialog helper: [”, ”]
    piped data from file dialog helper: [‘)\rGQ\xe7\xd46\x87\x8f^\xc0\xc9iX\x93\x95\x97.q\xe8(\x1fIN\x90;\xf8\n\x0f\xf6k\xab’, ‘C:\Users\Nithin\Desktop\Finding Rebecca – Eoin Dempsey.kfx-zip’]
    DeDRM v6.6.1: Trying to decrypt Finding Rebecca – Eoin Dempsey.kfx-zip
    Using Library AlfCrypto Python
    Decrypting KFX-ZIP ebook: Finding Rebecca – Eoin Dempsey
    Got DSN key from database default_key
    Found 1 keys to try after 0.2 seconds
    Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.8f9bf405-ab88-4789-9814-587fcf0519a5.voucher
    KFX DRM voucher successfully decrypted
    DeDRM v6.6.1: Failed to decrypt with error: This book is licensed as Prime. These tools are intended for use on purchased books.
    DeDRM v6.6.1: Looking for new default Kindle Key after 0.2 seconds
    searching for kinfoFiles in C:\Users\Nithin\AppData\Local
    Found K4PC 1.9+ kinf2011 file: C:\Users\Nithin\AppData\Local\Amazon\Kindle\storage.kinf2011
    Decrypted key file using IDString ‘851442801’ and UserName ‘4e697468696e’
    DeDRM v6.6.1: Found 1 new key
    Decrypting KFX-ZIP ebook: Finding Rebecca – Eoin Dempsey
    Got DSN key from database default_key_1
    Found 1 keys to try after 0.4 seconds
    Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.8f9bf405-ab88-4789-9814-587fcf0519a5.voucher
    KFX DRM voucher successfully decrypted
    DeDRM v6.6.1: 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 171, in _run_filetype_plugins
    File “calibre_plugins.dedrm.init“, line 621, in run
    File “calibre_plugins.dedrm.init“, line 571, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.6.1: 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
    Package KFX File Type (from KFX Input) 1.4.0: Packaging C:\Users\Nithin\Desktop\Finding Rebecca – Eoin Dempsey.kfx-zip
    Processing container: B00KDOYEF0_EBOK.azw
    Running file type plugin Package KFX File Type (from KFX Input) failed with traceback:
    Traceback (most recent call last):
    File “site-packages\calibre\customize\ui.py”, line 171, in _run_filetype_plugins
    File “calibre_plugins.kfx_input.package_filetype”, line 22, in run
    File “calibre_plugins.kfx_input.package_filetype”, line 35, in run_kfx
    File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 52, in convert_to_single_kfx
    File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 118, in decode_book
    File “calibre_plugins.kfx_input.kfxlib.yj_book”, line 205, in get_container
    KFXDRMError: Book container B00KDOYEF0_EBOK.azw has DRM and cannot be converted
    KFX metadata reader (from KFX Input) activated for C:\Users\Nithin\Desktop\Finding Rebecca – Eoin Dempsey.kfx-zip
    Added Finding Rebecca to db in: 2.8
    Added 1 books in 5.0 seconds

    • From the log:

      “Failed to decrypt with error: This book is licensed as Prime. These tools are intended for use on purchased books.”

  19. Hello! When I tried to install this tool on Calibre on Windows 7 x64 fails:
    calibre, version 3.25.0
    ERROR: Excepción no considerada: InvalidPlugin:The plugin in u’C:\Users\Admin\Downloads\Calibre\DeDRM_tools_6.6.1.zip’ is invalid. It does not contain a top-level init.py file

    calibre 3.25 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.12+
    Windows: (‘7’, ‘6.1.7601’, ‘SP1′, u’Multiprocessor Free’)
    Interface language: es
    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 471, in add_plugin
    File “site-packages\calibre\customize\ui.py”, line 60, 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\Admin\Downloads\Calibre\DeDRM_tools_6.6.1.zip’ is invalid. It does not contain a top-level init.py file

    Any help?

    • You’re trying to install the whole archive. Unzip that file, look in the DeDRM_calibre_plugin folder, and load DeDRM_plugin.zip.

  20. I am trying to import a kindle book I purchased today (6/15/2018) from Amazon into calibre 3.26.1 on a MacBook pro (macOS 10.13.5) and it simply won’t import (I never get to the point where I can try converting it), even after installing the most recent DeDRM plug-in.

    calibre Debug log
    calibre 3.26.1 embedded-python: True is64bit: True
    Darwin-17.6.0-x86_64-i386-64bit Darwin (’64bit’, ”)
    (‘Darwin’, ‘17.6.0’, ‘Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64’)
    Python 2.7.12
    OSX: (‘10.13.5’, (”, ”, ”), ‘x86_64′)
    Interface language: None
    Successfully initialized third party plugins: DeDRM (6, 6, 1)
    calibre 3.26.1 embedded-python: True is64bit: True
    Darwin-17.6.0-x86_64-i386-64bit Darwin (’64bit’, ”)
    (‘Darwin’, ‘17.6.0’, ‘Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64’)
    Python 2.7.12
    OSX: (‘10.13.5’, (”, ”, ”), ‘x86_64’)
    Interface language: None
    Successfully initialized third party plugins: DeDRM (6, 6, 1)
    devicePixelRatio: 1.0
    logicalDpi: 72.0 x 72.0
    physicalDpi: 111.000001667 x 110.000001652
    Using calibre Qt style: True
    [0.00] Starting up…
    [0.02] Showing splash screen…
    [0.19] splash screen shown
    [0.19] Initializing db…
    [0.28] db initialized
    [0.28] Constructing main UI…
    [1.77] main UI initialized…
    [1.77] Hiding splash screen
    [1.79] splash screen hidden
    [1.80] Started up in 1.80 seconds with 1110 books
    objc[764]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fff8e80bc90) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x11c518cd8). One of the two will be used. Which one is undefined.
    DeDRM v6.6.1: Trying to decrypt B010JG1YFO_EBOK.azw
    Using Library AlfCrypto DLL/DYLIB/SO
    DeDRM v6.6.1: 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.1: Looking for new default Kindle Key after 0.0 seconds
    Found k4Mac kinf2011 file: /Users/josephsomerville/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2011
    Decrypted key file using IDString ‘b5781498717a’ and UserName ‘josephsomerville’
    DeDRM v6.6.1: Found 1 new key
    DeDRM v6.6.1: Ultimately failed to decrypt after 0.5 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 171, in _run_filetype_plugins
    File “calibre_plugins.dedrm.init“, line 621, in run
    File “calibre_plugins.dedrm.init“, line 571, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.6.1: Ultimately failed to decrypt after 0.5 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 427, in get_file_type_metadata
    File “site-packages/calibre/customize/builtins.py”, line 284, 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 284, in init
    File “site-packages/calibre/ebooks/mobi/reader/headers.py”, line 312, in identity
    MobiError: Unknown book type: Ńfiúå”

  21. Hello,

    I don’t know why, but it seems that I cannot dedrm my books even with the latest version of dedrm. Here is the post. Could you have a look?

    calibre Journal de débogage
    calibre 3.26.1 embedded-python: True is64bit: False
    Windows-8.1-6.3.9600-SP0 Windows (’32bit’, ‘WindowsPE’)
    32bit process running on 64bit windows
    (‘Windows’, ‘8.1’, ‘6.3.9600’)
    Python 2.7.12+
    Windows: (‘8.1’, ‘6.3.9600’, ‘SP0′, u’Multiprocessor Free’)
    Interface language: fr
    Successfully initialized third party plugins: DeDRM (6, 6, 1)
    calibre 3.26.1 embedded-python: True is64bit: False
    Windows-8.1-6.3.9600-SP0 Windows (’32bit’, ‘WindowsPE’)
    32bit process running on 64bit windows
    (‘Windows’, ‘8.1’, ‘6.3.9600’)
    Python 2.7.12+
    Windows: (‘8.1’, ‘6.3.9600’, ‘SP0′, u’Multiprocessor Free’)
    Interface language: fr
    Successfully initialized third party plugins: DeDRM (6, 6, 1)
    Turning on automatic hidpi scaling
    devicePixelRatio: 1.0
    logicalDpi: 96.0 x 96.0
    physicalDpi: 118.41774744 x 118.225454545
    Using calibre Qt style: True
    [0.00] Starting up…
    [0.00] Showing splash screen…
    [0.50] splash screen shown
    [0.50] Initializing db…
    [0.61] db initialized
    [0.61] Constructing main UI…
    [5.28] main UI initialized…
    [5.28] Hiding splash screen
    [12.27] splash screen hidden
    [12.27] Started up in 12.27 seconds with 1 books
    Failed to check for calibre update: [Errno 11001] getaddrinfo failed
    Failed to check for plugin update: [Errno 11001] getaddrinfo failed
    stdout+stderr from file dialog helper: [”, ”]
    piped data from file dialog helper: [‘\xfa\xb4\x9b\xea\xd9GG\x1eO\x1fo\xca\x9c”\x9aq%w\xc4\xfa`J?;\xb2\xb0\x0b\xcf5\x83r\x83’, ‘C:\Users\Madeleine Pepin\Documents\My Kindle Content\B008733ZS6_EBOK.azw’]
    DeDRM v6.6.1: Trying to decrypt B008733ZS6_EBOK.azw
    Using Library AlfCrypto Python
    MobiDeDrm v0.42.
    Copyright © 2008-2017 The Dark Reverser, Apprentice Harper et al.
    Decrypting Kindle Format 8 ebook: Légendes (French Edition)
    Got DSN key from database default_key
    Found 4 keys to try after 0.2 seconds
    Crypto Type is: 2
    DeDRM v6.6.1: Failed to decrypt with error: No key found in 4 keys tried.
    DeDRM v6.6.1: Looking for new default Kindle Key after 0.2 seconds
    searching for kinfoFiles in C:\Users\Madeleine Pepin\AppData\Local
    Found K4PC 1.9+ kinf2011 file: C:\Users\Madeleine Pepin\AppData\Local\Amazon\Kindle\storage.kinf2011
    Decrypted key file using IDString ‘2291465011’ and UserName ‘4d6164656c65696e6520506570696e’
    DeDRM v6.6.1: Ultimately failed to decrypt after 0.3 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 171, in _run_filetype_plugins
    File “calibre_plugins.dedrm.init“, line 621, in run
    File “calibre_plugins.dedrm.init“, line 571, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.6.1: Ultimately failed to decrypt after 0.3 seconds. Read the FAQs at Harper’s repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
    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 Légendes (French Edition) to db in: 2.0
    Added 1 books in 2.9 seconds
    Worker Launch took: 0.259000062943
    Job: 1 Conversion du livre 1 sur 1 (Légendes (French Edition)) finished
    Conversion du livre 1 sur 1 (Légendes (French Edition))
    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
    Conversion options changed from defaults:
    verbose: 2
    cover: u’C:\Users\MADELE~1\AppData\Local\Temp\calibre_yayvjh\gvtyeh.jpeg’
    read_metadata_from_opf: u’C:\Users\MADELE~1\AppData\Local\Temp\calibre_yayvjh\6o8dgt.opf’
    output_profile: ‘tablet’
    Resolved conversion options
    calibre version: 3.26.1
    {‘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’C:\Users\MADELE~1\AppData\Local\Temp\calibre_yayvjh\gvtyeh.jpeg’,
    ‘debug_pipeline’: None,
    ‘dehyphenate’: True,
    ‘delete_blank_paragraphs’: True,
    ‘disable_font_rescaling’: False,
    ‘dont_split_on_page_breaks’: False,
    ‘duplicate_links_in_toc’: False,
    ’embed_all_fonts’: False,
    ’embed_font_family’: None,
    ‘enable_heuristics’: False,
    ‘epub_flatten’: False,
    ‘epub_inline_toc’: False,
    ‘epub_toc_at_end’: False,
    ‘epub_version’: u’2′,
    ‘expand_css’: False,
    ‘extra_css’: None,
    ‘extract_to’: None,
    ‘filter_css’: u”,
    ‘fix_indents’: True,
    ‘flow_size’: 260,
    ‘font_size_mapping’: None,
    ‘format_scene_breaks’: True,
    ‘html_unwrap_factor’: 0.4,
    ‘input_encoding’: None,
    ‘input_profile’: <calibre.customize.profiles.InputProfile object at 0x033C1FF0>,
    ‘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,
    ‘no_chapters_in_toc’: False,
    ‘no_default_epub_cover’: False,
    ‘no_inline_navbars’: False,
    ‘no_svg_cover’: False,
    ‘output_profile’: <calibre.customize.profiles.TabletOutput object at 0x033AD610>,
    ‘page_breaks_before’: u”//*[name()=’h1′ or name()=’h2′]”,
    ‘prefer_metadata_cover’: False,
    ‘preserve_cover_aspect_ratio’: False,
    ‘pretty_print’: True,
    ‘pubdate’: None,
    ‘publisher’: None,
    ‘rating’: None,
    ‘read_metadata_from_opf’: u’C:\Users\MADELE~1\AppData\Local\Temp\calibre_yayvjh\6o8dgt.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,
    ‘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: MOBI Input running
    on C:\Users\MADELE~1\AppData\Local\Temp\calibre_yayvjh\esjo9l.azw
    Found KF8 MOBI of type ‘standalone’
    Python function terminated unexpectedly
    Légendes (French Edition) (Error Code: 1)
    Traceback (most recent call last):
    File “site.py”, line 101, in main
    File “site.py”, line 78, in run_entry_point
    File “site-packages\calibre\utils\ipc\worker.py”, line 195, in main
    File “site-packages\calibre\gui2\convert\gui_conversion.py”, line 33, in gui_convert_override
    File “site-packages\calibre\gui2\convert\gui_conversion.py”, line 26, in gui_convert
    File “site-packages\calibre\ebooks\conversion\plumber.py”, line 1088, in run
    File “site-packages\calibre\customize\conversion.py”, line 244, in call
    File “site-packages\calibre\ebooks\conversion\plugins\mobi_input.py”, line 44, in convert
    File “site-packages\calibre\ebooks\mobi\reader\mobi8.py”, line 86, in call
    File “site-packages\calibre\ebooks\mobi\reader\mobi6.py”, line 157, in check_for_drm
    calibre.ebooks.DRMError: Légendes (French Edition)

    Thank you very much

  22. Hello 🙂

    Please help… I bought kindle version of a book today from Amazon. I want it as PDF so I can read it on other devices. I tried to convert it on calibre. Unfortunately, it’s KFX-ZIP and would not allow me to convert it because of DRM. I have all the plugins. Please, please help me convert it to PDF. Thanks in advance.

    • If you downloaded to an E-ink Kindle, then you need to enter its serial number into the plugin customization. If you downloaded it with Kindle for PC/Mac, then calbre with DeDRM needs to be on the same computer and user.

  23. DeDrm plugin is not woriking in Calibre. I get the following error message

    Crypto Type is: 2
    DeDRM v6.6.1: Failed to decrypt with error: No key found in 4 keys tried.
    DeDRM v6.6.1: Looking for new default Kindle Key after 0.1 seconds
    DeDRM v6.6.1: Running kindlekey.py under Wine
    DeDRM v6.6.1: Command line: ‘WINEPREFIX=”/home/rcihard” wine python.exe “/home/rcihard/.config/calibre/plugins/DeDRM/libraryfiles/kindlekey.py” “/home/rcihard/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir”‘
    wine: cannot find L”C:\windows\system32\python.exe”
    DeDRM v6.6.1: Found and decrypted 0 key files
    DeDRM v6.6.1: Ultimately failed to decrypt after 0.5 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 171, in _run_filetype_plugins
    File “calibre_plugins.dedrm.init“, line 621, in run
    File “calibre_plugins.dedrm.init“, line 571, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.6.1: Ultimately failed to decrypt after 0.5 seconds. Read the FAQs at Harper’s repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
    Added Raspberry Pi For Dummies to db in: 1.7
    Added 1 books in 2.6 seconds

    • There’s been a long-standing issue with some Linux systems where DeDRM can’t find python under wine. (You do need to have Python and Pycrypto installed under Wine.) A workaround is to manually run the key retrieval script under Wine, and import the key into calibre.

      See the log for the command to run:

      wine python.exe “/home/rcihard/.config/calibre/plugins/DeDRM/libraryfiles/kindlekey.py” “/home/rcihard/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir”

      You may have to create that directory first, then you’ll find the key there. (You can put it someplace simpler, like “/home/rcihard/winekeysdir”)
      Look in the plugin customization to import the key into calibre.

  24. It seems that I can’t open the app in macOS 10.13.5; it merely appears like “The application “DeDRM” can’t be opened.” Would you like to have a look?
    Thanks~

    • I think this is a known bug. You might have to drop back a version or two to get a version that works, if you don’t want to install calibre and the plugin. (I recommend calibre and the plugin)

      • More a feature, than a bug: safety measures have been tightened with each newer Mac OS version.
        Apps which are not from the Appstore from Apple must be allowed to be opened.
        While there is a setting to generally allow that, it is considered unwise and unsafe and in the mojave Beta (wwdc/developer) it does not work for me.

        Solution: display the DeDRM program (script) in finder, right-click with your pointer (mouse or whatever) and chose open – this is also called CTRL-click .
        A question should pop up wether you want to run this unsafe program (“Are you sure you want to open it?” open/cancel with cancel selected).
        For mojave here is a link, which I just found and DID NOT test, but may well use (running a Beta is risky anyways), use at your own risk:
        https://www.tekrevue.com/tip/gatekeeper-macos-sierra/

      • Speaking of GitHub, I hope ApprenticeHarper is working on moving this project off GiTHub to an independent location.

    • I assume that you are trying to use Kindleunpack from that error message. That will not work because there is no embedded HTML to unpack in KFX format. You need to convert to other formats using calibre instead.

Comments are closed.