Saturday, July 23, 2011

Pimp your Kindle

I really like the idea of ebooks. These E Inks displays have an astonishing quality: I was very surprised to be even able to read a Din A4 PDF, downsized to fit the 6 inch display of a Kindle---although it is hard to read.

So, as I like the idea, I bought an ebook reader. I decided to buy Amazon's Kindle reader, as there are a lot of ebooks available thanks to Amazon. While I'm still enthusiastic about the really good display, I'm completely disappointed in the Kindle software. Most of all, ebooks are always displayed using justified text. But since hyphenation is not supported, this leads to really ugly layouts. The combination of justified text without hyphenation is a show-stopper!

So, I tried to figure out a solution to that problem. Fortunately, I found a Kindle version of the FBReader (fbkindle), which is not too complicated to be installed on the Kindle. FBReader displays ebooks in epubs format, and it provides hyphenation as known from TeX. Really nice! This blog entry summarizes the necessary steps along with a short presentation of additional tips.

Motivation


Before explaining the necessary steps to install FBReader, I just want to show you the differences between the original Kindle AZW reader and the FBReader.


Figure 1: Comparison of original Kindle AZW reader (left) and FBKindle epub reader (right)

Figure 1 shows two scans of the Kindle. I have used Melville's Moby Dick (free Amazon vs. Feedbooks version). It is freely available, not only at Amazon but also at some other ebook sites, and besides it is one book I always wanted to read. While some of the differences stem from the information stored in the ebooks themselves, other things are only (missing) features of the reader software. However, in my experience, the example is rather a typical one: I've found much worse (free) ebooks, and also slightly better ones. Let's go into the details:

The first obvious thing is hyphenation. As said above, the Kindle cannot hyphenate, which is a real problem due to the justified text layout used. The worst thing about that is, that it sometimes produces pseudo paragraphs, as you can see in the circle marked with "1a" (and also in the second line of the following chapter). FBReader supports hyphenation (circle marked "1b"). This is a software problem and no missing feature of the ebook. That is: No AZW ebook will support hyphenation, at least not with the current Kindle reader software.

