Fullscreen surface at INT_MAX layer. Raw evdev input.
~60fps render loop. No Activity, no framework, no JVM.
Creates a native surface at INT_MAX z-order. Sits above lock screen, status bar, everything.
MT Protocol A and B for touch. Separate key device for volume and power. Dedicated input thread with pipe-based stop signal.
EGL window surface on the native window. Swap interval 1. Frame callback with monotonic clock delta.
Touch ranges, event paths, sysfs nodes, SDK version and orientation defined per device in StratumConfig.h.
| method | returns | description |
|---|---|---|
| init() | bool | Connect to SurfaceFlinger, init EGL, open input devices. |
| run() | void | Start frame loop and input thread. Blocks until stop(). |
| stop() | void | Signal shutdown. Safe from any callback or thread. |
| width() | int | Display width in pixels after orientation swap. |
| height() | int | Display height in pixels after orientation swap. |
| aspect() | float | width / height. |
| vibrate(ms) | void | Write to vibrator sysfs node. |
| setBrightness(v) | void | Set panel brightness, clamped to configured range. |
| log(tag, fmt, ...) | void | __android_log_vprint to logcat. |
| field | type | notes |
|---|---|---|
| code | int | Linux keycode — KEY_POWER, KEY_VOLUMEUP, etc. |
| action | KeyAction | DOWN, UP, REPEAT. Software repeat after 0.5s, then every ~33ms. |
| time | float | CLOCK_MONOTONIC seconds. |
| field | type | notes |
|---|---|---|
| slot | int | Multitouch slot index. |
| id | int | Tracking ID from the kernel. |
| action | TouchAction | DOWN, MOVE, UP. |
| x, y | float | Normalised 0.0..1.0, adjusted for orientation. |
| time | float | CLOCK_MONOTONIC seconds. |
8x8 bitmap font, GL texture atlas, no external files.
| function | description |
|---|---|
| Text::init(aspect, prog) | Upload font atlas, bind to shader program. |
| Text::draw(str, x, y, size, r, g, b) | Draw a string at normalised coordinates. |
| Text::drawWrapped(str, x, y, size, maxW, r, g, b) | Word-wrap within maxW screen units. |
| Text::charW(size, aspect) | Width of one character in screen units. |
Place this in devices/<model>/StratumConfig.h. All fields are constexpr.
Fork the repo. Create devices/<model>/ with the three required items below.
Device paths, touch config, SDK version, orientation.
Application entry point. Copy src/default.cpp as a base.
KernelSU module source — module.prop, post-fs-data.sh, system tree.
Bare-metal boot menu. Pre-framework launch, touch and hardware key nav, boot status tracking, extras menu.