Sony DPT-CP1 stylus annotation — v1
First release of this fork for the Sony DPT-CP1 (and likely other Sony Marvell EPDC devices). Brings KOReader's annotation workflow to feature-parity with Sony's own NoteCreator on-screen latency.
What's new vs upstream KOReader
- Kernel-fast ink under the pen. Uses Sony's Direct Handwriting (DHW) kernel path — the digitizer driver paints stylus pixels straight to
/dev/graphics/fb0with near-zero perceptual lag. - Userspace overlay in DU mode. Stacked above KOReader's native page surface so strokes survive SurfaceFlinger composites (`NOCONVERT_DU + SP1_IGNORE` waveform).
- Coalescing render thread. Decouples touch-event rate (~100 Hz) from EPD-waveform rate (~8 Hz). No more stutter after fast multi-stroke writing.
- `pencil.koplugin` bundled. Annotate documents with the stylus: pen, eraser (tip + side button), highlight, color picker. No manual install on `/sdcard/koreader/plugins/` needed.
- Eraser button works. Side-button-held stylus events promote to eraser through both the JNI overlay path and the evdev cook path.
- Save-on-lifecycle policy. Strokes persist on page change / document close, not during writing — no disk I/O on the input thread.
- Menu position. `Pencil` is the first entry in Tools in both Reader and File Manager menus.
Install
```bash
adb install -r koreader-android-arm-v2026.03-143-gd03a090ce_2026-05-30.apk
```
If upgrading from a build signed with a different certificate, `adb uninstall org.koreader.launcher` first.
Build
```bash
git clone --recursive https://github.com/plateaukao/koreader.git
cd koreader
docker run --rm --platform linux/amd64 \
-v "$PWD:/home/ko/koreader" -w /home/ko/koreader \
--entrypoint bash koreader/koandroid:0.9.7-22.04 \
-lc './kodev release android-arm'
```
Architecture write-up
Full ADR with sequence diagrams: plateaukao.github.io/ADR/#koreader-sony-stylus-debug-and-refactor.md
Tested on
- Sony DPT-CP1 (Android 5.1, firmware 1.6.50.14130)
Other Sony Marvell EPDC devices (DPT-RP1, etc.) should work but are untested.