How can I remove the drm from an ePub file?
This is the simplest way that I have found:
- Install Adobe Digital Editions using winetricks
winetricks adobe_diged
- Download and install ePUBee within the same wine prefix used by Adobe Digital Editions
$ cd ~/Downloads $ wget http://download.epubee.com/ePUBeeePUBDRMRemoval.exe $ WINEPREFIX=~/.local/share/wineprefixes/adobe_diged/ wine ePUBeeePUBDRMRemoval.exe
- Start Adobe Digital Editions and login to your adobe account
- Add your DRM'ed books and wait until they are readable (decrypted)
- Run ePUBee. It should automatically decrypt any files added to Adobe Digital Editions to
~/.local/share/wineprefixes/adobe_diged/drive_c/users/${USER}/Application\ Data/decrypt/
- Use Calibre or your favorite ePUB management tool to get the ePUB's onto your reader
The simple answer is no. There is a convoluted process to getting the DRM stripped from your ebooks, but it is possible.
You will need to install calibre, and get the DRM removal plug-in separately. To get your keys from Adobe into the Calibre ebook reader, you will need to install the Adobe Digital Editions (ADE) with Wine.
Follow the instructions in the DRM removal plugin to get it working.
Update 1: ADE 1.7 no longer works properly in Wine. Attempts to download ebooks into it inevitably fail. Only version 2.0.1 works with this method of removing DRMs, and it is still quite difficult to get it set up properly in Wine.
Update 2: The DeDRM tools linked in here are even more straightforward for use if you legally own an ebook device. My books bought or owned on the Kobo and Amazon ebook stores can be quite trivially processed with the plugins included in the DeDRM packages linked in my original answer, as they rely on the device ID for DRM removal. No more installation of ADE required. The downloaded files include steps specific for your device.
The other answers no longer work (or did for me). Unfortunately getting it to work is convoluted and will use +5GB of space. However, this is what I did to get it working. I hope I included all the steps. It installs ADE 2.0.1
Note: wine1.7 and the version in repo for winetricks failed for installing dotdeb (required for ADE 2.0.1) so I installed the latest winetricks and wine
- Winetricks repo - winetricks
- I used
whereis winetricks
to find it and moved the downloaded winetricks to that location (for example/usr/bin/winetricks
)
- I used
- Wine2.0 - guide
- Remove your current version of wine prior to installing the new version
sudo add-apt-repository ppa:ricotz/unstable
sudo apt-get update && sudo apt install wine-stable
Installing ADE 2.0.1
I used this guide (partially replicated here)
Files to download- Dotnet Framework 3.5SP1
- ADE 2.0.1
WINEPREFIX=~/.adewine WINEARCH=win32 wineboot
export WINEPREFIX=$HOME/.adewine/
winetricks -q windowscodecs && winetricks -q corefonts
wine ~/Downloads/dotnetfx35setup.exe
# Will take awhilewine ~/Downloads/ADE_2.0_Installer.exe
At this point, you should open ADE and login to authorize it to allow calibre to gain your key later on.
WINEPREFIX=$HOME/.adewine/ wine ~/.adewine/drive_c/Program\ Files/Adobe/Adobe\ Digital\ Editions\ 2.0/DigitalEditions.exe
Install Python and Pycrypto for Calibre
The script for removing drm with calibre recommends python2.7 but python2.6 seems to work. For me, there was a bug where wine cannot find python.exe and has a error of
wine: cannot find L"C:\\windows\\system32\\python.exe"
I worked around that by linking it.
Install python26export WINEPREFIX=$HOME/.adewine/
winetricks python26
cd ~/.adewine/drive_c/windows/system32 && ln -s ../../Python26/python.exe ./; cd -
export WINEPREFIX=$HOME/.adewine/
- I installed the file from here (Voidspace) and this file - PyCrypto 2.6 for Python 2.6 32bit (sig)
wine pycrypto-2.6.win32-py2.6.exe
Install calibre and drm plugin
Install calibre
Install DeDRM calibre pluginsudo apt-get install calibre
Download DeDRM_tools from this repo
- Extract the DeDRM_calibre_plugin directory inside the zipfile to anywhere
- Open Calibre and go into:
Preferences
->Plugins
->Load Plugin from file
-> ChooseDeDRM_plugin.zip
from the directory you extracted too.
Configure DRM Plugin
- In plugins (from before) search for
drm
orDeDRM
- Select
Customize plugin
->Adobe Digital Editions ebooks
- In WINEPREFIX put in
/home/YOURUSERNAME/.adewine
# Replace YOURUSERNAME with your username :) - Select the Green Plus sign and give the key a name
Test
Download a book to ADE by opening the .ascm file (or dragging into it). You can open ADE by running
WINEPREFIX=$HOME/.adewine/ wine DigitalEditions.exe
Run Calibre and add a book from ~/Documents/My Digital Editions/bookname.epub