DRM Removal Tools for eBooks

Version 6.6.1 released on 2 June, 2018

Welcome to Apprentice Alf’s blog

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

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

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

The Tools

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

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

Getting Help with the Tools

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

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

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

In any bug report or help request, please include:

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

Anti-Piracy Notice

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

Origin of the Tools

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

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

Other Sources

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

Advertisements

4,489 thoughts on “DRM Removal Tools for eBooks

  1. This is to Laura in the comment thread I made, since I can’t reply directly for some reason. I can see what you mean with regards to the lack of interest in supporting Kindle for Android because Kindle for PC/Mac can support basically all e-books. The thing is that with the e-book I was trying to deDRM, it wasn’t available for Kindle for PC or regular Kindle e-readers (except for the Kindle Oasis). And I am assuming no one’s been able to figure out how to remove the DRM from Kindle Fire e-books as of yet. I’m not sure how many e-books are like the one I was trying to deDRM, but having a working method to do so for the Android Amazon Kindle app would be good as a “just in case.”

    • If someone were to figure out a way, I’m sure Apprentice Harper would be willing to incorporate it into the tools if possible.

      And you’re right, no one’s found out how to get keys for Kindle Fire devices as far as I’m aware.

      • As it stands now, I don’t think anyone will try to figure out a way to remove the DRM from the newer Kindle for Android apps because, as was previously mentioned, the Kindle for PC application is much easier to use in terms of working with the tools. I certainly don’t have the talent to figure out a way, and anyways, in my experience, there are only three e-books that aren’t supported by the Kindle for PC application.

  2. Hi all, I’d like to know if there’ll be a 64-bit version of the tools in the near future, i.e., before macOS 10.14 arrives. Thank you very much.

      • Paul, I don’t think there is a problem with the CURRENT plug-in; rather the concern is that with the arrival of macOS 10.14 later this year, only 64-bit applications will be allowed to run. Now whether this means that Calibre plug-ins have to also be 64-bit is unknown (can a 64-bit Calibre use a 32-bit plugin internally while running as a 64-bit application on macOS?) but the standalone Mac version of the tools WILL have to be 64-bit to run on macOS 10.14.

  3. I am facing a new DR System:
    CARE (“Content & Author Rights Environment”) developped by TEA (“The eBook Alternative”).
    Is there any chance to get rid of it?

      • It’s based on Readiums “Open Source Technology for EPUB 3 and the Open Web Platform”. (https://readium.github.io/). It might be used by libraries in Europe and companies who don’t want to go further with Adobe. It’s said that the most important ebook reader suppliers are willing to implement it. There is a comprehensive description on Readiums website.

        • If it gets used by stores and someone figures it out, I imagine that the Apprentices would be willing to incorporate it into these tools. If only libraries adopt it, then no.

  4. Running obok in MacOS 10.13.4 on an eBook from Kobo Desktop app. No errors in conversion by calibre, debug trace below. Resulting epub works fine most places, but all table-of-contents items take me to cover image in iBooks reader on iOS (all work fine in iBook on Mac). I’ve also included the “edit-book” warning info following calibre debug info.

    [Removed logs before releasing from spam. Looks like the question was reposted and resolved. — Alf.]

  5. I posted a long comment which seems to have disappeared when I was asked to log in when posting. I’ll repost a short version.

    My problem is that the epub generated by obok has a non-functional table-of-contents when read by iBooks in iOS. It works fine in the Mac version of iBooks, but in iOS iBooks all toc links take me to the cover image.

    I used the Obok DeDRM 6.5.4 plugin in calibre 3.21.0 to convert a kobo book from kobo desktop 4.6.7093 to DRM free epub. I’m running on MacOS 10.13.4 and iOS 11.2.6. I ran “calibre-debug -g” during the conversion and the short log file had no error messages, only “success” messages.

    The “edit book” program in calibre gives 54 warnings for the resulting epub. The first few are:

    CSS: Property: Invalid value for “CSS Level 2.1” property: 99vh [645:2: height]    [OEBPS/styles/style.css]
    CSS: Property: Invalid value for “CSS Level 2.1” property: 99vh [679:2: height]    [OEBPS/styles/style.css]
    CSS: MediaQuery: Missing token for production media_type: (‘IDENT’, u’amzn-kf8′, 742, 12)    [OEBPS/styles/style.css]
    CSS: Property: Invalid value for “CSS Fonts Module Level 3 @font-face properties” property: “../fonts/AvenirLTPro-Heavy.otf” [6:2: src]    [OEBPS/styles/vintage_style.css]
    The file OEBPS/fonts/AvenirLTPro-Heavy.otf has a mimetype that does not match its extension    [OEBPS/content.opf]
    Non-linear items in the spine    [OEBPS/content.opf]
    CSS: Property: Unknown Property name. [1:13: -webkit-text-combine]    [OEBPS/pages/about_author.xhtml]

    and then another 46 similar errors that all start “CSS: Property: Unknown Property name. [1:13: -webkit-text-combine]”
    and ends with

    The file OEBPS/pages/nav.xhtml is not referenced    [OEBPS/pages/nav.xhtml]
    CSS: Property: Unknown Property name. [1:13: -webkit-text-combine]    [OEBPS/pages/notes.xhtml]
    CSS: Property: Unknown Property name. [1:13: -webkit-text-combine]    [OEBPS/pages/story_page.xhtml]
    CSS: Property: Unknown Property name. [1:13: -webkit-text-combine]    [OEBPS/pages/title_page.xhtml]
    The file rights.xml is not listed in the manifest    [rights.xml]

    The table of contents looks fine in “edit book” and works fine on the Mac, both in calibre viewer and iBooks reader, but not in iOS.

    • Obok doesn’t do really any conversion. Kepubs are just epubs with some extra tags.

      You could try downloading the epub via ADE and then using DeDRM. See if that version has the same issue.

      • Thanks for the suggestion, Laura! I just tried that now, but it still has exactly the same problem. In fact, in iBooks on iOS, every entry in the table of contents opens an image of the cover, which returns to the table of contents when you close it. The same file works correctly on other readers on the Mac, and even in iBooks on the Mac.

  6. Any idea why this book is failing to convert from AZW3 to EPUB? The error details are below:

    [Removed conversion log before releasing from spam. — Alf.]

  7. I should have mentioned that, doing it this way, “edit books” only reports 9 problems when I check the file:

    ERROR: The meta cover tag has content before name    [OEBPS/content.opf]
    ERROR: CSS: Property: Invalid value for “CSS Level 2.1” property: 99vh [645:2: height]    [OEBPS/styles/style.css]
    ERROR: CSS: Property: Invalid value for “CSS Level 2.1” property: 99vh [679:2: height]    [OEBPS/styles/style.css]
    ERROR: CSS: MediaQuery: Missing token for production media_type: (‘IDENT’, u’amzn-kf8′, 742, 12)    [OEBPS/styles/style.css]
    ERROR: CSS: Property: Invalid value for “CSS Fonts Module Level 3 @font-face properties” property: “../fonts/AvenirLTPro-Heavy.otf” [6:2: src]    [OEBPS/styles/vintage_style.css]
    WARNING: The file OEBPS/fonts/AvenirLTPro-Heavy.otf has a mimetype that does not match its extension    [OEBPS/content.opf]
    WARNING: Non-linear items in the spine    [OEBPS/content.opf]
    WARNING: The linked resource ‘../../js/kobo.js’ does not exist    [OEBPS/pages/nav.xhtml]
    WARNING: The file OEBPS/pages/nav.xhtml is not referenced    [OEBPS/pages/nav.xhtml]

    iOS iBooks still has the problem with this file. If I let it fix problems automatically, it fixes all but 4 problems:

    ERROR: CSS: Property: Invalid value for “CSS Level 2.1” property: 99vh [664:3: height]    [OEBPS/styles/style.css]
    ERROR: CSS: Property: Invalid value for “CSS Level 2.1” property: 99vh [699:3: height]    [OEBPS/styles/style.css]
    ERROR: CSS: Property: Invalid value for “CSS Fonts Module Level 3 @font-face properties” property: “../fonts/AvenirLTPro-Heavy.otf” [6:3: src]    [OEBPS/styles/vintage_style.css]
    WARNING: The file OEBPS/fonts/AvenirLTPro-Heavy.otf is not referenced    [OEBPS/fonts/AvenirLTPro-Heavy.otf]

    and iOS iBooks still has the problem with this file.

      • You did it all wrong. What you want is to install the Modify ePub plugin for Calibre. You can use it to remove all javascript code and all kepub code and turn the kepub into an ePub. But really, the best way to do this is to go back to Kobo,com and download the eBook as ePub.

  8. Hello. I recently got a few comics gifted by a friend with NOOK Books because it was the only digital service that sold the comics. Initially I had no way to acess them in PC as I am not american. Got a friend to DL them through the W10 app which is not available to me. I got them now, and they’re DRM’d to hell. Got Calibre. Installed both plugins correctly. But DRM is not removed. I know, I know. BN is more complicated and has a key. Okay, well, under configurations for DRM removal in BN I added my account mail and credit card. Dunno what to put on the name of the key.. put a random o ne.. still didn’t work after resetting the program. :/

    Can anyone please TELL me how can I remove the DRM correctly, please?

    • Unfortunately, with comics, you may be out of luck. The DRM is sometimes handled differently when downloading with the Windows 10 Nook app. Try downloading them with the old Nook for PC program. Available here:

      http://images.barnesandnoble.com/PResources/download/eReader2/bndr2_setup_latest.exe

      If you can’t download them with that program, then there’s no good way to remove the DRM. If you can, then you should be fine. And, yes, you can put in whatever name you want for your B&N key. As long as the email and password are correct, it should retrieve a working key.

      • I installed the app, I get my Library, but I cannot download them. I get the “This title is not currently available for download in this application.” (Download:2138)..

      • I tried installing Nook for PC, but it doesn’t let me download the comics, sadly. :/ Will the DRM work if I download the comics somehow from the Android app? Is there really no way to remove the DRM of comics? 😦

        • I don’t know if it’s possible with comics downloaded to Android. I believe the Android app now stores the books in a folder that’s not user accessible unless you have root. And they might have the same problem.

          It’s possible with the downloads from the Windows 10 Nook app, but it’s a real pain. There’s a file called rights.xml which is normally inside the epub (which is actually a zip archive). But with these it’s stored in a separate database. 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. But wait…there’s more. The resulting file will be DRM-free, but not really readable in anything but the Nook app. But you can pull the images out, and make a regular digital comic since they are just a series of full page images. If you’re willing to tackle it and want more details, let me know.

          • I’m willing to do that as my last chance. Please, give me more details. What do you mean, ” can copy it out, name it “rights.xml” and stick it in the epub”?

            • I don’t mind if I have to save every page in jpg.. would rather have a readable epub or a .cbr.. but I’m desperate. So long as I got acess to the pages.. at least that way I could make a cbr.

            • Ok, first make copies of your epubs and the NookDownloads.db3 file to keep from messing with the originals just in case.

              You can open NookDownloads.db3 with Notepad since what you need is in plain text. Search inside it for the name of an epub file. Mine have 13-digit names. Just after that look for [?xml version=”1.0″?] except in greater than & less than brackets instead of square brackets (wordpress will get rid of them and everything inside them if I use them here). You want to copy everything starting with that through [/adept:rights]. Paste it into its own text file, and save it as “rights.xml”.

              Now take the epub with that name and change the extension to zip. Unzip it. Put rights.xml inside the META-INF folder. Zip it back up. Change the extension back to epub. If you have your B&N key set up in DeDRM, you should be able to add this to calibre and remove the DRM.

              Now you can take the DeDRMed epub, unzip it, and look in OPS\images\pages for the images. There are also thumbnails of each page in there too. I just deleted all the files ending in -thumb.jpg. Then I took all remaining files and zipped them up. Gave it the CBZ extension and finally I had my DRM-free and readable digital comic! Or as you said, you could do a RAR archive and make a CBR. Calibre’s viewer can read both of those, and calibre can convert them into other formats if needed.

              Repeat with each comic — Good luck! I hope you don’t have too many! Buy them elsewhere next time — print copies if necessary! 🙂

              • Hello; sorry to bother once more, but I’m getting closer to solve this problem, just need to fix one last issue.. for some reason, I did what you told me to and everything worked, but Calibre wasn’t able to remove the DRM.. here’s the log; perhaps I didn’t put things right in the plugin configuration. What should I put in there.. where can I find what I need for it to work? That’s the last part.. that’s all I need to fix to finally get acess to the epubs. Seems like some sort of issue with Python (which I have installed just for this and another method DeDrm uses too)..

                calibre Debug log
                calibre 3.21 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: None
                Successfully initialized third party plugins: DeDRM (6, 2, 1) && Obok DeDRM (3, 1, 2)
                calibre 3.21 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: None
                Successfully initialized third party plugins: DeDRM (6, 2, 1) && Obok DeDRM (3, 1, 2)
                Turning on automatic hidpi scaling
                devicePixelRatio: 1.0
                logicalDpi: 120.0 x 120.0
                physicalDpi: 96.0 x 95.9160839161
                Using calibre Qt style: True
                [0.00] Starting up…
                [0.00] Showing splash screen…
                [0.06] splash screen shown
                [0.06] Initializing db…
                [0.08] db initialized
                [0.08] Constructing main UI…
                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
                [1.58] main UI initialized…
                [1.58] Hiding splash screen
                [5.22] splash screen hidden
                [5.22] Started up in 5.22 seconds with 0 books
                DeDRM v6.2.1: Trying to decrypt 9781561638123.epub
                DeDRM v6.2.1: Verifying zip archive integrity
                DeDRM v6.2.1: “9781561638123.epub” is a secure Barnes & Noble ePub
                DeDRM v6.2.1: Trying Encryption key Test
                Could not decrypt gbohzc.epub because of an exception:
                Traceback (most recent call last):
                File “calibre_plugins.dedrm.ignobleepub”, line 268, in decryptBook
                File “xml\etree\ElementTree.py”, line 1312, in XML
                File “xml\etree\ElementTree.py”, line 1665, in close
                File “xml\etree\ElementTree.py”, line 1517, in _raiseerror
                ParseError: unclosed token: line 1, column 21

                DeDRM v6.2.1: Failed to decrypt with key Test after 0.2 seconds
                DeDRM v6.2.1: Looking for new NOOK Study Keys after 0.2 seconds
                No nook Study log files have been found.
                DeDRM v6.2.1: Ultimately failed to decrypt after 0.2 seconds.
                Read the FAQs at Alf’s blog: https://apprenticealf.wordpress.com/
                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 588, in run
                File “calibre_plugins.dedrm.init“, line 270, in ePubDecrypt
                DeDRMError: DeDRM v6.2.1: Ultimately failed to decrypt after 0.2 seconds.
                C:\Users\Users\Downloads\Nueva carpeta (2)\Calibre Portable\Calibre\app\pylib.zip\dateutil\parser.py:601: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode – interpreting them as being unequal
                Added The Complete “Omaha” the Cat Dancer: Volume 1 to db in: 1.4
                Added 1 books in 2.3 seconds
                Worker Launch took: 0.0789999961853

                • Hmm, you have an older version of DeDRM. Current version is 6.6.0. Try updating. With calibre and the DeDRM plugin, you don’t need to worry about Python or Pycrypto. Only with the stand-alone DeDRM Windows app.

                  In the B&N part of the DeDRM customization, you enter a name — whatever name you want to give your key — your B&N email account and password. Then I believe it shows you whether or not it retrieved a key. Hit OK or Apply on your way out of the dialog boxes. Then I’d suggest restarting calibre too before adding your books again.

                  It does look like you got the rights.xml in there correctly because otherwise it wouldn’t recognise it as a “secure Barnes & Noble ePub”.

                  • Just updated.. same issue.

                    calibre Debug log
                    calibre 3.22.1 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: None
                    Successfully initialized third party plugins: DeDRM (6, 6, 0) && Obok DeDRM (3, 1, 2) && Barnes & Noble (1, 2, 15)
                    calibre 3.22.1 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: None
                    Successfully initialized third party plugins: DeDRM (6, 6, 0) && Obok DeDRM (3, 1, 2) && Barnes & Noble (1, 2, 15)
                    Turning on automatic hidpi scaling
                    devicePixelRatio: 1.0
                    logicalDpi: 120.0 x 120.0
                    physicalDpi: 96.0 x 95.9160839161
                    Using calibre Qt style: True
                    [0.00] Starting up…
                    [0.02] Showing splash screen…
                    [0.08] splash screen shown
                    [0.08] Initializing db…
                    [0.08] db initialized
                    [0.08] 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
                    [1.88] main UI initialized…
                    [1.88] Hiding splash screen
                    [4.36] splash screen hidden
                    [4.36] Started up in 4.36 seconds with 1 books
                    DeDRM v6.6.0: Trying to decrypt 9781561638123.epub
                    DeDRM v6.6.0: Verifying zip archive integrity
                    DeDRM v6.6.0: “9781561638123.epub” is a secure Barnes & Noble ePub
                    DeDRM v6.6.0: Trying Encryption key Test
                    Could not decrypt jlgj0k.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 20

                    DeDRM v6.6.0: Failed to decrypt with key Test after 0.2 seconds
                    DeDRM v6.6.0: Looking for new NOOK Study Keys after 0.2 seconds
                    No nook Study log files have been found.
                    DeDRM v6.6.0: 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 631, in run
                    File “calibre_plugins.dedrm.init“, line 300, in ePubDecrypt
                    DeDRMError: DeDRM v6.6.0: 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 The Complete “Omaha” the Cat Dancer: Volume 1 to db in: 3.4
                    Added 1 books in 4.4 seconds
                    Worker Launch took: 0.0789999961853

                    • I also tried the settings of DeDRM BN for 6.60 which require login info. Did that, retrieved a key but I dind’t do anything with it, just saved it.. shall I try again copying the key or something?

                    • As long as it retrieve a key, then it should be good. Do you have any non-comic books, one that you can download with Nook for PC, to try?

                      Although I’m wondering if something is off with the rights.xml file, but I’m not sure what or how to fix it.

                    • Since line 270 of ignobleepub.py is

                      rights = etree.fromstring(inf.read(‘META-INF/rights.xml’))

                      I’d say the problem is the rights.xml. I don’t think it’s valid xml. Look at a book that already had a rights.xml in it to see the format and make sure you match that when you cut it out of the database file.

                    • when i opened the db3, it didn’t even parse as xml? it was a big jumble of letters and numbers which i found confusing as the rest of it had been human readable xml?

                    • @Seirra
                      You need an SQLite database viewer to see it properly. But the xml bits are in plain text so you can open in a text editor and grab what you need.

                    • I went through my collection to see if I could find any other epub and check inside, but none of them had any “rights.xml”.. and the other thing they did.. well, the only difference is that the text inside “rights.xml” is copypasted straight into just one full sentence, and not split like most xml codes tend to be, but I don’t think that’s the issue.. because it there had been an issue with the .xml, Calibre wouldn’t even detect it. Inside the rights.xml is a copypaste in text of what I found in the DB, refering to the epub I was trying to remove the DRM for, until adept:rights (including the ] ) just as you told me.. it can’t be that.. it must be some issue with Python.. but I need a fix somehow, man. I really want to get these comics working.

                  • I don’t know. I was able to do it with Notepad, but you might try Notepad++. Make sure you copy everything I indicated earlier including those starting and ending tags, and keeping the brackets they have instead of the square brackets I used here. And nothing else should be in rights.xml at all.

                    • I did as you said and it didn’t work.. I don’t think it’s a rights.xml issue. It’s something with Python or my computer.. :/

                    • Paul’s comment makes me think it is the rights.xml. I can’t see how it would be Python — the plugin uses the version that’s built into calibre. Don’t know why your computer would be an issue either. Another thing to try (although I don’t really know if it would make a difference) is to use 64 bit calibre.

                    • Ok, just looked at a rights.xml file from one of my regular nook books. It didn’t have this [?xml version=”1.0″?] at the beginning. So try leaving that off. Just copy from “<adept:rights” through the closing tag. Now I did put that in, and it didn’t matter so who knows.

                    • Sigh. Still doesn’t work. Does nothing. Gives me the same error in the log.

                      Traceback (most recent call last):
                      File “calibre_plugins.dedrm.ignobleepub”, line 270, in decryptBook
                      File “xml\etree\ElementTree.py”, line 1312, in XML
                      File “xml\etree\ElementTree.py”, line 1665, in close
                      File “xml\etree\ElementTree.py”, line 1517, in _raiseerror
                      ParseError: no element found: line 1, column 54 <——– (This changes everytime I change the xml somehow, which could explain it being related to the xml but I try and try and nothing I change works, I dunno…)

                      Traceback (most recent call last):
                      File “site-packages\calibre\customize\ui.py”, line 171, in _run_filetype_plugins
                      File “calibre_plugins.dedrm.init“, line 631, in run
                      File “calibre_plugins.dedrm.init“, line 300, in ePubDecrypt

                      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

                      In other news I also gave an epub with a rights.xml inside to a friend with another Calibre and he also couldn’t open it. He had my second issue (without the first one, which may explain the first one is .xml related, but the second isn’t.)

                      DeDRM v6.6.0: Trying to decrypt 9781561638123.epub
                      DeDRM v6.6.0: Verifying zip archive integrity
                      DeDRM v6.6.0: “9781561638123.epub” is a secure Barnes & Noble ePub
                      DeDRM v6.6.0: Looking for new NOOK Study Keys after 0.3 seconds
                      No nook Study log files have been found.
                      DeDRM v6.6.0: 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 631, in run
                      File “calibre_plugins.dedrm.init“, line 300, in ePubDecrypt
                      DeDRMError: DeDRM v6.6.0: 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
                      Added The Complete “Omaha” the Cat Dancer: Volume 1 to db in: 13.4
                      Added 1 books in 14.5 seconds
                      Worker Launch took: 0.223999977112

                    • Yes, yes, but what about THIS? That can’t be the rights.xml too.

                      File “site-packages\calibre\customize\ui.py”, line 171, in _run_filetype_plugins
                      File “calibre_plugins.dedrm.init“, line 631, in run
                      File “calibre_plugins.dedrm.init“, line 300, in ePubDecrypt

                    • Really, it IS the rights.xml file that’s causing the problems. I’m sorry if you can’t see the error. Perhaps raise an issue at github, where you can (I think) post the problematic rights.xml file.

                    • Somehow something’s missing that needs to be in the rights.xml or something’s in there that shouldn’t be. Maybe try an xml validator. Or as Paul suggested, raise an issue over at the GitHub. I keep tabs on questions there too.

                  • Well, I keep trying, and nothing works. Even online XML validation tells me nothing

                    In this pastebin it’s literally the full thing from the epub that I should use for rights.xml: I’ve tried many variations… is there any specific one I don’t know? https://pastebin.com/JpgvQctv

                    • No, it’s much longer than that. Do not include this: 9781561638123.epubKA

                      Then copy everything all the way through the CLOSING adept:rights tag. Which starts like this: </

                    • THAT WORKED! Finally I got it right. THANK YOU so much for your assistance! SO MUCH! Seriously, I’m so grateful you’ve stuck up to me til now, even being so annoying!!

                      I’m so happy I get to get the comics DRM-free now. I only wish the resolution of the pages would be higher. Like, it’s not LOW, but for digital, I tend to want more. I think Amazon had higher quality, but they stopped selling the comics and only sell volumes 3 and 8..

                      Talking about that, comics 4 and 8 of Barnes and Noble have some sort of issue; the pages are displayed like this. They shouldn’t; mostly it’s just clear white. https://i.imgur.com/TMUT00f.jpg I dunno what to do about it, Volume 8 is sold in Amazon alright, but 4 isn’t.. I’ve contacted BN about it but all they can do is refund and rebuy, but I don’t think the epub would change, most likely they send the same exact epub to each purchase no? I contacted the publisher, but no replies..

                    • Also, I try to do the exact same with the second volume, with the EPUB number of the second volume (without putting it in the rights.xml of course) but when I do the whole thing of putting it to Calibre.. Volume 1 appears, and the zip has Volume 1 pages.. anything else I need to learn?

                    • I would say that only the publisher could answer the question about the way the images look. And, yeah, I would assume another copy from B&N would be the same. Even another store might have the same issue. You can usually look at previews before buying.

                      No, vol 2 shouldn’t have vol 1 images. Download a fresh copy and look at it in the Nook app before trying to DeDRM it. It’s not unheard of for B&N (or any store) to have a mix up on their end.

                    • I sent a message through gmail to the publisher, but nothing works. You saw in my screencap how the pages look; it’s definitely not normal and some sort of problem. Volume 8 I can buy in Amazon (with even higher resolution than BN) but everything else, isn’t sold ANYWHERE else than Barnes and Noble, so I guess I’m gonna have to stand it.. as I doubt, as you say, that I’d get a different epub with a repurchase.

                      Every volume has been unDRM’d now, thank you so much. I’ll stay on the lookout in case I have any trouble with Amazon.

                    • Amazon books are much easier for the most part. Although there is one format which is split into azw3 for the main file and azw6 for the images which can be an issue. But it’s not used much anymore except in Japanese manga.

                    • A regular KF8 file shouldn’t be a problem. Only if the images are split into a seperate AZW6 file. Try downloading a sample.

  9. The Obok plugin can’t find the Kobo folder.

    calibre, version 3.21.0
    ERROR: Obok DeDRM v6.5.4:

    Could not find Kobo Library

    Windows/Mac: do you have Kobo Desktop installed?

    Windows/Mac/Linux: In case you have an Kobo eInk device, connect the device.

    I have the desktop installed on a Win10 and I’m logged in, so I know everything is there. I assume it’s looking for something than:

    C:\Users\Name\AppData\Local\Packages\KoboInc.KoboBooks_v*********0\LocalState\DownloadedBooks

    but that is the default folder created by the app when I recently downloaded it. How can I change the folder the plugin looks for? Or, if I can’t, can you tell me what the path it’s trying to find is and will simply creating it and pasting the books into it work? Thanx.

  10. I was pretty sure I was. Your link even took me to the page I remembered. But, just to be sure, I uninstalled and downloaded the exe, which ended up having the same file name as the one I already downloaded a couple days ago. However, when I installed it, I saw that it was a completely different interface–more robust. So I tried again and it all went off without a hitch. Thanx.

  11. I’ve installed DeDRM 6.6.0, as well as KFX input 1.3.0.

    I’m able to import KFX files – and they appear in the library. However, when I try to actually open them in Calibre – it simply tries to re-add them again?

  12. I am not able to import Amazon KFX format ebooks into calibre using the DeDRM plugin. The ebooks were all purchased directly from Amazon. Per the plugin readme file, I installed an earlier version of Kindle for PC to prevent downloads of the new format. Calibre still recognizes the KFX format.

    calibre version 3.21.0
    DeDRM tool 6.6.0
    Kindle for PC 1.16.0
    Windows 8.1

    Full details and debug log here:
    https://github.com/apprenticeharper/DeDRM_tools/issues/492

  13. I am not able to convert .azw downloaded using “download and transfer via USB” on a Mac.

    calibre Debug log
    calibre 3.20 embedded-python: True is64bit: True
    Darwin-17.5.0-x86_64-i386-64bit Darwin (’64bit’, ”)
    (‘Darwin’, ‘17.5.0’, ‘Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64’)
    Python 2.7.12
    OSX: (‘10.13.4’, (”, ”, ”), ‘x86_64′)
    Interface language: None
    Successfully initialized third party plugins: DeDRM (6, 6, 0)
    calibre 3.20 embedded-python: True is64bit: True
    Darwin-17.5.0-x86_64-i386-64bit Darwin (’64bit’, ”)
    (‘Darwin’, ‘17.5.0’, ‘Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64’)
    Python 2.7.12
    OSX: (‘10.13.4’, (”, ”, ”), ‘x86_64’)
    Interface language: None
    Successfully initialized third party plugins: DeDRM (6, 6, 0)
    devicePixelRatio: 2.0
    logicalDpi: 72.0 x 72.0
    physicalDpi: 113.500001705 x 113.500001705
    Using calibre Qt style: True
    [0.00] Starting up…
    [0.03] Showing splash screen…
    [0.22] splash screen shown
    [0.22] Initializing db…
    [0.25] db initialized
    [0.25] Constructing main UI…
    [1.52] main UI initialized…
    [1.52] Hiding splash screen
    [1.57] splash screen hidden
    [1.57] Started up in 1.57 seconds with 153 books
    2018-04-19 17:27:05.788 Calibre[11165:3448654] deliverNotificationWithTitle()
    * Notification delivered.

    • That log isn’t showing the book getting added. But did you choose an E-ink Kindle? Did you enter its serial number into the plugin customization?

  14. How do you sort series AND have that info translate to your kindle? I have several series that, despite marking them in order within Calibre, that information doesn’t make it onto my kindle–they’re all out of order. How do you fix that?

    I can sort my content several ways on my device, but no way sorts them in sequential order….

  15. Downloaded, installed and tried to use DeDRM this morning and couldn’t get it to work on my book. I followed the troubleshooting instructions in the DeDRM_plugin_ReadMe.txt and below is the log. The book is “The Brigades of Gettysburg” by Bradley M. Gottfried; it is in AZW format. I can’t remember when or where I got it, but I know that I had read it somehow. I would like to open it up so I can cite from it.

    Thanks for your help.

    calibre Debug log
    calibre 3.22.1 [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, 0) && Find Duplicates (1, 6, 3) && Extract ISBN (1, 4, 4)
    calibre 3.22.1 [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, 0) && Find Duplicates (1, 6, 3) && Extract ISBN (1, 4, 4)
    Turning on automatic hidpi scaling
    devicePixelRatio: 1.0
    logicalDpi: 96.0 x 96.0
    physicalDpi: 21.59 x 21.6746666667
    Using calibre Qt style: True
    [0.00] Starting up…
    [0.00] Showing splash screen…
    [0.09] splash screen shown
    [0.09] Initializing db…
    [0.16] db initialized
    [0.16] Constructing main UI…
    [2.44] main UI initialized…
    [2.44] Hiding splash screen
    SMART_DEV ( 0.01: 0.008) attach_to_port try ip address “” on port 9090
    SMART_DEV ( 1.00: 0.803) _startup_on_demand listening on port 9090
    SMART_DEV ( 1.06: 0.002) _attach_to_port try ip address “” on port 54982
    SMART_DEV ( 1.11: 0.000) _startup_on_demand broadcast socket listening on port 54982
    SMART_DEV ( 2.17: 1.021) run All IP addresses {‘{1307270E-39CF-11E8-B5E9-806E6F6E6963}’: [{‘netmask’: u’255.255.255.255′, ‘broadcast’: u’127.0.0.1′, ‘addr’: u’127.0.0.1′}], ‘{95E5901D-27A4-447D-A856-A46C4BD43144}’: [{‘netmask’: u’255.255.255.255′, ‘broadcast’: u’192.168.1.94′, ‘addr’: u’192.168.1.94′}]}
    [40.42] splash screen hidden
    [40.42] Started up in 40.42 seconds with 286 books
    stdout+stderr from file dialog helper: [”, ”]
    piped data from file dialog helper: [“\x99N \x0e\x8e\xe2:\x83\xc8N\x15Y\xff\xbb\xc919\xc2’\x1b=\x9d\xfd\x80\x8c\xee\xe8r\x94\xa1\x8b0”, ‘C:\Users\abehs\Documents\Bradley M. Gottfried\Brigades of Gettysburg
    The Union a (101)\Brigades of Gettysburg_ The Uni – Bradley M. Gottfried.azw’]
    DeDRM v6.6.0: Trying to decrypt Brigades of Gettysburg_ The Uni – Bradley M. Gottfried.azw
    Using Library AlfCrypto Python
    MobiDeDrm v0.42.
    Copyright © 2008-2017 The Dark Reverser, Apprentice Harper et al.
    Decrypting Mobipocket 6 ebook: Brigades of Gettysburg: The Union and Confederate Brigades at the Battle of Gettysburg
    Found 0 keys to try after 0.1 seconds
    Crypto Type is: 2
    DeDRM v6.6.0: Failed to decrypt with error: No key found in 0 keys tried.
    DeDRM v6.6.0: Looking for new default Kindle Key after 0.1 seconds
    searching for kinfoFiles in C:\Users\abehs\AppData\Local
    Found K4PC 1.9+ kinf2011 file: C:\Users\abehs\AppData\Local\Amazon\Kindle\storage.kinf2011
    Decrypted key file using IDString ‘1119526164’ and UserName ‘6162656873’
    DeDRM v6.6.0: Found 1 new key
    MobiDeDrm v0.42.
    Copyright © 2008-2017 The Dark Reverser, Apprentice Harper et al.
    Decrypting Mobipocket 6 ebook: Brigades of Gettysburg: The Union and Confederate Brigades at the Battle of Gettysburg
    Got DSN key from database default_key_1
    Found 4 keys to try after 0.3 seconds
    Crypto Type is: 2
    DeDRM v6.6.0: 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 620, in run
    File “calibre_plugins.dedrm.init“, line 570, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.6.0: 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
    Added Brigades of Gettysburg: The Union and Confederate Brigades at the Battle of Gettysburg to db in: 0.3
    Added 1 books in 1.7 seconds
    Worker Launch took: 0.140000104904

  16. I am unable to find any of the Kindle files that I downloaded today. I searched for *.azw (worked in January, which was my last download/conversion), but nothing appears for 4/26/18. I haven’t updated my Kindle for PC app. Is there some other file type I should be searching for?

    thanks!

    PS, for those who haven’t tried it–you can open ebook files in Librera (an Android app), and SCROLL them. Which makes reading in the tub MUCH safer.

    • You should be able to find your downloads at (assuming Windows) C:/Users/[username]/Documents/My Kindle Content/[author]/[title] and kf8 as I recall places more folders under there.

      I have found that you can use the touchscreen functions of a phone or tablet through a regular ziplock bag, which makes reading in the tub certainly less worrisome.

      • That’s where the January downloaded files went. Unfortunately I’ve hunted all over the C: drive for changes on 4/26 and found no .azw files. Kindle for PC says all my files have synced, but dang if I know where they are.

        I’m too chicken to trust any ziplock bag, even the most expensive. 🙂

        • In Kindle for PC, look in the Tools menu > Options > Content. And that will show you the folder where books are stored. Are the books showing checkmarks? I know sometimes Amazon will change my default device, and then the books don’t automatically download on sync.

        • It may have synced, but unless you downloaded the new books so that they show in the library view with a check mark on the cover, they will not actually be on your PC.

          Use the menu choices: Tools -> Options -> Content to see the name of the “Current content folder”, which is the location on your PC where books are sent.

  17. Currently I am using ADE 1.7. and it works fine most of the time.
    Now I stumbled upon two books published in 2017 that give me an error message

    Ereignisdetails:
    Error #2038
    — Ende —

    on a help site I found this error means the ade is too old…
    Before I try 2.0.1, has anybody experienced the same issue? Does version 2.X work?
    As I read in the FAQ, newer versions of ADE will not work with the Tools? Any chance this might change in the future?

    • ADE 2.0.1 should work unless a store has completely switched to the new Adobe DRM. I’m not sure if Linux users can run it under Wine though.

      I imagine that someone will eventually figure out the new DRM once more stores put it into use.

    • Something to keep in mind with Kindle Unlimited…the authors get paid according to how much of the book you read. If you remove the DRM, Amazon doesn’t know and the author gets zero credit.

      • Yes, I am aware.. but I am paying for Kindle Unlimited, after all.. and I can always read the book itself within the app if that’s what giving money to the authors. The backup for myself, just in case, later.

        Not sure if to go further with Kindle 1.1.7, it does remove the DRM, but I noticed how this one book had capitals at the start of the chapters and displayed weirdly, and do I assume the quality of comic rips/ebooks themselves doesn’t change between the old and new versions?

        • You’re paying Amazon for their book rental service.

          Recent versions of Kindle for PC/Mac support KFX format books. 1.17 was the last version that didn’t. So in many cases, the books will be in a different format.

  18. Hey folks, I used to be somewhat tech-y but feel really, really out of the loop after reading all these comments! I’m trying to set my American Kindle up so I can read library books borrowed via Canadian Overdrive. I’ll delete them when I’m done, and won’t be sharing them; I just don’t want to have to go buy a new e-reader to read library books.

    I’m on a Mac. I’ve downloaded and installed Calibre, and I set up Overdrive. I tried to convert the file in Calibre, but it’s DMR protected. (No surprise.)

    My question is… has anyone had any success deDMRing Overdrive files and then putting them on a Kindle? Do I have to install a plugin in Calibre? I don’t want to break my computer, and as a new Mac user, I’m a bit wary of installing a ton of programs/plugins because I’m still figuring out how to delete things from my Mac in the event they don’t work. Given what I’ve already done (installing Calibre and Overdrive), do you think I can accomplish reading Overdrive books on my Kindle, or should I just call it a day and go get a physical book?

    Any help is appreciated!

    • For rented (lent) library files you will probably not get any help here. In the FAQ it is quite clearly stated the DeDRM Tools are only for books you have bought yourself.
      “has anyone had any success deDMRing Overdrive files and then putting them on a Kindle?”

      The other question is, what do you really want? From your description you want to read lent books on your Kindle, this should be possible, but again, the setup for that does not have anything to do with this site, maybe you get help, maybe you won’t, you should look into the help sections from Overdrive and Amazon, if all you want to do is read lent books.
      Just searched for it, although I have yet to get library card (and in Germany), for the US it should be easy:
      https://help.overdrive.com/customer/portal/articles/1481599#nextgencontent
      if the link displays, it should work, else search on overdrive.
      Also maybe MobileRead will help you.

    • As Ingo said, we don’t support removing DRM from library books here. Obviously I don’t know what your Canadian library supports, but here in the US many libraries have Kindle ebook loans through Overdrive.

      • Ah, sorry, I must have missed the FAQs; google sent me directly to this page. Apparently the US libraries people can use Kindles, but here in Canada the Kindle isn’t supported (our Amazon equivalent, Indigo Chapters, has their own e-reader that the libraries endorse). I think technology has become too complicated for me on this one. Thanks anyway 🙂

      • that’s not true, I moved with my parents from san jose to where we are now, I can tell you that overdrive here in my new city has less library books total, san jose had kindle books but my new local public libraries , has no kindle books listed and only a few epub books, something I could of found in the san jose overdrive store, this other city location in ca , has no kindle and titles I was able to find in san jose don’t even show up here, I am not very happy with the selection that my new libray supports, for some reason, you can’t get access to the same loans as the san jose online overdrive access, overdrive for some reason limits some of these CA locations to no kindle books and very few online titles here in redding its overdrive kind of sucks to the san jose overdrive since a lot of the old books are no longer accessable , also you get 4 year library cards from san jose but redding their library cards are only about 3 years before you have to renew the card itself it seems, I was thinking its a good idea for people to know about this problem since, I wish I still could access the san jose card but its 4 yrs limit is up, and well here in redding, ca their seems to be no kindle ebooks in its overdrive store at all online.

        • Definitely depends on your library, their budget, and patron demand for ebooks. From what I’ve heard, publishers charge libraries ridiculously high fees and often only allow so many loans on a book before their license expires. All the more reason not to abuse this service — publishers will just keep making it tougher for libraries to provide it.

  19. I purchased ebooks at booklive.
    And I want to transfer epug to pdf.
    However calibre can’t load the file.
    I think the file is protected, then I want to remove DRM.
    Do anyone know the way?

    • If they have Adobe DRM… if they can be downloaded to Adobe Digital Editions 2.0.1, then you use the tools here. Otherwise, I don’t know.

      • Thanks. Unfortunately, I think that this service doesn’t Adobe DRM because I can’t downloaded to Adobe Digital Editions.

  20. ok, downloaded the most current DRM tools and it’s not working, at all. at least on a few books, and I have no clue why. it converted some, but not about 16 of them. any idea on what I can try?

  21. Since Nook for PC has been discontinued and it looks like Nook Study has, too. Is there any thoughts to trying to DeDRM books from the Windows App (windows 8 and up) or from the android devices? I can see a day coming when nothing is available for the Nook for PC. Already, some of the books I have give the message “not available for this device” when I try to download via Nook for PC.

    • You can already DeDRM regular Nook epubs from the Windows app and the Android app (if you can get to them). Anything you can’t download to Nook for PC these tools can’t handle either.

      The tools have never been able to remove DRM from Nook PDFs (Page Perfect Nookbooks). Not that it would be impossible — just that it doesn’t seem like anyone ever bothered to figure that out (or at least didn’t share it here).

      Other epubs (like comics) can be DeDRMed with some work. And then you still need to do more to make it readable in anything but the Nook app. Once again, no one with the skills to create a tool for this has bothered.

      I think that most of us who care about removing DRM have simply given up on buying ebooks from Barnes & Noble anymore.

      • We are just waiting for the takeover, Kobo anyone…?
        Actually, living in Germany, buying ebooks from B&N was and still is possible, but it is work, and often I do not bother. Hint: there would have been a simple check to see I am from non-USA, but as long as it works for me and they sell me books, I buy one once every blue moon, when it is not available elsewhere or cheapest at B&N. And even for free books you need a payment method online with them, and they check your origin.

  22. Hi there, I’m trying to use the plugin to remove DRM from some Japanese manga that I have downloaded using Kindle for PC on windows 10. I went back to the older version of the kindle software as suggested, and installed the latest version of the plugin, but I have no luck converting the files. I’d previously had no issue converting this kind of file..

    Here’s the log:

    calibre Debug log
    calibre 3.23 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: en_GB
    Successfully initialized third party plugins: DeDRM (6, 6, 0)
    calibre 3.23 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: en_GB
    Successfully initialized third party plugins: DeDRM (6, 6, 0)
    Not controlling automatic hidpi scaling
    devicePixelRatio: 3.0
    logicalDpi: 80.0 x 80.0
    physicalDpi: 93.9653179191 x 94.2680412371
    Using calibre Qt style: True
    [0.00] Starting up…
    [0.00] Showing splash screen…
    [0.20] splash screen shown
    [0.20] Initializing db…
    [0.20] db initialized
    [0.20] Constructing main UI…
    [1.70] main UI initialized…
    [1.70] Hiding splash screen
    [4.86] splash screen hidden
    [4.88] Started up in 4.88 seconds with 1 books
    stdout+stderr from file dialog helper: [”, ”]
    piped data from file dialog helper: [‘m.\x08\x94\x9dN\x0fYa\x13j\xd5ay\x97;{\xd2\xbd&\xad\x98\xf1d\xe5\x1f:>\xf6\xc8\x85i’, ‘C:\Users\Taen\Documents\My Kindle Content\B07C3HWKNM_EBOK\B07C3HWKNM_EBOK.azw’]
    DeDRM v6.6.0: Trying to decrypt B07C3HWKNM_EBOK.azw
    Using Library AlfCrypto Python
    MobiDeDrm v0.42.
    Copyright © 2008-2017 The Dark Reverser, Apprentice Harper et al.
    Decrypting Kindle Format 8 ebook: ディアプラス 2018年4月号[期間限定]
    Found 0 keys to try after 0.4 seconds
    Crypto Type is: 2
    DeDRM v6.6.0: Failed to decrypt with error: No key found in 0 keys tried.
    DeDRM v6.6.0: Looking for new default Kindle Key after 0.4 seconds
    searching for kinfoFiles in C:\Users\Taen\AppData\Local
    Found K4PC 1.9+ kinf2011 file: C:\Users\Taen\AppData\Local\Amazon\Kindle\storage.kinf2011
    Decrypted key file using IDString ‘654271963’ and UserName ‘5461656e’
    DeDRM v6.6.0: Found 1 new key
    MobiDeDrm v0.42.
    Copyright © 2008-2017 The Dark Reverser, Apprentice Harper et al.
    Decrypting Kindle Format 8 ebook: ディアプラス 2018年4月号[期間限定]
    Got DSN key from database default_key_1
    Found 4 keys to try after 0.7 seconds
    Crypto Type is: 2
    DeDRM v6.6.0: Ultimately failed to decrypt after 0.7 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.7 seconds. Read the FAQs at Harper’s repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
    Added ディアプラス 2018年4月号[期間限定] to db in: 0.7
    Added 1 books in 2.5 seconds

    • It seems that Kindle for PC does not always install to the same location. There may be a kinf file left behind from the previously installed version.

  23. I downloaded the tools and read everything several times before I did anything. Once I felt confident enough, I followed the directions one by one and checked each one off. I was feeling pretty good. I deleted all the books from Calibre that I could not open due to DRM. I added each one back – either one at a time or several at a time. I held my breath when I clicked on one of the books expecting to see the DRM notice come up. I was elated that the book opened with no DRM message! YAY! So I closed out Calibre and went about my business. The next day I added several more epubs to Calibre that I had deleted the day before and clicked to open them to make sure everything was working. Unfortunately it is not working now! I am getting the same DRM message as before. I have deleted them and added them back to Calibre several times and still the same thing. I do not understand what I am doing wrong. Has anyone else had this happen? I checked to make sure there have been no updates to my computer. HELP!!

  24. would like to ask about Microsoft new DRM for their eBooks in the Microsoft store, is their an app to remove the DRM from MSEPUB files , under their directory called AppData\Local\Packages\Microsoft.MicrosoftEdge_8****\LocalState\library_books_***** I would like to copy the ones I buyed into my kindle but of course this new DRM format by Microsoft does not seem to be DEDRM yet, I don’t no if anyone’s working on an app that would allow be to transfer this ebook type onto my kindle paperwhite from calibre app in windows 10. calibre seems to read the ebook title if I rename msepub to epub, but its still in an DRM format when imported into calibre and the DeDRM_tools don’t work for this new MSEPUB format yet, also inside its directory is 3 folders Licenses, Covers Common. please write me back if and when an app to remove microsofts new DRM Tools can remove this new DRM format, since I would like to be able to use this ebooks in something else than just edge books in windows itself, seems to be an DRM epub format, with the ext. of msepub files when extract with 7 zip show some of the structure but of course I can’t yet remove the DRM from these epubs even extracting the files from it but I hope that info helps get DeDRM_Tools updated with an app to take care of microsofts new DRM format, again I was really hoping that I could copy the epub into calibre and convert them into kindle format for my kindle paperwrite 2 at some point in the future, since its ok to read them from edge web browser but I would prefer to be able to read them in my kindle itself if its even possible to remove its new DRM formatting at all.

    • I wouldn’t expect it to be possible to remove this DRM anytime soon. I imagine most people who are concerned about DRM removal will simply avoid buying books there. Then the only reason to figure it out is if someone with the skills wants a challenge.

      • ok, thanks for the info, the reason I buyed books their is that its easy to get bing rewards gift cards that can be used with the Microsoft ebooks from their web store, otherwise yes that DRM is a pain since you can’t transfer the ebooks yet to your kindle hardware at all.

  25. I have a question about Obok and Linux. I have Kobo Desktop running on my Linux machine under Crossover Linux, a Codeweavers product based on Wine. It runs in a wineprefix Kobo_Desktop under .cxoffice in my home directory. The path to the database from the wineprefix is strangely drive_c/Program\ Files/Kobo/fonts/ whilst the books are more sensibly in drive_c/users/crossover/Local\ Settings/Application\ Data/Kobo/Kobo\ Desktop\ Edition/kepub/. I notice in kobo.py there is some code commented out in relation to Linux and Wine. If it is not too onerous I would appreciate some guidance as to what changes I would need to make in obok.py to allow it to work with this configuration. I very much doubt there are a lot of crossover linux users so it is certainly not worth wasting a lot of time on it. Thanks.

    • Well, I never worked with obok, but I used to have PlayOnLinux withe ADE and K4PC.
      I had to change the paths to the correct wine-prefixes.
      Maybe you can check them?

      • Thanks for the reply. I’ve got ADE 2.0.1 working fine under Wine. It is not that important. Would just be nice to get it working. I’m learning some Python at the moment so once I understand it sufficiently I may be able to have a look myself.

        • OK now, that’s my point…
          I am trying to get 2.0.1 running under Kubuntu 18.04/Wine 3 but until now there’s always something not working…
          Maybe you want to tell me how you did it?

  26. I’ve been using the DeDRM plugin for Calibre for a while now and it’s worked great. For whatever reason it isn’t working with this book. I decided to also try with the Mac application included in the folder and I see an error in the log:

    There is 1 ebook to be decrypted.
    Processing file: Chemical Principles.azw3
    shellcommand: /usr/bin/python ‘/private/var/folders/1t/_hwzw0xj1w3_rdshx_p83q9w0000gn/T/AppTranslocation/B332258F-9885-4F4A-BC18-7E970E734C3B/d/DeDRM.app/Contents/Resources/k4mobidedrm.py’ ‘/Users/Teo/Downloads/Chemical Principles.azw3’ ‘/Users/Teo/Desktop/’ > ‘/Users/Teo/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
    shellresult: Using Library AlfCrypto DLL/DYLIB/SO
    Traceback (most recent call last):
    File “/private/var/folders/1t/_hwzw0xj1w3_rdshx_p83q9w0000gn/T/AppTranslocation/B332258F-9885-4F4A-BC18-7E970E734C3B/d/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 93, in
    import kfxdedrm
    File “/private/var/folders/1t/_hwzw0xj1w3_rdshx_p83q9w0000gn/T/AppTranslocation/B332258F-9885-4F4A-BC18-7E970E734C3B/d/DeDRM.app/Contents/Resources/kfxdedrm.py”, line 20, in
    from calibre_plugins.dedrm import ion
    ImportError: No module named calibre_plugins.dedrm
    shellcommand: /usr/bin/python ‘/private/var/folders/1t/_hwzw0xj1w3_rdshx_p83q9w0000gn/T/AppTranslocation/B332258F-9885-4F4A-BC18-7E970E734C3B/d/DeDRM.app/Contents/Resources/kindlekey.py’ ‘/Users/Teo/Library/Preferences/com.apprenticealf.dedrm/newKeys/’ > ‘/Users/Teo/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
    shellresult: kindlekey.py v2.5
    Copyright © 2010-2016 by some_updates, Apprentice Alf and Apprentice Harper
    Found k4Mac kinf2011 file: /Users/Teo/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2011
    Found k4Mac kinf2011 file: /Users/Teo/Library/Application Support/Kindle/storage/.kinf2011
    Decrypted key file using IDString ‘6dcc68fd34a3’ and UserName ‘Teo’
    Decrypted key file using IDString ‘6dcc68fd34a3’ and UserName ‘Teo’
    Saved a key to /Users/Teo/Library/Preferences/com.apprenticealf.dedrm/newKeys/kindlekey1.k4i
    Saved a key to /Users/Teo/Library/Preferences/com.apprenticealf.dedrm/newKeys/kindlekey2.k4i

    shellcommand: /usr/bin/python ‘/private/var/folders/1t/_hwzw0xj1w3_rdshx_p83q9w0000gn/T/AppTranslocation/B332258F-9885-4F4A-BC18-7E970E734C3B/d/DeDRM.app/Contents/Resources/k4mobidedrm.py’ -k ‘/Users/Teo/Library/Preferences/com.apprenticealf.dedrm/KindleKey 7.der’ -k ‘/Users/Teo/Library/Preferences/com.apprenticealf.dedrm/KindleKey 8.der’ ‘/Users/Teo/Downloads/Chemical Principles.azw3’ ‘/Users/Teo/Desktop/’ > ‘/Users/Teo/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
    shellresult: Using Library AlfCrypto DLL/DYLIB/SO
    Traceback (most recent call last):
    File “/private/var/folders/1t/_hwzw0xj1w3_rdshx_p83q9w0000gn/T/AppTranslocation/B332258F-9885-4F4A-BC18-7E970E734C3B/d/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 93, in
    import kfxdedrm
    File “/private/var/folders/1t/_hwzw0xj1w3_rdshx_p83q9w0000gn/T/AppTranslocation/B332258F-9885-4F4A-BC18-7E970E734C3B/d/DeDRM.app/Contents/Resources/kfxdedrm.py”, line 20, in
    from calibre_plugins.dedrm import ion
    ImportError: No module named calibre_plugins.dedrm
    There was an error with 1 ebook:
    Chemical Principles.azw3 couldn’t be decrypted.

      • Here I tried with another book:

        Convert book 1 of 1 (Life: The Science of Biology)
        Conversion options changed from defaults:
        output_profile: ‘kindle_pw3′
        verbose: 2
        cover: u’/var/folders/1t/_hwzw0xj1w3_rdshx_p83q9w0000gn/C/calibre_3.14.0_tmp_d8gA2L/AyWDre.jpeg’
        read_metadata_from_opf: u’/var/folders/1t/_hwzw0xj1w3_rdshx_p83q9w0000gn/C/calibre_3.14.0_tmp_d8gA2L/bVZNWP.opf’
        Resolved conversion options
        calibre version: 3.14.0
        {‘asciiize’: False,
        ‘author_sort’: None,
        ‘authors’: None,
        ‘base_font_size’: 0.0,
        ‘book_producer’: None,
        ‘change_justification’: u’original’,
        ‘chapter’: u”//*[((name()=’h1′ or name()=’h2′) and re:test(., ‘\s*((chapter|book|section|part)\s+)|((prolog|prologue|epilogue)(\s+|$))’, ‘i’)) or @class = ‘chapter’]”,
        ‘chapter_mark’: u’pagebreak’,
        ‘comments’: None,
        ‘cover’: u’/var/folders/1t/_hwzw0xj1w3_rdshx_p83q9w0000gn/C/calibre_3.14.0_tmp_d8gA2L/AyWDre.jpeg’,
        ‘custom_size’: None,
        ‘debug_pipeline’: None,
        ‘dehyphenate’: True,
        ‘delete_blank_paragraphs’: True,
        ‘disable_font_rescaling’: False,
        ‘duplicate_links_in_toc’: False,
        ’embed_all_fonts’: False,
        ’embed_font_family’: None,
        ‘enable_heuristics’: False,
        ‘expand_css’: False,
        ‘extra_css’: None,
        ‘filter_css’: u”,
        ‘fix_indents’: True,
        ‘font_size_mapping’: None,
        ‘format_scene_breaks’: True,
        ‘html_unwrap_factor’: 0.4,
        ‘input_encoding’: None,
        ‘input_profile’: <calibre.customize.profiles.InputProfile object at 0x10acb1ed0>,
        ‘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_inline_navbars’: False,
        ‘output_profile’: <calibre.customize.profiles.KindlePaperWhite3Output object at 0x10ad786d0>,
        ‘page_breaks_before’: u”//*[name()=’h1′ or name()=’h2′]”,
        ‘paper_size’: u’letter’,
        ‘pdf_add_toc’: False,
        ‘pdf_default_font_size’: 20,
        ‘pdf_footer_template’: None,
        ‘pdf_header_template’: None,
        ‘pdf_mark_links’: False,
        ‘pdf_mono_family’: u’Liberation Mono’,
        ‘pdf_mono_font_size’: 16,
        ‘pdf_page_margin_bottom’: 72.0,
        ‘pdf_page_margin_left’: 72.0,
        ‘pdf_page_margin_right’: 72.0,
        ‘pdf_page_margin_top’: 72.0,
        ‘pdf_page_numbers’: False,
        ‘pdf_sans_family’: u’Liberation Sans’,
        ‘pdf_serif_family’: u’Liberation Serif’,
        ‘pdf_standard_font’: u’serif’,
        ‘prefer_metadata_cover’: False,
        ‘preserve_cover_aspect_ratio’: False,
        ‘pretty_print’: False,
        ‘pubdate’: None,
        ‘publisher’: None,
        ‘rating’: None,
        ‘read_metadata_from_opf’: u’/var/folders/1t/_hwzw0xj1w3_rdshx_p83q9w0000gn/C/calibre_3.14.0_tmp_d8gA2L/bVZNWP.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’: ‘[]’,
        ‘uncompressed_pdf’: False,
        ‘unit’: u’inch’,
        ‘unsmarten_punctuation’: False,
        ‘unwrap_lines’: True,
        ‘use_auto_toc’: False,
        ‘use_profile_size’: False,
        ‘verbose’: 2}

        Python function terminated unexpectedly: Life: The Science of Biology
        InputFormatPlugin: MOBI Input running
        on /var/folders/1t/_hwzw0xj1w3_rdshx_p83q9w0000gn/C/calibre_3.14.0_tmp_d8gA2L/LAvG_Y.azw
        Traceback (most recent call last):
        File “/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py”, line 154, in main
        return run_entry_point()
        File “/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py”, line 114, in run_entry_point
        return getattr(pmod, func)()
        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 245, in call
        File “site-packages/calibre/ebooks/conversion/plugins/mobi_input.py”, line 36, in convert
        File “site-packages/calibre/ebooks/mobi/reader/mobi6.py”, line 161, in extract_content
        File “site-packages/calibre/ebooks/mobi/reader/mobi6.py”, line 157, in check_for_drm
        calibre.ebooks.DRMError: Life: The Science of Biology

  27. Just want to post some good news and some bad news on the obok plugin on Linux. The good news is that I now have it working on my Linux desktop. The bad news is that the changes I have made are peculiar to my current setup of Kobo Desktop in Crossover Linux. I basically made some changes to obok.py to enable linux and to hardcode my paths to the sqlite database and to the kepub directory, and to legacy_obok.py to hardcode the keys obtained manually from the registry in wine. My python skills are not currently sufficient to allow me to rewrite the code to extract the keys, though I think the existing code will probably work if there is a function to read the Wineprefix windows registry. Also, the Crossover install of the Desktop is notable for having a number of kepub directories and a number of sqlite database instances in different directories, and the correct ones would be difficult but not impossible to detect automatically. I suspect it may be relatively easy to allow the user to input the relevant paths and the two keys required. However, I doubt there is enough demand for this, especially given that Kobo Desktop is currently broken on Wine itself.

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

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

Twitter picture

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

Facebook photo

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

w

Connecting to %s