Log in

No account? Create an account


April 8th, 2014

Ebook DRM Removal Guide @ 01:28 pm

Hi there!

This is a step-by step guide on how to make a backup copy of your purchased ebooks. In the process, we'll be stripping DRM (Digital Rights Management) software -- i.e. copy protection -- from the ebook files. This will allow you to read the ebooks you bought on any device you want. This guide is intended for a reader with at least a basic level of computer literacy. You'll need to be able to download and install programs from the internet and understand how to navigate to different drives and folders.

I'm assuming you buy your books from either Amazon or Barnes and Noble, and use Windows. The necessary software is also available for Mac OS X and Linux; I'm just not comfortable enough with either OS to write instructions for them. If you buy your books through Apple, you're out of luck, as the DRM removal software doesn't currently support iBooks.


Why do I need a backup? My purchase information is saved on the site where I buy my books, and I can re-download them as many times as I need to.

Personally, I keep my physical books and movies on shelves in my home, where I have control over when and where I have access to them. If I kept them at, say, my dad's house, I could still come over and get them any time I liked, unless it was the middle of the night. Or he asked me not to visit one day because he and my stepmother were sick. Or, worse, because he suddenly decided to up and sell them because he felt like being a dick one day (note: my dad is not actually a dick). There are a growing number of stories of ebook sellers yanking specific titles from people's devices without warning or closing accounts and denying the customers access to their purchases. Backing up your books will ensure that your library is safe no matter what happens. It also means you'll be able to easily transfer your books from one brand of device to another in case Amazon gets taken out by ninja assassins, Barnes and Noble goes the way of Borders (hiring all those ninja assassins is expensive!), or the Doesn'tActuallyExistYet9000 turns out to be the e-reader of your dreams and you fling your suddenly hateful Kindle/Nook out the window in a fit of sheer bibliophilic glee.

But isn't cracking copy protection illegal? Will I get in trouble for this?

It's certainly a legal gray area, and you're going to want to look up the laws in your country if you're really worried. In the US, the current precedent from recent court cases is that while it's definitely illegal to distribute copyrighted material, and it's also illegal to create DRM-cracking software, actually using the software that someone else wrote to make a backup copy of your own legally purchased books is allowable under Fair Use, provided that you keep all copies yourself and do not distribute them. Not bursting into your local police station, leaping on the desk, and shouting, "I used cracking software to make quasi-legal copies of my media!" is probably also a good idea.

Obligatory Piracy Comment: If you don't find "don't distribute your books because keeping authors fed and able to pay their electric bill is the right thing to do" to be a compelling argument, note that while the DRM will be removed from your files, digital watermarks that tell Amazon and B&N exactly who purchased this book -- and who to sue if it ends up on the internet -- will not be. I haven't researched how to remove these watermarks, and I don't care to. So don't pirate your books.

Is this going to be a pain? I mean, these instructions are pretty long. Am I going to have to do all of this every time I buy a book?

What we're going through here is the initial setup process. It can be a little intimidating, but most of these steps are one-time-only. Once you're good to go, the DRM-removal and backup process is very easy and automatic, provided that you're diligent about maintenance. All the DRM-removal tools in the world won't help if you don't use them whenever you buy a book.

Okay, I'm convinced. Let's do this.

Great! The first thing you're going to want to do is...

1. Get the Ebook Files Onto Your Computer

While you can technically plug your e-reader into your computer and pull the files off of it, I honestly find that to be more trouble than it's worth. B&N and Amazon really don't want you accessing these files, so they go out of their way to make them a pain to find. There's a much easier way to get copies of the ebook files, and that's to download the Nook or Kindle PC reading apps.

Nook for PC is available here: http://www.barnesandnoble.com/u/nook-for-pc/379003591/

Kindle for PC is available here: http://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000426311

