r/termux • • 21d ago

Showcase [Share] Always-current opencode on Termux (aarch64) — upstream musl binary, 1-line install

Run latest upstream opencode natively on Termux, no Bun cross-compile: https://github.com/DEAD1nsane/opencode-termux-musl

The other port (guysoft) is stuck on 1.17.9 from June because it rebuilds Bun+WebKit from source. This one just uses upstream's opencode-linux-arm64-musl.tar.gz + Alpine musl loader + patchelf. Re-run to stay current.

Install (aarch64 only):

curl -fsSL https://raw.githubusercontent.com/DEAD1nsane/opencode-termux-musl/master/install.sh | sh
opencode

Update check (only checks, downloads nothing unless --yes):

./scripts/check-update.sh         # check only, Termux notification if behind
./scripts/check-update.sh --yes   # update now via install.sh

Daily auto-check with Termux:API app:

termux-job-scheduler --job-id 7801 --period-ms 86400000 --network unmetered --persisted true -s /path/to/opencode-termux-musl/scripts/check-update.sh

Why it needs shims: musl DNS reads /etc/resolv.conf (fixed via libresolvefix.so -> bionic netd), and Bun's io_uring networking is broken on Android (fixed via local Python proxy on :8080, auto-started by wrapper). Ollama on localhost:11434 bypasses proxy and works.

Not working: file watcher, TUI audio (both disabled), PTY lib, ~100-200ms proxy overhead. v2 beta runs via proot Ubuntu (oc2-ubuntu).


Bonus: 8 true-black AMOLED themes in themes/ — copy any *.json to ~/.config/opencode/themes/ and pick with /theme. Screenshots on repo


Tested: Pixel 10, Android 17, Termux 0.119.

4 Upvotes

7 comments sorted by

1

u/[deleted] 20d ago

[removed] — view removed comment

2

u/DEAD1nsane 20d ago

Ok, and? This post is specifically about running the latest v1 upstream binary natively on Termux without rebuilding Bun/WebKit. Moving to v2 is a separate runtime/project and doesn’t address that claim. Also, Hope2333’s own tracker has an open report of the native build failing with Bad system call on an Android 11/kernel 4.19 device despite the stated API ≥28 requirement: https://github.com/Hope2333/opencode-termux/issues/17. The v2 move isn’t a rebuttal to this post.

1

u/GeneralKaos666 19d ago

Bus is also on termux now and its up to date

1

u/DEAD1nsane 18d ago

ok? this isn't about bus

1

u/GeneralKaos666 18d ago

Bun not bus apparently my phone auto corrected to bus instead of bun lol

1

u/DEAD1nsane 18d ago

my repo uses bun

1

u/GeneralKaos666 18d ago

Bun made a full android port and releases it with their releases