Skip to content

PsProsen-Dev/OpenClaw-On-Android

Repository files navigation

OCA Banner

πŸ€– OpenClaw on Android (OCA)

πŸš€ Turn any Android phone into a 24/7 AI server β€” one command, zero hassle.

Native performance via Termux & glibc. No Proot. No VM. Pure ARM64 power.


Release License Discussions Stars Forks


πŸš€ Quick Start β€’ ⚑ Features β€’ πŸ¦™ Local LLM β€’ πŸ“– Docs β€’ πŸ— Architecture β€’ 🀝 Community


🌟 The Vision

Your old Android phone is not e-waste. It's a powerful ARM64 server waiting to happen.

OCA seamlessly installs the OpenClaw AI ecosystem directly onto your device via Termux. This completely bypasses sluggish Linux distributions (like Ubuntu on Proot), running natively with full glibc compatibility instead of Android's default Bionic libraries.

Before OCA ❌ After OCA βœ…
Slow Proot containers Native ARM64 execution
Bionic libc limitations Full glibc compatibility
Manual setup (hours) One-command install (2 mins)
Limited AI tools 4+ AI CLIs pre-configured
No remote access SSH server included
Static installation Auto-updating ecosystem

πŸš€ Quick Start

Deploying OCA takes under 5 minutes

Step 1: Prepare Your Phone βš™οΈ

Configure Developer Options, Stay Awake, and battery optimization to prevent Android from killing Termux.

πŸ‘‰ Read Phone Setup Guide for step-by-step instructions.

Step 2: Install Termux πŸ“±

⚠️ Important: The Play Store version of Termux is discontinued. You must install from F-Droid.

  1. Open browser and go to f-droid.org
  2. Search for Termux β†’ Tap Download APK
  3. Install and allow "Install from unknown sources"

Step 3: Initial Setup πŸ”§

Open Termux and run:

pkg update -y && pkg install -y curl

Step 4: Install OCA πŸš€

curl -sL https://raw.githubusercontent.com/PsProsen-Dev/OpenClaw-On-Android/master/bootstrap.sh | bash && source ~/.bashrc

Takes 3-10 minutes depending on network and device.

Step 5: Start OpenClaw Setup

openclaw onboard

Follow the on-screen instructions.

Step 6: Start Gateway

openclaw gateway

⚠️ Important: Run directly in Termux app, not via SSH. SSH session disconnect will stop the gateway.

That's it. You now have a full AI server on your phone.


⚑ Features

πŸ“± Native Execution ☁️ Full Node.js v24
OpenClaw runs bare-metal in Termux glibc-patched Node.js v24.14.0
No Proot overhead Official linux-arm64 binaries
100% ARM64 optimized Bypasses Android linker restrictions
πŸ€– AI CLI Tools πŸ¦™ Local LLM
Qwen Code, Claude Code, Gemini, Codex node-llama-cpp + Ollama support
Zero-config setup Run models locally (experimental)
Cloud API routing ☁️ NEW: Ollama Cloud Models
🌐 Remote Access πŸ›‘οΈ Safe Root
SSH server on port 8022 oca-root wrapper for rooted devices
Remote terminal access Selective root commands
24/7 headless operation No system compromise
πŸ”„ Auto-Updates πŸ”§ Unified CLI
One-command updates via oca --update oa command for all operations
Automatic security patches Update, status, install, uninstall
Rolling release model Platform-aware architecture

πŸ”§ CLI Reference

After installation, use the oa command for managing your installation:

Command Description
oa --update Update OpenClaw and Android patches
oa --install Install optional tools (tmux, code-server, AI CLIs)
oa --uninstall Remove OpenClaw on Android
oa --status Show installation status
oa --version Show version
oa --help Show available options

Update example:

oa --update && source ~/.bashrc

This updates: OpenClaw core, code-server, OpenCode, AI CLI tools, Android patches


πŸ¦™ Local LLM

Run AI models directly on your phone!

☁️ NEW: Ollama Cloud Models - No local resources needed!

OCA now supports local LLM inference via node-llama-cpp and Ollama (including cloud models!).

☁️ Ollama Cloud Models (Recommended)

