Adobe Digital Editions, Linux, and DRMs: Updated again
The most popular posts on that blog are, by far, those in which I gave detailed instruction on how to remove DRMs from Adobe Digital Editions Books, the first one in 2011 and the second in 2019.
I still own the same PocketBook Touch Lux 3 as in 2019, and the setup I described in 2019 is still working. However, the machine on which it works is aging, and having read Terence Eden's blog post, I was eager to try Grégory Soutadé's libgourou library which promises to convert .acsm files into .epub files without using ADE or wine, on the laptop I'm currently using the most.
And I'm glad to report that: it works!
So here are the details:
Installing libgourou
I first tried to use the AppImage, but couldn't figure it out and ended up old-school downloading the most recent tar.gz
from the libgourou repository, which in my case was the 0.8.7 version.
In the desired repository
tar zxvf libgourou-v0.8.7.tar.gz # adapt to the version you've downloaded cd libgourou
Then I compiled using make
, which meant wading through a few error messages to figure out I needed to install missing libraries with
sudo aptitude install libpugixml-dev libssl-dev libcurl4-openssl-dev libzip-dev
(The README is pretty explicit on which external libraries are needed, so this did not come as a huge surprise.)
Then
make PREFIX=<desired location>
Following directions, I then added my chosen path to LD_LIBRARY_PATH
with
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<same desired location>
Now it's time to active your Adobe Profile:
./utils/adept_activate -u <username>
Your username (and the password that is then asked from you) are those of your AdobeID account.
Apparently, if this does not work, you can also provide your password through:
./utils/adept_activate -u <username> -p <password>
which might require changing your password so that it does not contain any special characters incompatible with this command.
Now all you need to convert an acsm to an epub is to run
./utils/acsmdownloader <stupid ADE file>.acsm
That is the only command of all that section you will need to repeat!
You can also use libgourou to grab the key that will be used by the DeDRM plugin:
./utils/acsmdownloader --export-private-key
Installing calibre
Following the official instructions I merely ran
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
Installing the DeDRM plugin
Let's take a small break here to give heartfelt thanks to Apprentice Alf, Apprentice Harper, The Dark Reverser and i♥cabbages, who are among the few unsung heroes whose work make it possible for Linux users to remove DRMs from books we've legally purchased so that we can actually read them on the ebook reader we've also legally purchased for this exact intended purpose.
Now download the latest .zip
version of DeDRM from its github repo (in my case, version 7.2.1).
Move it to its own special directory and unzip it there.
Then open Calibre (which you can do by running calibre
from the command line, or from the start menu).
In the upper menu bar, you'll find a "Preferences" menu. Click on the tiny arrow at the far right of this bar to see all the possibilities. Click "Advanced", then "Plugins", then "Load plugin from file".
Pick DeDRM/DeDRM_plugin.zip
.
Click "Customize plugin", then "Adobe Digital Editions ebooks", then "Import Existing Key Files". (If you need to find this plugin again, it will be under "File type plugins".)
Navigate to the .der
key file previously created by acsmdownloader.
Now all you can add whatever epub you have created from an acsm file with acsmdownloader to Calibre, and it will be DRM free. All that without wine. Thank you, Grégory.