601af2cec3828537a5a9886f36c653f6c5c1edbd
Some checks failed
Build & Test WASM / build-and-test (push) Has been cancelled
KoboPatch Web UI
Fully client-side web app for applying kobopatch patches to Kobo e-readers. No backend — runs entirely in the browser via WebAssembly. Can be hosted as a static site.
User flow
- Select device (auto-detect via File System Access API on Chromium, or manual dropdowns on any browser)
- Configure patches (enable/disable, PatchGroup mutual exclusion via radio buttons)
- Build — firmware auto-downloaded from Kobo's CDN (
ereaderfiles.kobo.com, CORS open), patched via WASM in a Web Worker - Write
KoboRoot.tgzto device (Chromium auto mode) or download manually
File structure
src/public/ # Webroot — serve this directory
index.html # Single-page app, 3-step wizard (Device → Patches → Build)
style.css
app.js # Step navigation, flow orchestration, firmware download with progress
kobo-device.js # KOBO_MODELS (serial prefix → name), FIRMWARE_DOWNLOADS (version+prefix → URL),
# getDevicesForVersion(), getFirmwareURL(), KoboDevice class (File System Access API)
patch-ui.js # PatchUI class: loads patch zips (JSZip), parses YAML, renders toggle UI,
# generates kobopatch.yaml config with overrides
kobopatch.js # KobopatchRunner: spawns Web Worker per build, handles progress/done/error messages
patch-worker.js # Web Worker: loads wasm_exec.js + kobopatch.wasm, runs patchFirmware(),
# posts progress back, transfers result buffer zero-copy
wasm_exec.js # Go WASM support runtime (copied from Go SDK by setup.sh, gitignored)
kobopatch.wasm # Compiled WASM binary (built by build.sh, gitignored)
patches/
index.json # [{ "version": "4.45.23646", "filename": "patches_4.45.23646.zip" }]
patches_*.zip # Each contains kobopatch.yaml + src/*.yaml patch files
kobopatch-wasm/ # WASM build
main.go # Go entry point: jsPatchFirmware() → patchFirmware() pipeline
# Accepts configYAML, firmwareZip, patchFiles, optional progressFn
# Returns { tgz: Uint8Array, log: string }
go.mod
setup.sh # Clones kobopatch source, copies wasm_exec.js
build.sh # GOOS=js GOARCH=wasm go build, copies .wasm to src/public/,
# sets ?ts= cache-bust timestamp in patch-worker.js
Adding a new firmware version
- Add the patch zip to
src/public/patches/and updateindex.json - Add firmware download URLs to
FIRMWARE_DOWNLOADSinkobo-device.js(keyed by version then serial prefix) - The kobo CDN prefix per device family (e.g.
kobo12,kobo13) is stable; the date path segment changes per release
Building the WASM binary
Requires Go 1.21+.
cd kobopatch-wasm
./setup.sh # first time only
./build.sh # compiles WASM, copies to src/public/
Running locally
python3 -m http.server -d src/public/ 8888
Credits
kobopatch by pgaskin. Patches from MobileRead.
Description
SRC. Experimental Web UI for patching your Kobo firmware, runs completely clientside.
https://kp.nicoverbruggen.be
Languages
JavaScript
67.2%
HTML
13%
CSS
8.7%
Go
5.6%
Shell
5.5%