Skip to content

KindleModding/KWebBrew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KWebBrew

badge

(K·Web·Brew)
Kindle Web-Based HomeBrew Launcher

KWebBrew KChess

What Is It?

The KWebBrew Launcher (Kindle Web-Based HomeBrew Launcher) allows people to code custom HTML webapps which are then stored locally on the Kindle itself, without the need for an internet connection or jailbreak!
The KWebBrew Launcher acts as a launcher which automatically scans for apps, and then allows you to launch them with ease
The KWebBrew Launcher also comes with a few applications of its own, such as a read-only file manager (write filesystem access requires jailbreak, which is not the point of KWebBrew
Lastly, the KWebBrew Launcher also comes with an API which other applications can use to read local files/directories as well as a polyfill including most standard ES6 features (see Limitations)

Compatability

KWebBrew works on firmwares <=5.16.3 It won't work on firmwares starting 5.16.4 because of the new Chromium browser that doesn't support the file:/// protocol.

Installation

  1. Download the latest release KWebBrew.zip file
  2. Extract the zip file
  3. Copy the apps and kwebbrew folders to the root of your Kindle
  4. Copy the .active_content_sandbox folder to the root of your Kindle (note: this erases your web browser history and any custom bookmarks) DONE!

How To Use

KWebBrew automatically installs a bookmark for itself when copying the .active_content_sandbox folder, simply select this bookmark and it will open KWebBrew

KWebBrew also doesn't require an internet connection to function, simply open it and select an app

How do I install apps?

Apps are HTML apps which are installed in the apps folder of your Kindle, they will appear on the launcher as shown in the images To install an app, simply download it, and copy the folder to the apps folder KWebBrew comes with a few proof-of-concept apps such as Sudoku (Created by tesseractcat on the mobileread forums) or KChess (still a work in progress) and KCalc (a Kindle calculator)

Info for developers

Please see the wiki (Work In Progress)

How Does It Work?

Since the Kindle browser can access local files, and the fact that we know the mount path for USB, this means that the browser can load local HTML files!
In fact, the browser itself can even bookmark these files for quick access.
However, the browser does not support fetch or xmlhttprequests to get local files, luckily, I found a workaround by using iframes and getting their source. Additionally, the use of a polyfill allows apps using the KWebBrew API to use ES6 syntax in their apps, while the browser normally wouldn't support it

Limitations

Note that whilst the polyfill works extremely well, there are some things that can't be replaced by a polyfill, for this reason the following features do not work:

If you find any unexpected behaviour, please open an issue

Credits

Using custom polyfill from: polyfill.io - MIT
"Exploit" Discovery: mobileread forums also here