Removing DRM from e-books

Page created: 2024-07-20
Updated: 2025-08-29

If you buy or check-out an e-book through your local library, you’ll likely end up with an ACSM file (extension .acsm).

Publishers like Tor (torpublishinggroup.com) and No Starch Press (nostarch.com) and Manning (manning.com) are awesome because they will sell you a DRM-free ebook. I happily pay these publishers because they understand that I want to own the books I buy and I want to be able to read them on the electronic device of my choosing.

I begrudgingly pay other publishers that sell books with DRM and I remove that DRM. But it has to be a very special book that I want to read very badly.

See also How I manage my e-books with Calibre.

Removing DRM Method 1 (Linux)

I really love this tiny executable. It does the whole download and decrypt process for you so you’re left with an EPUB or PDF file ready for use!

https://github.com/BentonEdmondson/knock

Original gone, archive.org has it. Thanks Anita!

The README explains how to use it. Just run the knock executable against your ACSM file:

$ knock book.acsm

That’s it! You can manage the book with Calibre, etc.

Removing DRM Method 2 (Windows)

This is a Calibre plugin and only does the decrypting. It does not download the file. For that, you’ll still need Adobe Digital Editions to process the .acsm file:

To setup everything needed:

  • Install Calibre

  • Install Adobe Digital Editions (does the downloading process)

  • Download the DeDRM plugin (URL above)

  • Open Calibre and go to Preferences then Plugins

  • Choose Load plugin from file and select the DeDRM plugin

Then, for each DRM-locked book with an ACSM file:

  • Open your .acsm file with Adobe Digital Editions (ADE)

  • Open Calibre, click Add Books

  • Go find the encrypted book file (e.g. .epub) in "Documents" and then "My Digital Editions" or just "Digital Editions".

  • When you open the encrypted e-book, the DeDRM plugin will automatically decrypt it

  • Now you’re read to read the book, export it to your favorite device, etc.

What is an ACSM file?

From what I can tell, the biggest DRM scheme, by far, is Adobe’s. An ACSM is a tiny XML file that tells this stupid Adobe program called "Adobe Digital Editions" to download a DRM-locked file from Adobe’s servers.

See Wikipedia’s little summary: Adobe Content Server (wikipedia.org).

The file is truly tiny. Here’s what one of Adobe’s sample files looks like:

<fulfillmentToken fulfillmentType="free" auth="user" xmlns="http://ns.adobe.com/adept">
  <distributor>urn:uuid:b4e1303f-630f-4769-9c82-4dea6d65a277</distributor>
  <operatorURL>https://contentserver.adobe.com/fulfillment</operatorURL>
  <transaction>8b5c76eb-ac3d-41a5-8a54-cb0b1396ad7c-000011af</transaction>
  <purchase>2024-07-20T16:24:49+00:00</purchase>
  <expiration>2024-07-20T17:24:49+00:00</expiration>
  <resourceItemInfo>
    <resource>urn:uuid:85e0bf96-a8aa-4508-8acc-c5d40c3f21c8</resource>
    <resourceItem>1</resourceItem>
    <metadata>
      <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">The Princess Diaries</dc:title>
      <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Meg Cabot</dc:creator>
      <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">application/pdf</dc:format>
    </metadata>
    <licenseToken>
      <resource>urn:uuid:85e0bf96-a8aa-4508-8acc-c5d40c3f21c8</resource>
      <permissions>
        <display/>
        <excerpt/>
        <print/>
        <play/>
      </permissions>
    </licenseToken>
  </resourceItemInfo>
  <hmac>DiACserh0EyMypvmuOL2a+CCF1s=</hmac>
</fulfillmentToken>

As you can see, it just provides a path and some IDs that identify who, what, when and where the request was made. The above shows the time and date at which I downloaded the sample file from Adobe’s website.

Yup, Adobe is keeping track of who downloads e-books all over the world.

Anyway, a program like Adobe Digital Editions (or Knock) downloads the actual file (e.g. EPUB, or in this case, PDF) from the given URL. Then it decrypts the file temporarily for reading or permanently for DRM-free storage or reading on other devices or applications.