Download and install one or both of these programs. You'll be prompted to enter your account login information; once you do so, the books you've purchased will appear. Now you'll need to individually download each book to your computer. For the Nook app, hovering your mouse over the cover of a book will cause a pop-up window to appear with the download button. For Kindle, you'll need to right-click the book cover, then select "Download".

Once downloaded, you can find your files conveniently located in your "My Documents" folder. Kindle files will be in "My Kindle Content", and Nook files will be in "My Barnes & Noble eBooks". Barnes & Noble names its files conveniently, with the book's title in the filename. Amazon names its files strings of random gibberish. You can rename these files if you want, but it's not really necessary. Also, the Kindle files that you want have blue book icons. The other files in your "My Kindle Content" folder are temporary files generated by the Kindle for PC program. We won't be using them here, and they can be deleted without causing problems. (Make sure Kindle for PC is closed before you try to move, delete, or rename files or you will get an error message.)

Okay, so now we have a bunch of ebook files. They're loaded with DRM, so aren't very useful as they are. We need to strip the DRM.

2. Download and Install Calibre

Calibre is like iTunes for ebooks. It will organize your collection, and can upload books to your e-reader if you want. It's also open source, which means it will always be free to use.

Download it here: http://calibre-ebook.com/download

Note: Make sure you download the correct version! If you're not sure whether your version of Windows is 32-bit or 64-bit, this page will tell you how to find out: http://support.microsoft.com/kb/827218

When you install Calibre, it will ask you where you want your library stored. Calibre will create a folder in the location you specify, and that'll be the permanent location of your book backup, so choose somewhere you'll remember, such as C:\Ebooks or C:\Users\[Your User Name]\My Documents\Ebooks. You can also have multiple Calibre libraries at a time. I find it useful to keep books purchased from different sources in different libraries, but you can organize however you like.

3. Download DRM Removal Tools

By itself, Calibre can't read your DRM'd books. That's part of the whole "legal gray area" thing; if the core program can't crack copy protection, its creators can't be harassed by publishers trying to shut down their site. But since it's open source, other people are free to develop program extensions called "plugins" that will add to Calibre's functionality. We're going to install one of them now. The plugin we're looking for is found here: http://apprenticealf.wordpress.com/2012/09/10/drm-removal-tools-for-ebooks/

Here's what you're looking for:

There are two download links listed. I strongly recommend using the one at mega.co.nz because that file host doesn't try to sneak bundleware on your system. If you opt for the datafilehost.com mirror (whyyyyy), make sure to uncheck the "use our download manager and get recommended downloads" option before clicking download. You probably wouldn't wind up with a virus, but whatever you did end up with is likely to be annoying and nobody has time to uninstall random crap that they didn't want in the first place.

Once you've downloaded the tools file, extract the zip and open the folder. The folder we're looking for is called "DeDRM_calibre_plugin". Inside it is a readme and another zip archive that contains the actual plugin. You don't need to unzip it, but make sure it's somewhere you can locate later.

4. Install the Plugin using Calibre

Run Calibre and let the welcome wizard run to set up your library if you haven't already done so.

Click on Preferences up at the top (gears icon). In the window that pops up, click Plugins (green puzzle piece under Advanced near the bottom), then click on Load plugin from file. Locate the DeDRM_calibre_plugin zip file and click Open.  A window will pop up asking if you're sure; click yes. Now your plugin is installed.

If you don't buy books from bn.com, we're done here -- go to the next step. But if you buy Nook books from Barnes & Noble, there's one more hoop to jump through.

Barnes and Noble's DRM creates a unique encryption key using the name and credit card number that they have on file for you. In order to break this DRM, you must provide this info to create a decryption key.


Click Customize plugin.

Click Barnes and Noble ebooks.

Click the green plus sign ("Create new Barnes and Noble key")

A new window will open with three fields. In the first field you're just naming the decryption key that you're about to create, so you can put down anything. The second field must contain your name EXACTLY as it is listed on your account page at bn.com, and the third field must contain the default credit card number that you have on file with bn.com, without spaces or dashes.

