[FEATURE]: Make a binary build for Android Aarch64 (Termux) #8261

Open
opened 2026-02-16 18:09:32 -05:00 by yindo · 1 comment
Owner

Originally created by @VikKalm on GitHub (Feb 1, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I would love to use OpenCode on Termux (android). Now it doesn't even build because OpenCode use precompiled binaries those are not compatible with Termux/Android format.

$ npm i -g opencode-ai
npm error code 1
npm error path /data/data/com.termux/files/usr/lib/node_modules/opencode-ai
npm error command failed
npm error command sh -c bun ./postinstall.mjs || node ./postinstall.mjs
npm error sh: line 1: bun: command not found
npm error Failed to setup opencode binary: Could not find package opencode-android-arm64: Cannot find module 'opencode-android-arm64/package.json'
npm error Require stack:
npm error - /data/data/com.termux/files/usr/lib/node_modules/opencode-ai/postinstall.mjs
npm error A complete log of this run can be found in: /root/.npm/_logs/2026-02-02T00_28_37_358Z-debug-0.log


$ curl -fsSL https://opencode.ai/install | bash

Installing opencode version: 1.1.48
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100%
Command already exists in /data/data/com.termux/files/home/.bashrc, skipping write.

                                 ▄
█▀▀█ █▀▀█ █▀▀█ █▀▀▄ █▀▀▀ █▀▀█ █▀▀█ █▀▀█
█░░█ █░░█ █▀▀▀ █░░█ █░░░ █░░█ █░░█ █▀▀▀
▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀  ▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀


OpenCode includes free models, to start:

cd <project>  # Open directory
opencode      # Run command

For more information visit https://opencode.ai/docs


$ ~/.opencode/bin/opencode
error: "/data/data/com.termux/files/home/.opencode/bin/opencode" has unexpected e_type: 2

ENV:
Android 13
Xiaomi Pad 6

Originally created by @VikKalm on GitHub (Feb 1, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request I would love to use OpenCode on Termux (android). Now it doesn't even build because OpenCode use precompiled binaries those are not compatible with Termux/Android format. ```text $ npm i -g opencode-ai npm error code 1 npm error path /data/data/com.termux/files/usr/lib/node_modules/opencode-ai npm error command failed npm error command sh -c bun ./postinstall.mjs || node ./postinstall.mjs npm error sh: line 1: bun: command not found npm error Failed to setup opencode binary: Could not find package opencode-android-arm64: Cannot find module 'opencode-android-arm64/package.json' npm error Require stack: npm error - /data/data/com.termux/files/usr/lib/node_modules/opencode-ai/postinstall.mjs npm error A complete log of this run can be found in: /root/.npm/_logs/2026-02-02T00_28_37_358Z-debug-0.log $ curl -fsSL https://opencode.ai/install | bash Installing opencode version: 1.1.48 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100% Command already exists in /data/data/com.termux/files/home/.bashrc, skipping write.   ▄ █▀▀█ █▀▀█ █▀▀█ █▀▀▄ █▀▀▀ █▀▀█ █▀▀█ █▀▀█ █░░█ █░░█ █▀▀▀ █░░█ █░░░ █░░█ █░░█ █▀▀▀ ▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀ ▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ OpenCode includes free models, to start: cd <project> # Open directory opencode # Run command For more information visit https://opencode.ai/docs $ ~/.opencode/bin/opencode error: "/data/data/com.termux/files/home/.opencode/bin/opencode" has unexpected e_type: 2 ``` ENV: Android 13 Xiaomi Pad 6
yindo added the discussion label 2026-02-16 18:09:32 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 1, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #10504: OpenCode binary fails to run natively on Termux / Android aarch64 (wrong interpreter + non‑PIE executable)
  • #8620: [Regression] v1.1.21 OpenTUI fails to initialize in Termux/PRoot (ARM64): "Permission denied" on /proc/self/fd
  • #8959: OpenCode freezes with black screen in Termux proot-distro Ubuntu, cannot exit with Ctrl+C
  • #7843: [Critical] CLI hangs on second run (Deadlock) on Linux ARM64 (Proot/Container environments)
  • #961: Termux support

These issues discuss related Termux/Android ARM64 compatibility problems. Feel free to ignore if your specific case differs.

@github-actions[bot] commented on GitHub (Feb 1, 2026): This issue might be a duplicate of existing issues. Please check: - #10504: OpenCode binary fails to run natively on Termux / Android aarch64 (wrong interpreter + non‑PIE executable) - #8620: [Regression] v1.1.21 OpenTUI fails to initialize in Termux/PRoot (ARM64): "Permission denied" on /proc/self/fd - #8959: OpenCode freezes with black screen in Termux proot-distro Ubuntu, cannot exit with Ctrl+C - #7843: [Critical] CLI hangs on second run (Deadlock) on Linux ARM64 (Proot/Container environments) - #961: Termux support These issues discuss related Termux/Android ARM64 compatibility problems. Feel free to ignore if your specific case differs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8261