Run powerful models in the cloud β€” zero local RAM/storage usage!

# Pull and launch with cloud model
ollama pull kimi-k2.5:cloud
ollama launch openclaw --model kimi-k2.5:cloud

Recommended Cloud Models:

  • kimi-k2.5:cloud - Multimodal reasoning (64k context)
  • minimax-m2.5:cloud - Fast coding (64k context)
  • glm-5:cloud - Reasoning & code generation
  • gpt-oss:120b-cloud - High-performance (128k context)

🏠 Local Models (Experimental)

⚠️ Important Constraints (click to expand)
Constraint Requirement Reality Check
RAM 2-4GB free Phone RAM is shared with Android
Storage 4-70GB+ Model files are large
Speed CPU-only No GPU offloading on Android
Use Case Testing/Experimentation Cloud APIs for production

Quick Start

# Option 1: node-llama-cpp (Recommended)
npm install -g node-llama-cpp --ignore-scripts

# Option 2: Ollama (Full Server)
curl -fsSL https://ollama.com/install.sh | sh

Model Recommendations

Model Size RAM Needed Speed Best For
TinyLlama 1.1B ~670MB 2GB ⚑⚑⚑ Testing
Phi-3 Mini ~2.3GB 4GB ⚑⚑ Light tasks
Llama 3.2 1B ~670MB 2GB ⚑⚑⚑ Mobile-friendly
Mistral 7B ~4.1GB 8GB ⚑ Advanced only

πŸ“– Read Full Local LLM Guide for detailed setup, troubleshooting, and cloud comparison.


πŸ— Project Architecture

OCA Architecture

How OCA Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Android Device (Termux)                    β”‚
β”‚                         β”‚                               β”‚
β”‚                         β–Ό                               β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                       β”‚
β”‚              β”‚  glibc-runner    β”‚                       β”‚
β”‚              β”‚  (ld.so wrapper) β”‚                       β”‚
β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β”‚
β”‚                       β”‚                                 β”‚
β”‚                       β–Ό                                 β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                       β”‚
β”‚              β”‚  Node.js v24     β”‚                       β”‚
β”‚              β”‚  linux-arm64     β”‚                       β”‚
β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β”‚
β”‚                       β”‚                                 β”‚
β”‚         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                 β”‚
β”‚         β–Ό                            β–Ό                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”‚
β”‚  β”‚ OpenClaw     β”‚           β”‚  Local LLM   β”‚          β”‚
β”‚  β”‚ Gateway      β”‚           β”‚  (Optional)  β”‚          β”‚
β”‚  β”‚              β”‚           β”‚              β”‚          β”‚
β”‚  β”‚ β€’ AI CLIs    β”‚           β”‚ β€’ llama.cpp  β”‚          β”‚
β”‚  β”‚ β€’ SSH        β”‚           β”‚ β€’ Ollama     β”‚          β”‚
β”‚  β”‚ β€’ clawdhub   β”‚           β”‚ β€’ GGUF       β”‚          β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Technical Highlights

  1. Pacman glibc-runner: Injects ld-linux-aarch64.so.1 to bypass Android's restricted linker
  2. Path Rewriting: UNIX paths (/tmp, /bin/sh) dynamically mapped to Termux prefixes
  3. JS Runtime Shims: glibc-compat.js polyfills os.cpus() and os.networkInterfaces() for V8

πŸ“– Documentation

Everything you need to run OCA like a pro

πŸ“š Guide Description
πŸš€ Quick Start Get running in 5 minutes
πŸ“± Phone Setup Developer Options, Stay Awake, Battery
πŸ”§ Installation Full 8-step installer breakdown
πŸ€– AI CLI Tools Qwen, Claude, Gemini, Codex setup
πŸ¦™ Local LLM Run models locally (node-llama-cpp, Ollama)
🌐 Dashboard Connect Multi-device management from PC
πŸ” SSH Setup Remote access configuration
βš™οΈ Configuration Manage settings and preferences
πŸ”§ Troubleshooting Common errors and fixes
πŸ‘» Phantom Process Killer Android 12+ fix

πŸ“‘ Browse all docs: docs/


πŸ›‘ Important: Android 12+ Users

