DRM Removal Tools for eBooks

Version 6.4.3 released on 28 April, 2016

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 my FAQs post:  Frequently Asked Questions about the DRM removal tools.

If you have any problems with the current tools, please ask for help in a comment on this post. 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 folder)
  • 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 this application for gaining full access to your own ebooks for archiving/converson/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.

1,805 thoughts on “DRM Removal Tools for eBooks

  1. Latest tools on MacOS 10.11.4. Using calibre 2.55.0 on Kindle files downloaded to the Mac Kindle app.

    Convert book 1 of 1 (Auntie Mame: An Irreverent Escapade)
    Resolved conversion options
    calibre version: 2.55.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/bs/l7g9cymj1gl3w8m_4vq4jhvw0000gn/C/calibre_2.55.0_tmp_t23mqj/AiJvD_.jpeg’,
    ‘debug_pipeline’: None,
    ‘dehyphenate’: True,
    ‘delete_blank_paragraphs’: True,
    ‘disable_font_rescaling’: False,
    ‘dont_compress’: False,
    ‘duplicate_links_in_toc’: False,
    ’embed_all_fonts’: False,
    ’embed_font_family’: None,
    ‘enable_heuristics’: False,
    ‘expand_css’: False,
    ‘extra_css’: None,
    ‘extract_to’: None,
    ‘filter_css’: u”,
    ‘fix_indents’: True,
    ‘font_size_mapping’: None,
    ‘format_scene_breaks’: True,
    ‘html_unwrap_factor’: 0.4,
    ‘input_encoding’: None,
    ‘input_profile’: ,
    ‘insert_blank_line’: False,
    ‘insert_blank_line_size’: 0.5,
    ‘insert_metadata’: False,
    ‘isbn’: None,
    ‘italicize_common_cases’: True,
    ‘keep_ligatures’: False,
    ‘language’: None,
    ‘level1_toc’: None,
    ‘level2_toc’: None,
    ‘level3_toc’: None,
    ‘line_height’: 0.0,
    ‘linearize_tables’: False,
    ‘margin_bottom’: 5.0,
    ‘margin_left’: 5.0,
    ‘margin_right’: 5.0,
    ‘margin_top’: 5.0,
    ‘markup_chapter_headings’: True,
    ‘max_toc_links’: 50,
    ‘minimum_line_height’: 120.0,
    ‘mobi_file_type’: u’old’,
    ‘mobi_ignore_margins’: False,
    ‘mobi_keep_original_images’: False,
    ‘mobi_toc_at_start’: False,
    ‘no_chapters_in_toc’: False,
    ‘no_inline_navbars’: True,
    ‘no_inline_toc’: False,
    ‘output_profile’: ,
    ‘page_breaks_before’: u”//*[name()=’h1′ or name()=’h2′]”,
    ‘personal_doc’: u'[PDOC]’,
    ‘prefer_author_sort’: False,
    ‘prefer_metadata_cover’: False,
    ‘pretty_print’: False,
    ‘pubdate’: None,
    ‘publisher’: None,
    ‘rating’: None,
    ‘read_metadata_from_opf’: u’/var/folders/bs/l7g9cymj1gl3w8m_4vq4jhvw0000gn/C/calibre_2.55.0_tmp_t23mqj/c2uC4S.opf’,
    ‘remove_fake_margins’: True,
    ‘remove_first_image’: False,
    ‘remove_paragraph_spacing’: False,
    ‘remove_paragraph_spacing_indent_size’: 1.5,
    ‘renumber_headings’: True,
    ‘replace_scene_breaks’: u”,
    ‘search_replace’: ‘[]’,
    ‘series’: None,
    ‘series_index’: None,
    ‘share_not_sync’: False,
    ‘smarten_punctuation’: False,
    ‘sr1_replace’: None,
    ‘sr1_search’: None,
    ‘sr2_replace’: None,
    ‘sr2_search’: None,
    ‘sr3_replace’: None,
    ‘sr3_search’: None,
    ‘start_reading_at’: None,
    ‘subset_embedded_fonts’: False,
    ‘tags’: None,
    ‘timestamp’: None,
    ‘title’: None,
    ‘title_sort’: None,
    ‘toc_filter’: None,
    ‘toc_threshold’: 6,
    ‘toc_title’: None,
    ‘transform_css_rules’: ‘[]’,
    ‘unsmarten_punctuation’: False,
    ‘unwrap_lines’: True,
    ‘use_auto_toc’: False,
    ‘verbose’: 2}
    InputFormatPlugin: MOBI Input running
    on /var/folders/bs/l7g9cymj1gl3w8m_4vq4jhvw0000gn/C/calibre_2.55.0_tmp_t23mqj/9HiZQD.azw3
    Found KF8 MOBI of type ‘standalone’
    Extracting text…
    Parsing all content…
    Parsing text/part0005.html …
    Parsing text/part0017.html …
    Parsing text/part0006.html …
    Parsing text/part0007.html …
    Parsing text/part0008.html …
    Parsing text/part0009.html …
    Parsing styles/0001.css …
    Parsing text/part0018.html …
    Parsing text/part0010.html …
    Parsing styles/0002.css …
    PropertyValue: Missing token for production Choice(ColorValue, Dimension, URIValue, Value, variable, MSValue, CSSCalc, function): (‘CHAR’, u’&’, 4, 20)
    No content to parse.
    PropertyValue: Unknown syntax or no value: &quot
    CSSStyleDeclaration: Syntax Error in Property: font-family: &quot
    Property: No “:” after name found: Shift Light&quot [4:38: quot]
    Property: No property value found: Shift Light&quot [4:38: quot]
    CSSStyleDeclaration: Syntax Error in Property: Shift Light&quot
    PropertyValue: Missing token for production Choice(ColorValue, Dimension, URIValue, Value, variable, MSValue, CSSCalc, function): (‘CHAR’, u’&’, 10, 20)
    No content to parse.
    PropertyValue: Unknown syntax or no value: &quot
    CSSStyleDeclaration: Syntax Error in Property: font-family: &quot
    Property: No “:” after name found: Shift Light&quot [10:38: quot]
    Property: No property value found: Shift Light&quot [10:38: quot]
    CSSStyleDeclaration: Syntax Error in Property: Shift Light&quot
    PropertyValue: Missing token for production Choice(ColorValue, Dimension, URIValue, Value, variable, MSValue, CSSCalc, function): (‘CHAR’, u’&’, 16, 20)
    No content to parse.
    PropertyValue: Unknown syntax or no value: &quot
    CSSStyleDeclaration: Syntax Error in Property: font-family: &quot
    Property: No “:” after name found: Fort-Book&quot [16:36: quot]
    Property: No property value found: Fort-Book&quot [16:36: quot]
    CSSStyleDeclaration: Syntax Error in Property: Fort-Book&quot
    Parsing text/part0011.html …
    Parsing text/part0000.html …
    Parsing text/part0019.html …
    Parsing text/part0012.html …
    Parsing text/part0013.html …
    Parsing text/part0001.html …
    Parsing text/part0014.html …
    Parsing text/part0015.html …
    Parsing text/part0002.html …
    Parsing text/part0016.html …
    Parsing text/part0003.html …
    Parsing text/part0004.html …
    Referenced file u’styles/%26quot%3bfonts/Fort-Book.otf%26quot%3b’ not found
    Referenced file u’styles/fonts/Shift-BoldItalic.otf’ not found
    Referenced file u’styles/fonts/Shift-Light.otf’ not found
    Reading TOC from NCX…
    Merging user specified metadata…
    Detecting structure…
    Flattening CSS and remapping font sizes…
    Source base font size is 10.56000pt
    Removing fake margins…
    Found 1 items of level: div_3
    Found 2 items of level: div_2
    Found 20 items of level: div_1
    Found 14 items of level: p_3
    Found 2728 items of level: p_2
    Ignoring level div_3
    Ignoring level p_3
    div_2 left margin stats: Counter()
    div_2 right margin stats: Counter()
    div_1 left margin stats: Counter({u”: 16, u’0%’: 1})
    div_1 right margin stats: Counter({u”: 16, u’0′: 1})
    Negative text indent detected at level p_2, ignoring this level
    Cleaning up manifest…
    Trimming unused files from manifest…
    Trimming u’images/00005.jpeg’ from manifest
    Trimming u’images/00007.jpeg’ from manifest
    Python function terminated unexpectedly: Argument must be bytes or unicode, got ‘float’
    Traceback (most recent call last):
    File “/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py”, line 209, 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 190, in main
    File “site-packages/calibre/gui2/convert/gui_conversion.py”, line 31, in gui_convert_override
    File “site-packages/calibre/gui2/convert/gui_conversion.py”, line 25, in gui_convert
    File “site-packages/calibre/ebooks/conversion/plumber.py”, line 1219, in run
    File “site-packages/calibre/ebooks/conversion/plugins/mobi_output.py”, line 208, in convert
    File “site-packages/calibre/ebooks/conversion/plugins/mobi_output.py”, line 240, in write_mobi
    File “site-packages/calibre/ebooks/mobi/mobiml.py”, line 116, in __call__
    File “site-packages/calibre/ebooks/mobi/mobiml.py”, line 127, in mobimlize_spine
    File “site-packages/calibre/ebooks/mobi/mobiml.py”, line 567, in mobimlize_elem
    File “site-packages/calibre/ebooks/mobi/mobiml.py”, line 567, in mobimlize_elem
    File “site-packages/calibre/ebooks/mobi/mobiml.py”, line 565, in mobimlize_elem
    File “site-packages/calibre/ebooks/mobi/mobiml.py”, line 287, in mobimlize_content
    File “src/lxml/lxml.etree.pyx”, line 3112, in lxml.etree.SubElement (src/lxml/lxml.etree.c:81786)
    File “src/lxml/apihelpers.pxi”, line 203, in lxml.etree._makeSubElement (src/lxml/lxml.etree.c:18358)
    File “src/lxml/apihelpers.pxi”, line 198, in lxml.etree._makeSubElement (src/lxml/lxml.etree.c:18281)
    File “src/lxml/apihelpers.pxi”, line 302, in lxml.etree._initNodeAttributes (src/lxml/lxml.etree.c:19840)
    File “src/lxml/apihelpers.pxi”, line 316, in lxml.etree._addAttributeToNode (src/lxml/lxml.etree.c:20196)
    File “src/lxml/apihelpers.pxi”, line 1437, in lxml.etree._utf8 (src/lxml/lxml.etree.c:32414)
    TypeError: Argument must be bytes or unicode, got ‘float’
    Creating MOBI Output…
    Serializing resources…
    Creating MOBI 6 output
    Generating in-line TOC…
    Applying case-transforming CSS…
    Parsing manglecase.css …
    Parsing tocstyle.css …
    Rasterizing SVG images…
    Converting XHTML to Mobipocket markup…

      • i, too, am having trouble with conversion…BUT when I try to open on the ebbok I get a DRM error, but NOT when importing. Opens in Kindle for PC. bought on Amazon…Two recently bought ebooks have the same problem. Using latest tools. Log to follow
        calibre, version 1.48.0 (win32, isfrozen: True)
        Conversion Error: Failed: Convert book 1 of 1 (Civilization One: The World is Not as You Thought it Was)

        Convert book 1 of 1 (Civilization One: The World is Not as You Thought it Was)
        Resolved conversion options
        calibre version: 1.48.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:\\DOCUME~1\\User\\LOCALS~1\\Temp\\calibre_eyfimi\\t823fd.jpeg’,
        ‘debug_pipeline’: None,
        ‘dehyphenate’: True,
        ‘delete_blank_paragraphs’: True,
        ‘disable_font_rescaling’: False,
        ‘dont_compress’: False,
        ‘duplicate_links_in_toc’: False,
        ’embed_all_fonts’: False,
        ’embed_font_family’: None,
        ‘enable_heuristics’: False,
        ‘expand_css’: False,
        ‘extra_css’: None,
        ‘extract_to’: None,
        ‘filter_css’: u”,
        ‘fix_indents’: True,
        ‘font_size_mapping’: None,
        ‘format_scene_breaks’: True,
        ‘html_unwrap_factor’: 0.4,
        ‘input_encoding’: None,
        ‘input_profile’: ,
        ‘insert_blank_line’: False,
        ‘insert_blank_line_size’: 0.5,
        ‘insert_metadata’: False,
        ‘isbn’: None,
        ‘italicize_common_cases’: True,
        ‘keep_ligatures’: False,
        ‘language’: None,
        ‘level1_toc’: None,
        ‘level2_toc’: None,
        ‘level3_toc’: None,
        ‘line_height’: 0.0,
        ‘linearize_tables’: False,
        ‘margin_bottom’: 5.0,
        ‘margin_left’: 5.0,
        ‘margin_right’: 5.0,
        ‘margin_top’: 5.0,
        ‘markup_chapter_headings’: True,
        ‘max_toc_links’: 50,
        ‘minimum_line_height’: 120.0,
        ‘mobi_file_type’: u’old’,
        ‘mobi_ignore_margins’: False,
        ‘mobi_keep_original_images’: False,
        ‘mobi_toc_at_start’: False,
        ‘no_chapters_in_toc’: False,
        ‘no_inline_navbars’: True,
        ‘no_inline_toc’: False,
        ‘output_profile’: ,
        ‘page_breaks_before’: u”//*[name()=’h1′ or name()=’h2′]”,
        ‘personal_doc’: u'[PDOC]’,
        ‘prefer_author_sort’: False,
        ‘prefer_metadata_cover’: False,
        ‘pretty_print’: False,
        ‘pubdate’: None,
        ‘publisher’: None,
        ‘rating’: None,
        ‘read_metadata_from_opf’: u’C:\\DOCUME~1\\User\\LOCALS~1\\Temp\\calibre_eyfimi\\t69nvu.opf’,
        ‘remove_fake_margins’: True,
        ‘remove_first_image’: False,
        ‘remove_paragraph_spacing’: False,
        ‘remove_paragraph_spacing_indent_size’: 1.5,
        ‘renumber_headings’: True,
        ‘replace_scene_breaks’: u”,
        ‘search_replace’: ‘[]’,
        ‘series’: None,
        ‘series_index’: None,
        ‘share_not_sync’: False,
        ‘smarten_punctuation’: False,
        ‘sr1_replace’: None,
        ‘sr1_search’: None,
        ‘sr2_replace’: None,
        ‘sr2_search’: None,
        ‘sr3_replace’: None,
        ‘sr3_search’: None,
        ‘start_reading_at’: None,
        ‘subset_embedded_fonts’: False,
        ‘tags’: None,
        ‘timestamp’: None,
        ‘title’: None,
        ‘title_sort’: None,
        ‘toc_filter’: None,
        ‘toc_threshold’: 6,
        ‘toc_title’: None,
        ‘unsmarten_punctuation’: False,
        ‘unwrap_lines’: True,
        ‘use_auto_toc’: False,
        ‘verbose’: 2}
        InputFormatPlugin: MOBI Input running
        on C:\DOCUME~1\User\LOCALS~1\Temp\calibre_eyfimi\pvkuqe.azw3
        Found KF8 MOBI of type ‘standalone’
        Extracting text…
        Python function terminated unexpectedly
        ‘NoneType’ object has no attribute ‘resource_index’ (Error Code: 1)
        Traceback (most recent call last):
        File “site.py”, line 132, in main
        File “site.py”, line 109, in run_entry_point
        File “site-packages\calibre\utils\ipc\worker.py”, line 195, in main
        File “site-packages\calibre\gui2\convert\gui_conversion.py”, line 31, in gui_convert_override
        File “site-packages\calibre\gui2\convert\gui_conversion.py”, line 25, in gui_convert
        File “site-packages\calibre\ebooks\conversion\plumber.py”, line 1040, in run
        File “site-packages\calibre\customize\conversion.py”, line 241, in __call__
        File “site-packages\calibre\ebooks\conversion\plugins\mobi_input.py”, line 43, in convert
        File “site-packages\calibre\ebooks\mobi\reader\mobi8.py”, line 102, in __call__
        File “site-packages\calibre\ebooks\mobi\reader\mobi8.py”, line 436, in extract_resources
        AttributeError: ‘NoneType’ object has no attribute ‘resource_index’

            • sorry found it here is the debug from calibre

              calibre Debug log
              calibre 1.48 isfrozen: True is64bit: False
              Windows-XP-5.1.2600-SP3 Windows (’32bit’, ‘WindowsPE’)
              (‘Windows’, ‘XP’, ‘5.1.2600’)
              Python 2.7.5
              Windows: (‘XP’, ‘5.1.2600’, ‘SP3’, ‘Multiprocessor Free’)
              Starting up…
              Loaded cached store plugin for: Project Gutenberg at version: 5
              Loaded cached store plugin for: Archive.org at version: 2
              Started up in 3.55 seconds with 0 books
              Worker Launch took: 0.155999898911
              Job: 1 Read metadata (0 of 1) finished
              Read metadata (0 of 1)
              DeDRM v6.3.4: Trying to decrypt Civilization One_ The World is Not as You Thought it Was_B00ILSYZK4.azw3
              Using Library AlfCrypto DLL/DYLIB/SO
              MobiDeDrm v0.41.
              Copyright © 2008-2012 The Dark Reverser et al.
              MOBI header version 8, header length 264
              Extra Data Flags: 3
              Decrypting Kindle Format 8 ebook: Civilization One: The World is Not as You Thought it Was
              Found 6 keys to try after 0.2 seconds
              Crypto Type is: 2
              File is encoded with PID MKjyNCn77C.
              Decrypting. Please wait . . . . done
              Decryption succeeded after 0.2 seconds
              DeDRM v6.3.4: Finished after 0.2 seconds

              Added Civilization One: The World is Not as You Thought it Was to db in: 1.625 seconds

              • so according to this the removal of drm was successful. why then does the calibre reader say the file is drmed ??

                • Ah, just realized your using an old version of calibre because of Windows XP. That might not support the azw3 files. I’m not sure.

                  • the XP azw3 connection has always worked before. Has Amazon brought out something new?? I can use my Win 10 machine, but I don’t like to expose it to any more internet than I have to

                    • I guess I’m mistaken then. I was thinking maybe it only opened .mobi files. There is a new format from Amazon that hasn’t been figured out yet, but that has a .kfx extension. I’m not sure what the issue here is then. Did you remove the DRMed copy before trying to import the book again?

                    • Oh yes…like I said I’ve been converting books for years, and have always found a work around before. This seems to just not work ??

                    • OK…so here is the funny part- the paperwhite DL will NOT open in KPC, but I went to Amazon and Re-DLed the book file and it WILL open in KPC, but not on either my K.v7 or my paperwhite. Just had whisper upgrades to the opsys on my readers…???
                      I’m going to DL a new Calibre on Win 10 and start all over .
                      Bob

                    • Each kindle device/app has its own unique key. So you can’t open something downloaded for your Paperwhite on Kindle for PC even if they’re signed into the same account. Did you see Paul’s answer?

                    • yes thank you. I saw Paul’s post. but actually I DL all my books multiple times to all my devices.
                      thanks.
                      Bob

                    • In my previous comment, I was referring to DRMed kindle books. That’s why I asked if you could open the DeDRMed book originally from your E-ink Kindle in K4PC. To see if it did actually have the DRM removed.

                    • ah yes. I actually could open the ebook. it was only the conversion that didn’t work.
                      Bob

        • Oddly enough, despite what calibre says, that’s not a DRM error. You’ve just run into a calibre bug.

          A possible work-around would be to use KindleUnpack to ‘extract’ an ePub, and then try opening that. The ePub might not be a completely valid ePub, but calibre shouldn’t have any problems opening it.

          • And now for the final chapter. New Win10 machine, new Calibre latest upgrade, had a “talk” with Apprentice Harper, and added ALL my serial numbers for all my Kindles into Calibre Plugins. I don’t know what did it, but something did it. It works. I probably should have done that in the beginning instead of wasting your time. Thanks to all.
            Bob

    • calibre Debug log
      calibre 2.55 embedded-python: True is64bit: True
      Darwin-15.4.0-x86_64-i386-64bit Darwin (’64bit’, ”)
      (‘Darwin’, ‘15.4.0’, ‘Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64’)
      Python 2.7.11
      OSX: (‘10.11.4’, (”, ”, ”), ‘x86_64’)
      Successfully initialized third party plugins: DeDRM
      Starting up…
      Started up in 2.77 seconds with 537 books
      DeDRM v6.3.6: Trying to decrypt B000FC1GPG_EBOK.azw
      Using Library AlfCrypto DLL/DYLIB/SO
      MobiDeDrm v0.41.
      Copyright © 2008-2012 The Dark Reverser et al.
      MOBI header version 8, header length 264
      Extra Data Flags: 3
      Decrypting Kindle Format 8 ebook: Auntie Mame: An Irreverent Escapade
      Found 8 keys to try after 0.0 seconds
      Crypto Type is: 2
      File is encoded with PID fWxjR/OHMW.
      Decrypting. Please wait . . . . done
      Decryption succeeded after 0.1 seconds
      DeDRM v6.3.6: Finished after 0.1 seconds
      Added Auntie Mame: An Irreverent Escapade to db in: 0.1
      Added 1 books in 0.8 seconds

  2. Don’t think this works with Kindle to PC versions because it’s impossible to extract serial number which is required when using this software.

    • A serial number is only needed for books from E-Ink kindles. Books from Kindle for PC get decrypted automatically, as the tools pick up the key from where Kindle for Pc stores it.

      If it’s not working for you, post an import log.

  3. Here is the debug log. When I attempt to open the book imported, I receive the DRM notice:

    operators note: the files dragged and dropped were: C009CJO3LU_EBOK.azw, C009CJO3LU_EBOK.mbpV2 and kindlekey.pyw
    ===========================================================================================
    calibre Debug log
    calibre 2.56 embedded-python: True is64bit: True
    Linux-3.13.0-85-generic-x86_64-with-debian-jessie-sid Linux (’64bit’, ‘ELF’)
    (‘Linux’, ‘3.13.0-85-generic’, ‘#129-Ubuntu SMP Thu Mar 17 20:50:15 UTC 2016’)
    Python 2.7.9
    Linux: (‘debian’, ‘jessie/sid’, ”)
    Successfully initialized third party plugins: DeDRM && K4PC, K4Mac, Kindle Mobi and Topaz DeDRM
    Starting up…
    Loaded cached store plugin for: Woblink at version: 12
    Started up in 3.53 seconds with 0 books
    DeDRM v6.4.3: Trying to decrypt B006CJO3LU_EBOK.azw
    Using Library AlfCrypto DLL/DYLIB/SO
    MobiDeDrm v0.41.
    Copyright © 2008-2012 The Dark Reverser et al.
    MOBI header version 8, header length 264
    Extra Data Flags: 3
    Decrypting Kindle Format 8 ebook: Theory of Bananas
    Found 0 keys to try after 0.1 seconds
    Crypto Type is: 2
    DeDRM v6.4.3: Failed to decrypt with error: No key found in 0 keys tried.
    DeDRM v6.4.3: Looking for new default Kindle Key after 0.1 seconds
    DeDRM v6.4.3: Running kindlekey.py under Wine
    DeDRM v6.4.3: Command line: “WINEPREFIX=”/home/blablabla/calibre-bin/calibre” wine python.exe “/home/blablabla/.config/calibre/plugins/DeDRM/libraryfiles/kindlekey.py” “/home/blablabla/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir””
    Added B006CJO3LU EBOK to db in: 2.2
    Added kindlekey to db in: 1.7
    fixme:storage:create_storagefile Storage share mode not implemented.
    err:mscoree:LoadLibraryShim error reading registry key for installroot
    err:mscoree:LoadLibraryShim error reading registry key for installroot
    err:mscoree:LoadLibraryShim error reading registry key for installroot
    err:mscoree:LoadLibraryShim error reading registry key for installroot
    fixme:storage:create_storagefile Storage share mode not implemented.
    fixme:iphlpapi:NotifyAddrChange (Handle 0x114e2b8, overlapped 0x114e2d0): stub
    fixme:storage:create_storagefile Storage share mode not implemented.
    fixme:iphlpapi:NotifyAddrChange (Handle 0x10fe890, overlapped 0x10fe89c): stub
    wine: configuration in ‘/home/blablabla/calibre-bin/calibre’ has been updated.
    wine: cannot find L”C:\\windows\\system32\\python.exe”
    DeDRM v6.4.3: Found and decrypted 0 key files
    DeDRM v6.4.3: Ultimately failed to decrypt after 16.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 154, in _run_filetype_plugins
    File “calibre_plugins.dedrm.__init__”, line 604, in run
    File “calibre_plugins.dedrm.__init__”, line 554, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.4.3: Ultimately failed to decrypt after 16.2 seconds
    is not a valid Kindle serial number or PID.
    K4MobiDeDRM: Calibre configuration directory = /home/blablabla/.config/calibre
    MOBI header version = 8, length = 264
    Extra Data Flags = 3
    Crypto Type is: 2
    Running file type plugin K4PC, K4Mac, Kindle Mobi and Topaz DeDRM failed with traceback:
    Traceback (most recent call last):
    File “site-packages/calibre/customize/ui.py”, line 154, in _run_filetype_plugins
    File “calibre_plugins.k4mobidedrm.__init__”, line 89, in run
    ImportError: No module named PyQt4.Qt
    Added Theory of Bananas to db in: 1.9
    Added 3 books in 18.8 seconds
    Worker Launch took: 0.0578360557556

    • Remove the K4PC, K4Mac, Kindle Mobi and Topaz DeDRM plugin.

      Clearly something is going wrong with the key generation because of some problem with wine/python. You might be able to generate a key manually by running kindlekey.pyw under wine yourself. Then import the key file into the DeDRM preferences.

      Just dragging kindlekey.pyw onto calibre won’t do anything useful.
      The .mbpV2 file isn’t needed either.

      • Hmmm. . . when I run kindlekey.pyw from command prompt in wine:

        C:\Program Files (x86)\Amazon\Kindle>kindlekey.pyw

        : No such file or directoryon\Kindle>/usr/bin/env: python

        • What options are there for removing DRM without using wine? I agree, there must be something wrong with the interaction between Linux and Wine and I attempted to follow the instructions under the ReadMe_First.txt but the directions for using wine with Linux are a tad bid confusing for me: Do I ONLY need http://www.activestate.com/activepython/downloads Python AND PyCrypto from http://www.voidspace.org.uk/python/modules.shtml and if so, which specific files does somebody choose at http://www.voidspace.org.uk/python/modules.shtml and http://www.activestate.com/activepython/downloads.

          thanks for help.

          • Here is the latest traceback:

            DeDRM v6.4.3: Trying to decrypt C009CJO3LU_EBOK.azw
            Using Library AlfCrypto DLL/DYLIB/SO
            MobiDeDrm v0.41.
            Copyright © 2008-2012 The Dark Reverser et al.
            MOBI header version 8, header length 264
            Extra Data Flags: 3
            Decrypting Kindle Format 8 ebook: Theory of Bananas
            Found 0 keys to try after 0.0 seconds
            Crypto Type is: 2
            DeDRM v6.4.3: Failed to decrypt with error: No key found in 0 keys tried.
            DeDRM v6.4.3: Looking for new default Kindle Key after 0.0 seconds
            DeDRM v6.4.3: Running kindlekey.py under Wine
            DeDRM v6.4.3: Command line: “WINEPREFIX=”/home/bla/calibre-bin/calibre” wine python.exe “/home/bla/.config/calibre/plugins/DeDRM/libraryfiles/kindlekey.py” “/home/bla/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir””
            wine: cannot find L”C:\\windows\\system32\\python.exe”
            DeDRM v6.4.3: Found and decrypted 0 key files
            DeDRM v6.4.3: Ultimately failed to decrypt after 0.4 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 154, in _run_filetype_plugins
            File “calibre_plugins.dedrm.__init__”, line 604, in run
            File “calibre_plugins.dedrm.__init__”, line 554, in KindleMobiDecrypt
            DeDRMError: DeDRM v6.4.3: Ultimately failed to decrypt after 0.4 seconds

            • Installed the files as suggested with no problem in the install. Still receiving this error, following is a traceback:

              bla@linux:~/calibre-bin/calibre$ ./calibre
              Starting debug executable: /home/bla/calibre-bin/calibre/bin/calibre-debug
              bla@linux:~/calibre-bin/calibre$ ./calibre
              DeDRM v6.4.3: Trying to decrypt C009CJO3LU_EBOK.azw
              Using Library AlfCrypto DLL/DYLIB/SO
              MobiDeDrm v0.41.
              Copyright © 2008-2012 The Dark Reverser et al.
              MOBI header version 8, header length 264
              Extra Data Flags: 3
              Decrypting Kindle Format 8 ebook: Theory of bananas
              Found 0 keys to try after 0.0 seconds
              Crypto Type is: 2
              DeDRM v6.4.3: Failed to decrypt with error: No key found in 0 keys tried.
              DeDRM v6.4.3: Looking for new default Kindle Key after 0.0 seconds
              DeDRM v6.4.3: Running kindlekey.py under Wine
              DeDRM v6.4.3: Command line: “WINEPREFIX=”/home/bla/calibre-bin/calibre” wine python.exe “/home/bla/.config/calibre/plugins/DeDRM/libraryfiles/kindlekey.py” “/home/bla/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir””
              wine: cannot find L”C:\\windows\\system32\\python.exe”
              DeDRM v6.4.3: Found and decrypted 0 key files
              DeDRM v6.4.3: Ultimately failed to decrypt after 0.3 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 154, in _run_filetype_plugins
              File “calibre_plugins.dedrm.__init__”, line 604, in run
              File “calibre_plugins.dedrm.__init__”, line 554, in KindleMobiDecrypt
              DeDRMError: DeDRM v6.4.3: Ultimately failed to decrypt after 0.3 seconds

              So, seeing that there is no end to errors with wine in conjunction with Linux, is there a linux-only method for decrypting? If not, what do you think is the problem here? Thanks in advance.

              • For what it’s worth, Python.exe IS located in: /home/.wine/drive_c/Python27 but when I input that path into calibre’s “customize plugin” | kindle for Mac/PC books | WINEPREFIX get message “the default encryption key for Mac/PC could not be found”

                • SUCCESS! Ran wine python.exe /home/bla/.config/calibre/plugins/DeDRM/libraryfiles/kindlekey.py

                  which output and *.k4i file in /home/bla/.config/calibre/plugins/DeDRM/libraryfiles

                  which I then imported into calibre using the customize plugin button in calibre

  4. I’m trying to convert a Kindle book downloaded to my Mac (OS X 10.11.4). Typically I use Calibre but it’s been giving me the DRM error so I’ve also tried the standalone application and that fails as well. One thing I’ve noticed is that when I ran the Kindle app to download my latest purchase, it asked me to re-login with my credentials and now most of my previously downloaded books in the Kindle app won’t open. It’s telling me to remove the book and redownload it. So I’m guessing there’s a new key. Here’s the latest log:

    shellcommand: /usr/bin/python ‘/Users/jon/Documents/DeDRM_tools_6.4.3/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/adobekey.py’ ‘/Users/jon/Library/Preferences/com.apprenticealf.dedrm/Local Adept Key.der’ > ‘/Users/jon/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
    shellresult: adobekey.py v6.0
    Copyright © 2009-2013 i♥cabbages and Apprentice Alf
    Traceback (most recent call last):
    File “/Users/jon/Documents/DeDRM_tools_6.4.3/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/adobekey.py”, line 602, in
    sys.exit(cli_main())
    File “/Users/jon/Documents/DeDRM_tools_6.4.3/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/adobekey.py”, line 525, in cli_main
    keys = adeptkeys()
    File “/Users/jon/Documents/DeDRM_tools_6.4.3/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/adobekey.py”, line 446, in adeptkeys
    raise ADEPTError(“Could not find ADE activation.dat file.”)
    __main__.ADEPTError: Could not find ADE activation.dat file.
    shellcommand: /usr/bin/python ‘/Users/jon/Documents/DeDRM_tools_6.4.3/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/kindlekey.py’ ‘/Users/jon/Library/Preferences/com.apprenticealf.dedrm/Local Kindle Key.k4i’ > ‘/Users/jon/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
    shellresult: kindlekey.py v2.2
    Copyright © 2010-2016 by some_updates, Apprentice Alf and Apprentice Harper
    Found k4Mac kinf2011 file: /Users/jon/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2011
    Couldn’t decrypt file.
    Could not retrieve Kindle for Mac/PC key.

    shellcommand: /usr/bin/python ‘/Users/jon/Documents/DeDRM_tools_6.4.3/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/ignoblekey.py’ ‘/Users/jon/Library/Preferences/com.apprenticealf.dedrm/Nook Study Key.b64’ > ‘/Users/jon/Library/Preferences/com.apprenticealf.dedrm/DeDRM_temp.log’
    shellresult: ignoblekey.py v1.1
    Copyright © 2015 Apprentice Alf
    No nook Study log files have been found.
    Could not retrieve nook Study key.

    • Unregister your current Kindle for Mac. delete and re-download it from the Amzon web site (not the Mac App store). Delete /Users/jon/Library/Containers/com.amazon.Kindle/. Delete any already-downloaded books.

      Now reinstall, re-register and download one book. See if that does the trick.

  5. I tried to remove DRM unsuccessfully, with the following :
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Users\User>calibredb add “C:\Users\User\Desktop\The Road To Ruin\The Road to
    Ruin how Tony Abbott-asin_B01C4LWF32-type_EBOK-v_0.azw3”
    Kindle and Mobipocket DeDRM v0.4.13: Trying to decrypt The Road to Ruin how Tony
    Abbott-asin_B01C4LWF32-type_EBOK-v_0.azw3.
    Using Library AlfCrypto DLL/DYLIB/SO
    Running file type plugin Kindle and Mobipocket DeDRM failed with traceback:
    Traceback (most recent call last):
    File “site-packages\calibre\customize\ui.py”, line 154, in _run_filetype_plugi
    ns
    File “calibre_plugins.k4mobidedrm.__init__”, line 116, in run
    File “calibre_plugins.k4mobidedrm.__init__”, line 249, in config
    File “site-packages\calibre\customize\zipplugin.py”, line 179, in load_module
    File “calibre_plugins.k4mobidedrm.config”, line 4, in
    ImportError: No module named PyQt4.Qt
    Backing up metadata
    Added book ids: 5
    Notifying calibre of the change

    Appreciate any help

    rhjames

  6. HI – first time user here. Hope I have done this correctly!

    *****

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Users\Catriona>calibre-debug -g
    calibre 2.56 [64bit] embedded-python: True is64bit: True
    Windows-7-6.1.7601-SP1 Windows (’64bit’, ‘WindowsPE’)
    (‘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 2.06 seconds with 0 books
    DeDRM v6.4.3: Trying to decrypt A Crown of Swords-asin_B002VCR08K-type_EBOK-v_0.
    azw
    Using Library AlfCrypto DLL/DYLIB/SO
    MobiDeDrm v0.41.
    Copyright © 2008-2012 The Dark Reverser et al.
    MOBI header version 6, header length 232
    Extra Data Flags: 2
    Decrypting Mobipocket 6 ebook: A Crown of Swords
    Found 0 keys to try after 0.1 seconds
    Crypto Type is: 2
    DeDRM v6.4.3: Failed to decrypt with error: No key found in 0 keys tried.
    DeDRM v6.4.3: Looking for new default Kindle Key after 0.1 seconds
    searching for kinfoFiles in C:\Users\Catriona\AppData\Local
    No K4PC kindle.info/kinf/kinf2011 files have been found.
    DeDRM v6.4.3: Ultimately failed to decrypt after 0.1 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 154, in _run_filetype_plugi
    ns
    File “calibre_plugins.dedrm.__init__”, line 604, in run
    File “calibre_plugins.dedrm.__init__”, line 554, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.4.3: Ultimately failed to decrypt after 0.1 seconds
    Added A Crown of Swords to db in: 0.2
    Added 1 books in 0.7 seconds

    • That’s not a book from Kindle for PC. The only other type of Kindle book the tools handle is books from E-Ink-based Kindles (e.g. Paperwhite), and for those you must enter the Kindle’s serial number in the plugin’s preferences.

      • Given the prevalence of Kindle E-ink devices, why aren’t there instructions for entering the serial number here?

        Don’t get me wrong, I can find them with Google, but it seems like that omission would probably lead to a lot of confusion.

      • My error – many thanks
        I have the first generation Kindle. I had copied the files to my pc and was working from there. Need to work out where I go from here then!

        • Just enter your Kindle’s serial number in the DeDRM customisation dialog. You can find your Kindle’s serial number in your account section of the Amazon web site.

  7. Hello. First time I’ve been unable to DeDRM one of my Kindle books under Windows 10. Here’s the output from debug mode (IDString and UserName stripped). Using latest version of Calibre and Kindle app and DeDRM. Thanks!
    ======================================
    calibre Debug log
    calibre 2.56 [64bit] embedded-python: True is64bit: True
    Windows-8-6.2.9200 Windows (’64bit’, ‘WindowsPE’)
    (‘Windows’, ‘8’, ‘6.2.9200’)
    Python 2.7.9
    Windows: (‘8’, ‘6.2.9200’, ”, ‘Multiprocessor Free’)
    Successfully initialized third party plugins: DeDRM
    Starting up…
    Started up in 121.86 seconds with 135 books
    DeDRM v6.4.3: Trying to decrypt B00E5CJ29Y_EBOK.azw
    Using Library AlfCrypto DLL/DYLIB/SO
    MobiDeDrm v0.41.
    Copyright © 2008-2012 The Dark Reverser et al.
    MOBI header version 8, header length 264
    Extra Data Flags: 3
    Decrypting Kindle Format 8 ebook: Contextual Anger Regulation Therapy for the Treatment of Clinical Anger: A Mindfulness and Acceptance-Based Behavioral Approach (Practical Clinical Guidebooks)
    Found 4 keys to try after 0.1 seconds
    Crypto Type is: 2
    DeDRM v6.4.3: Failed to decrypt with error: Cannot decode library or rented ebooks.
    DeDRM v6.4.3: Looking for new default Kindle Key after 0.1 seconds
    searching for kinfoFiles in C:\Users\Dan\AppData\Local
    Found K4PC 1.9+ kinf2011 file: C:\Users\Dan\AppData\Local\Amazon\Kindle\storage\.kinf2011
    Decrypted key file using IDString ‘##########’ and UserName ‘#####n’
    DeDRM v6.4.3: Found 1 new key
    MobiDeDrm v0.41.
    Copyright © 2008-2012 The Dark Reverser et al.
    MOBI header version 8, header length 264
    Extra Data Flags: 3
    Decrypting Kindle Format 8 ebook: Contextual Anger Regulation Therapy for the Treatment of Clinical Anger: A Mindfulness and Acceptance-Based Behavioral Approach (Practical Clinical Guidebooks)
    Found 4 keys to try after 0.1 seconds
    Crypto Type is: 2
    DeDRM v6.4.3: Ultimately failed to decrypt after 0.1 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 154, in _run_filetype_plugins
    File “calibre_plugins.dedrm.__init__”, line 604, in run
    File “calibre_plugins.dedrm.__init__”, line 554, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.4.3: Ultimately failed to decrypt after 0.1 seconds
    Added Contextual Anger Regulation Therapy for the Treatment of Clinical Anger: A Mindfulness and Acceptance-Based Behavioral Approach (Practical Clinical Guidebooks) to db in: 4.8
    Added 1 books in 6.3 seconds

  8. OK, trying to get Calibre up and running under Ubuntu 16.04 (I have previously successfully set up under 12.04. and 14.04, etc).
    Using latest tools, and hopefully all the correct versions — 32 bit wine (apt install wine-i386) and all the increasingly aging infrastructure. I have no idea what version of kindle pc is getting installed, my only choice is what’s offered at the link. I note some of the linux instructions are slightly dated: the ADE link only gives you 4.0 now, but if you go to https://appdb.winehq.org/objectManager.php?sClass=version&iId=15545 and scroll down a bit, there’s the correct exe file for download.

    Anyway, here’s the output from calibre-debug -g I fixed a few problems already but I’m stumped at this point. Note that if I go into Calibre’s Preferences/Advanced/Plugin/ and customize it, I can add keys with the green plus button, though it just says default keys?

    I have anonymized the following, except that the IDString IS ‘0’… and I’m thinking it shoudln’t be, but I’m not sure how to fix that one.

    cestmoi@retribution:~$ calibre-debug -g
    calibre 2.56 embedded-python: True is64bit: True
    Linux-4.4.0-22-generic-x86_64-with-debian-stretch-sid Linux (’64bit’, ‘ELF’)
    (‘Linux’, ‘4.4.0-22-generic’, ‘#39-Ubuntu SMP Thu May 5 16:53:32 UTC 2016’)
    Python 2.7.9
    Linux: (‘debian’, ‘stretch/sid’, ”)
    Successfully initialized third party plugins: DeDRM
    Starting up…
    Started up in 2.15 seconds with 6252 books
    DeDRM v6.4.3: Trying to decrypt B0143LAJ70_EBOK.azw
    Using Library AlfCrypto DLL/DYLIB/SO
    MobiDeDrm v0.41.
    Copyright © 2008-2012 The Dark Reverser et al.
    MOBI header version 8, header length 264
    Extra Data Flags: 3
    Decrypting Kindle Format 8 ebook: Art of Hogwash
    Found 4 keys to try after 0.0 seconds
    Crypto Type is: 2
    DeDRM v6.4.3: Failed to decrypt with error: No key found in 4 keys tried.
    DeDRM v6.4.3: Looking for new default Kindle Key after 0.0 seconds
    DeDRM v6.4.3: Running kindlekey.py under Wine
    DeDRM v6.4.3: Command line: “WINEPREFIX=”/home/cestmoi/.wine” wine python.exe “/home/cestmoi/.config/calibre/plugins/DeDRM/libraryfiles/kindlekey.py” “/home/cestmoi/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir””
    kindlekey.py v2.2
    Copyright ? 2010-2016 by some_updates, Apprentice Alf and Apprentice Harper
    searching for kinfoFiles in C:\users\cestmoi\Local Settings\Application Data
    Found K4PC 1.9+ kinf2011 file: C:\users\cestmoi\Local Settings\Application Data\Amazon\Kindle\storage\.kinf2011
    Decrypted key file using IDString ‘0’ and UserName ‘############’
    Saved a key to Z:\home\cestmoi\.config\calibre\plugins\DeDRM\libraryfiles\winekeysdir\kindlekey1.k4i
    DeDRM v6.4.3: Found and decrypted 1 key file
    DeDRM v6.4.3: 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 154, in _run_filetype_plugins
    File “calibre_plugins.dedrm.__init__”, line 604, in run
    File “calibre_plugins.dedrm.__init__”, line 554, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.4.3: Ultimately failed to decrypt after 0.2 seconds
    Added Art of Hogwash to db in: 2.5
    Added 1 books in 4.0 seconds

    • I think this is the problem:

      Decrypted key file using IDString ‘0’

      I seem to remember a long-ago problem where the disk ID of the wine ‘disk’ was set to zero, which upset something in the encryption/decryption process.

      And that’s as much as I know – but you sound like the sort of person who’ll be able to work out how to reset the disk id, and can then wipe and reinstall Kindle for PC. Or whatever else it needs to sort it out, given this hint.

      • I am adding my answer here for anyone else with the same problem I described above. Turns out I had to re-download the files, not just re-import them. So I renamed my old My\ Kindle\ Content directory to something else and then restarted Kindle and downloaded a test book. I removed the old import (that had failed to de-DRM) from Calibre, then imported its fresh download back into Calibre. This worked just fine.

  9. Calibre doesn’t decrypt ADE pdf

    :~$ calibre-debug -g
    calibre 2.54 embedded-python: False is64bit: True
    Linux-4.2.0-1-amd64-x86_64-with-Debian-testing-wheezy Linux (’64bit’, ‘ELF’)
    (‘Linux’, ‘4.2.0-1-amd64’, ‘#1 SMP Debian 4.2.6-3 (2015-12-06)’)
    Python 2.7.10
    Linux: (‘Debian’, ‘testing’, ‘wheezy’)
    Successfully initialized third party plugins: DeDRM && Obok DeDRM
    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
    Key u’A’ for shortcut Apri la cartella contenente is already used by Aggiungi libri, ignoring
    Started up in 3.00 seconds with 0 books
    DeDRM v6.4.3: Trying to decrypt Clinical_Diagnostic_Tests_0002.pdf
    DeDRM v6.4.3: Clinical_Diagnostic_Tests_0002.pdf is a PDF ebook
    DeDRM v6.4.3: Looking for new default Adobe Digital Editions Keys after 0.1 seconds
    DeDRM v6.4.3: Running adobekey.py under Wine
    DeDRM v6.4.3: Command line: “WINEPREFIX=”/home/bla” wine python.exe “/home/bla/.config/calibre/plugins/DeDRM/libraryfiles/adobekey.py” “/home/bla/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir””
    Executing wine (wineserver64) 1.8.1 on Debian stretch/sid (amd64).
    If something goes wrong, please rerun with “WINEDEBUG=err+all wine”
    for more detailed debugging output.
    wine: cannot find L”C:\\windows\\system32\\python.exe”
    DeDRM v6.4.3: Found and decrypted 0 key files
    DeDRM v6.4.3: Exception when getting default Adobe Key after 0.3 seconds
    Traceback (most recent call last):
    File “calibre_plugins.dedrm.__init__”, line 439, in PDFDecrypt
    IndexError: list index out of range
    DeDRM v6.4.3: Ultimately failed to decrypt after 0.3 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 “/usr/lib/calibre/calibre/customize/ui.py”, line 154, in _run_filetype_plugins
    nfp = plugin.run(path_to_file)
    File “calibre_plugins.dedrm.__init__”, line 611, in run
    File “calibre_plugins.dedrm.__init__”, line 486, in PDFDecrypt
    DeDRMError: DeDRM v6.4.3: Ultimately failed to decrypt after 0.3 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/lib/calibre/calibre/customize/ui.py”, line 376, in get_file_type_metadata
    mi = plugin.get_metadata(stream, ftype.lower().strip())
    File “/usr/lib/calibre/calibre/customize/builtins.py”, line 323, in get_metadata
    return get_metadata(stream)
    File “/usr/lib/calibre/calibre/ebooks/metadata/pdf.py”, line 99, in get_metadata
    raise ValueError(‘Could not read info dict from PDF’)
    ValueError: Could not read info dict from PDF
    Added Clinical Diagnostic Tests 0002 to db in: 2.3
    QXcbWindow: Unhandled client message: “_GTK_LOAD_ICONTHEMES”
    QXcbWindow: Unhandled client message: “_GTK_LOAD_ICONTHEMES”
    QXcbWindow: Unhandled client message: “_GTK_LOAD_ICONTHEMES”
    QXcbWindow: Unhandled client message: “_GTK_LOAD_ICONTHEMES”
    QXcbWindow: Unhandled client message: “_GTK_LOAD_ICONTHEMES”
    QXcbWindow: Unhandled client message: “_GTK_LOAD_ICONTHEMES”
    QXcbWindow: Unhandled client message: “_GTK_LOAD_ICONTHEMES”
    QXcbWindow: Unhandled client message: “_GTK_LOAD_ICONTHEMES”
    QXcbWindow: Unhandled client message: “_GTK_LOAD_ICONTHEMES”
    Added 1 books in 3.8 seconds
    QXcbWindow: Unhandled client message: “_GTK_LOAD_ICONTHEMES”
    QXcbWindow: Unhandled client message: “_GTK_LOAD_ICONTHEMES”

      • There’s some odd interaction with wine and python. If you can run the python scripts manually, just run adobekey.py, and then import the generated key file into the DeDRM plugin’s preferences in calibre.

  10. Hello,

    Running DeDRM Tools 6.4.3 on Calibre 2.56.0, trying to open a PDF that correctly opens on Adobe Digital Editions 4.5, Windows 10.

    Log file:
    calibre Debug log
    calibre 2.56 embedded-python: True is64bit: False
    Windows-8-6.2.9200 Windows (’32bit’, ‘WindowsPE’)
    32bit process running on 64bit windows
    (‘Windows’, ‘8’, ‘6.2.9200’)
    Python 2.7.9
    Windows: (‘8’, ‘6.2.9200’, ”, ‘Multiprocessor Free’)
    Successfully initialized third party plugins: DeDRM
    Starting up…
    Started up in 4.91 seconds with 1 books
    DeDRM v6.4.3: Trying to decrypt Algoritmos Genéticos 3a Edição.pdf
    DeDRM v6.4.3: Algoritmos Genéticos 3a Edição.pdf is a PDF ebook
    DeDRM v6.4.3: Looking for new default Adobe Digital Editions Keys after 0.4 seconds
    Found 1 keys
    DeDRM v6.4.3: Trying a new default key
    Error serializing pdf Algoritmos Genéticos 3a Edição.pdf. Probably wrong key.
    DeDRM v6.4.3: Failed to decrypt with new default key after 0.5 seconds
    DeDRM v6.4.3: Ultimately failed to decrypt after 0.5 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 154, in _run_filetype_plugins
    File “calibre_plugins.dedrm.__init__”, line 611, in run
    File “calibre_plugins.dedrm.__init__”, line 486, in PDFDecrypt
    DeDRMError: DeDRM v6.4.3: 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 “site-packages\calibre\customize\ui.py”, line 376, in get_file_type_metadata
    File “site-packages\calibre\customize\builtins.py”, line 323, in get_metadata
    File “site-packages\calibre\ebooks\metadata\pdf.py”, line 99, in get_metadata
    ValueError: Could not read info dict from PDF
    Added Algoritmos Genéticos 3a Edição to db in: 2.0
    Added 1 books in 4.4 seconds
    Exception TypeError: “‘NoneType’ object is not callable” in <bound method NativeFunction.__del__ of > ignored

    Also I don’t know if it’s right, but inside Calibre on “Customize Plugin”, “Adobe Digital Editions ebooks” option, there isn’t any key displayed.

    Thanks in advance,

      • Hello,

        Thanks for the reply.

        Yes, ADE is registered with an Adobe ID. I’ve tried with the ADE 2.01, but it doesn’t work.

        If I try to open directly from the bookshelf, I get a message: “An Error Has Been Detected – Activation Server error – code : E_ADEPT_INTERNAL – Digital Editions encountered an error on the activation server. – To retry, click the Try Again button.”

        If I try to delete from bookshelf and add again from .acsm, I get a message: “Error! Check Activation.”

        In Help > Authorization Information, I have: “This computer can read Adobe DRM protected content authorized to the following account(s): “myemail@myemail.com | AdobeID (urn:uuid:myadobeuuid)”

        So, any luck? I’ve trying add the .acsm again to 4.5 and it worked fine, but no luck with 2.01.

        • Sounds like you probably have the newer DRM that hasn’t been figured out yet. And the tools can’t remove it. In the future, stick with ADE 2.0.1.

        • As Laura says, it sounds like your book is from a bookstore that has enabled the new Adobe encryption. Which book store was it? You can’t do anything about this book, but for future books from this bookstore, you might be able to remove DRM by opening the .acsm file with ADE 2.01 FIRST. But if the bookstore is REQUIRING the new encryption, even that won’t help.

  11. DRM failed on PDF import

    debug info is:

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Users\X220>calibre-debug -g
    calibre 2.22 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 1.75 seconds with 38 books
    DeDRM v6.4.3: Trying to decrypt The Thinking Persons Guide To Climate Change.pdf

    DeDRM v6.4.3: The Thinking Persons Guide To Climate Change.pdf is a PDF ebook
    DeDRM v6.4.3: Looking for new default Adobe Digital Editions Keys after 0.1 seco
    nds
    Found 1 keys
    DeDRM v6.4.3: Trying a new default key
    Error serializing pdf The Thinking Persons Guide To Climate Change.pdf. Probably
    wrong key.
    DeDRM v6.4.3: Failed to decrypt with new default key after 0.2 seconds
    DeDRM v6.4.3: 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 155, in _run_filetype_plugi
    ns
    File “calibre_plugins.dedrm.__init__”, line 611, in run
    File “calibre_plugins.dedrm.__init__”, line 486, in PDFDecrypt
    DeDRMError: DeDRM v6.4.3: Ultimately failed to decrypt after 0.2 seconds.
    Syntax Error: Couldn’t find the ‘EBX_HANDLER’ security handler
    pdfinfo errored out with return code: 1
    Traceback (most recent call last):
    File “site-packages\calibre\customize\ui.py”, line 349, in get_file_type_metad
    ata
    File “site-packages\calibre\customize\builtins.py”, line 326, in get_metadata
    File “site-packages\calibre\ebooks\metadata\pdf.py”, line 101, in get_metadata

    ValueError: Could not read info dict from PDF
    Added The Thinking Persons Guide To Climate Change to db in: 0.3
    Added 1 books in 1.6 seconds
    Exception TypeError: “‘NoneType’ object is not callable” in <bound method Native
    Function.__del__ of > ignored

  12. I can’t even get the plugin installed. I followed the ReadMe instructions but get the floowing error:

    calibre, version 2.56.0
    ERROR: Unhandled exception: InvalidPlugin:The plugin in u’C:/Users/ayacullo/Downloads/DeDRM_tools_6.4.3.zip’ is invalid. It does not contain a top-level __init__.py file

    calibre 2.56 [64bit] embedded-python: True is64bit: True
    Windows-8-6.2.9200 Windows (’64bit’, ‘WindowsPE’)
    (‘Windows’, ‘8’, ‘6.2.9200’)
    Python 2.7.9
    Windows: (‘8’, ‘6.2.9200’, ”, ‘Multiprocessor Free’)
    Traceback (most recent call last):
    File “site-packages\calibre\gui2\preferences\plugins.py”, line 316, in add_plugin
    File “site-packages\calibre\customize\ui.py”, line 415, in add_plugin
    File “site-packages\calibre\customize\ui.py”, line 55, in load_plugin
    File “site-packages\calibre\customize\zipplugin.py”, line 188, in load
    File “site-packages\calibre\customize\zipplugin.py”, line 286, in _locate_code
    InvalidPlugin: The plugin in u’C:/Users/ayacullo/Downloads/DeDRM_tools_6.4.3.zip’ is invalid. It does not contain a top-level __init__.py file

    I’m using a PC with Windows 10. What am I doing wrong?

  13. Hi I have problem when I tried to import ebooks form my kindle to calibri.
    After imprt finish and I checking if can open book with the viewr it look like drm is not removed and the log :

    C:\Users\lapet>calibre-debug -g
    calibre 2.57.1 [64bit] embedded-python: True is64bit: True
    Windows-8-6.2.9200 Windows (’64bit’, ‘WindowsPE’)
    (‘Windows’, ‘8’, ‘6.2.9200’)
    Python 2.7.9
    Windows: (‘8’, ‘6.2.9200’, ”, ‘Multiprocessor Free’)
    Qt: Untested Windows version 10.0 detected!
    Successfully initialized third party plugins: DeDRM
    Starting up…
    Started up in 2.74 seconds with 86 books
    Storage number map:
    {(7L, 0L): [(1L, ‘C’)],
    (7L, 1L): [(1L, ‘D’), (2L, ‘E’)],
    (7L, 2L): [(1L, ‘G’)]}
    Storage number for USBSTOR\DISK&VEN_KINDLE&PROD_INTERNAL_STORAGE&REV_0100\B0D42201350609A8&0: StorageDeviceNumber(type=7L, number=2L, partition_number=0L)
    Drive letters for USBDevice(vendor_id=0x1949 product_id=0x4 bcd=0x100 devid=usb\vid_1949&pid_0004&rev_0100 devinst=13)
    {u’drive_letters’: [‘G’],
    u’pnp_id_map’: {‘G’: u’\\\\?\\usbstor#disk&ven_kindle&prod_internal_storage&rev_0100#b0d42201350609a8&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}’},
    u’readonly_drives’: set([]),
    u’sort_map’: {‘G’: (2L, 1L)}}
    Job: 1 Get device information started
    DeviceJob: 1 Get device information done, calling callback
    DeviceJob: 1 Get device information callback returned
    Job: 2 Set library information started
    DeviceJob: 2 Set library information done, calling callback
    DeviceJob: 2 Set library information callback returned
    Job: 3 Get list of books on device started
    DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= None
    DEBUG: 0.0 USBMS: dirs are: G:\ documents
    DEBUG: 0.3 USBMS: scan from root False G:\documents
    Job: 2 Set library information finished
    No details available.
    Job: 1 Get device information finished
    No details available.
    DEBUG: 1.6 USBMS: count found in cache: 92, count of files in metadata: 92, need_sync: False
    DEBUG: 1.6 USBMS: Finished fetching list of books from device. oncard= None
    DEBUG: 1.6 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= carda
    DEBUG: 1.6 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= cardb
    DeviceJob: 3 Get list of books on device done, calling callback
    DeviceJob: metadata_downloaded: Starting set_books_in_library
    DeviceJob: set_books_in_library: books to process= 92
    Job: 3 Get list of books on device finished
    No details available.
    DeviceJob: set_books_in_library finished: time= 0.0090000629425
    DeviceJob: metadata_downloaded: updating views
    DeviceJob: metadata_downloaded: syncing
    DeviceJob: metadata_downloaded: refreshing ondevice
    DeviceJob: metadata_downloaded: sending metadata_available signal
    DeviceJob: 3 Get list of books on device callback returned
    Job: 3 Get list of books on device finished
    No details available.
    Job: 4 Delete books from device started
    DEBUG: 41.8 USBMS: deleting 1 books
    DEBUG: 41.9 USBMS: finished deleting 1 books
    DeviceJob: 4 Delete books from device done, calling callback
    DEBUG: 41.9 USBMS: removing metadata for 1 books
    DEBUG: 41.9 USBMS: finished removing metadata for 1 books
    DeviceJob: set_books_in_library: books to process= 91
    DeviceJob: set_books_in_library finished: time= 0.0920000076294
    DeviceJob: 4 Delete books from device callback returned
    Job: 5 Send metadata to device started
    DEBUG: 42.1 USBMS: starting sync_booklists
    DEBUG: 42.3 USBMS: finished sync_booklists
    DeviceJob: 5 Send metadata to device done, calling callback
    DeviceJob: 5 Send metadata to device callback returned
    Job: 4 Delete books from device finished
    No details available.
    Job: 5 Send metadata to device finished
    No details available.
    DeDRM v6.4.3: Trying to decrypt BPMN Method and Style, Second Edition, with BPMN Implementer’s Guide_B0076R7Y8Q.azw
    Using Library AlfCrypto DLL/DYLIB/SO
    MobiDeDrm v0.41.
    Copyright �� 2008-2012 The Dark Reverser et al.
    MOBI header version 7, header length 232
    Extra Data Flags: 3
    Decrypting Mobipocket 7 ebook: BPMN Method and Style, Second Edition, with BPMN Implementer’s Guide
    Found 0 keys to try after 0.4 seconds
    Crypto Type is: 2
    DeDRM v6.4.3: Failed to decrypt with error: No key found in 0 keys tried.
    DeDRM v6.4.3: Looking for new default Kindle Key after 0.4 seconds
    searching for kinfoFiles in C:\Users\lapet\AppData\Local
    Found K4PC 1.9+ kinf2011 file: C:\Users\lapet\AppData\Local\Amazon\Kindle\storage\.kinf2011
    Decrypted key file using IDString ‘1016002193’ and UserName ‘6c61706574’
    DeDRM v6.4.3: Found 1 new key
    MobiDeDrm v0.41.
    Copyright �� 2008-2012 The Dark Reverser et al.
    MOBI header version 7, header length 232
    Extra Data Flags: 3
    Decrypting Mobipocket 7 ebook: BPMN Method and Style, Second Edition, with BPMN Implementer’s Guide
    Found 4 keys to try after 0.5 seconds
    Crypto Type is: 2
    DeDRM v6.4.3: Ultimately failed to decrypt after 0.5 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 154, in _run_filetype_plugins
    File “calibre_plugins.dedrm.__init__”, line 604, in run
    File “calibre_plugins.dedrm.__init__”, line 554, in KindleMobiDecrypt
    DeDRMError: DeDRM v6.4.3: Ultimately failed to decrypt after 0.5 seconds
    Added 1 books in 1.2 seconds
    Job: 6 Upload 1 books to device:BPMN Method and Style, Second Edition, with BPMN Implementer’s Guide started
    Device using plugboard azw KINDLE2 None
    Setting metadata in: BPMN Method and Style, Second Edition, with BPMN Implementer’s Guide at: G:\documents\BPMN Method and Style, Second Edition, with BPMN Implementer’s Guide_B0076R7Y8Q.azw
    DEBUG: 58.7 USBMS: uploading 1 books
    APNX META: guid: cd9236bd
    APNX META: ASIN: B0076R7Y8Q
    APNX META: CDE: EBOK
    APNX META: format: MOBI_7
    APNX META: Name: CR_TF0EH68SWX7NN489C7X0XFAPMZ86
    APNX Content Header: {“contentGuid”:”cd9236bd”,”asin”:”B0076R7Y8Q”,”cdeType”:”EBOK”,”fileRevisionId”:”1″}
    DEBUG: 61.9 USBMS: finished uploading 1 books
    DeviceJob: 6 Upload 1 books to device:BPMN Method and Style, Second Edition, with BPMN Implementer’s Guide done, calling callback
    DEBUG: 61.9 USBMS: adding metadata for 1 books
    DEBUG: 61.9 USBMS: finished adding metadata
    DeviceJob: set_books_in_library: books to process= 92
    DeviceJob: set_books_in_library finished: time= 0.00399994850159
    DeviceJob: 6 Upload 1 books to device:BPMN Method and Style, Second Edition, with BPMN Implementer’s Guide callback returned
    Job: 7 Send metadata to device started
    DEBUG: 62.0 USBMS: starting sync_booklists
    DEBUG: 62.1 USBMS: finished sync_booklists
    DeviceJob: 7 Send metadata to device done, calling callback
    DeviceJob: 7 Send metadata to device callback returned
    Job: 6 Upload 1 books to device:BPMN Method and Style, Second Edition, with BPMN Implementer’s Guide finished
    No details available.
    Job: 7 Send metadata to device finished
    No details available.

    • If it’s an e-ink kindle, then you need to add the serial number to the plugin customization. Otherwise, download the book with Kindle for PC and import that copy.

  14. I imported the book with no problem, but I cannot convert it. I could do this last week, but I downloaded the latest version of calibre

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Users\Bill>calibre-debug -g
    calibre 2.57.1 [64bit] embedded-python: True is64bit: True
    Windows-7-6.1.7601-SP1 Windows (’64bit’, ‘WindowsPE’)
    (‘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 2.50 seconds with 1 books
    Storage number map:
    {(7L, 0L): [(2L, ‘C’)],
    (7L, 1L): [(1L, ‘E’)],
    (7L, 2L): [(1L, ‘G’)],
    (7L, 3L): [(1L, ‘I’)]}
    Storage number for USBSTOR\DISK&VEN_KINDLE&PROD_INTERNAL_STORAGE&REV_0100\B02416
    0430930XLP&0: StorageDeviceNumber(type=7L, number=3L, partition_number=0L)
    Drive letters for USBDevice(vendor_id=0x1949 product_id=0x4 bcd=0x100 devid=usb\
    vid_1949&pid_0004&rev_0100 devinst=3388)
    {u’drive_letters’: [‘I’],
    u’pnp_id_map’: {‘I’: u’\\\\?\\usbstor#disk&ven_kindle&prod_internal_storage&rev
    _0100#b024160430930xlp&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}’},
    u’readonly_drives’: set([]),
    u’sort_map’: {‘I’: (3L, 1L)}}
    Added StartActions.data.B003WUYOQ6 to db in: 0.2
    Job: 1 Get device information started
    DeviceJob: 1 Get device information done, calling callback
    Added LanguageLayer.en.B003WUYOQ6 to db in: 0.2
    Job: 1 Get device information finished
    No details available.
    DeviceJob: 1 Get device information callback returned
    Job: 2 Set library information started
    DeviceJob: 2 Set library information done, calling callback
    Added EndActions.data.B003WUYOQ6 to db in: 0.2
    Job: 1 Get device information finished
    No details available.
    Job: 2 Set library information finished
    No details available.
    DeviceJob: 2 Set library information callback returned
    Job: 3 Get list of books on device started
    DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard=
    None
    DEBUG: 0.0 USBMS: dirs are: I:\ documents
    Added Why We Get Fat And What to Do About It B003WUYOQ6 to db in: 0.2
    DEBUG: 0.5 USBMS: scan from root False I:\documents
    Added B003WUYOQ6 to db in: 0.3
    Added AuthorProfile.profile.B003WUYOQ6 to db in: 0.3
    Job: 2 Set library information finished
    No details available.
    Added AssetDownloadMetadata to db in: 0.3
    Added XRAY.entities.B003WUYOQ6 to db in: 0.3
    Added Why We Get Fat And What to Do About It B003WUYOQ6787bf0c5b8ba1df19af97b4e6
    f8e7447 to db in: 0.3
    DEBUG: 6.3 USBMS: count found in cache: 276, count of files in metadata: 276,
    need_sync: False
    DEBUG: 6.3 USBMS: Finished fetching list of books from device. oncard= None
    DEBUG: 6.3 USBMS: Fetching list of books from device. Device= KINDLE2 oncard=
    carda
    DEBUG: 6.3 USBMS: Fetching list of books from device. Device= KINDLE2 oncard=
    cardb
    DeviceJob: 3 Get list of books on device done, calling callback
    DeviceJob: metadata_downloaded: Starting set_books_in_library
    DeviceJob: set_books_in_library: books to process= 276
    DeviceJob: set_books_in_library finished: time= 0.0090000629425
    DeviceJob: metadata_downloaded: updating views
    DeviceJob: metadata_downloaded: syncing
    DeviceJob: metadata_downloaded: refreshing ondevice
    DeviceJob: metadata_downloaded: sending metadata_available signal
    DeviceJob: 3 Get list of books on device callback returned
    Job: 3 Get list of books on device finished
    No details available.
    Added 9 books in 11.4 seconds

    C:\Users\Bill>^A

    I get an error that says:” could not convert 1 of 1 books, because not supported formats were found. I copied everything in the directory under the kindle book title.

  15. I deleted the book in Caliber. Stopped it then restarted in debug.

    Here you go.

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Users\Bill>calibre-debug -g
    calibre 2.57.1 [64bit] embedded-python: True is64bit: True
    Windows-7-6.1.7601-SP1 Windows (’64bit’, ‘WindowsPE’)
    (‘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 2.49 seconds with 1 books
    Storage number map:
    {(7L, 0L): [(2L, ‘C’)],
    (7L, 1L): [(1L, ‘E’)],
    (7L, 2L): [(1L, ‘G’)],
    (7L, 3L): [(1L, ‘I’)]}
    Storage number for USBSTOR\DISK&VEN_KINDLE&PROD_INTERNAL_STORAGE&REV_0100\B02416
    0430930XLP&0: StorageDeviceNumber(type=7L, number=3L, partition_number=0L)
    Drive letters for USBDevice(vendor_id=0x1949 product_id=0x4 bcd=0x100 devid=usb\
    vid_1949&pid_0004&rev_0100 devinst=3388)
    {u’drive_letters’: [‘I’],
    u’pnp_id_map’: {‘I’: u’\\\\?\\usbstor#disk&ven_kindle&prod_internal_storage&rev
    _0100#b024160430930xlp&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}’},
    u’readonly_drives’: set([]),
    u’sort_map’: {‘I’: (3L, 1L)}}
    Job: 1 Get device information started
    DeviceJob: 1 Get device information done, calling callback
    DeviceJob: 1 Get device information callback returned
    Job: 2 Set library information started
    DeviceJob: 2 Set library information done, calling callback
    DeviceJob: 2 Set library information callback returned
    Job: 3 Get list of books on device started
    DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard=
    None
    DEBUG: 0.0 USBMS: dirs are: I:\ documents
    DEBUG: 0.6 USBMS: scan from root False I:\documents
    Job: 1 Get device information finished
    No details available.
    Job: 2 Set library information finished
    No details available.
    DEBUG: 6.6 USBMS: count found in cache: 276, count of files in metadata: 276,
    need_sync: False
    DEBUG: 6.6 USBMS: Finished fetching list of books from device. oncard= None
    DEBUG: 6.6 USBMS: Fetching list of books from device. Device= KINDLE2 oncard=
    carda
    DEBUG: 6.6 USBMS: Fetching list of books from device. Device= KINDLE2 oncard=
    cardb
    DeviceJob: 3 Get list of books on device done, calling callback
    DeviceJob: metadata_downloaded: Starting set_books_in_library
    DeviceJob: set_books_in_library: books to process= 276
    DeviceJob: set_books_in_library finished: time= 0.00599980354309
    DeviceJob: metadata_downloaded: updating views
    DeviceJob: metadata_downloaded: syncing
    DeviceJob: metadata_downloaded: refreshing ondevice
    DeviceJob: metadata_downloaded: sending metadata_available signal
    DeviceJob: 3 Get list of books on device callback returned
    Job: 3 Get list of books on device finished
    No details available.
    Added Why We Get Fat And What to Do About It B003WUYOQ6 to db in: 0.3
    Added StartActions.data.B003WUYOQ6 to db in: 0.2
    Added LanguageLayer.en.B003WUYOQ6 to db in: 0.2
    Added EndActions.data.B003WUYOQ6 to db in: 0.2
    Added B003WUYOQ6 to db in: 0.2
    Added AuthorProfile.profile.B003WUYOQ6 to db in: 0.2
    Added AssetDownloadMetadata to db in: 0.2
    Added XRAY.entities.B003WUYOQ6 to db in: 0.2
    Added Why We Get Fat And What to Do About It B003WUYOQ6787bf0c5b8ba1df19af97b4e6
    f8e7447 to db in: 0.2
    Added 9 books in 28.6 seconds

    • Ah – perhaps I know. I think that book is probably using the new KFX format. Neither the plugin nor calibre can handle that. Go to the Amazon web site, and from the ‘Manage Content’ page, download the book ‘for transfer via USB’ to your Kindle. That will get you a .azw3 file, and you can import that into calibre.

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