Thread: JBPatch
View Single Post
Old 04-16-2012, 06:12 AM   #1
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
ixtab's Avatar
Posts: 2,907
Karma: 6727286
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Cool JBPatch

Version 4.0.0 (2013-04-13)
  • Fix Reader layout and add hyphenation support for .mobi/.azw books (does not apply to KF8/.azw3 books -- see here for an alternative solution for azw3)
  • Change display margins
  • Look up words in all applicable dictionaries, instead of only one
  • Modify "Device Info" page to include JBPatch information
  • Customize reader font sizes (FW 5.1.x; notes for newer firmwares are here)
  • Customize progress display while reading books (FW 5.1.x only)
  • Book Cover View on Home screen and in Collections (FW 5.1.x only)
  • Support all orientations in the Java UI (including upside-down), working for Home Screen, Kindlets, ... (FW 5.1.x only)
  • Password-protect books (FW 5.1.x only)
  • Text-To-Speech on all books, regardless of language or DRM (FW 5.1.x only)
  • Better scrollbars, actually usable with a finger, and working in menus (FW 5.1.x only)
  • Automatically install the developer keys when required (certificate bundle version 2012-10-02) (FW 5.1.x only)
  • Modify Collection Count Behavior, accounting for nested collections (FW 5.1.x only)
  • ... and potentially many more

For instance, here are images showing the hyphenation (animated), the dictionaries patch (animated), the progress bar, and the cover view:
Click image for larger version

Name:	hyphenation.gif
Views:	10843
Size:	79.0 KB
ID:	90081Click image for larger version

Name:	dictionaries.gif
Views:	9811
Size:	71.3 KB
ID:	93570Click image for larger version

Name:	progressbar.gif
Views:	9878
Size:	44.2 KB
ID:	91269Click image for larger version

Name:	coverview.gif
Views:	13880
Size:	84.4 KB
ID:	90133

...and here are a few screenshots of the JBPatch User Interface:
Click image for larger version

Name:	jbpatchui_overview.gif
Views:	13425
Size:	21.2 KB
ID:	89401Click image for larger version

Name:	jbpatchui_conf.gif
Views:	12194
Size:	31.6 KB
ID:	89402Click image for larger version

Name:	jbpatchui_system.gif
Views:	9099
Size:	37.3 KB
ID:	89403


JBPatch (Java Bytecode Patch) is a framework which allows to replace/modify Kindle functionality, without having to physically modify the files present on the device. Patches are pluggable, meaning that everybody can create modifications, and you can install as many (or as few) as you want. This can only modify Java-based functionality, but that covers 100% of the UI of Kindle 1 - 4, and still about 75% of Kindle 5 (Kindle Touch / Paperwhite). Patches are generally expected to be rather small, and to modify very specific aspects. However, they can in principle be arbitrarily complex -- everything is possible!

So far, only patches for Kindle Touch and Paperwhite have been released. The general approach should work on other models though. If you find this interesting, and could test it on other devices, you're more than welcome to try it out, and to comment here. (UPDATE: thanks to arikfunke, a bare-bones JBPatch now works on the K3!)

  • Kindle Touch, Firmware 5.1.0 -, or Kindle Paperwhite, Firmware 5.3.1 - 5.3.4. However, the only firmwares that are actively supported are 5.1.2 (Kindle Touch) and 5.3.4 (Paperwhite). See this post, and the notes further below, for the reasons. To prevent your Kindle from automatically installing a newer firmware, use dsmid's BackDoorLock.
  • Of course, the jailbreak is required.
  • In addition, the user interface requires the Kindlet Jailbreak (mirror: update_k5_ALL_PW_ALL_kindlet_jailbreak_install.bin from in KUAL thread).
  • If you get a "Your device is not authorized as a Test Kindle" message when opening the UI, install the Developer Certificates Bundle (mirror: update_k5_ALL_PW_ALL_devcerts_install.bin from in KUAL thread).

Downloads / Source Code:
Download the file attached to this post to get the latest release version, and install as described in the contained README file.

Source code is available from here.

JBPatch is completely localizable, but the download only includes english translations. Translations for other languages can be downloaded from here. Those files are updated hourly if changes to the translations are detected. More information is available in the Wiki.