The other differences stem from the ebooks themselves. As the headings demonstrate ("2a" vs. "2b"), the AZW book does not correctly layout the heading. That is, the title of the heading is formatted as plain text. While this is only ugly, I have found free AZW books with footnotes inserted into the plain text without anything indicating the footnote (the free version of Hegel's Logik). An even worse problem is, that some books do not come with no table of contents, and no chapter markers. As indicated with the "3a", the AZW version of Moby Dick does not provide any chapter markers, while the EPUB version does ("3b"). Actually, with out these markers and TOC, an ebook like Moby Dick is not usable at all. Sometime, it is possible to generate TOCs with tools such as Calibre, but, hey guys, I want to read a book, not create and fix it.

While the FBReader provides a much better layout, I really miss one feature the Kindle reader software provides: dictionary integration. This is a really cool feature, and although is is listed as a planned feature for FBReader, is is not implemented yet. At the moment, I'm using my Android's ColorDict to help me out, just as I used to do when reading books printed on paper. Weird! The dictionary coming with Kindle is an english dictionary, and I have installed a free german-english dictionary, as explained below.

Overview



Figure 2: Kindle root folder after installing 3rd-party software



Figure 2 shows my Kindle root folder, with some subfolder created by the software described below. It contains a folder with the collections database and some configuration files of the Kindle AZW reader (1), as well as your content (2). All third-party software is installed on the Kindle by first mounting the Kindle to your PC or Mac, and then by copying some installation file into the mounted root folder (0) (sometimes, this folder is referred to as "/mount/us", on MAc OS X, it is the root folder when you mount your Kindle). Then, the Kindle needs to be rebooted, and when starting up, the software is installed automatically (and the installer is removed). The installer usually creates a folder in the Kindle's root folder.

Frankly, I really hate to install hacks on the Kindle. So, please Amazon, improve your Kindle software! The hardware is really cool, but the software is rotten! Meanwhile, here's how to install alternative software. Frankly, this is not the first list, and you will find similar lists on the web. One of the best places is the mobileread.com forum, and a list of hacks can be found there as well.

The quick installation should only serve as a short guide, please read the documentation linked to before installing anything. You may lose warranty when applying the hacks described below, or you may break your Kindle. Use it on your own risk!

"Jailbreak" for Kindle


A small "security" feature built into the original Kindle software prevents arbitrary 3rd-party software to be installed. So, we first need a special piece of software, to work around this issue. This is the "jailbreak". There exists different software versions of the original Kindle software, and they require different software hacks as well. The Kindle (at the time writing this post) comes with version 3.1. Yifan Lu has published a jailbreak for that version:

Download
Yifan Lu's website: Kindle 3.1 Jailbreak
Quick install
  1. Unpack kindle-jailbreak.zip
  2. Copy installer update_jailbreak_*_*_install matching your kindle version into Kindle's root folder (Fig. 2 (0))
  3. Restart Kindle (Home, Menu - Settings, Menu - Restart
Documentation
See download location.


The ad-base Kindle is not that easy to jailbreak, and frankly: if you choose to save that little money and accept ads, then do not complain about the original software. However, according to Yifan Lu, some non-ad Kindles also come with the new 3.2.1 software, so here's the link on how to jailbreak this version as well (I didn't try it myself): Yifan Lu: Kindle 3.2.1 Jailbreak (also see thread at mobilreader).

Launchpad


In order to be able to start 3rd-party software, you need some launcher software (as there is no command line available by default). Launchpad is a small utility, which enables the user to execute commands after pressing a defined sequence of keys, as demonstrated on this Youtube video.. Launchpad is available via the mobileread.com forum:
Download
http://www.mobileread.com/forums/showthread.php?t=97636
Quick install
  1. Download and unpack lpad-pkg-001c.zip
  2. Copy installer update_launchpad_*_*_install.bin matching your kindle version into Kindle's root folder (Fig. 2 (0))
  3. Restart Kindle (Home, Menu - Settings, Menu - Restart
Documentation
See download location.

After successfully installing launchpad, a new subfolder should have been created in your Kindle's root folder, as shown in Figure 2 (3). Inside that folder, you will find the configuration files *.ini with defined key sequences and commands to be executed. Note that you always have to press Shift before the defined key sequences, and that you have to press all keys one after the other and not all at the same time.

FBReader (FBKindle)


Now we are ready to install FBReader, in order to be able to read DRM-free EPUB books on your Kindle. There exist two versions: FBReader by Dzha and FBKindle by Andy Wooden. I have chosen FBKindle , as it runs vis-a-vis with the original Kindle reader software, and one can easily switch between both version using a keyboard shortcut. Both versions are ports of the original C++ FBReader software. Unfortunately, this version has not been updated for quite some time, especially because nice things such as dictionary integration are still missing. Note: There also exists a sourceforge project called FBKindle, unfortunately it does not contain any files yet.

Download
http://www.mobileread.com/forums/showthread.php?t=107371
Quick install
  1. Download and copy fbKindle-bin.tar.gz into Kindle's root folder (Fig. 2 (0))
  2. Add the following lines to your launchpad/launchpad.ini file (or create launchpad/fbreader.ini containing these line):
    [Actions]
    F R = !/mnt/us/fbKindle/goqt.sh FBReader &
    U T = !cd /mnt/us; tar zxvf fbKindle-bin.tar.gz; rm fbKindle-bin.tar.gz;echo 101 >/proc/eink_fb/update_display
  3. Restart Kindle (Home, Menu - Settings, Menu - Restart) in order to activate new key sequences


  4. Activate FBKindle installation key-sequence, i.e. quickly press Shift, then U, and then T. This will unpack the FBKindle archive, and install FBReader in a subfolder fbKindle on your Kindle, as shown in Fig. 2 (4)


  5. Now, start FBKindle via Shift, then F, and then R. Actually, you will have to restart FBKindle every time after restarting your Kindle!


Documentation
See download location,german guide at e-reader-forum.de.
Unfortunately, the library management of FBReader/FBKindle is as bad as the the management functions of the original Kindle software. Seriously, I'm wondering how Amazon (or in that case the FBReader programmers) expects user's to install and manage more than 20 books. Anyways, the menu button will activate the FBReader menu, and from there on it should be self explaining (shortcuts are documented on the pages linked to above). The nice thing about FBKindle is, that you can easily switch forth and back between FBReader and the original Kindle software by pressing shift and alt simultaneously.

Free dictionaries for the Kindle software

Back to the original Kindle software. A really nice feature of the Kindle reader is that is comes with integrated dictionary support. Since I usually need english to german translations, I was looking for an english-german dictionary. There exists a lot of free dictionaries, and I found a free solution for the Kindle as well. Michael Sheldon (kudos to Michael) has converted free dictionaries into the mobi-format, which is supported by Kindle.
Download
http://mikeasoft.com/~mike/kindle-dicts/
Quick install
  1. Download dictionary file, e.g., English-German.mobi, and place it inside your documents folder
  2. Select this dictionary as your primary dictionary via menu - Settings, menu - Change Primary Dictionary
Documentation
Michael Sheldon's blog

Custom Screensaver

Not really necessary, but nice to have: screensaver with your own pictures. I really do not understand why Amazon does not directly support that feature. So, you have to firstly install a 3rd party screensaver hack. Then, you can copy your own pictures into a folder of the screensaver software.
Download
http://www.mobileread.com/forums/showthread.php?t=97636
Quick install
  1. Download and unpack kindle-ss-0.22.N.zip
  2. Copy installer update_ss_0.22.N_*_install.bin matching your kindle version into Kindle's root folder (Fig. 2 (0))
  3. Restart Kindle (Home, Menu - Settings, Menu - Restart
  4. Installer should have created a folder linkss, as shown in Figure 2 (5). Copy your images (600x800 pixels) into the created folder linkss/screensavers.
  5. Restart Kindle (Home, Menu - Settings, Menu - Restart) in order to activate new images.
Documentation
See download location.