Target: OpenCode native Android/aarch64 Bionic, no proot or glibc. The current stable release is v2.2.5-bun144.1. The previous OpenCode 2.2.2, 2.2.0, and 2.1.4 releases and both 2.1.3 builds (Bun 1.4.4 and the original Bun 1.4.0) remain available for rollback.
Two supported paths:
- CI release path:
.github/workflows/build-native-android.ymlfetches pinned OpenCode source, builds its source-mode graph with Bun 1.4.4, cross-compiles the pinned OpenTUI with the NDK sysroot and Zig, and transplants the graph onto the hash-verified Android/Bionic Bun 1.4.4 runtime. The Bionic safety guards and release patches are checked against the pinned OpenTUI source. The transplant fix preserves zero-filled.bsswhen ELF metadata is relocated. Inputs are locked intools/supply-chain-lock.json. The workflow builds OpenCode2.2.5/ OpenTUI0.8.0(v2.2.5-bun144.1). - OpenTUI 0.8.0 port: OpenCode 2.2.3+ pins
@opentui/coreand@opentui/solidat0.8.0, so the native renderer must match.tools/patch-opentui-0.8.0.pykeeps thebuild.zig,buffer.zig, andclipboard/host.zigguards; 0.8.0 clamps viewport origins in i64, so the 0.7.0 extreme-origin short-circuits are dropped.patches/opentui/v0.8.0-file-prefix-map.patchandpatches/opentui/v0.8.0-tlsdesc-self-resolver.patchare re-verified against the 0.8.0 tag. OpenCode 2.2.0 also replaced the--targetbuild flag withOPENCODE_TARGET; the source build sets it and asserts that exactly one target was emitted. - Release gate: candidate run 41193063342 built
v2.2.5-bun144.1and passed the artifact checks: 669-module graph, embedded OpenTUI 0.8.0libopentui.so(4,522,624 bytes, 244 exportedot_*symbols, Bionic-onlyNEEDEDentries), and the FFI negative-coordinate guard. The exact CI binary passed checksum/version verification, interactive TUI startup, and a clean exit on one Android device..github/workflows/publish-native-android.ymlpublishes only that CI artifact after rechecking its hashes, metadata, and transplant report; a phone-built binary is never uploaded. The publish job installs a hash-pinned cosign binary fromtools/supply-chain-lock.jsonand signsSHA256SUMSplus the archive with keyless Sigstore signing;install.shverifies both bundles when cosign is available and fails closed withOPENCODE_REQUIRE_SIGNATURE=1. CI's Linux runner cannot execute the Android ELF, so its runtime TUI probe is skipped. Thev2.2.2-bun144.1,v2.2.0-bun144.1,v2.1.4-bun144.2,v2.1.3-bun144.1, and originalv2.1.3Bun 1.4.0 releases remain available for rollback. - On-device (older transplant path): Termux itself is Bionic, so this path needs no NDK. The full guide is in
docs/transplant.md. Deps:pkg install python3 nodejs clang make zig(zigonly to rebuild OpenTUI;upxoptional), plus network fornpm packand the Android Bun download. The currently documented local target is2.0.26:Output:make transplant VER=2.0.26
artifacts/transplant/2.0.26/opencode-native-revived. Then test:opencode --version, TUI smoke, auth, prompt, clean exit. The2.2.xreleases use the CI source-build path above; the older on-device command does not reproduce it.