A WINE Remedy for acsm epub DRM Adobe ADEs

Author: admin | Category: Uncategorized | Tags:

Using WINE in linux, you can turn that DRM laden .acsm file into a readable .epub for your Nook or other device, whether Adobe likes it or not!

You are here because you either bought an ebook or borrowed one from your local library only to be left with a useless .acsm file. You run a free, open source operating system that is not supported by Adobe and all those other tutorials on the internet insist that you succumb to using Windows proprietary software. Never!

Still, you are left wondering, “What is this .acsm file and where the hell is my book?” (If you are sufficiently annoyed and ready to begin, then skip to the tutorial below.)

The bad news: A .acsm file is not a book. It is similar to a .torrent file. In other words, .acsm is a filetype that tells Adobe Digital Editions to download the actual book file, which will be a .epub. Said .epub will contain DRM (Digital Rights Management) that will cause it to self destruct and prevent copying to or reading it on any device which Adobe fails to authorize. If you are running Adobe Digital Editions via WINE on linux, then it will certainly fail to detect and authorize your device. It will also fail to recognize the .acsm file because you’re running it from a nigh-emulator and one does not simply-double click a file and have it opened by the associated program into Mordor! Or, you know… whatever epic tale it is you’re trying to read.

The worse news: This means you will either have to say goodbye to the money you just wasted on a useless file or go through way more effort than is reasonable just to read a document.

The good news: You can, in fact, access the book you paid for and transfer it to other devices. The first time is the most tedious. After that you will be better prepared to strip that nasty DRM from ebooks you buy in the future. That is, assuming you ever spend another dime on an ebook after this.

Note: From here on out, Adobe Digital Editions is referred to as ADEs, pronounced “AIDS”. Because, like the disease, it is a terrible plague that the world would be much better off without. Unlike the disease, DRM is not as easy to protect yourself against and affects a lot more people by infecting otherwise healthy content. There is no safe way to use DRM. For the first time ever, abstinence really is the answer.

Begin Tutorial

Acquire and Prepare Your Tools

Download Digital Editions Stand-Alone Installer:

You will have to go here and make and create an account with Adobe or login if you have a current account. Wow… even this step is more tedious than it should be.

Install ADEs with WINE:

Right click on the .exe you just downloaded (should be something likedigitaleditions_172.exe) and select Properties tab. Check the box next to “make the file executable” and click ok. The installation process should begin. Don’t bother opening ADEs yet / close it if it launches.

Download python-2.6.2.msi

Install python-2.6.2.msi

Must be installed using WINE regardless of whether you have python installed on your linux distro. Notice it is a .msi which will download and install the files, but you must enter the following command in your terminal to run a .msi in WINE (Yes, I RTFM). Don’t forget to cd to the directory your .msi is located:
msiexec /i python-2.6.2.msi

Download and Install PyCrypto

Download pycrypto-2.1.0.win32-py2.6.exe. Right-click -> Properties tab -> check box to make executable. Right-click and run with WINE to install.

Create a New Directory and Download Inept Scripts

Make sure you can view hidden directories by pressing ctrl + H.

Create a directory called “inept” in your /home/user/.wine/drive_c/ directory (so WINE can find it when you run it later).

To download the two scripts, Right-click each link and Save link as… Remove “.txt” from the file names and save to the ~/.wine/drive_c/inept/ dir you just created: ineptkey.pyw and ineptepub.pyw

Take a Break

I’m not kidding here. Just getting prepared has been a lot of work. I recommend you walk around for a few minutes, breathe, relax. There is plenty waiting for you when you get back. Even Sherlock Holmes was at his best while puffing his pipe or playing his violin.

Administer the Cure for ADEs

Place booktitle.acsm under your WINE Directory

Move your .acsm file to some place on your faux C: directory, probably located at /home/user/.wine/drive_c/

Run ADEs in WINE via Command Line

cd to the Adobe directory which contains digitaleditions.exe.

For me it accessed with:
cd ~/.wine/drive_c/Program\ Files/Adobe/Adobe\ Digital\ Editions/

Run ADEs on the .acsm file from terminal and it should automatically download the epub. ADEs is supposed to be a Windows program. You must enter the file path to the directory where you just placed the .acsm file using Windows syntax. Notice that every time a “\” or ” ” empty space appears in the file path, it is preceded by a “\”. See here for details.

wine digitaleditions.exe C:\\acsm\ folder\\filename.acsm

Get Your Readable epub With DRM

This should download a DRM laden epub and open it in the ADEs library. The actual epub is stored at:
/home/user/.wine/drive_c/users/user/My Documents/My Digital Editions

For our faux Windows purposes, remember this Windows version of the same file path. You will need it soon.:
Z:\home\user\My Digital Editions

Run Ineptkey Script

cd to your python.exe directory:

cd ~/.wine/drive_c/Python26

Run inpetkey.pyw using your WINE version of python (will not work if you run the local, linux version of python!):
wine python.exe C:\\inept\\ineptkey.pyw

You should get a message confirming that adeptkey.der was created. It should be in the same folder as ineptkey.pyw, so confirm it exists:
ls ~/.wine/drive_c/inept

Run Ineptepub.exe

Run ineptepub.exe via python.exe via WINE:
wine python.exe C:\\inept\\ineptepub.pyw

The following prompt should pop up with key file, input and output fields:

Key File: Navigate to adeptkey.der (in this case it is in ~/.wine/Drive_c/inept/). If you can’t browse to the hidden .wine directory in this Windows program, then move adeptkey.der to a directory that is not hidden and try again.

Input Path: Browse and select the folder that ADEs has saved the DRM infected epub file(s) to. All files in the folder you choose will be decrypted. Z:\home\user\My Digital Editions

Output Path: Choose any folder to create the new, DRM free .epub file in! Click “Decrypt whole directory” and confirm that your new, DRM free booktitle.epub file(s) has(have) been created. You are now free to copy the file, transfer it to another device, keep it for as long as you want or convert it into another format.

Enjoy finally being able to read the ebook(s) you paid for!

Further advice about purchasing DRM hindered documents:

If you do not want to go through all this trouble then the only alternative for ebooks that are not released in open format is to download the same book for free through one of the many pirate sites on the internets. I probably can not legally advocate doing that, but as I said, this is currently the only alternative that I am aware of. It may in fact be the only way to acquire content without being forced to buy proprietary software.

It may even be considered illegal to remove DRM, whereas it appears to be within fair use rights under DMCA in the USA to download an ebook as long as you don’t distribute more than $1,000 retail value within a six month period.

Granted, I’m not a lawyer, but it appears that it is legal to download a pirated copy of an ebook and share a limited amount, yet it is illegal to remove the DRM that prevents you from sharing. I recommend checking with a legal expert if you are concerned.

If you come to find as myself and Harvard Professor Charlie Nesson did, that downloading does not appear to be illegal, the download your books for free and send donations directly to authors you wish to support. This whole experience has taught me that companies which use non-free, non-standard document formats are not only unnecessary, but they are also a nuisance to society (you and me). I highly recommend that people stop purchasing ebooks that have DRM. Ask your library to only accept documents that are in an open format. Download and share to the maximum extent of the law.

Inept scripts from http://www.softsay.com/ via this tutorial.

This post is mirrored at kat.ph

Leave a Comment

Blue Captcha Image


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>