* * *
eBooks come in many forms; see this article in Wikipedia for a list. Most of the common formats can be read on an iPhone, by one app or another — see iPhone as eReader for more.
An eBook format that the iPhone can't deal with, however, is the supposedly "open" EPUB format if, paradoxically, it is copy-protected using the Digital Rights Management methodology created by Adobe Systems. This Adobe/EPUB format, a DRM-protected variety of the open EPUB format, is used by the Adobe Digital Editions (ADE) eBook reader. ADE is intended for personal computers, but not for most mobile devices like an iPhone. The full name of Adobe's DRM methodology is Adobe Digital Editions Protection Technology, or ADEPT. The Adobe/EPUB format can accordingly be called ADEPT/EPUB.
To repeat: Adobe Digital Editions, a.k.a. ADE, is software that runs on Windows and Mac platforms, but there is no ADE for the iPhone. Why not? Maybe because ADE incorporates Adobe Flash as a way of presenting complex graphics, and Flash is not supported on the iPhone. The iPhone, lacking Flash support, cannot read ADEPT/EPUB eBooks. This is so even though there is no Flash content in ADEPT/EPUB eBooks!
If it were possible to bypass or strip off the ADEPT DRM encryption, however, these ADEPT/EPUB eBooks would become plain old EPUB eBooks — downloadable to, and working just fine in, Stanza for the iPhone.
Bypassing ADEPT encryption so that you can read ADEPT/EPUB books on an iPhone is in fact possible. Here is a step-by-step explanation of how.
Before you get started, you'll probably need to download and install the free Adobe Digital Editions software itself.
I know of only one exception to that rule. If you have a Sony Reader, you probably have installed its companion Reader Library (formerly eBook Library) software for the Sony Reader on your Windows PC or Mac. As of version 3.0, this software (current version is 3.1) can stand in lieu of Adobe Digital Editions software, in that it lets you authorize your Sony Reader device (and your computer as well) for Adobe DRM-protected content. If you have already done that, you don't need to install and authorize ADE, and you can skip ahead to Step 2 in these instructions.
What if you are not sure whether your computer is Adobe-authorized?
If you are using Windows XP — I don't know enough about Windows Vista or Windows 7 to say how to do this on those operating systems — you can check to see whether your computer is already Adobe-authorized by clicking on the start button, selecting Run..., typing regedit.exe in the Open... box and clicking OK, and in the Registry Editor window that appears, selecting Edit:Find.... Then type privateLicenseKey in the Find what: box and click the Find Next button. If your computer is Adobe-authorized, then (after a few seconds of searching) the Registry Editor will show a two-item list in the right side of its window that contains privateLicenseKey as the first data item. (The second item is the actual — albeit encrypted — value of the key.) Voila! You can now close the Registry Editor window and skip ahead to Step 2 of these instructions.
If you are using a Mac, one way you can check to see whether your computer is Adobe-authorized is to look for an activation.dat file in your Home folder hierarchy on your Mac — specifically, in the ~/Library/Application Support/Adobe/Digital Editions/ folder. (~ is shorthand for your Home folder.) If activation.dat is there, you have already authorized your Mac for Adobe-DRM'ed eBooks. You can skip ahead to Step 2 of these instructions. (Note: the ~/Library/Application Support/ folder hierarchy will not show up in a Finder search unless you specifically tell the search to include system files.)
If you didn't skip ahead to Step 2, you need to authorize your computer to read Adobe-DRM'ed eBooks. Click here to install (or simply launch) ADE on either a Mac or a Windows computer. About halfway down the page which comes up you will see a large button saying one of two things:
- If you see the word "Launch," then you already have the latest version of Adobe Digital Editions installed on your computer. You should click on the "Launch" button to open ADE. When you do — since you have just checked to see whether ADE is activated and found that it isn't — you should see an ADE Setup Assistant window superimposed over the main Adobe Digital Editions window.
- If you instead see the word "Install," click on it to obtain the latest ADE version. A warning appears: "This application can read and write files to your system. Would you like to continue installing?" Click "Install" again. Another warning appears: "Press yes to download and continue the installation of Adobe Digital Editions." Click "yes." After the download has finished, the Adobe Digital Editions app immediately opens on your Windows or Mac computer, displaying an "Adobe Digital Editions Install" window. That window contains a license agreement to which you must click "I Agree." You'll now see the ADE Setup Assistant window superimposed over the main Adobe Digital Editions window.
Whether you just installed or simply launched ADE, you should now see the ADE Setup Assistant, since presumably your computer is not yet ADE-activated. You need to click the Setup Assistant's "Continue" button to see a panel asking you to "Authorize Computer" by filling in your Adobe ID (which is typically your e-mail address) and associated password.
If you do not already have an account with an Adobe ID, you should now click on "get an Adobe ID online," in order to be taken via your Web browser to an online page that will allow you to set up an Adobe account. Once you set up your Adobe account, return to the patiently waiting Adobe Digital Editions Setup Assistant and enter your new Adobe ID and password. Click the "Activate" button.
You have the option instead to choose "Don't Authorize Computer" at this point, instead of "get an Adobe ID online." This is what is referred to as an "anonymous" activation, in that your computer will be "activated" but not "authorized" to use any particular Adobe ID.
As long as the computer you are using is not available to the public, my strong suggestion is that you not choose this option. If you choose it, you will not have the ability to download Adobe-DRM'ed eBooks to, and read them on, any computer but the one you are presently activating. If you authorize your computer using an Adobe ID, you can use the same Adobe ID to authorize up to six computers, total — plus, you will be able to transfer Adobe eBooks to a device such as a Sony Reader or a Barnes & Noble Nook that has been activated with the same Adobe ID.
I have been assured that the following steps in these instructions will work with an anonymous activation that does not specify an Adobe ID. However, if you activate Adobe Digital Editions anonymously and then later do it again with an Adobe ID, at that time all of your earlier ADE e-book purchases will become unusable. So I strongly recommend that you activate Adobe Digital Editions with an Adobe ID right from the outset.
Once you click "Activate," you will see (briefly) a panel saying "Connecting to authorization server," and then, once the authorization is complete, you will see the Setup Assistant's final panel, from which you can, if you like, point your browser at the Adobe Digital Editions Online Library. This, as the title says, is the repository on the Internet where many, but not necessarily all, of the Adobe Digital Editions eBooks you buy will be kept. From the web page which appears in your browser, you can now obtain your first ADE eBooks.
I'll leave it to you to visit this library later on in this set of instructions and explore how this is done. At this point, you need to click "Finished" to dismiss the Setup Assistant.
Now, if you are on Windows you will have on your C:\ drive a folder, C:\Program Files\Adobe\Adobe Digital Editions, that contains digitaleditions.exe, the ADE application. On a Mac, the Mac version of the Adobe Digital Editions software resides in your Applications folder.
Next, if you are using Windows, you need to obtain Python, a programming/scripting language originally developed for Unix-based computers, and also available for Windows.
If you use Windows you can currently get Python version 2.6, which you can download and install in Windows by going to the Python download page and then clicking on (as of this writing) the hotlink to Python 2.6.4 Windows installer. (There is also a version 3.1, but I can't guarantee it will work with this procedure.) You'll download a file called python-2.6.4.msi which you'll proceed to double-click, and then you'll follow the installer's on-screen prompts that allow you to install the Python 2.6 package in a directory the installer creates, C:\Python26. The actual app within that folder is called python.
For the Mac platform, you do not need to download and install Python at all, as Python 2.5 (which works fine for purposes of these instructions) is automatically installed as part of Mac OS X 10.5 "Leopard." (I believe this is also true of OS X 10.6 "Snow Leopard.") Even though Python 2.5 is part of the Mac OS X software package, you do need to make sure the optionally installed Apple Developer package is installed on your Mac.
If you already, at the outermost root level of your Mac's folder hierarchy, have a folder called Developer, you're fine. If not, you must create it by inserting your OS X 10.5 Install DVD and navigating to and then double-clicking Mac OS X Install DVD:Optional Installs:Xcode Tools:Xcode Tools.mpkg. You will be led by the installer program which opens through the necessary steps to install the Developer Tools package. These tools are necessary in the next stage of this procedure, that of installing and setting up the PyCrypto extensions to Python.
PyCrypto, the Python Cryptography Toolkit, is a package containing various cryptographic tools for the Python programming language. Its modules are going to be required later on in this set of instructions.
Windows users can obtain PyCrypto here (on that page, click on the link to pycrypto-2.0.1.win32-py2.6.exe). After downloading the .exe file, double-click on it to run the Setup Wizard. As long as you have already downloaded and installed Python as detailed above, the Wizard (after you click "Next >" on the introductory panel) will indicate Python 2.6 has been duly found in the Windows Registry, in C:\Python26\. The Wizard will accordingly use the subfolder C:\Python26\Lib\site-packages\ as its installation directory. After you click on "Next >" once more, you will see a "Ready to install" panel. Click "Next >" yet again to actually perform the installation. Then click "Finish" to exit the Wizard. You should now be able to locate a Crypto folder and also a pycrypto-2.0.1-py2.6.egg-info file in C:\Python26\Lib\site-packages\.
Mac users should go here and click on the "Download" button for PyCrypto 2.0.1. The pycrypto-2.0.1.tar.gz file you'll receive will most likely land right on your Desktop (depending on how you have your browser configured for downloads; if it doesn't download right to the Desktop, you can just move it there). Upon being double-clicked, the pycrypto-2.0.1.tar.gz file expands into a pycrypto-2.0.1 folder, also on the Desktop. You may move this folder wherever you like, or leave it right on the Desktop.
Next, Mac users need to click here to download PyCrypto_2.0.1_Installer.app.zip, which, when unzipped, expands into an AppleScript app called PyCrypto_2.0.1_Installer. Double click PyCrypto_2.0.1_Installer to run the installer itself. It will ask you to navigate to and choose your pycrypto-2.0.1 folder, the one you created in the preceding paragraph of these instructions. Once you have clicked "Choose," PyCrypto_2.0.1_Installer will open a window in the Mac's Terminal application and execute some Unix commands in it. The first time you use the PyCrypto_2.0.1_Installer, the Unix commands will produce a large amount of output in the Terminal window, due to the fact that the PyCrypto software is, for the first time on your computer, undergoing a "build." Any subsequent times you use PyCrypto_2.0.1_Installer, an "install" without a preliminary "build" will be done, and you will see less output in the Terminal window. In either case, the final line of the Terminal-window output should say "Writing /Library/Python/2.5/site-packages/pycrypto-2.0.1-py2.5.egg-info".
At this point you can quit Terminal. If you look in Finder — starting at the root-level directory, not at the Home folder for your user account — and navigate to /Library/Python/2.5, you should find a site-packages folder. In it there should now be a Crypto folder and a pycrypto-2.0.1-py2.5.egg-info file.
At this point, you have obtained the Adobe Digital Editions application (or else the Sony Reader Library app) and authorized your computer by activating your Adobe ID and password (or you have activated ADE anonymously); installed Python (on a Windows platform only); made sure you have the Developer Tools installed (on a Mac only); and installed the PyCrypto cryptography tools within Python (on either a Windows PC or a Mac).
You are going to run two Python scripts in order to decrypt Adobe Digital Editions eBooks. I'll discuss the second of these two scripts in Step 6 below. The first Python script is designed to extract cryptographic key information from the Adobe Digital Editions desktop software that you now have installed and authorized on your computer.
For Windows, the script comes in a file called ineptkey_v43.pyw.zip, downloadable here.
For the Mac, the file ineptkeymac_v1.py.zip is downloadable here.
Whichever ZIP file you download, you need to expand it (unless your browser does that automatically for you). The Windows script expands as ineptkey_v43.pyw when you double-click it; the Mac's as ineptkeymac_v1.py. (On a Mac, if you can't get the ZIP file to expand by double-clicking it, then you can expand it manually using either Archive Utility or Stuffit Expander.)
To run the ineptkey_v43.pyw script on a Windows platform, you will open and run the script in the python app created in Step 2. To do that, right-click on ineptkey_v43.pyw and select Open With: python to designate the python.exe app. Or, if you instead select Open With: Choose Program ... , you can check "Always use the selected program to open this kind of file," and then select python and click "OK." From then on, you will be able to double-click any Python script file whose filename extension is .pyw, and it will automatically open in python.exe.
On a Mac, you will initially open ineptkeymac_v1.py in Build Applet. To do that, right-click on ineptkeymac_v1.py and select Open With: Build Applet. An application called ineptkeymac_v1 will appear in the same folder as ineptkeymac_v1.py. Double-click the ineptkeymac_v1 app to actually run the script.
I'll refer to these scripts generically as ineptkey. Having to be run only once, ineptkey derives a decryption key (sometimes called a "security certificate") which can then be used by the second script (see Step 6 below) to decrypt any Adobe Digital Reader eBook that you obtain and download. The decryption key/security certificate is saved by ineptkey in a new file called adeptkey.der. On Windows, adeptkey.der is placed in the folder that contains the ineptkey script itself; after the file has been generated, you can manually rename it if you like and/or move it wherever you like.
On a Mac, a File Save dialog allows you to specify in what folder (and by what name) to save adeptkey.der. You can move the adeptkey.der file (by whatever name) which contains the decryption key/security certificate into any folder you like.
Once you have used ineptkey once to obtain adeptkey.der, you never have to use it again (unless you someday re-authorize ADE on your computer with a different Adobe ID and password).
Notes: The AppleScript-based app ADEPTKey_Generator was formerly used on Macs to do what ineptkeymac_v1.py does, but it no longer works with the latest version of Adobe Digital Editions.
If you have any adeptkey.der files from either ADEPTKey_Generator on a Mac or versions of ineptkey prior to version 4.3 on Windows, you should trash them. They will no longer work in Step 6 below.
At this point, you are done with all the admittedly complex preliminary steps. You are ready to actually obtain and download some eBooks that are protected with Adobe ADEPT DRM-encryption. You can start to do so by visiting the Adobe Digital Editions Online Library. Obtain and download at least one Adobe-DRM'ed eBook that is in the "EPUB eBook" format specifically. (There is a Python script called ineptpdf that can decrypt Adobe-DRM'ed "PDF eBook" editions, but it is beyond the scope of this discussion.)
Note that when you buy an EPUB eBook from the Adobe Digital Editions Online Library, the Adobe Digital Editions software on your computer will open, if it's not already active, and the eBook will be downloaded automatically. The eBook will appear in "Reading View" in the ADE window, ready to read. (This is true if you are using the ADE software. If you are using Sony Reader software, I don't know exactly how all this works.)
With the newly downloaded eBook visible in Reading View, you can click on the READING menu and then on Item Info... . A window will open that shows, among other things, the File path: to where the downloaded eBook is stored on your computer.
On Windows XP, the eBook will normally be in the user's My Documents\My Digital Editions folder, the full path to which is C:\Documents and Settings\
On a Mac, the eBook file will normally be in the /Users/
On both operating systems, the name of the file will typically be (roughly) the same as the book title, usually with each space replaced by an underscore ('_') character. Some eBooks download with more cryptic file names. The filename extension will be .epub.
You should leave the downloaded file exactly where Adobe Digital Editions puts it, under its original name and filename extension. However, there's no law against making a copy of that file, putting it where you wish, and naming it what you wish. (However, it's definitely a good idea to retain the .epub extension.)
Once you have downloaded, located, and optionally duplicated one or more EPUB eBooks that use Adobe DRM encryption, you can move on to the next step.
The adeptkey.der file containing the ADEPT decryption key/security certificate — you generated it earlier in Step 4 in this set of instructions, remember? — can now be used, on either a Windows machine or a Mac, by the ineptepub Python script to decrypt downloaded ADE books.
For either a Windows platform or a Mac — the same script works on both — you can download the ineptepub_v2.pyw.zip file here. After you download it, just unzip the ZIP file to get the file ineptepub_v2.pyw.
Your browser may unzip the ZIP file automatically, so you won't have to. If it doesn't unzip the file automatically, then:
- On Windows XP (I'm not sure about other Windows versions), you can unzip the .zip file manually by double-clicking it and then clicking "Extract all files" under "Folder Tasks" in the window that opens. Otherwise, you can use the WinZip utility.
- On a Mac, you can unzip the .zip file manually using either Archive Utility or Stuffit Expander.
On Windows, you will next open and run the ineptepub_v2.pyw script in the python app created in Step 2. To do that, right-click on the ineptepub_v2.pyw script file and select Open With: python to use the python.exe app. If you instead select Open With: Choose Program ... , you can check "Always use the selected program to open this kind of file," and then select python and click "OK." From then on, you will be able to double-click any Python script file whose filename extension is .pyw, and it will automatically open in python.exe.
On a Mac, you should next change the .pyw filename extension to .py in a Get Info window in Finder. Finder will ask you to confirm your intention to change the extension; just click "Use .py." You should then double-click the ineptepub_v2.py script file to (try to) make the ineptepub_v2 app in the same folder. If the double-click method doesn't produce the ineptepub_v2 app file, then probably what has happened is that the script has (briefly) opened in Python Launcher instead. Python Launcher cannot deal with this particular script, so it quits right away. This time, just right-click the ineptepub_v2.py script file and choose Open With: Build Applet.
On Windows, when you open the ineptepub_v2.py script in python, in front of an empty python.exe window you'll see:
As you can see, you'll need to specify three files. The easiest way: click on the "..." button to the right of each file-entry field, then navigate to and select the requisite file for each:
- For Key file, you'll select the decryption key/security certificate file created earlier, the one that by default has the name adeptkey.der.
- For Input file, you'll select a file containing any previously downloaded Adobe Digital Editions eBook you want to decrypt. In Windows, the downloaded eBook will typically be stored in My Documents\My Digital Editions. It will have the filename extension .epub. (On a Mac, it will be in ~/Documents/Digital Editions, where '~' signifies the Home Directory for your user account. Again, the file will have the filename extension .epub.)
- For Output file, you'll select a folder for and give a name to the file that is to contain the decrypted version of the eBook; you can put the decrypted output file anywhere you like in your folder hierarchy. You should make sure to specify the .epub extension for the output filename.
Then click on Decrypt. Within a second or so, the INEPT EPUB Decrypter window should say "File successfully decrypted." The decrypted output file should be right where you said to put it, using the file name and .epub extension you specified. If you double-click its icon, it will open in Adobe Digital Editions (even though it is no longer encrypted!). You can alternatively open it in any other eBook reading application, such as Stanza, that handles EPUBs.
You can now either perform one or more additional INEPT EPUB Decrypter decryptions or click Quit.
On a Mac, using ineptepub is about the same, though visually the user interface looks different. When you double-click on the ineptepub_v2, app, you will see:
It's like the Windows version, but without color. This time, behind the INEPT EPUB Decrypter window there's an empty Console window that you can just ignore, whereas in the Windows version, the window behind the INEPT EPUB Decrypter window is an empty python.exe window. You will (as for the Windows version above) use the "..." buttons to select Key file, Input file, and (the folder location and name of) Output file (don't forget to specify the .epub extension for the output file) then click Decrypt.
Remember, on a Mac, the Input file will normally be in ~/Documents/Digital Editions, where '~' signifies the Home Directory for your user account. This is the folder into which Adobe Digital Editions downloads eBooks. Again, the downloaded file will have the filename extension .epub.
Within seconds after you click Decrypt in the INEPT EPUB Decrypter window, you should see the message File successfully decrypted at the top of the window. You can now do further eBook decryptions, if you like.
After you finish doing eBook decryptions, just click Quit.
Once you have decrypted an eBook, you can open the decrypted eBook file in the free Stanza desktop application. The Mac version of Stanza can be obtained here, the Windows version here, and the iPhone/iPod Touch version here.
Once you have installed one of the desktop versions of Stanza, just open a decrypted eBook file in it. You will be able to read it right on your desktop.
Or, if you want to read it in Stanza for the iPhone/iPod Touch, follow the instructions here to transfer the book to your mobile device. (I find the "Sharing using Stanza Desktop" method works just fine.)
... And You're Done!
If you aren't done, then perhaps you ran into a problem? If so, check out Breaking Adobe DRM — Tips, Tricks, Workarounds for possible help. If you can't find the solution you need there, please post any questions you have as comments, either to this post or to that one.
You can get more details about the ineptkey and ineptepub Python scripts at Circumventing Adobe ADEPT DRM for EPUB.