How to read an ACSM file on Linux?

54,129

Solution 1

I created a program called Knock to convert ACSM files to DRM-free EPUB files at the command line:

[user@computer:~]$ knock ./example.acsm
downloading the file from Adobe...
removing DRM from the file...
DRM-free EPUB file generated at ./example.epub

It doesn't use Adobe Digital Editions and it doesn't use Wine. It is completely free and open-source software for native Linux.

Solution 2

The question is quite old, but people like myself still trip up on DRM locked ebooks. I assume you want to get out of the acsm a DRM-free epub. My instruction is for Ubuntu/Debian using apt-get, but the tools exist for other distros as well. I need a couple of tools in particular: the DeDRM tool for python2.7 and wine. On wine, we will install Adobe Digital Editions, python and pip for windows

  1. Install wine and winetricks because we will run Adobe Digital Editions in wine. By default ubuntu19.10 intalled wine 4 on my machine. Its easier to upgrade to wine5 first. ADE works so much better with wine5.

     sudo apt-get install winehq-stable winetricks winbind
    
  2. Install dotnet40

     winetricks dotnet40 
    
  3. Now download Adobe Digital Editions for Windows and install it:

     wine Downloads/ADE_4.5_Installer.exe 
    
  4. After installing and launching DigitalEditions you will need to authorize you computer or log in with your adobe id if you don`t have one create it for free.

  5. Open in ADE the acsm file. It will download the epub into your user documents folder (e.g., ~/Documents ) in sub dir "My\ Digital\ Editions". Note that the file is still DRM protected.

  6. Now its time to run DeDRM from python wine. Unzip DeDRM tool Version 6.x and locate the adobekey.py file.

  7. Install python, pip and pycryptodome:

     winetricks python27 # this should also install pip
     wine pip install pycryptodome
    
  8. Run adobekey.py from the dedrm you downloaded before with wine python:

     wine ~/.wine/drive_c/Python27/python.exe adobekey.py 
    
  9. You get the adobekey_1.der that you need to run the other script:

     python ineptepub.py adobekey_1.der ~/Path/to/drm_locked.epub your_drm_free_out.epub
    

    For pdfs use 'ineptpdf.py' inststead of 'ineptepub.py'. If you get an error in this step about python, adjust the term 'python', to 'python2' or 'python3'.

  10. You should get the output:

     Successfully decrypted drm_locked.epub as your_drm_free_out.epub
    

Done. Read your epub on any epub reader, e.g., okular, readera, lithium.

To be sure, this is quite a few steps. However, ADE is not a good reader, and the reading experience using wine even worse. I disagree that removing DRM is not legal; for personal use it's perfectly fine to remove DRM from your purchased ebooks. Publishers, of course, have an interest in reducing and controlling access to the material. EFF has some interesting articles on DMCA, DRM, and copyright. Have fun reading.

Solution 3

I will try to list all the solutions I've found.

First one. Tested solution: working, and very easy.

First install Wine on your Linux. Then download Adobe Digital editions. Link to download Adobe Digital editions

Then, install the file you dowloaded from Adobe (It was ADE_4.5_Installer.exe, for me), in the Wine virtual Window. If you don't know how to use wine, see this doc: How to install and use Wine on Linux

Second solution:

Install a virtual Windows on Linux. How to.

Third solution: If you failed to install virtual machine or open with Wine, and if you really need this program, install a dual boot on your computer Windows/Linux. How to dual boot Windows/linux on the same computer

4th solution, use a virtual Android phone (or a real one) and install the Adobe Digital editions for Android. Virtual smartphone software, Memu

You can also try to emulate MacOs, or iOS.

There are solutions to remove the DRM, and so convert the acsm into epub, but there are no legal, so I don't think I'm allowed to write them.

Solution 4

.acsm can only be used with Adobe Digital Editions and stands for Adobe Content Server Manager.

For more information about Adobe Digital Editions please see http://www.adobe.com/products/digitaleditions/faq/

Side note (may not be generally applicable to Digital Editions users): Stated in the agreement (may be of concern in making a program to access .acsm ) for Adobe Content Server section 11.1 you agree not to:

(d) obtain or attempt to obtain any materials or Information through any means > not intentionally made available through the Services;

Interpret this as you will, I will not give you illegal advice.

Share:
54,129

Related videos on Youtube

Aadit M Shah
Author by

Aadit M Shah

Computer science engineer with over ten years of experience in software development. Implemented web development, web analytics, and information technology solutions for both Cloud 100 and startup companies. Contributed to several open source software projects, with over 1.2 million aggregate downloads.

Updated on September 18, 2022

Comments

  • Aadit M Shah
    Aadit M Shah almost 2 years

    So, I needed the Semantics Engineering with PLT Redex textbook to complete a homework assignment this week. I needed it in a digital format because I'm going to POPL 2016 tomorrow and I can't have it delivered to me. Hence, I paid $50 for the eBook so that I could complete my homework.

    The problem is that I'm using Arch Linux and for some reason Adobe Digital Editions doesn't work for me. During installation it said that it might not work on a 64-bit system. Anyway, I tried to find an alternative solution and I learned that I could read the book using Bluefire Reader on my phone.

    And it worked. I can read the book, but I don't want to read the book on my little phone screen. So, I transferred the PDF file that Bluefire Reader downloaded to my laptop in hopes that I could open it using a simple PDF reader. Then I double click on the PDF file with a smirk on my face... and it asks me for a password.

    I hope you can understand my frustration. All I want to do is read the book that I legally purchased on my laptop so that I can complete my homework and get on with my life. I tried using other eBook readers like Calibre but it requires that I convert my ACSM file to EPUB using Adobe Digital Editions (which doesn't work for me). What other alternatives do I have?

  • jvb
    jvb almost 7 years
    As all listed "solutions" require installing the ADE software (on different operating systems), and downloading the ePub via ADE with an operational ADE user account... how come you are claiming my comment above to be "not true"?
  • Quidam
    Quidam almost 7 years
    You seem very susceptible. I was saying "no" to "you can't convert ASCM". I should have say "I disagree" instead of "untrue", but English is not my language. Anyway, it doesn't desserve a downvote from you. Why people seek revenge here rather than peace and communication? It's only replying to a comment to tell my opinion, I didn't kill you nor downvoted you.
  • larus
    larus about 6 years
    "The problem is that I'm using Arch Linux and for some reason Adobe Digital Editions doesn't work for me. During installation it said that it might not work on a 64-bit system." Your solution does not work for the user, as they already said.
  • Rob Romijnders
    Rob Romijnders over 5 years
    Then they should have made a version for Linux
  • myselfhimself
    myselfhimself over 4 years
    I stopped at step 5. successfully. Thanks for having been so precise in your details!!! This is the best answer to me!!
  • NWMT
    NWMT about 4 years
    As of April 10 2020 this solution still works! Legal or not, this is what I needed to do so that my 9 year old could read the ebooks provided by the public library on my e-Reader, instead of on a computer screen or smartphone. I think in this case, given current COVID-19 confinement orders, that bending rules like this is appropriate. The kids have to read!
  • Michaël
    Michaël about 4 years
    Thanks for the walkthrough! Two small comments: In step 4, you don't need to register an Adobe ID, you can just authorize the computer. In step 10, if you're dedrming a PDF, use ineptpdf.py instead.
  • Adam
    Adam about 4 years
    @Michaël, good point. I update that.
  • KNejad
    KNejad almost 4 years
    Thank you so much! You're a rockstar. One small comment, it seems you no longer need to run winetricks pip anymore since pip is already installed
  • Adam
    Adam almost 4 years
    Hi @KNejad, thanks, I updated that. All the credits belong to the DeDRM developers, wine team and Microsoft ^^ (Its amazing that the dotnet 4.0 installation actually works in wine ;) )
  • piotrekkr
    piotrekkr almost 4 years
    If you are using Arch Linux you can use this script (at first run wine might ate all your ram) After install run ADE and authorizie your computer using Adobe ID. Then run script again with option 2 and it will generate der file. After that import der file into Calibre plugin and now you can convert epub to mobi without DRM.
  • Kyle
    Kyle over 3 years
    Wow, thanks to the original answer and the script above! It actually worked, but with one change. adobekey.py only works with Python3, so I replaced it with this version from the Python2 branch from the DeDRM_tools GitHub.
  • Kyle
    Kyle over 3 years
    And for anyone in the future, I updated the Arch script so it will pull the correct Python2 file in the first place.
  • Adam
    Adam over 3 years
    Hi @kyle, makes sense to me, but I think the main work will work on the main branch. I think its worth to update that wine tutorial for python3 once DeDRM 7 is released.
  • Kyle
    Kyle over 3 years
    Agreed, I'm just glad they left a clean break point from Python 2. PyCrypto will need to move to Python 3 as well. I'm watching DeDRM for releases to update the wiki or raise an issue when that times comes.
  • user3619803
    user3619803 over 3 years
    With python3 (and DeDRM 7 on Calibre 5) you can just pip install pycryptodome and don't have to install that huge VCForPython27.msi.
  • Adam
    Adam over 3 years
    Hi @unhammer, do you mean sonething like: winetricks python3 && wine python3.exe -m pip install pycryptodome ?
  • user3619803
    user3619803 over 3 years
    @Adam sounds right, though I tried with in win10 in a vbox (since wine ADE*exe gave some error and I had a vbox handy), where I first typed python into cmd.exe and it popped up a "Store" for me to install python with, then I just did pip install pycryptodome in cmd.exe. ------------------------------------------------------------‌​--------------------‌​--------------------‌​--------------------‌​----------------- The hoops we jump through, I didn't even notice the book had DRM before I tried opening it :(( 0/5 will not buy again
  • Adam
    Adam over 3 years
    I guess with wine it will be bit complicated.. Some guys tried that on stackexchange too. When I try to install the python.exe with wine-6.0 using sudo wine Downloads/python-3.9.1.exe it fails with [...] Detected Windows 7 [...] Windows 8.1 or later is required to continue installation. It would be cool to simplify all that installation and run latest DeDRM. For the moment at least ADE4.5 runs stable with wine.. If anyone likes to write an answer how to do it with a windows VM, I will upvote that :)
  • hackerb9
    hackerb9 over 3 years
    i tried this in Wine 6 today and was baffled that DigitalEditions.exe kept crashing. Turned out I needed to apt install winbind. Perhaps that should be one of the steps now.
  • Adam
    Adam over 3 years
    hi @hackerb9, you are right. I had winbind installed before, I can reproducce that without it DigitalEditions will crash at startup.
  • sawablo
    sawablo over 3 years
    Hi @Adam. Just a heads-up that I had to use DeDRM tool Version 6.x for step 9 and Version 7.x for step 10. I don't know why!
  • Adam
    Adam over 3 years
    Hi @sawablo, that's because you probably perform step 9 with wine, while step 10 you can do without wine.
  • sawablo
    sawablo over 3 years
    Good point, @Adam! Is wine necessary for step 9? Why?
  • Adam
    Adam over 3 years
    I think adobekey.py will access data from ADE. The comments in the source code would suggest that: github.com/psyrendust/dedrm-ebook-tools/blob/master/… Actually steps 6-9 you only need to run the python script in an environment that has access to ADE. That`s why one user suggested to use a virtual machine instead of wine.
  • Joce NoToPutinsWarInUkraine
    Joce NoToPutinsWarInUkraine over 3 years
    Could it work in a 64bit-box without enabling multiarch? #wine Downloads/ADE_4.5_Installer.exe answers "it looks like wine32 is missing, you should install it. multiarch needs to be enabled first"
  • Adam
    Adam about 3 years
    Hi @Joce, I think it can be best answered here: forum.winehq.org
  • LandoR
    LandoR about 3 years
    still working. I had use deDRM 6.x and find that VCForPython file on archive.org
  • Adam
    Adam almost 3 years
    Hi @LandoR, i just updated the docs. You do not need VCforPython anymore if you install pycryptodome. Maybe thats why microsoft took vcforpython down.
  • Bogdan
    Bogdan over 2 years
    Worked for me. I had an issue opening it with the epub viewer provided by Calibre which rendered all in black pages, but It was visible in Okular.
  • gene_wood
    gene_wood over 2 years
    This didn't work for me in Fall 2021 as in step 5, Adobe Digital Editions 4.5.11 didn't produce an epub in the My Digital Editions directory, but instead a DRMd pdf file.
  • Adam
    Adam over 2 years
    Hi @gene_wood, I think the format depends on what you have bought. In case of PDFs you can use in step 9 'ineptpdf.py' inststead of 'ineptepub.py' as written in the description above. You can later convert to Epub, there are many tools for that. Here is a guide for calibre: lifewire.com/convert-pdf-to-epub-4581324
  • Adam
    Adam over 2 years
    Cool idea and name for the project. Would have been probably easier when the underlying libgourou lib was also python :)
  • thomasa88
    thomasa88 over 2 years
    It's a bit scary that you tell users to change sysctl without any information on the implications. Anyway, the setting was already enabled on my system, but I still get an error: $ ./knock-1.1.0-alpha-x86_64-linux epub.acsm -> ../run: 1: ./nix/store/ml4m2016xm278m8h4w1x3gaayq9kh3p2-startup: not found cat /proc/sys/kernel/unprivileged_userns_clone -> 1
  • Admin
    Admin about 2 years
    @thomasa88 the latest update removes this requirement. It is now just a normal, static ELF binary. Try it, it should work for you