The abovementioned page only contains downloads for languages that are officially supported on the Kindle Touch. Links to "unofficial" language packs can be found below:
  • chinese (by szfisher)
  • hungarian (by hanog; translations only for the subset of patches supported on FW 5.3.x)

GUI Launcher Integration (KT):
If you wish to access JBPatch from the GUI Launcher, you can use this file. This is not required, just an optional feature.

New Patches:
As said, this is a pluggable mechanism, and you can enable as many patches as you want. Patches can be developed by everyone, but some reverse engineering skills are required. Here are some HOWTOs which walk you through the process of creating a patch: simple, more complex. Note that these are referring to a previous version of JBPatch. For newer versions, slightly more effort is required to accommodate for the UI requirements (but not for the actual patching itself).

Documentation / Contributions:
The primary source of documentation is now this Wiki page. The intention of that page is to consolidate the information contained in this thread in an organized and easily-accessible manner. In other words: everybody is more than welcome to modify the Wiki page and to improve its usefulness, by adding or clarifying topics, or by contributing new patches and localizations.

The Wiki page and this thread are meant to complement each other: think of the thread as the place where ongoing topics are discussed, while the Wiki page serves as a "one-stop-shop" for information. IMO, this merges the best of both worlds: cutting-edge, but sometimes "chaotic" discussions in the forums (chaotic in the sense that information tends to get lost, or difficult to find, as the discussion progresses), plus easily-accessible information on the Wiki. Of course, you are welcome to propagate important changes in the Wiki to this thread, and vice-versa.

Version History and Release Announcements:

Installation/Update Notes:
  • Don't uninstall previous versions before updating. Just install the new version on top of the older one (but read all of the following notes).
  • If you are upgrading from any version lower than 4.0.0: While this isn't absolutely required, I strongly recommend to uninstall, then reinstall JBPatch.
  • If you are upgrading from a version between 2.2.0 and 3.2.0: no further action required.
  • If you are upgrading from a version between 2.0.0 and 2.1.2: all bundled patches are automatically updated, but you have to re-download any "non-bundled" patches. If you don't know what "non-bundled" even means, you can probably just ignore this notice.
  • If you are upgrading from version 1.3.1 or earlier: please remove all files in the opt/jbpatch/ directory (if it exists) before installing this version.
  • If you experience issues with the user interface after updating JBPatch (or a single patch), your localization files are probably out of date. The easiest way to fix this is to copy the most recent localization files to the device.
  • Update error 3 on installation?
    Use the "Update your Kindle" entry from the Settings menu, not the "Restart" one.

Other Notes:
  • Questions: Feel free to post your questions in this thread. However, please try not to ask questions which have already been answered many times before. No, I'm not asking you to read the thousands of posts in this thread, but please read at least the *entire* Wiki page, and use the forum's search function, before asking your question.
  • Patch requests: If you have a proposal about how an existing patch can be improved, or an idea for an entirely new patch, please post them in this thread.
    Unfortunately, because of Amazon's recent policy of aggressively re-obfuscating (almost) the entire framework with every new firmware release, chances that new patches will be developed are... rather small. More information here and here. Sorry, folks. If you want to complain, complain to Amazon.
  • Links: You are free to share and redistribute the JBPatch files in whichever way you please. However, note that the download links provided here are NOT stable links. In other words: DO NOT SHARE DIRECT DOWNLOAD LINKS to the files in this post; instead, link to THIS THREAD.
  • Kindle 3 users: Although not officially supported, JBPatch also works on the K3!

This is completely off-topic - but since you already clicked on the "spoiler" button, you can as well watch the video, too. I think you'll like it

If you like JBPatch:
I sincerely hope that you find JBPatch useful. If you like the enhancements that it offers to your Kindle experience, you are more than welcome to donate a little something... but don't give your money to me. Please donate for a much more important cause, namely: for a Literacy project in Laos. You will make not only me happy. Thank you!

Make sure to download the correct file for your device!
  • Kindle Touch, Firmware 5.1.x: download *
  • Kindle Touch, Firmware 5.3.2 or download *
  • Kindle Paperwhite, Firmware 5.3.x: download *
Attached Files
File Type: zip (1.27 MB, 2130 views)
File Type: zip (1.21 MB, 3353 views)
File Type: zip (1.21 MB, 2816 views)

Last edited by ixtab; 09-21-2013 at 04:04 PM.
ixtab is offline   Reply With Quote