DRM Removal Tools for eBooks

Version 6.5.4 released on 27 June, 2017

Welcome to Apprentice Alf’s blog

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

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

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

The Tools

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

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

Getting Help with the Tools

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

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

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

In any bug report or help request, please include:

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

Anti-Piracy Notice

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

Origin of the Tools

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

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

Other Sources

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

Advertisements

3,836 thoughts on “DRM Removal Tools for eBooks

  1. Hello,

    I have the older (1.7) version of the Kindle for PC app, and haven’t had any trouble de-DRMing and converting books with Calibre lately (I like to convert them to PDF to annotate in more pen-friendly programs).

    I purchased two of my law school textbooks as ebooks from Amazon. Both added to Calibre and converted to Epub automatically with no problem. One manually converted to PDF with no problem. The other, however, fails to convert to PDF. Both are similar-style textbooks from the same publisher. I have tried fiddling with various output settings, converting from epub and from the azw version, all to no avail.

    Note that I was able to convert the Epub file into a PDF via a free online converter, but that doesn’t allow for customizing the output the way Calibre does.

    Here is the error message I receive when attempting to convert the Epub into PDF, NOT using heuristic processing (though I tried that a few times):

    calibre, version 3.7.0 (win32, embedded-python: True)
    Conversion error: Failed: Convert book 1 of 1 (Criminal Law and Its Processes: Cases and Materials (Aspen Casebook Series))

    Convert book 1 of 1 (Criminal Law and Its Processes: Cases and Materials (Aspen Casebook Series))
    Conversion options changed from defaults:
    pdf_mono_family: u’Courier New’
    cover: u’C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\uesapj.jpeg’
    pdf_mono_font_size: 12
    read_metadata_from_opf: u’C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\6ssuh0.opf’
    verbose: 2
    pdf_serif_family: u’Times New Roman’
    page_breaks_before: u”//[name()=’h1′ or name()=’h2′]”
    pdf_page_numbers: True
    output_profile: ‘generic_eink’
    pdf_sans_family: u’MS Shell Dlg 2′
    pdf_default_font_size: 12
    input_profile: ‘kindle’
    Resolved conversion options
    calibre version: 3.7.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’C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\uesapj.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.KindleInput object at 0x04CF56B0>,
    ‘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.GenericEink object at 0x04CF57F0>,
    ‘page_breaks_before’: u”//
    [name()=’h1′ or name()=’h2′]”,
    ‘paper_size’: u’letter’,
    ‘pdf_add_toc’: False,
    ‘pdf_default_font_size’: 12,
    ‘pdf_footer_template’: None,
    ‘pdf_header_template’: None,
    ‘pdf_mark_links’: False,
    ‘pdf_mono_family’: u’Courier New’,
    ‘pdf_mono_font_size’: 12,
    ‘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’: True,
    ‘pdf_sans_family’: u’MS Shell Dlg 2′,
    ‘pdf_serif_family’: u’Times New Roman’,
    ‘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’C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\6ssuh0.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}
    InputFormatPlugin: EPUB Input running
    on C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\75os8x.epub
    Found HTML cover titlepage.xhtml
    Parsing all content…
    Parsing text/part0003.html …
    Parsing page_styles.css …
    Parsing text/part0009_split_002.html …
    Parsing stylesheet.css …
    Parsing text/part0011_split_002.html …
    Parsing text/part0012_split_002.html …
    Parsing text/part0016_split_004.html …
    Parsing text/part0000.html …
    Parsing text/part0017_split_000.html …
    Parsing text/part0001.html …
    Parsing text/part0020.html …
    Parsing text/part0002.html …
    Parsing text/part0017_split_001.html …
    Parsing text/part0004.html …
    Parsing text/part0018_split_000.html …
    Parsing text/part0016_split_003.html …
    Parsing text/part0016_split_001.html …
    Parsing text/part0019_split_001.html …
    Parsing text/part0016_split_000.html …
    Parsing text/part0011_split_000.html …
    Parsing text/part0007.html …
    Parsing text/part0015_split_003.html …
    Parsing text/part0008.html …
    Parsing titlepage.xhtml …
    Parsing text/part0015_split_004.html …
    Parsing text/part0010_split_001.html …
    Parsing text/part0016_split_002.html …
    Parsing text/part0011_split_001.html …
    Parsing text/part0019_split_000.html …
    Parsing text/part0009_split_001.html …
    Parsing text/part0011_split_003.html …
    Parsing text/part0010_split_000.html …
    Parsing text/part0006.html …
    Parsing text/part0011_split_004.html …
    Parsing text/part0012_split_000.html …
    Parsing text/part0012_split_001.html …
    Parsing text/part0018_split_002.html …
    Parsing text/part0015_split_000.html …
    Parsing text/part0009_split_000.html …
    Parsing text/part0013_split_000.html …
    Parsing text/part0018_split_001.html …
    Parsing text/part0021.html …
    Parsing text/part0013_split_001.html …
    Parsing text/part0015_split_002.html …
    Parsing text/part0013_split_002.html …
    Parsing text/part0013_split_003.html …
    Parsing text/part0014_split_000.html …
    Parsing text/part0014_split_001.html …
    Parsing text/part0014_split_002.html …
    Parsing text/part0022.html …
    Parsing text/part0005.html …
    Parsing text/part0015_split_001.html …
    Reading TOC from NCX…
    Merging user specified metadata…
    Detecting structure…
    Flattening CSS and remapping font sizes…
    Source base font size is 16.00000pt
    Removing fake margins…
    Found 12642 items of level: p_2
    Found 1414 items of level: p_3
    Found 80 items of level: p_4
    Found 17 items of level: p_5
    Found 7 items of level: div_4
    Found 32 items of level: div_3
    Found 803 items of level: div_2
    Found 49 items of level: div_1
    Ignoring level div_4
    Ignoring level p_5
    Negative text indent detected at level p_2, ignoring this level
    Negative text indent detected at level p_3, ignoring this level
    Negative text indent detected at level p_4, ignoring this level
    div_3 left margin stats: Counter({u”: 32})
    div_3 right margin stats: Counter({u’0′: 32})
    div_2 left margin stats: Counter({u”: 53, u’0′: 1})
    div_2 right margin stats: Counter({u’0′: 30, u’2em’: 24})
    div_1 left margin stats: Counter({u”: 45, u’0′: 2})
    div_1 right margin stats: Counter({u”: 45, u’0′: 2})
    Cleaning up manifest…
    Trimming unused files from manifest…
    Trimming u’titlepage.xhtml’ from manifest
    Creating PDF Output…
    Splitting markup on page breaks and flow limits, if any…
    Converting input as a text based book…
    Serializing oeb input to disk for processing…
    The cover image has an id != “cover”. Renaming to work around bug in Nook Color
    Rendering pages to PDF…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0000.html…
    Loading font: family_name=Times New Roman full_name=Times New Roman postscript_name=TimesNewRomanPSMT subfamily_name=Regular
    Loading font: family_name=Times New Roman full_name=Times New Roman Bold postscript_name=TimesNewRomanPS-BoldMT subfamily_name=Bold
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0001.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0002.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0003.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0004.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0005.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0006.html…
    Loading font: family_name=Times New Roman full_name=Times New Roman Italic postscript_name=TimesNewRomanPS-ItalicMT subfamily_name=Italic
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0007.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0008.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0009_split_000.html…
    Loading font: family_name=Times New Roman full_name=Times New Roman Bold Italic postscript_name=TimesNewRomanPS-BoldItalicMT subfamily_name=Bold Italic
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0009_split_001.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0009_split_002.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0010_split_000.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0010_split_001.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0011_split_000.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0011_split_001.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0011_split_002.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0011_split_003.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0011_split_004.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0012_split_000.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0012_split_001.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0012_split_002.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0013_split_000.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0013_split_001.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0013_split_002.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0013_split_003.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0014_split_000.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0014_split_001.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0014_split_002.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0015_split_000.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0015_split_001.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0015_split_002.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0015_split_003.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0015_split_004.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0016_split_000.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0016_split_001.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0016_split_002.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0016_split_003.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0016_split_004.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0017_split_000.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0017_split_001.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0018_split_000.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0018_split_001.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0018_split_002.html…
    Processing C:\Users\bahzew\AppData\Local\Temp\calibre_mtcrpd\ecr1fl_pdf_out\text\part0019_split_000.html…

  2. I have downloaded calibre and the lastest plugin. I have followed the instruction but I am unable to convert my AZW3 file to a .pdf and dedrm. it gives me an error saying it has a DRM. Am I doing something wrong? thanks

  3. I used the calibre plug in on Windows 10 and have been unable to remove the DRM from my nook books.

    The error message I receive when I open the books is “This book is locked by DRM”

    Below is the debug log:

    calibre Debug log
    calibre 3.7 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: None
    Successfully initialized third party plugins: DeDRM (6, 5, 4) && Obok DeDRM (6, 5, 4)
    calibre 3.7 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: None
    Successfully initialized third party plugins: DeDRM (6, 5, 4) && Obok DeDRM (6, 5, 4)
    Turning on automatic hidpi scaling
    devicePixelRatio: 1.0
    logicalDpi: 96.0 x 96.0
    physicalDpi: 71.9842323651 x 71.9822878229
    Using calibre Qt style: True
    Starting up…
    DEBUG: 0.0 obok::utilities.py – loading translations
    DEBUG: 0.0 obok::dialogs.py – loading translations
    DEBUG: 0.0 obok::config.py – loading translations
    DEBUG: 0.0 obok::action_err.py – loading translations
    Started up in 18.72 seconds with 1 books
    stdout+stderr from file dialog helper: [”, ”]
    piped data from file dialog helper: [‘\xba/|>o\xee\xb7\x1f\x1106\x82\x18\x02\x1aA\xb2\xfb-\xbc\xc0\xef\x9c\xa9r\xe2\xfa\x06\x0b\xcd\xdd\xe3’, ‘C:\Users\rc89829\Documents\My Barnes & Noble eBooks\blaraytx@aol.com\aclashofkingsasongof_9780553897852.epub’]
    DeDRM v6.5.4: Trying to decrypt aclashofkingsasongof_9780553897852.epub
    DeDRM v6.5.4: Verifying zip archive integrity
    DeDRM v6.5.4: “aclashofkingsasongof_9780553897852.epub” is a secure Barnes & Noble ePub
    DeDRM v6.5.4: Looking for new NOOK Study Keys after 0.1 seconds
    No nook Study log files have been found.
    DeDRM v6.5.4: 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 622, in run
    File “calibre_plugins.dedrm.init“, line 293, in ePubDecrypt
    DeDRMError: DeDRM v6.5.4: Ultimately failed to decrypt after 0.1 seconds.
    Added 0 books in 0.7 seconds

  4. I am unable to decrypt a rental. Mac..Kindle ver 1.17.1

    There is 1 ebook to be decrypted.
    Processing file: B007NWFNDW_EBOK.azw
    shellcommand: /usr/bin/python ‘/private/var/folders/75/hpcln8ps63zdql42vwpt8rn80000gn/T/AppTranslocation/BD6746A1-9C95-4F01-B600-6FED93DD8BF6/d/DeDRM.app/Contents/Resources/k4mobidedrm.py’ ‘/Users/howardschneider/Downloads/My Kindle Content/B007NWFNDW_EBOK.azw’ ‘/Users/howardschneider/Desktop/’ > ‘/Users/howardschneider/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
    shellresult: Using Library AlfCrypto DLL/DYLIB/SO
    K4MobiDeDrm v5.4.
    Copyright © 2008-2013 The Dark Reverser et al.
    MobiDeDrm v0.41.
    Copyright © 2008-2012 The Dark Reverser et al.
    MOBI header version 4, header length 232
    Decrypting Mobipocket 4 ebook: The Wandering Heretics of Languedoc (Cambridge Studies in Medieval Life and Thought: Fourth Series)
    Found 0 keys to try after 0.0 seconds
    Crypto Type is: 2
    Error decrypting book after 0.0 seconds: Cannot decode library or rented ebooks.
    Traceback (most recent call last):
    File “/private/var/folders/75/hpcln8ps63zdql42vwpt8rn80000gn/T/AppTranslocation/BD6746A1-9C95-4F01-B600-6FED93DD8BF6/d/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 254, in decryptBook
    book = GetDecryptedBook(infile, kDatabases, androidFiles, serials, pids, starttime)
    File “/private/var/folders/75/hpcln8ps63zdql42vwpt8rn80000gn/T/AppTranslocation/BD6746A1-9C95-4F01-B600-6FED93DD8BF6/d/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 228, in GetDecryptedBook
    mb.processBook(totalpids)
    File “/private/var/folders/75/hpcln8ps63zdql42vwpt8rn80000gn/T/AppTranslocation/BD6746A1-9C95-4F01-B600-6FED93DD8BF6/d/DeDRM.app/Contents/Resources/mobidedrm.py”, line 441, in processBook
    raise DrmException(u”Cannot decode library or rented ebooks.”)
    DrmException: Cannot decode library or rented ebooks.
    shellcommand: /usr/bin/python ‘/private/var/folders/75/hpcln8ps63zdql42vwpt8rn80000gn/T/AppTranslocation/BD6746A1-9C95-4F01-B600-6FED93DD8BF6/d/DeDRM.app/Contents/Resources/kindlekey.py’ ‘/Users/howardschneider/Library/Preferences/com.apprenticealf.dedrm/newKeys/’ > ‘/Users/howardschneider/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
    shellresult: kindlekey.py v2.3
    Copyright © 2010-2016 by some_updates, Apprentice Alf and Apprentice Harper
    Found k4Mac kinf2011 file: /Users/howardschneider/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2011
    Found k4Mac kinf2011 file: /Users/howardschneider/Library/Application Support/Kindle/storage/.kinf2011
    Decrypted key file using IDString ‘092206f78484’ and UserName ‘howardschneider’
    Decrypted key file using IDString ‘092206f78484’ and UserName ‘howardschneider’
    Saved a key to /Users/howardschneider/Library/Preferences/com.apprenticealf.dedrm/newKeys/kindlekey1.k4i
    Saved a key to /Users/howardschneider/Library/Preferences/com.apprenticealf.dedrm/newKeys/kindlekey2.k4i

    shellcommand: /usr/bin/python ‘/private/var/folders/75/hpcln8ps63zdql42vwpt8rn80000gn/T/AppTranslocation/BD6746A1-9C95-4F01-B600-6FED93DD8BF6/d/DeDRM.app/Contents/Resources/k4mobidedrm.py’ -k ‘/Users/howardschneider/Library/Preferences/com.apprenticealf.dedrm/KindleKey 3.der’ -k ‘/Users/howardschneider/Library/Preferences/com.apprenticealf.dedrm/KindleKey 4.der’ ‘/Users/howardschneider/Downloads/My Kindle Content/B007NWFNDW_EBOK.azw’ ‘/Users/howardschneider/Desktop/’ > ‘/Users/howardschneider/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
    shellresult: Using Library AlfCrypto DLL/DYLIB/SO
    K4MobiDeDrm v5.4.
    Copyright © 2008-2013 The Dark Reverser et al.
    MobiDeDrm v0.41.
    Copyright © 2008-2012 The Dark Reverser et al.
    MOBI header version 4, header length 232
    Decrypting Mobipocket 4 ebook: The Wandering Heretics of Languedoc (Cambridge Studies in Medieval Life and Thought: Fourth Series)
    Found 8 keys to try after 0.0 seconds
    Crypto Type is: 2
    Error decrypting book after 0.0 seconds: Cannot decode library or rented ebooks.
    Traceback (most recent call last):
    File “/private/var/folders/75/hpcln8ps63zdql42vwpt8rn80000gn/T/AppTranslocation/BD6746A1-9C95-4F01-B600-6FED93DD8BF6/d/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 254, in decryptBook
    book = GetDecryptedBook(infile, kDatabases, androidFiles, serials, pids, starttime)
    File “/private/var/folders/75/hpcln8ps63zdql42vwpt8rn80000gn/T/AppTranslocation/BD6746A1-9C95-4F01-B600-6FED93DD8BF6/d/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 228, in GetDecryptedBook
    mb.processBook(totalpids)
    File “/private/var/folders/75/hpcln8ps63zdql42vwpt8rn80000gn/T/AppTranslocation/BD6746A1-9C95-4F01-B600-6FED93DD8BF6/d/DeDRM.app/Contents/Resources/mobidedrm.py”, line 441, in processBook
    raise DrmException(u”Cannot decode library or rented ebooks.”)
    DrmException: Cannot decode library or rented ebooks.
    There was an error with 1 ebook:
    B007NWFNDW_EBOK.azw couldn’t be decrypted.

  5. I just bought an ebook from Amazon and I can’t get it to convert. I’m running Windows 7 and I’m using Kindle version 1.17. I’m using the latest version of Calibre and version DeDRM version 6.5.4. Here’s the log I get from Calibre: calibre Debug log
    calibre 3.7 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: None
    Successfully initialized third party plugins: DeDRM (6, 5, 4) && Kindle and Mobipocket DeDRM (0, 4, 17) && Inept Epub DeDRM (0, 1, 7)
    calibre 3.7 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: None
    Successfully initialized third party plugins: DeDRM (6, 5, 4) && Kindle and Mobipocket DeDRM (0, 4, 17) && Inept Epub DeDRM (0, 1, 7)
    Turning on automatic hidpi scaling
    devicePixelRatio: 2.0
    logicalDpi: 72.0 x 72.0
    physicalDpi: 36.0177252585 x 36.0
    Using calibre Qt style: True
    Starting up…
    Started up in 22.24 seconds with 0 books
    stdout+stderr from file dialog helper: [”, ”]
    piped data from file dialog helper: [‘\xc6\xa5_\xd8\x91G\xfbL\xcf\xfd\xb3]\xe5\x917\x17\xa8\xf3\x17\xe7\xcco#P\xc5Ab\xd7]\xfb\x9a\x88’, ‘C:\Users\pc\Documents\My Kindle Content\B010KN4VJW_EBOK.azw’]
    DeDRM v6.5.4: Trying to decrypt B010KN4VJW_EBOK.azw
    Using Library AlfCrypto Python
    MobiDeDrm v0.41.
    Copyright © 2008-2012 The Dark Reverser et al.
    MOBI header version 8, header length 264
    Extra Data Flags: 3
    Decrypting Kindle Format 8 ebook: Excuse Me, Professor: Challenging the Myths of Progressivism
    Found 2 keys to try after 0.1 seconds
    Crypto Type is: 2
    DeDRM v6.5.4: Failed to decrypt with error: No key found in 2 keys tried.
    DeDRM v6.5.4: Looking for new default Kindle Key after 0.1 seconds
    searching for kinfoFiles in C:\Users\pc\AppData\Local
    Found K4PC 1.9+ kinf2011 file: C:\Users\pc\AppData\Local\Amazon\Kindle\storage.kinf2011
    Decrypted key file using IDString ‘3232302968’ and UserName ‘7063’
    DeDRM v6.5.4: Found 1 new key
    MobiDeDrm v0.41.
    Copyright © 2008-2012 The Dark Reverser et al.
    MOBI header version 8, header length 264
    Extra Data Flags: 3
    Decrypting Kindle Format 8 ebook: Excuse Me, Professor: Challenging the Myths of Progressivism
    Found 4 keys to try after 0.2 seconds
    Crypto Type is: 2
    DeDRM v6.5.4: Ultimately failed to decrypt after 0.2 seconds.
    Read the FAQs at Harper’s repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
    Running file type plugin DeDRM failed with traceback:
    Traceback (most recent call last):
    File “site-packages\calibre\customize\ui.py”, line 171, in _run_filetype_plugins
    File “calibre_plugins.dedrm.init“, line 611, in run
    File “calibre_plugins.dedrm.init“, line 561, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.5.4: Ultimately failed to decrypt after 0.2 seconds
    Added Excuse Me, Professor: Challenging the Myths of Progressivism to db in: 2.0
    Added 1 books in 2.7 seconds

  6. Hello, hoping somebody can help me figure this out. I’m running the most recent Calibre and DeDRM 6.5.4 with an amazon ebook I downloaded using Kindle for PC version 1.17.1 (44183). The file downloads as a .azw4. I’ve tried uninstalling everything following the apprentice alf tutorials here, but the program gets stuck at the very start of loading the book. The “Adding books…” progress bar appears, but never goes beyond “Reading metadata and adding to library (one book)…” and stays at 0%. I can’t tell for sure as this is all new to me, but it seems like the log is showing that DeDRM isn’t finding a key to decrypt the file. Is there something that I’m missing? Or might it just take a lot longer than I’m expecting it to. Should I just leave it running for a while and see what happens? Here’s my log:

    calibre Debug log
    calibre 3.7 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: None
    Successfully initialized third party plugins: DeDRM (6, 5, 4) && Obok DeDRM (6, 5, 4)
    calibre 3.7 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: None
    Successfully initialized third party plugins: DeDRM (6, 5, 4) && Obok DeDRM (6, 5, 4)
    Turning on automatic hidpi scaling
    devicePixelRatio: 1.0
    logicalDpi: 96.0 x 96.0
    physicalDpi: 72.0567375887 x 71.8867924528
    Using calibre Qt style: True
    Starting up…
    DEBUG: 0.0 obok::utilities.py – loading translations
    DEBUG: 0.0 obok::dialogs.py – loading translations
    DEBUG: 0.0 obok::config.py – loading translations
    DEBUG: 0.0 obok::action_err.py – loading translations
    Started up in 7.69 seconds with 0 books
    DeDRM v6.5.4: Trying to decrypt B01AAYZWP8_EBOK.azw4
    Using Library AlfCrypto Python
    MobiDeDrm v0.41.
    Copyright © 2008-2012 The Dark Reverser et al.
    MOBI header version 4, header length 264
    Decrypting Mobipocket 4 ebook: Fundamentals of Thermal-Fluid Sciences
    Found 0 keys to try after 0.3 seconds
    Crypto Type is: 2
    DeDRM v6.5.4: Failed to decrypt with error: No key found in 0 keys tried.
    DeDRM v6.5.4: Looking for new default Kindle Key after 0.3 seconds
    searching for kinfoFiles in C:\Users\Loque\AppData\Local
    Found K4PC 1.9+ kinf2011 file: C:\Users\Loque\AppData\Local\Amazon\Kindle\storage.kinf2011
    Decrypted key file using IDString ‘439268100’ and UserName ‘4c6f717565’
    DeDRM v6.5.4: Found 1 new key
    MobiDeDrm v0.41.
    Copyright © 2008-2012 The Dark Reverser et al.
    MOBI header version 4, header length 264
    Decrypting Mobipocket 4 ebook: Fundamentals of Thermal-Fluid Sciences
    Found 4 keys to try after 0.6 seconds
    Crypto Type is: 2
    File is encoded with PID /9eixDclH5.
    Decrypting. Please wait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  7. I’m having trouble with Calibre and the DeDRM plugin since I changed to Linux (Manjaro). I’m using an old version of PC Kindle under Wine, and it works just fine. There is also a Calibre for Linux, so apparently no problem in that front, either.
    The problem comes once I install the DeDRM plugin in Calibre and add an encoded book: Wine is triggered (I thought that the plugin was written in Python?), and the decodification fails due to an obscure error.
    There are other tools, bot no one seems to work correctly. For example, I used mobidedrm, but the problem is that its companion tool kindelpid is unable to create the correct pid from my Paperwhite serial number.
    Any help or idea?

    • To use books from Kindle for PC, temporarily install calibre and the plugin under Wine. Add a book, save your key, and import that key into your Linux calibre.

      To use books from your Paperwhite, add its serial number into the plugin customization. (You may need to download them from the website to avoid KFX format.)

      • I’ve been able to solve the problem by installing Calibre under Wine as well. It is a bit sluggish, however. What do yu mean with: “To use books from Kindle for PC, temporarily install calibre and the plugin under Wine. Add a book, save your key, and import that key into your Linux calibre.”? Where is the key? How do I import it into Calibre? Regards, Baltasar

    • I have had no success using the Kindle app from within wine. The problem that I am seeing is that I cannot seem to find the correct location of the Kindle for PC keys so that the plugin can successfully strip the DRM. My workaround has been to boot into Windows 10, download my books, import them into Calibre whilst in Win, and then once I am booted back into Linux, import from my Windows Calibre folder.

  8. Using the plug in and the proper version of Kindle PC I was able to import a few books that came in as AZW3 then it started importing them as AZW’s. I double checked to make sure it hadn’t updated the Kindle App. Any Idea what’s going on here? Calibre says I still have a DRM File.

    Thanks.

  9. I used to be able to use these tools so easily, for the past year I have been stuck with these errors:

    $ calibre-debug -g
    calibre 3.1.1 embedded-python: False is64bit: True
    Linux-4.12.11-300.fc26.x86_64-x86_64-with-fedora-26-Twenty_Six Linux (’64bit’, ”)
    (‘Linux’, ‘4.12.11-300.fc26.x86_64’, ‘#1 SMP Thu Sep 7 18:32:12 UTC 2017’)
    Python 2.7.13
    Linux: (‘Fedora’, ’26’, ‘Twenty Six’)
    Interface language: None
    Successfully initialized third party plugins: DeDRM (6, 5, 4)
    Turning on automatic hidpi scaling
    devicePixelRatio: 2.0
    logicalDpi: 96.0 x 96.0
    physicalDpi: 131.096774194 x 134.470588235
    Using calibre Qt style: True
    Starting up…
    libpng warning: iCCP: known incorrect sRGB profile
    libpng warning: iCCP: known incorrect sRGB profile
    Started up in 1.32 seconds with 9 books
    Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
    DeDRM v6.5.4: Trying to decrypt Programming_in_Haskell.pdf
    DeDRM v6.5.4: Programming_in_Haskell.pdf is a PDF ebook
    DeDRM v6.5.4: Trying Encryption key default_key
    DeDRM v6.5.4: Exception when decrypting after 0.2 seconds
    Traceback (most recent call last):
    File “calibre_plugins.dedrm.init“, line 414, in PDFDecrypt
    File “calibre_plugins.dedrm.ineptpdf”, line 2193, in decryptBook
    File “calibre_plugins.dedrm.ineptpdf”, line 1999, in init
    File “calibre_plugins.dedrm.ineptpdf”, line 1484, in initialize
    File “calibre_plugins.dedrm.ineptpdf”, line 1610, in initialize_ebx
    error: Error -5 while decompressing data: incomplete or truncated stream
    DeDRM v6.5.4: Failed to decrypt with key default_key after 0.2 seconds
    DeDRM v6.5.4: Looking for new default Adobe Digital Editions Keys after 0.2 seconds
    DeDRM v6.5.4: Running adobekey.py under Wine
    DeDRM v6.5.4: Command line: ‘WINEPREFIX=”/home/kxra/.wine” wine python.exe “/home/kxra/.config/calibre/plugins/DeDRM/libraryfiles/adobekey.py” “/home/kxra/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir”‘
    adobekey.py v6.0
    Copyright ? 2009-2013 i?cabbages and Apprentice Alf
    Found 1 keys
    Saved a key to Z:\home\kxra.config\calibre\plugins\DeDRM\libraryfiles\winekeysdir\adobekey_1.der
    DeDRM v6.5.4: Found and decrypted 1 key file
    DeDRM v6.5.4: 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 “/usr/lib64/calibre/calibre/customize/ui.py”, line 170, in _run_filetype_plugins
    nfp = plugin.run(nfp) or nfp
    File “calibre_plugins.dedrm.init“, line 618, in run
    File “calibre_plugins.dedrm.init“, line 493, in PDFDecrypt
    DeDRMError: DeDRM v6.5.4: Ultimately failed to decrypt after 0.5 seconds.
    Syntax Error: Couldn’t find the ‘EBX_HANDLER’ security handler
    pdfinfo errored out with return code: 1
    Traceback (most recent call last):
    File “/usr/lib64/calibre/calibre/customize/ui.py”, line 416, in get_file_type_metadata
    mi = plugin.get_metadata(stream, ftype.lower().strip())
    File “/usr/lib64/calibre/calibre/customize/builtins.py”, line 342, in get_metadata
    return get_metadata(stream)
    File “/usr/lib64/calibre/calibre/ebooks/metadata/pdf.py”, line 115, in get_metadata
    raise ValueError(‘Could not read info dict from PDF’)
    ValueError: Could not read info dict from PDF
    Added Programming in Haskell to db in: 0.2
    Added 1 books in 1.3 seconds

      • Version 1.7 as listed in the instructions and same adobe ID I’ve always had. I have to enter my wineprefix “.wine” manually, but after that I can hit the green plus sign to add the default key. Installed the python tools successfully as well

        • I recall people having issues with 1.7 and EPUBs. Could be a similar issue with PDFs. I’d try using ADE 2.0.1 if possible. I don’t think it works under Wine, but maybe you have access to a Windows machine. Sorry if that’s not much help. :/ Hopefully someone who has it working in Linux will have a better answer.

  10. I’ve been able to solve the problem by installing Calibre under Wine as well. It is a bit sluggish, however. What do yu mean with: “To use books from Kindle for PC, temporarily install calibre and the plugin under Wine. Add a book, save your key, and import that key into your Linux calibre.”? Where is the key? How do I import it into Calibre? Regards, Baltasar

    • If you’ve successfully DeDRMed a book from Kindle for PC with the plugin in calibre under wine, then go into the plugin customization Kindle for PC section. You’ll see a default key listed there and a save button. This will create a .k4i file which you can import into the plugin in your Linux calibre. It will only work for books from that particular installation of Kindle for PC.

  11. calibre Registro de depuración
    calibre 2.41 isfrozen: 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.9
    Windows: (‘7’, ‘6.1.7601’, ‘SP1’, ‘Multiprocessor Free’)
    Successfully initialized third party plugins: DeDRM
    Starting up…
    Started up in 11.15 seconds with 4 books

    Debugging DND event
    application/x-qt-windows-mime;value=”Shell IDList Array” 5712 ‘\x02\x00\x00\x00\x10\x00\x00\x00H\x08\x00\x00\xfa\x0e\x00\x00\x14\x00\x1fB%H\x1e\x03\x94{\xc3M\xb11\xe9F\xb4L\x8d\xd5 \x00\x00\x00\x1a\x00\xee\xbb\xfe#\x00\x00\x10\x00}\xb1\r{\xd2\x9c\x93J\x973F\xcc\x89\x02.|\x00\x00\x94\x03\x00\x00\x8e\x03\x81\x19\x14\x10d\x03 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x00\x00\x001SPS0\xf1%\xb7\xefG\x1a\x10\xa5\xf1\x02\x8c\x9e\xeb\xac1\x00\x00\x00\n\x00\x00\x00\x00\x1f\x00\x00\x00\x0f\x00\x00\x00M\x00i\x00s\x00 \x00d\x00o\x00c\x00u\x00m\x00e\x00n\x00t\x00o\x00s\x00\x00\x00\x00\x00\x15\x00\x00\x00\x0f\x00\x00\x00\x00@\x00\x00\x00\x00\xd2\xade\xa6\x97\xd0\x01\x11\x00\x00\x00\r\x00\x00\x00\x00\x13\x00\x00\x00\x11\x00\x00\x00\x15\x00\x00\x00\x0e\x00\x00\x00\x00@\x00\x00\x00\x00\xdd\x8fr\x18.\xd3\x01\x15\x00\x00\x00\x10\x00\x00\x00\x00@\x00\x00\x00\x00\xdd\x8fr\x18.\xd3\x01\x00\x00\x00\x001\x00\x00\x001SPS\xb1\x16mD\xad\x8dpH\xa7H@.\xa4=x\x8c\x15\x00\x00\x00d’

    application/x-qt-windows-mime;value=”UsingDefaultDragImage” 4 ‘\x01\x00\x00\x00’

    application/x-qt-windows-mime;value=”DragImageBits” 36896 ‘\x00\x00\x00\x00\x00\x000\x00\x00\x00Y\x00\x00\x00\x07\x1f\x05\x1e\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00′

    application/x-qt-windows-mime;value=”DragContext” 16 ‘\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00’

    application/x-qt-windows-mime;value=”DragSourceHelperFlags” 4 ‘\x01\x00\x00\x00’

    application/x-qt-windows-mime;value=”InShellDragLoop” 4 ‘\x01\x00\x00\x00’

    text/uri-list 287 ‘file:///C:/Users/XXXXXXXXX/Documents/My%20Digital%20Editions/Metalibro.%20Manual%20del%20libro%20en%20la%20imprenta%20.epub\r\nfile:///C:/Users/Editorial/Documents/My%20Digital%20Editions/De%20la%20investigaci%C3%B3n%20al%20Libro.%20Estudios%20y%20cr%C3%B3nicas%20de%20la%20bibliofi.epub\r\n’

    application/x-qt-windows-mime;value=”FileName” 49 ‘C:\Users\EDITOR~1\DOCUME~1\MYDIGI~1\METALI~1.EPU\x00’

    application/x-qt-windows-mime;value=”FileNameW” 196 ‘C\x00:\x00\\x00U\x00s\x00e\x00r\x00s\x00\\x00E\x00d\x00i\x00t\x00o\x00r\x00i\x00a\x00l\x00\\x00D\x00o\x00c\x00u\x00m\x00e\x00n\x00t\x00s\x00\\x00M\x00y\x00 \x00D\x00i\x00g\x00i\x00t\x00a\x00l\x00 \x00E\x00d\x00i\x00t\x00i\x00o\x00n\x00s\x00\\x00M\x00e\x00t\x00a\x00l\x00i\x00b\x00r\x00o\x00.\x00 \x00M\x00a\x00n\x00u\x00a\x00l\x00 \x00d\x00e\x00l\x00 \x00l\x00i\x00b\x00r\x00o\x00 \x00e\x00n\x00 \x00l\x00a\x00 \x00i\x00m\x00p\x00r\x00e\x00n\x00t\x00a\x00 \x00.\x00e\x00p\x00u\x00b\x00\x00\x00’

    Firefox rurl: None None
    URLS: [‘file:///C:/Users/XXXXXXXXXXX/Documents/My%20Digital%20Editions/Metalibro.%20Manual%20del%20libro%20en%20la%20imprenta%20.epub’, ‘file:///C:/Users/XXXXXXXX/Documents/My%20Digital%20Editions/De%20la%20investigaci%C3%B3n%20al%20Libro.%20Estudios%20y%20cr%C3%B3nicas%20de%20la%20bibliofi.epub’]
    Paths: [u’C:/Users/XXXXXXXX/Documents/My Digital Editions/Metalibro. Manual del libro en la imprenta .epub’, u’C:/Users/XXXXXX/Documents/My Digital Editions/De la investigaci\xf3n al Libro. Estudios y cr\xf3nicas de la bibliofi.epub’]
    Extensions: frozenset([u’epub’])
    DeDRM v6.5.4: Trying to decrypt Metalibro. Manual del libro en la imprenta .epub
    DeDRM v6.5.4: Verifying zip archive integrity
    DeDRM v6.5.4: Metalibro. Manual del libro en la imprenta .epub is a secure Adobe Adept ePub
    DeDRM v6.5.4: Trying Encryption key default_key
    DeDRM v6.5.4: Trying to decrypt De la investigación al Libro. Estudios y crónicas de la bibliofi.epub
    DeDRM v6.5.4: Verifying zip archive integrity
    DeDRM v6.5.4: De la investigación al Libro. Estudios y crónicas de la bibliofi.epub is a secure Adobe Adept ePub
    DeDRM v6.5.4: Trying Encryption key default_key
    DeDRM v6.5.4: Decrypted with key default_key after 0.6 seconds
    DeDRM v6.5.4: Finished after 0.6 seconds
    DeDRM v6.5.4: Decrypted with key default_key after 0.2 seconds
    DeDRM v6.5.4: Finished after 0.2 seconds
    C:\Program Files (x86)\Calibre2\pylib.zip\dateutil\parser.py:339: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode – interpreting them as being unequal
    C:\Program Files (x86)\Calibre2\pylib.zip\dateutil\parser.py:339: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode – interpreting them as being unequal
    Added De la investigación al Libro. Estudios y crónicas de la bibliofilia to db in: 0.2
    Added Metalibro. Manual del libro en la imprenta to db in: 0.1
    Added 2 books in 1.6 seconds

  12. calibre Debug log
    calibre 3.7 embedded-python: True is64bit: False
    Windows-10-10.0.15063-SP0 Windows (’32bit’, ‘WindowsPE’)
    32bit process running on 64bit windows
    (‘Windows’, ’10’, ‘10.0.15063’)
    Python 2.7.12+
    Windows: (’10’, ‘10.0.15063’, ‘SP0′, u’Multiprocessor Free’)
    Interface language: None
    Successfully initialized third party plugins: DeDRM (6, 5, 4)
    calibre 3.7 embedded-python: True is64bit: False
    Windows-10-10.0.15063-SP0 Windows (’32bit’, ‘WindowsPE’)
    32bit process running on 64bit windows
    (‘Windows’, ’10’, ‘10.0.15063’)
    Python 2.7.12+
    Windows: (’10’, ‘10.0.15063’, ‘SP0′, u’Multiprocessor Free’)
    Interface language: None
    Successfully initialized third party plugins: DeDRM (6, 5, 4)
    Turning on automatic hidpi scaling
    devicePixelRatio: 1.0
    logicalDpi: 120.0 x 120.0
    physicalDpi: 140.947976879 x 141.402061856
    Using calibre Qt style: True
    Starting up…
    Started up in 12.70 seconds with 44 books
    stdout+stderr from file dialog helper: [”, ”]
    piped data from file dialog helper: [‘g\x99.i\x0b\xff\xa1\xd9\xe4\xe8\xbeA\xd7C\x9b\x1d>\xfe\xec\x95\x97n(r\xce#\xfa\xf5\x97y q’, ‘C:\Users\casey\Downloads\Catastrophic Crisis.azw3’]
    DeDRM v6.5.4: Trying to decrypt Catastrophic Crisis.azw3
    Using Library AlfCrypto Python
    MobiDeDrm v0.41.
    Copyright © 2008-2012 The Dark Reverser et al.
    MOBI header version 8, header length 264
    Extra Data Flags: 3
    Decrypting Kindle Format 8 ebook: Catastrophic Crisis
    Found 4 keys to try after 0.1 seconds
    Crypto Type is: 2
    DeDRM v6.5.4: Failed to decrypt with error: No key found in 4 keys tried.
    DeDRM v6.5.4: Looking for new default Kindle Key after 0.1 seconds
    searching for kinfoFiles in C:\Users\casey\AppData\Local
    Found K4PC 1.9+ kinf2011 file: C:\Users\casey\AppData\Local\Amazon\Kindle\storage.kinf2011
    Decrypted key file using IDString ‘3293748819’ and UserName ‘6361736579’
    DeDRM v6.5.4: Found 1 new key
    MobiDeDrm v0.41.
    Copyright © 2008-2012 The Dark Reverser et al.
    MOBI header version 8, header length 264
    Extra Data Flags: 3
    Decrypting Kindle Format 8 ebook: Catastrophic Crisis
    Found 4 keys to try after 0.1 seconds
    Crypto Type is: 2
    DeDRM v6.5.4: 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 611, in run
    File “calibre_plugins.dedrm.init“, line 561, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.5.4: Ultimately failed to decrypt after 0.1 seconds
    Added Catastrophic Crisis to db in: 0.3
    Added 1 books in 1.1 seconds

  13. Was unable to remove DRM from my latest book.
    copy of my log
    There is 1 ebook to be decrypted.
    Processing file: Cursed-in-L.azw
    shellcommand: /usr/bin/python ‘/Applications/DeDRM.app/Contents/Resources/k4mobidedrm.py’ -s ‘90231702314307EV,G090G10563030D39’ ‘/Users/joanna/Desktop/Cursed-in-L.azw’ ‘/Users/joanna/Desktop/’ > ‘/Users/joanna/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
    shellresult: Using Library AlfCrypto DLL/DYLIB/SO
    K4MobiDeDrm v5.4.
    Copyright © 2008-2013 The Dark Reverser et al.
    MobiDeDrm v0.41.
    Copyright © 2008-2012 The Dark Reverser et al.
    MOBI header version 8, header length 264
    Extra Data Flags: 3
    Decrypting Kindle Format 8 ebook: Cursed in Love: A Zodiac Shifters Paranormal Romance: Cancer
    Found 4 keys to try after 0.0 seconds
    Crypto Type is: 2
    Error decrypting book after 0.0 seconds: No key found in 4 keys tried.
    Traceback (most recent call last):
    File “/Applications/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 254, in decryptBook
    book = GetDecryptedBook(infile, kDatabases, androidFiles, serials, pids, starttime)
    File “/Applications/DeDRM.app/Contents/Resources/k4mobidedrm.py”, line 228, in GetDecryptedBook
    mb.processBook(totalpids)
    File “/Applications/DeDRM.app/Contents/Resources/mobidedrm.py”, line 471, in processBook
    raise DrmException(u”No key found in {0:d} keys tried.”.format(len(goodpids)))
    DrmException: No key found in 4 keys tried.
    shellcommand: /usr/bin/python ‘/Applications/DeDRM.app/Contents/Resources/kindlekey.py’ ‘/Users/joanna/Library/Preferences/com.apprenticealf.dedrm/newKeys/’ > ‘/Users/joanna/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
    shellresult: kindlekey.py v2.3
    Copyright © 2010-2016 by some_updates, Apprentice Alf and Apprentice Harper
    Found k4Mac rainier file: /Users/joanna/Library/Application Support/Kindle/storage/.rainier-2.1.1-kinf
    Couldn’t decrypt file.
    Could not retrieve Kindle for Mac/PC key.

    There was an error with 1 ebook:
    Cursed-in-L.azw couldn’t be decrypted.

  14. Hello i also installed v1.7 as recommended, and the plugin, but still get the DRM error.

    C:\Users\admin>calibre-debug -g
    calibre 3.7 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
    Successfully initialized third party plugins: DeDRM (6, 5, 4) && Obok DeDRM (6, 5, 4)
    Turning on automatic hidpi scaling
    devicePixelRatio: 1.0
    logicalDpi: 96.0 x 96.0
    physicalDpi: 98.5496535797 x 98.4132841328
    Using calibre Qt style: True

    C:\Users\admin>calibre-debug -g
    calibre 3.7 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
    Successfully initialized third party plugins: DeDRM (6, 5, 4) && Obok DeDRM (6, 5, 4)
    Turning on automatic hidpi scaling
    devicePixelRatio: 1.0
    logicalDpi: 96.0 x 96.0
    physicalDpi: 98.5496535797 x 98.4132841328
    Using calibre Qt style: True

  15. I wonder if anyone has come across the following problem – I’ve “dusted” an ePub with Calibre, and I can read it all right with Calibre’s book viewer on my desktop. However no ebook reading app on my iPad or iPhone seems to work: when adding the book it is either not recognised, or I get an error message to the effect that it is encrypted. Any ideas on what could be going wrong? thank you!

    • If it’s opening in calibre’s ebook viewer, then it’s definitely DRM-free. You could try opening it in calibre’s ebook editor, and check for errors. If any are found, there’s an option to attempt to automatically fix. If that doesn’t do it, then try asking over at the MobileRead forums.

      • thanks Laura, I’ve tried that and there are no errors – but there is an encryption.xml file in the book: perhaps removing that would fix it? or would it screw it up completely instead?

        • ok, problem solved – I deleted “encryption.xml”, and that did it! Thanks Laura for suggesting I have a look at editing the file!

          • Cool! I was going to say give a try and see what happens. 🙂 Turns out that file is the result of embedded fonts which are copyrighted. I guess removing it allows the reading app to fall back on its own fonts.

  16. I successfully installed the DeDRM plugin into Calibre (Manjaro Linux), but after restarting and importing the AZW file the DRM has not been removed. What to do? Calibre’s error details reports “ERROR: DRM”

Leave a Reply

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

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s