Repository navigation
OpenCode 2 for Termux v1.0.3 (Android seccomp SIGSYS fix)
Pre-releaseOpenCode 2 for Termux v1.0.3
Critical fix: Android seccomp crash (Bad system call, exit 159).
Every Android process inherits a zygote seccomp policy that traps close_range (and
openat2, fchmodat2, pidfd_open, clone3) with SECCOMP_RET_TRAP. Stock Bun calls
close_range before main, so opencode2 died with SIGSYS (exit 159) on Android. On this
device it crashed on every invocation; on others it surfaced when spawning a process (the
reported "background process" crash).
This release embeds a patched Bun runtime carrying the upstream fix
(oven-sh/bun#39775, #30769): a SIGSYS handler installed in bun_initialize_process rewrites
the syscall return register to -ENOSYS for seccomp traps, so Bun's existing fallbacks run
(real close() loop instead of close_range) - no crash, and descriptor cleanup is preserved.
The patch and build script are maintained in this repo:
patches/bun/android-seccomp-sigsys.patch + scripts/build-bun-android.sh.
Install
Pacman
curl -LO https://github.com/guysoft/opencode-termux/releases/download/v1.0.3/opencode2-1.0.3-1-aarch64.pkg.tar.xz
pacman -U opencode2-1.0.3-1-aarch64.pkg.tar.xz
opencode2Deb
curl -LO https://github.com/guysoft/opencode-termux/releases/download/v1.0.3/opencode2_1.0.3_aarch64.deb
dpkg -i opencode2_1.0.3_aarch64.deb
opencode2Standalone zip
curl -LO https://github.com/guysoft/opencode-termux/releases/download/v1.0.3/opencode2-1.0.3-android-aarch64.zip
mkdir -p $PREFIX/libexec/opencode2
unzip opencode2-1.0.3-android-aarch64.zip
mv opencode2 $PREFIX/bin/opencode2 && chmod +x $PREFIX/bin/opencode2
mv opencode2.bin libopentui.so $PREFIX/libexec/opencode2/
chmod +x $PREFIX/libexec/opencode2/opencode2.bin
pkg install ripgrep
opencode2Verified on device
Samsung Galaxy S10e (SM-G970F, Android 12), in Termux (app seccomp domain):
opencode2 --version->opencode2 v2.0.0-android-termux.2(wasBad system call, exit 159)- TUI starts and renders; background service spawns
opencode2 runspawns its server child and exits cleanly (EXIT=0)- No
SIGSYS/SYS_SECCOMPin logcat
Unchanged
- Side-by-side with v1 (
opencodeuntouched); v2 files stay private underlibexec/opencode2/ - App version scheme:
opencode2 --versionshows the app version,v1.0.xis this repo release
SHA256 checksums in SHA256SUMS.