Kindle DRM Removal Using SCons

I have a Kindle. I like it a lot, but it has some issues. The recent Macmillan vs. Amazon fight is one. Another is the DRM on every file purchased from Amazon. If I buy a book, I want to know that I can read it forever. Luckily, smart people figured out how to break the DRM on most Kindle books a long time ago. A few books are in another format called Topaz that until recently hadn’t been broken. I just found a book I wanted that was in that format, so I went and looked again, and it turns out someone finally cracked it about a month ago.

I’m not going to link to any of the actual tools here, but they shouldn’t be too hard to find. My contribution is an SConstruct file for the SCons build system that automatically copies all my books to my computer and removes the DRM all in one step.  It’s not your typical use of a build system, but when I thought about what I was trying to do, I realized it was really just a simple dependency graph, something SCons is perfect for.

The complete process is:

  1. Plug Kindle into computer via USB
  2. In a shell, cd <path/where/this/file/lives>
  3. scons

This will automatically get any new books, and remove the DRM (and in Topaz’s case, convert them into svg files viewable in a browser)

Installation is not difficult either:

  1. Install SCons
  2. Put this SConstruct file in the directory where you want to save your books
  3. Get your Kindle’s PID and put it in the SConstruct file (the DRM tools will tell you how to do that)
  4. Edit the location your Kindle gets mounted to. The one I have in there is for a Mac, but except for that path I don’t see any reason this won’t all work on any OS
  5. Put the DRM tools in a tools subdirectory

SConstruct file after the jump
› Continue reading

Tags: , , , , , ,

Sunday, February 21st, 2010 Uncategorized 3 Comments