Skip to content

feat: add android-arm64 (Termux) support — platform bundle missing from npm & GitHub Releases #1550

Description

@carlosFTP999

Environment

  • OS: Android (Termux), aarch64
  • Node: v24.18.0 · npm 11.19.0
  • CodeGraph: 1.5.0 (latest)

Symptom

npm i -g @colbymchenry/codegraph installs the shim but no platform bundle. Running it fails:

codegraph: platform bundle missing (registry did not provide @colbymchenry/codegraph-android-arm64).
codegraph: downloading codegraph-android-arm64.tar.gz from GitHub Releases (1.5.0)...
codegraph: no prebuilt bundle for android-arm64.
codegraph: download failed (HTTP 404).
  URL: https://github.com/colbymchenry/codegraph/releases/download/v1.5.0/codegraph-android-arm64.tar.gz
Expected the optional package @colbymchenry/codegraph-android-arm64 to be installed.

Root cause

In Node.js on Termux, process.platform is "android" (verified: node -e "console.log(process.platform, process.arch)"android arm64), so the shim requests an android-arm64 bundle. But v1.5.0 ships only:

  • npm optionalDependencies: @colbymchenry/codegraph-darwin-arm64, -darwin-x64, -linux-arm64, -linux-x64, -win32-arm64, -win32-x64no android
  • GitHub Releases v1.5.0 assets: codegraph-darwin-arm64.tar.gz, codegraph-darwin-x64.tar.gz, codegraph-linux-arm64.tar.gz, codegraph-linux-x64.tar.gz, codegraph-win32-arm64.zip, codegraph-win32-x64.zip, SHA256SUMSno android → download 404s

The standalone installer has the same gap: install.sh maps Darwin→darwin and Linux→linux only, and Termux's uname -s reports Linux, so it would pick linux-arm64 — but that bundle embeds a glibc-linked Node runtime, while Termux uses Android's bionic libc, so it cannot run there without a proper Android build.

Secondary issue (masks the real one)

The installed bin/codegraph symlink targets npm-shim.js, which starts with the shebang #!/usr/bin/env node. Termux has no /usr/bin/env (env lives at /data/data/com.termux/files/usr/bin/env), so direct exec fails with bad interpreter before the shim even runs; exec-based tooling surfaces it as fork/exec ... no such file or directory. Invoking via node npm-shim.js reveals the actual bundle error above.

This is exactly what Gentle-AI (a development-agent toolchain that wires CodeGraph as an MCP server in its environment and is actively used on Termux) reports during its OpenCode CodeGraph MCP wiring reconcile — Android/Termux users are currently blocked.

Suggested fix

Add an android-arm64 build. Termux is standard Android/bionic aarch64, so a single target covers it:

  1. Build the kernel via scripts/build-kernel.sh --target aarch64-linux-android (a supported Rust target) and publish codegraph-android-arm64.tar.gz in the release workflow alongside the existing matrix
  2. Add @colbymchenry/codegraph-android-arm64 to optionalDependencies so the shim's platform lookup succeeds
  3. Teach install.sh to detect Android/Termux (e.g. via uname -o = Android or /data/data/com.termux presence) instead of blindly mapping to linux
  4. Make the bin shim shebang Termux-compatible (or document invoking via node npm-shim.js) so direct exec works

If a bionic-linked bundle is not feasible, an alternative is publishing a statically-linked ELF aarch64 bundle that runs on both linux-gnu and Android/bionic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions