claude-code-android icon indicating copy to clipboard operation
claude-code-android copied to clipboard

[DEVICE] android 10 didnot work

Open ayoubelmhamdi opened this issue 5 months ago • 4 comments

Device Information

  • Device model: lenovo tab m10
  • Android version: 10
  • Architecture: aarch64
  • Kernel version: 4.9.190+
  • Termux version/source: F-Droid v0.119 + github v0.119
  • Which path(s) tested: A: native Termux (bare claude)
  • Node.js version: v26.2.0
  • Claude Code version: 2.1.*

Status

  • [ ] Works fully
  • [ ] Partial (some features broken)
  • [x] Fails to run

Notes

$ claude
Bad system call            claude

log files

log.log strace.log

ayoubelmhamdi avatar Jun 11 '26 14:06 ayoubelmhamdi

Apologies for the delay. I missed the notification this issue opened. I was just able to replicate on my Android 10 device a Moto G7 Power. Considering the device worked previously that gives me a strong tell that it is on the Claude Code side but I am digging deeper to investigate and see if there is a workaround/ fix.

ferrumclaudepilgrim avatar Jun 16 '26 17:06 ferrumclaudepilgrim

Right now I still don't have a working update.

Currently the obmy workaround is to run

curl -fsSL https://raw.githubusercontent.com/ferrumclaudepilgrim/claude-code-android/main/install-pinned.sh -o install-pinned.sh bash install-pinned.sh

Which runs the old install-pinned.sh and sticks you to 2.1.112

I am going to keep digging on this end.

ferrumclaudepilgrim avatar Jun 19 '26 05:06 ferrumclaudepilgrim

So for the moment unfortunately 2.1.112 is the furthest I can get my Android 10 device as well as is.

I fear to get to further is going to require a significant workaround/ fix. I have not abandoned it however my time I am able to dedicate to the repo has changed slightly for a few days so I do not have a definitive timeline for further updates.

Hopefully 2.1.112 continues to satisfy your use need and we can get a proper Anthropic built Android Claude Code sooner than later!

ferrumclaudepilgrim avatar Jun 29 '26 16:06 ferrumclaudepilgrim

#!/data/data/com.termux/files/usr/bin/bash

claude-code-android: pinned install (native Termux, opt-in legacy path).

Installs Claude Code 2.1.112, the last upstream version that ships a JS entry

point and runs on Termux with no binary patching. Pins there and locks the pin

against the in-process auto-updater. No glibc-runner, no patched binary, no

auto-updating wrapper.

This is the simplest, smallest path. The trade-off is that it stays at 2.1.112:

you do not get newer claude features or fixes. If you want current claude, use

install.sh (the default Path A) instead. This script is for people who want a

minimal, no-shim install and are content to stay pinned.

Re-run safe: every step is idempotent.

Tracking the upstream issue: https://github.com/anthropics/claude-code/issues/50270

set -euo pipefail

CC_PIN="2.1.112" CC_DIR="$PREFIX/lib/node_modules/@anthropic-ai/claude-code"

info(){ printf '\u001B[0;36m[info]\u001B[0m %s ' "$1"; } ok(){ printf '\u001B[0;32m[ok]\u001B[0m %s ' "$1"; } warn(){ printf '\u001B[0;33m[warn]\u001B[0m %s ' "$1" >&2; } fail(){ printf '\u001B[0;31m[fail]\u001B[0m %s ' "$1" >&2; exit 1; }

--- Preflight ---

[ -z "${PREFIX:-}" ] && fail "Run this inside Termux, not adb shell. Install Termux from F-Droid." [ "$(uname -m)" = "aarch64" ] || fail "aarch64 only. uname -m reports: $(uname -m)"

Android's low-memory killer can SIGKILL the process tree during a heavy install

if this runs inside a claude session under memory pressure. A plain shell is safer.

if [ -n "${CLAUDE_CODE_EXECPATH:-}" ] || [ -n "${CLAUDECODE:-}" ]; then warn "You appear to be running inside a claude session; Android may kill the" warn "install under memory pressure. A plain Termux shell is safer." read -r -p "Continue anyway? [y/N] " LMK case "${LMK,,}" in y|yes) ;; *) fail "Stopped. Open a fresh Termux session and re-run." ;; esac fi

--- Do not clobber a newer native install ---

if [ -d "$HOME/.local/share/claude/versions" ] && ls "$HOME/.local/share/claude/versions"/..* >/dev/null 2>&1
&& [ -f "$PREFIX/bin/claude" ] && [ ! -L "$PREFIX/bin/claude" ]; then warn "A native (install.sh) claude install is already present." warn "Continuing installs the pinned $CC_PIN npm package and takes over the" warn "'claude' command. This is a downgrade." read -r -p "Replace it with the pinned install? [y/N] " DG case "${DG,,}" in y|yes) ;; *) fail "Stopped. Nothing changed." ;; esac fi

ok "Running in Termux on aarch64"

--- Pin a Termux mirror if none is selected (avoids an interactive stall) ---

if [ ! -e "$PREFIX/etc/termux/chosen_mirrors" ] && [ -e "$PREFIX/etc/termux/mirrors/default" ]; then ln -sf "$PREFIX/etc/termux/mirrors/default" "$PREFIX/etc/termux/chosen_mirrors" 2>/dev/null || true fi

--- Node.js ---

export DEBIAN_FRONTEND=noninteractive APT_OPTS="-y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold"

info "apt-get update" apt-get update $APT_OPTS >/dev/null || fail "apt-get update failed. If it stalls, run 'termux-change-repo', pick a mirror, then re-run."

info "apt-get full-upgrade (brings the base current so node links against a matching openssl)" apt-get full-upgrade $APT_OPTS >/dev/null || fail "apt-get full-upgrade failed."

info "apt-get install nodejs" apt-get install $APT_OPTS nodejs >/dev/null || fail "apt-get install nodejs failed."

NODE_V="$(node -v 2>/dev/null || true)" [ -n "$NODE_V" ] || fail "node installed but cannot run (an openssl mismatch usually). Re-run; if it persists, 'apt-get full-upgrade' by hand." ok "Node.js $NODE_V installed"

--- Claude Code (pinned) ---

export TMPDIR="$PREFIX/tmp" [ -d "$CC_DIR" ] && chmod -R u+w "$CC_DIR" 2>/dev/null || true

if [ -e "$PREFIX/bin/claude" ] && [ ! -L "$PREFIX/bin/claude" ]; then rm -f "$PREFIX/bin/claude" info "cleared the existing native claude command so the pinned package can own it" fi

info "installing Claude Code $CC_PIN (the last upstream version with a JS entry point)" DISABLE_AUTOUPDATER=1 npm install -g "@anthropic-ai/claude-code@${CC_PIN}" || fail "npm install failed."

CLAUDE_VER="$(claude --version 2>/dev/null | head -1 || true)" { [ -n "$CLAUDE_VER" ] && [[ "$CLAUDE_VER" != "not installed" ]]; } || fail "claude did not launch after install. 'claude --version' returned: $CLAUDE_VER" ok "Claude Code installed: $CLAUDE_VER"

--- Grep tool: system ripgrep symlinked onto the vendored path ---

info "wiring Claude Code's Grep tool to system ripgrep" apt-get ins

KrypticKode007 avatar Aug 03 '26 07:08 KrypticKode007