Note: The credit card number is the one that B&N has on file on the date that you download the ebook, not the purchase date. It doesn't matter if you bought the book five years ago using a credit card that expired the day after purchase; if you download the file today using Nook for PC, the credit card info you need is your current one.

Once you've entered the information, click OK. You now have a decryption key based on the data entered. You can create as many keys as you like. When you're done, click Close, then Click OK on the Customize DeDRM window, Apply on the Preferences - Plugins window, then finally Close on the main Preferences window.

EDIT 4/28/15: Barnes and Noble has changed their DRM scheme as of mid-2014. See here for new instructions on how to obtain key data to decrypt your Nook books (I will also paste the contents of this link into the comments below).

5. Close Calibre and restart it

This will ensure that your newly installed plugin will work correctly.

6. Import your books!

Now it's time to add those books that we downloaded all the way back in step 1 to Calibre and let the plugin automatically strip the DRM from the files. You can either drag and drop your ebook files directly into the Calibre library window or use the Add Books button at the top of the screen.

Once you have some books in your Calibre library, we want to make sure everything worked. Double-click one of the files to attempt to open it in Calibre's built-in e-reader.

You want to see this:

Not this:

(Assuming of course that the book you double-clicked on was Dirk Gently's Holistic Detective Agency by the late, great, Douglas Adams. If you chose a different book you should see that book instead. But seriously, why would you?)

If it worked, congratulations! You've successfully created a DRM-free backup copy of your ebook. You can see where Calibre stored your file by right-clicking on the title and selecting Open Containing Folder.

After some quick cleanup -- delete the various installers, the tools file you downloaded, and the old ebook files -- you can bask in the satisfaction of actually owning your book collection. Good job!

7. Calibre Hints

I'm not going to teach you how to use Calibre. That's outside the scope of this document and there are lots of tutorials and support forums floating around. But this is a very versatile program, and you definitely want to be able to use the following functions from the top menu bar:

Edit Metadata - Make sure all of the info about the book (author, title, series, cover art, cover blurb, etc.) is correct and complete. The easiest way to do that is using the "Download Metadata" button at the bottom of the Edit Metadata screen. It'll look your book up on Amazon and whatever other source(s) you specify and import the data automatically. You can also update everything manually, if you want -- great if you want your Pern books to have the Michael Whelan dragon cover art and not those horrifying flying dinosaur-things that the current covers are sporting.

Convert Books - With DRM gone, Calibre can change the format of your ebooks. Useful if you're like me and read Kindle books on a Nook (azw to epub).

Device / Send to Device - These buttons only appear if you actually have your e-reader connected to your PC via a USB cable. Calibre will upload your books to your e-reader for you.

Library - Switch between multiple libraries and do other file-management type functions. Also contains a "pick a random book" feature for the indecisive.

Remove Books - If you use this option, Calibre will delete your library files. Not something you want to do willy-nilly. But the arrow next to the Remove Books button gives you some options that may be useful, such as removing specific formats or removing all formats except the one that you specify. I convert all of my books to epub for use on my Nook and don't want to keep around all those azw and mobi files that are taking up space.

8. In the Future

Now that your software is all set up, the next time you buy a book all you have to do is download the ebook file (second half of step 1) and import it into Calibre (step 6). It's simple, as long as you remember to do it every time you make a purchase! Remember, backups only work if you actually create them.

9. End
That's it! Thanks for reading!
Share  |  |


[User Picture Icon]
Date:April 8th, 2014 06:30 pm (UTC)
Cut tag, please?
[User Picture Icon]
Date:April 8th, 2014 06:31 pm (UTC)
Whoops -- sorry!
Date:April 8th, 2014 07:52 pm (UTC)
I've used this process but I always forget how to do it months later when I realize I've gotten a few new books. Also seems like I can never find the directions I used the time before... so yay! thanks! bookmarking!
[User Picture Icon]
Date:April 8th, 2014 08:12 pm (UTC)
That's kind of the "nice" thing about reading Kindle books on a Nook the way I do; I'm forced to do this if I want to read the books I've purchased!

Here's how I buy books...

- Buy from Amazon or whereever.
- Add to Goodreads.
- Add to my backlog reading list spreadsheet.
- Download and import into Calibre.
- Upload to Nook.
- Rename the old DRM'd file and save it as an additional backup just in case.
[User Picture Icon]
Date:April 10th, 2014 05:48 pm (UTC)
Thank you. This has been something that bugs me. I may someday want a non-Kindle. I'm not sure if Amazon is going to make another e-paper DX. And, hang it, yes, if I *bought* that e-book, I should be able to read it even if Amazon and I end up in some funky dispute.
[User Picture Icon]
Date:April 10th, 2014 11:56 pm (UTC)
You're welcome. Let me know if the instructions make sense -- they make sense to me, but then they would, wouldn't they?
[User Picture Icon]
Date:April 11th, 2014 04:47 pm (UTC)
It definitely seems to - I'll probably try it tonight or tomorrow and find out for sure. But reading it, it looks like my keyboard and mouse could duplicate what you've done.
[User Picture Icon]
Date:April 21st, 2014 02:43 pm (UTC)
Thanks! I recently downloaded a stripper for epubs on the Mac to temporarily acquire a couple of research books, three day checkouts just weren't suitable. And I really hate Adobe's methodology for dealing with DRM.

One thing that I really like on my Mac is the ability to send a printout to a PDF, it made copying some web sites to my Nook really easy for my current classes. But what I REALLY want is the ability to print directly to epub, that would make my life so much easier since then I could reflow text and increase the font size. After the semester ends I should search around for it, and if not, I have a new book on Objective C sitting around, maybe I should get back in to programming.
[User Picture Icon]
Date:April 24th, 2014 05:01 am (UTC)
(Gotta remember not to read when bleary. Damn it, I spent two minutes wondering how one downloads an exotic dancer.)
[User Picture Icon]
Date:April 24th, 2014 05:12 am (UTC)
You can do some really amazing things with 3-D printers these days. ;-)
[User Picture Icon]
Date:April 28th, 2015 02:44 pm (UTC)

