HopHop

Remove DRM from Kindle Ebooks on Linux

calibre dedrm epub kindle linux ebook drm tutorial

How to retrieve your Kindle ebooks and convert them to EPUB on Linux, without Windows or a Kindle e-reader? After quite a bit of struggle, here's the method that works in 2026.

The Problem

Some time ago, I realized I owned dozens of Kindle books purchased conveniently on Amazon. I was reading them on my phone via the Android app, but having acquired a new e-reader (non-Kindle), I naturally wanted to retrieve these books and convert them to EPUB so I could enjoy them on any device.

My constraints were as follows:

  • I work exclusively on Linux (no Windows)
  • I don't own a Kindle e-reader

The Old Method (No Longer Works)

Previously, I would strip DRM using Calibre and the noDRM fork of the DeDRM plugin. On Linux, you had to use Wine and install an old version of the Kindle application (1.17 if I remember correctly).

Bad news: when I tried again recently, I discovered to my horror that this old version no longer worked. It displayed a message saying the computer wasn't connected to the Internet. After some research, I understood that Amazon had decommissioned the old APIs used by this version.

I tried to get newer versions of the Kindle app working under Wine, but without success. They all crash with the following error:

0024:err:module:loader_init "KRFDynamic.dll" failed to initialize, aborting

After several hours of trial and error, I finally found a viable solution. I struggled so much that I decided an article was in order!

The Solution: Android Emulation

The method consists of:

  1. Installing an Android emulator (Genymotion)
  2. Configuring a custom Android 11 image
  3. Installing an ARM emulation module for the Kindle app
  4. Installing a specific version of the Kindle Android app
  5. Downloading all books in the app
  6. Retrieving KFX files via ADB
  7. Extracting the Kindle app configuration
  8. Importing this configuration into Calibre's DeDRM plugin
  9. Removing DRM from all books!

Step 1: Installing Genymotion and Android 11

I used Genymotion as an emulator. It requires creating an account, but offers several advantages:

  • Available in most Linux repositories
  • Intuitive and easy-to-use interface
  • All images are rooted with simple ADB access

Once Genymotion is installed, create a Custom Phone with Android 11.

Step 2: Installing ARM Support (libhoudini)

At this point, it's impossible to install the Amazon Kindle app because it requires ARM architecture. To work around this problem, you need to install libhoudini by following the instructions in this repository:

👉 https://github.com/niizam/Genymotion_A11_libhoudini

The installation is done via a simple ADB command and goes smoothly.

Step 3: Installing the Kindle App

Important: Don't install the latest version of the Kindle app! Recent versions store encryption keys in an encrypted file that I couldn't decrypt.

I used version 8.39 from 2022. The APK file kindle-8-39-0-100-1-3-237316-0.apk is available on Uptodown.

To install it, simply drag and drop the APK file onto the emulator window. Installation happens automatically.

Once the app is installed, log in to your Amazon account and download all your books one by one.

Step 4: Retrieving Files via ADB

Make sure ADB is installed on your system, then launch Genymotion with the Android 11 image.

Run the following commands in a terminal:

# Retrieve books
adb pull /storage/self/primary/Android/data/com.amazon.kindle .

# Retrieve the key database
adb shell "su -c 'cat /data/data/com.amazon.kindle/databases/map_data_storage.db'" > map_data_storage.db

Step 5: Configuring the DeDRM Plugin in Calibre

After installing the DeDRM plugin and enabling the From KFX plugin:

  1. Launch Calibre
  2. Go to Preferences → Plugins
  3. Find DeDRM → Customize plugin
  4. Click on Kindle for Android ebooks
  5. Click the + button
  6. Add the map_data_storage.db file retrieved earlier
  7. Save the changes

Step 6: Importing Books into Calibre

  1. Click the arrow next to Add books
  2. Choose Add from folders and sub-folders
  3. Select the folder where you ran adb pull (it contains the KFX files)

If everything goes well, all your books are now imported into Calibre, DRM-free! All that's left is to convert them to EPUB if needed.


Conclusion

This method requires some preparation, but it works perfectly on Linux without needing Windows or a physical Kindle device.

Hoping this helps someone in the same situation!

Legal note: This article is intended for personal use with books you have legitimately purchased. Circumventing DRM may be illegal in some jurisdictions.


This article was automatically translated from French. Sorry if it feels a bit off in places.

Next Post