If you see [Process completed (signal 9)], Android's Phantom Process Killer has terminated Termux.

Fix it in 30 seconds:

adb shell settings put global development_settings_enabled 1
adb shell settings put global max_phantom_processes 64

πŸ“– Read Full Fix Guide


πŸ“± Phone Preparation

Essential for 24/7 Operation

Android may kill background processes or throttle them when the screen is off. For 24/7 operation:

Setting Purpose How To
Developer Options Enable advanced controls Settings β†’ About β†’ Tap Build Number 7x
Stay Awake Prevent CPU throttling Developer Options β†’ Stay Awake
Battery Optimization Prevent app killing Settings β†’ Apps β†’ Termux β†’ Battery β†’ Unrestricted
Charge Limit Protect battery during 24/7 use Use AccuBattery or similar

πŸ“– Read Complete Phone Setup Guide for detailed instructions.


🌐 Dashboard & Remote Access

SSH Setup

Access your OCA dashboard from PC browser via SSH tunnel:

# From your PC terminal
ssh -L 3000:localhost:3000 -L 8080:localhost:8080 u0_aXXX@192.168.X.X -p 8022

πŸ“– Read SSH Setup Guide for complete instructions.

Dashboard Connect (Multi-Device)

Running OCA on multiple devices? Use Dashboard Connect to manage them from your PC:

  • Save connection settings (IP, token, ports) for each device with a nickname
  • Generates SSH tunnel commands automatically
  • Switch between devices with one click
  • Your data stays local β€” Settings saved only in browser localStorage

πŸ’‘ Tip: Name your devices (e.g., "Old Pixel", "Bedroom Phone") for easy identification.


πŸ— Platform Architecture (Developer Info)

L1/L2/L3 Dependency Layers

OCA uses a platform-plugin architecture that separates platform-agnostic infrastructure from platform-specific code:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Orchestrators (install.sh, update-core.sh, uninstall.sh)    β”‚
β”‚ ── Platform-agnostic. Read config.env and delegate.         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Shared Scripts (scripts/)                                   β”‚
β”‚ ── L1: install-infra-deps.sh (always)                       β”‚
β”‚ ── L2: install-glibc.sh, install-nodejs.sh (conditional)    β”‚
β”‚ ── L3: Optional tools (user-selected)                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Platform Plugins (platforms/<platform>/)                    β”‚
β”‚ ── config.env: declares dependencies                        β”‚
β”‚ ── install.sh / update.sh / uninstall.sh / ...              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Dependency layers:

Layer Scope Examples Controlled by
L1 Infrastructure (always) git, pkg update Orchestrator
L2 Platform runtime (conditional) glibc, Node.js, build tools config.env flags
L3 Optional tools (user-selected) tmux, code-server, AI CLIs User prompts

Installed Components

Core Infrastructure (L1): git

Platform Runtime (L2): pacman, glibc-runner, Node.js v24, python, make, cmake, clang, binutils

OpenClaw Platform: OpenClaw, clawdhub, PyYAML, libvips

Optional Tools (L3): tmux, ttyd, dufs, android-tools, code-server, OpenCode, Claude Code, Gemini CLI, Codex CLI


🎯 What's New in v10.03.2026

Feature Description
node-llama-cpp Prebuilt binary support with --ignore-scripts
Ollama Integration Full server with model management
Model Guide Recommendations for RAM/Storage constraints
Cloud vs Local Comparison table for decision making

πŸ“¦ View Release Notes


🀝 Community

Join the discussion! Ask questions, share your Android setup, or request features.

πŸ’¬ GitHub Discussions  ‒  πŸ› Report an Issue


πŸ™ Credits & License

Built with ⚑ by PsProsen-Dev

Using Jarvis (RTX⚑) / OpenClaw Authored Architecture


MIT License Made with Love


πŸš€ Ready to transform your Android phone?

curl -sL https://raw.githubusercontent.com/PsProsen-Dev/OpenClaw-On-Android/master/bootstrap.sh | bash

Your phone is now an AI server. ⚑

About

🦞 Turn any Android phone into a 24/7 AI server β€” one command, zero hassle. No proot, no Ubuntu, pure Termux.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors