ComboNative Puts Real Kotlin/Compose Code Inside Android Mini Programs, Each in Its Own Process
Android teams building for in-vehicle systems, kiosks, TVs, or custom ROMs have long faced a deadlock: JS-based mini programs are safe but slow and limited, while native plugins leak memory, crash the host, and break when obfuscated. ComboNative breaks that deadlock by running native code in separate processes with a narrow IPC contract, making independent hardening and clean process teardown practical for the first time in a lightweight, no-hook package.
ComboNative is a new Android dynamic framework that treats each mini program as a native Kotlin/Compose module running in its own sub-process. It solves three structural problems that plague single-process pluginization: independent obfuscation and hardening become possible because cross-process communication transmits only bytes and API IDs, never class names; crash isolation is guaranteed by the process boundary, with a circuit breaker that disables a misbehaving mini program; and memory leaks are eliminated because closing a mini program simply kills its process, letting the OS reclaim everything.
The runtime achieves this without hooking AMS or PMS. A build-time Gradle plugin generates a fixed pool of stub components and stub processes, and the host assigns an idle slot when launching a mini program. The trade-off is a hard cap on concurrent mini programs equal to the number of pre-declared slots, and a small per-process memory overhead.
A complete demo with three mini programs—a ledger app, a Compose UI demo, and an NDK image processor—clocks in at 7.74 MB in release, with the framework itself accounting for under 5%. The project is in alpha; four runtime libraries are on Maven Central, the sample repository is open source, and the main engine library is available as a prebuilt dependency.
By shifting dynamism from runtime hooking to build-time stub generation, ComboNative sidesteps the entire AMS/PMS compatibility minefield that has made traditional pluginization fragile across Android versions.
The 'bytes not class names' IPC rule is the architectural linchpin: it decouples the host and mini program build pipelines completely, which is what makes independent obfuscation and hardening possible where single-process approaches fail.
The slot-pool design is a deliberate trade of flexibility for stability—capping concurrency and unifying launchMode across slots in exchange for zero system-API hooks and predictable resource usage.
ComboNative's security model is honest about its limits: same UID means it cannot stop a malicious native module from accessing process-reachable resources, so it explicitly targets controlled, semi-trusted ecosystems rather than open app markets.
The framework's size efficiency comes from treating the host as a shared runtime: mini programs use compileOnly for the SDK and inherit Compose/AndroidX from the host, so .cbp files carry only differential code.