Replaced the bloated emoji-heavy original with something that actually respects your intelligence. Straight talk, no sales pitch, proper architecture diagram, and the audit info front and center.
5.5 KiB
OpenClaw on Android (OCA)
Your old Android phone is not e-waste. It's an ARM64 server sitting in a drawer.
This repo turns any Termux device into a full OpenClaw AI server — native glibc, no proot, no VM, no excuses.
Mirror of PsProsen-Dev/OpenClaw-On-Android with audited install scripts. See SAFE_INSTALL.md or the safe/ directory for cleaned-up versions that don't blindly pipe things to bash.
Quick Start
1. Install Termux from F-Droid
Play Store version is dead. Get it from f-droid.org/packages/com.termux.
2. Phone prep
- Turn on Developer Options
- Enable "Stay Awake"
- Set Termux battery optimization to "Unrestricted"
- Run
termux-wake-lockin the app
Without this Android will kill your processes the moment the screen turns off.
3. Install
pkg update -y && pkg install -y curl
curl -sL https://raw.githubusercontent.com/PsProsen-Dev/OpenClaw-On-Android/master/bootstrap.sh | bash
source ~/.bashrc
Takes 3-10 minutes. Want to know what this actually runs? Read SAFE_INSTALL.md.
4. Onboard
openclaw onboard
openclaw gateway
Run openclaw gateway directly in Termux, not over SSH — disconnecting the session kills it.
5. Verify
source ~/.bashrc
brew --version
go version
openclaw --version
What You Get
| Thing | Details |
|---|---|
| OpenClaw | AI agent gateway with SSH, CLI tools, plugin system |
| glibc runtime | Linux binaries running natively on Android via ld.so wrapper |
| Node.js v24 | Official linux-arm64 builds, glibc-patched |
| Homebrew | Linuxbrew inside Debian proot-distro |
| Go 1.23 | glibc Go toolchain |
| code-server | VS Code in the browser (via Debian FHS container) |
| Playwright | Headless Chromium + xvfb for web automation |
| OpenCode | AI code editor (bun-based) |
| AI CLIs | Qwen Code, Gemini CLI, Claude Code, Codex (opt-in) |
Architecture
Android (Termux)
├─ glibc-runner (ld.so wrapper)
│ └─ Node.js v24 (linux-arm64)
│ ├─ OpenClaw Gateway
│ │ ├─ AI CLIs
│ │ ├─ SSH server (:8022)
│ │ └─ clawdhub
│ └─ Local LLM (optional)
│ ├─ llama.cpp
│ └─ Ollama + cloud models
└─ proot-distro (Debian)
├─ Homebrew / Linuxbrew
├─ code-server
└─ Playwright + Chromium + xvfb
The trick: Android uses Bionic libc, but Linux binaries expect glibc. OCA uses a glibc-runner wrapper that injects ld-linux-aarch64.so.1 so standard Linux executables run directly on ARM64 Android. No proot overhead for the stuff that matters.
CLI
oca --update Update OpenClaw and patches
oca --status Global installation health
oca --clean Purge caches
oca --uninstall Remove everything
oca --version Version info
oca --help Full help
Local LLM
Run models on-device or route through cloud models via Ollama.
Cloud models (recommended)
Zero RAM/STORAGE cost on your phone:
ollama pull kimi-k2.5:cloud
ollama launch openclaw --model kimi-k2.5:cloud
Local models (experimentation)
| Model | Size | RAM | Speed |
|---|---|---|---|
| TinyLlama 1.1B | ~670MB | 2GB | Fast |
| Phi-3 Mini | ~2.3GB | 4GB | OK |
| Llama 3.2 1B | ~670MB | 2GB | Fast |
| Mistral 7B | ~4.1GB | 8GB | Slow |
CPU only. No GPU offloading on Android. Keep your expectations in check.
Remote Access
SSH tunnel from your PC:
ssh -L 3000:localhost:3000 -L 8080:localhost:8080 [email protected] -p 8022
Then open localhost:3000 in your browser.
Android 12+ Phantom Process Fix
If you get Process completed (signal 9), Android is killing Termux background processes:
adb shell settings put global development_settings_enabled 1
adb shell settings put global max_phantom_processes 64
Audit & Safe Install
The upstream project uses curl | bash for several tool installers. We audited every external download and wrote safe replacements in the safe/ directory:
- SAFE_INSTALL.md — What each script actually downloads and runs
safe/install-code-server.sh— Downloads release tarball from GitHub, no pipesafe/install-bun.sh— Downloads bun zip from oven-sh/bun releases, no pipesafe/install-nodesource.sh— Manual NodeSource apt repo setup, no pipesafe/install-opencode.sh— Safe bun + opencode-ai installsafe/install-playwright.sh— Safe NodeSource + playwright installsafe/install-homebrew.sh— Git clone (has integrity checks, not curl|bash)
Same tools. Just no blind piping.
Docs
| Guide | What it covers |
|---|---|
| Quick Start | 5-minute walkthrough |
| Phone Setup | Battery, dev options, wakelock |
| Installation | Full installer breakdown |
| AI CLI Tools | Qwen, Claude, Gemini, Codex |
| Local LLM | Models, cloud vs local |
| SSH Setup | Remote access |
| Troubleshooting | Common errors |
| Phantom Process Killer | Android 12+ fix |
Fork maintained by Dragon on git.rewr.ca Original by PsProsen-Dev MIT License