Target: OpenCode native Android/aarch64 Bionic, no proot or glibc. The current stable release is v2.3.2. The previous OpenCode 2.3.0, 2.2.7, 2.2.5, 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. Release tags from 2.3.2 onward are the plain upstream version; Bun/OpenTUI details stay in the asset name and build metadata.
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.3.2/ OpenTUI0.8.4(v2.3.2). - OpenTUI 0.8.4 port: OpenCode 2.3.0 pins
@opentui/coreand@opentui/solidat0.8.4, so the native renderer must match. 0.8.4 requires Zig0.17.0; Zig0.17.1has the same translate-c target parsing and does not fix the host include-path issue. The 0.8.4build.zigandbuffer.zigare unchanged from 0.8.1, and the clipboard host's Linuxpthread_tryjoin_npcall is unchanged, sotools/patch-opentui-0.8.4.pykeeps thebuild.zig,buffer.zig, andclipboard/host.zigguards. 0.8.4 keeps the i64 viewport clamp, routes text draws throughdrawTextFitted, and addsot_scene_reaches_hooksfor culled streaming text. The build also adds an emptylimits.hshim after the NDK sysroot so Bionic's#include_nextcannot reach the host glibc headers that Zig 0.17 translate-c appends for cross builds.patches/opentui/v0.8.4-file-prefix-map.patchandpatches/opentui/v0.8.4-tlsdesc-self-resolver.patchare re-verified against the 0.8.4 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 44289708544 built
v2.3.2and passed the artifact checks: 701-module graph, embedded OpenTUI 0.8.4libopentui.so(4,620,328 bytes, 270 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.3.0-bun144.1,v2.2.7-bun144.1,v2.2.5-bun144.1,v2.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.