Ketoy Developer Documentation
Ketoy is a server-driven execution runtime for Android. You write plain Kotlin — Jetpack Compose, coroutines, ViewModels, Navigation, Room, Hilt — with a handful of @Ketoy* annotations. The compiler lowers your code into a compact, signed bytecode bundle (.ktx) that any APK with the Ketoy runtime can execute natively.
The app is the OS. The server ships programs.
You can update screens, fix bugs, run A/B tests, and roll out features without going through the Play Store — every bundle is Ed25519-signed, sandboxed by capability, and rendered through real Jetpack Compose on the device.
This site is the developer manual for Ketoy 0.3.4-alpha. Every example is verified against current code — dev.ketoy.vm:*:0.3.4-alpha on Maven Central.
Start here
Install Ketoy, write your first @KetoyEntryPoint, and ship a signed bundle in fifteen minutes.
Your first screen
Write a @KetoyComposable, wire it to the runtime, and watch it render from a .ktx.
Guides
Compose UI, ViewModels, coroutines, navigation, networking, storage, custom capabilities, custom adapters.
Read the guidesHow to read this site
| If you want to… | Read |
|---|---|
| Install Ketoy in a new or existing Android project | Getting Started → Installation |
| Write your first KBC screen | Getting Started → First Screen |
Sign and ship a .ktx to your users | Getting Started → Bundle & Sign |
| Build UI with Compose, icons, fonts, images | Guides → Compose UI & State |
| Persist state across rotation / process death | Guides → ViewModel |
| Use coroutines, Flow, StateFlow | Guides → Coroutines & Flow |
| Navigate between screens | Guides → Navigation |
| Make HTTP calls | Guides → Networking |
| Read/write preferences | Guides → DataStore |
| Use Room DAOs from KBC | Guides → Room |
| Wire everything through Hilt | Guides → Hilt |
| Bridge a custom Android API into KBC | Guides → Custom Capability |
Render a custom @Composable not in the catalog | Guides → Custom Adapter |
| Understand which Kotlin features are supported | Guides → Kotlin Language |
| Look up an opcode, capability ID, or compile error | Reference |
Hard non-goals
Some things Ketoy will never support — by design:
- No downloadable DEX / JVM bytecode (KBC only).
- No reflection inside KBC.
- No direct
android.*/androidx.*API access from KBC source — every Android touchpoint is mediated by the capability registry. - No
GlobalScope,runBlocking, or unstructured concurrency. - No raw I/O — file, network, prefs all go through capabilities.
- No skipping signature verification in production builds.
If you need any of those things, they belong in native Kotlin in your host APK. Ketoy is for the parts you want to ship over-the-air.