Thursday, 12 September 2024

How to View Kindle .azw3 files in Calibre in Ubuntu 22.04

These are the instructions I had to follow to view and convert/back up the DRM protected ebook files stored on my Kindle in Ubuntu. They are mostly taken from the Readme files of the DeDRM Calibre plugin project.

 

First, I plugged in my Kindle with a USB cord, and copied the .azw3 format files I wanted to back up over to my local laptop, which is running Ubuntu 22.04.

I am using Calibre v.5.37.
You will need the plugin 'Apprentice Alf's DRM Removal Tool for Ebooks'.
The latest version is available for download from GitHub:
https://github.com/apprenticeharper/DeDRM_tools/releases

Download the 'DeDRM_tools_[version_here].zip' file.
Extract the contents (unzip).
Inside will be a plugin 'DeDRM_plugin.zip' file.

On the command line, install a pip package for Calibre that is probably missing by default:
sudo apt install python3-pip;
pip install pycryptodome


Open calibre's Preferences dialog.  
Click on the Advanced > "Plugins" icon.  
Next, click on the button, "Load plugin from file".  
Navigate to the unzipped DeDRM_tools folder, find the file "DeDRM_plugin.zip".  
Click to select the file and select "Open".  
Click "Yes" in the "Are you sure?" dialog box.
Click the "OK" button in the "Success" dialog box.

You must enter your Kindle's serial number in the customisation dialog.

To find it on your Kindle, go to Settings, look up the Device Info section.
You should see the 'Serial Number' there you need.

In Calibre, you should see the 'DeDRM' plugin showing up in the plugins list under the File type section.
Click on it, click on Customize plugin.
Click on 'eInk Kindle ebooks'
Click the + button and enter your Kindle serial number
Click OK, Apply.

Restart Calibre.

Once installed and configured, you can simply add a DRM book to Calibre and a DRM-free version will be imported into the Calibre database.
Note that DRM removal only occurs on IMPORT not on CONVERSION or at any other time.
If you have already imported DRMed books you'll need to remove the books from Calibre and re-import them.