New Nook DRM Scheme

Changes at Barnes & Noble

In mid-2014, Barnes & Noble changed the way they generated encryption keys. Instead of deriving the key from the user's name and credit card number, they started generating a random key themselves, sending that key through to devices when they connected to the B&N servers. This means that some users will find that no combination of their name and CC# will work in decrypting their ebooks.

There is a work-around. B&N's desktop apps for Mac and Windows (nook for Mac/PC, nookStudy) generate a log file that contains the encryption key. For Mac the log file can be found somewhere in [user folder]/Library/Application Support/Barnes & Noble/ and for Windows the log file can be found somewhere in C:\Users\admin\AppData\Roaming\Barnes & Noble\

In both cases, the log file will be called BNClientLog.txt

You will need to open the application, sign in to your account, and download your books, checking that you can read them in the application, and then quit the application.

Then you must open the log file in a text editor and search for CCHashResponseV1. Immediately after that text should be some more text, similar to ccHash: "rLYiGD+vcPoXvsj/87kDAb1AkBy="

Copy the text after ccHash, include the " marks. Save it in a new text file, with file name extension .b64

Follow the instructions below "Importing Existing Keyfiles:" to import that newly saved file into the preferences.

Importing Existing Keyfiles:

At the bottom-left of the plugin’s customization dialog, you will see a button labeled "Import Existing Keyfiles". Use this button to import existing ‘.b64’ key files. Key files might come from being exported from this or older plugins, or may have been generated using the original i♥cabbages script, or you may have made it by following the instructions above.