When using Linux and buying ebooks, you will have to convert ACSM files on Linux to ePub. The Kobo store and other popular ebook stores don’t just give you a usable ePub, they often come in ACSM format. To actually read the book you’ve purchased you need to open that ACSM file up in Adobe Digital Editions and download an ePub. Then if you want to do anything with your book, like put it onto your own e-reader, you’re going to need to remove the DRM. The process is absurd but it’s the way things are right now.
What is an ACSM File?
First let’s answer, what is an ACSM file? ACSM stands for Adobe Content Server Message. This is a proprietary file format which acts as a “key” to the actual eBook hosted on Adobe Content Server. That’s right, the ACSM file you got from Kobo, Google Books, or somewhere else isn’t actually an eBook locked behind DRM, but essentially just a link to the book which you now need to download from Adobe.
How to Convert ACSM Files on Linux to EPUB
For this guide I am using PopOS, these commands should work on any other Ubuntu-based distro as well.
Install the Tooling
To do this, we are going to use WINE.
First, enable running 32-bit architectures if you have not already.
sudo dpkg --add-architecture i386
Install WINE from WineHQ. (If you hit any snags check the official install guide)
# Add the WineHQ repo and needed tooling wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add - sudo apt install software-properties-common sudo apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs) main"
Update your package list and install WineHQ
sudo apt update sudo apt install --install-recommends winehq-stable winetricks winbind
Verify WINE is setup properly
Convert ASCM to EPUB Using Adobe Digital Editions
Install dotnet40 as we need to for ADE, make sure to click through all the options
winetricks corefonts dotnet40
Download the Adobe Digital Editions installer for Windows
Next, use WINE to install ADE
Again, click through all the options but avoid installing Norton, lol. Once the install is complete ADE should automatically open up.
Now go to
authorize computer and sign in to Adobe, you will need to create an Adobe account if you don’t have one already.
wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Adobe/Adobe\ Digital\ Editions\ 4.5/DigitalEditions.exe
Convert ACSM Files on Linux to EPUB
Inside Adobe Digital Editions, open the ACSM file. You can find your Linux file system inside the Z:/ drive.
The book you imported will now be available inside the wine file system in
Documents/My Digital Editions/
ls ~/.wine/drive_c/users/$USER/Documents/My\ Digital\ Editions/
Install python + deps which will be needed to DeDRM the epub
winetricks python27 # this should also install pip wine pip install pycryptodome
Download a 6.x.x release (https://github.com/apprenticeharper/DeDRM_tools/releases) of the DeDRM tool and extract
Please note that 7.x.x versions will not work.
Now run adobekey.py in wine with Python
wine ~/.wine/drive_c/Python27/python.exe adobekey.py
Now use your locally installed python to deDRM the epub. Don’t forget to update those file paths.
python3 ineptepub.py adobekey_1.der ~/.wine/drive_c/users/chris/Documents/My\ Digital\ Editions/The\ Unicorn\ Project.epub ~/Downloads/test.epub
HUZZAH! It worked!
Now I can actually use the book that I paid for. You would be forgiven for thinking it would have been easier to just pirate the book since it likely would have been.
To convert more books just import them into ADE and then run the conversion command again
python3 ineptepub.py adobekey_1.der ~/.wine/drive_c/users/chris/Documents/My\ Digital\ Editions/another.epub ~/Downloads/another.epub
I love my Kobo e-reader. See it here on Amazon!
1 thought on “Convert ACSM Files on Linux to ePub”