Skip to content

Latest commit

History

91,406 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

๐Ÿฆž AnyClaw

๐Ÿš€ OpenClaw + Codex + Claude Code โ€” Running Natively on Android ๐Ÿš€

AndroidOpenClawCodexClaude CodeKotlinStatusLicense


Three AI coding agents. One APK. Your pocket.OpenClaw gateway + OpenAI Codex CLI + Claude Code (via Claw Code / OpenClaude)โ€” all running in a full Linux environment on your Android phone.


 โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘
โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ•— โ–ˆโ–ˆโ•‘
โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘
โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ•”โ–ˆโ–ˆโ–ˆโ•”โ•
โ•šโ•โ• โ•šโ•โ•โ•šโ•โ• โ•šโ•โ•โ•โ• โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ• โ•šโ•โ• โ•šโ•โ•โ•โ•šโ•โ•โ•
T H R E E ยท A G E N T S ยท O N E ยท A P K

Download APK ยท Google Play ยท OpenClaw Docs ยท Project Spec


๐Ÿคฏ What Is This?

This project puts three AI coding agents on your Android phone in a single APK:

  • OpenClaw โ€” a personal AI assistant with multi-channel support, agent routing, skills, Canvas, and a full Control UI dashboard
  • OpenAI Codex CLI โ€” a terminal-based coding agent that reads your codebase, writes code, and runs commands
  • Claw Code (OpenClaude) โ€” the leaked Claude Code architecture, rebranded as OpenClaude, now running on Android. Yes, Claude Code on your phone.

All three run inside an embedded Linux environment extracted from the APK. No root required. No Termux dependency. Everything is self-contained.

๐Ÿง  TL;DR โ€” We took the Claude Code source (leaked from Anthropic's npm package, 512K lines of TypeScript), which was rewritten as Claw Code (48K+ GitHub stars) and rebranded as OpenClaude โ€” and made it run on Android alongside OpenClaw and Codex. Three AI coding agents in your pocket.


๐Ÿ†• Claude Code on Android โ€” via Claw Code / OpenClaude

In March 2026, Anthropic's Claude Code had its full source code accidentally leaked via an npm source map. The community built Claw Code โ€” a clean-room rewrite that hit 48K+ stars in hours. It was later rebranded as OpenClaude.

We ported it to Android. It now runs inside AnyClaw alongside OpenClaw and Codex:

WhatDescription
๐Ÿฆ€Claw Code / OpenClaudeClaude Code architecture โ€” 19 tools, 15 slash commands, multi-agent swarms, MCP support
๐Ÿ”ง19 Built-in ToolsFile I/O, shell execution, Git operations, web scraping, notebook editing โ€” permission-gated
๐Ÿง Query EngineLLM API calls, response streaming, caching, multi-step orchestration
๐Ÿ”ŒMCP IntegrationModel Context Protocol with 6 transport types โ€” connect external tool servers
๐Ÿ‘ฅMulti-Agent SwarmsSpawn sub-agents to parallelize tasks in isolated contexts
๐Ÿ”ฎProvider AgnosticClaude, OpenAI, local models โ€” not locked to Anthropic
โšกRust Core6-crate workspace, 16 runtime modules, native aarch64-musl binary

๐Ÿ“ฑ Screenshots


๐Ÿ’ฌ AI Coding Agent
Full conversational coding with streaming responses and reasoning visibility.

๐Ÿงฉ Dashboard & Sessions
Multi-thread sessions, agent routing, skills, Canvas โ€” running on your phone.

๐ŸŒ What Can You Do?

FeatureDescription
๐ŸฆžOpenClaw DashboardFull Control UI โ€” chat, agents, sessions, skills, Canvas. Runs locally on your device
๐Ÿ’ฌCodex ChatConversational coding agent with streaming responses and reasoning visibility
๐Ÿฆ€Claude Code (OpenClaude)Full Claw Code agent โ€” 19 tools, query engine, MCP, multi-agent swarms
๐ŸงEmbedded LinuxComplete Termux-derived userland โ€” sh, apt, Node.js, Python, SSL certs
โšกExecute CommandsAll three agents run shell commands in the embedded Linux environment
๐ŸงตMulti-Thread SessionsParallel conversations, each with its own context and working directory
๐Ÿ”“Full Auto-ApprovalNo permission popups โ€” danger-full-access mode by default
๐Ÿ”‹Background ExecutionForeground service keeps everything alive when you switch apps
๐Ÿ”‘OAuth LoginOne-time browser-based auth โ€” shared between all agents
๐Ÿ“ดOffline BootstrapLinux environment extracted from APK โ€” works without internet after setup

โšก Quick Start

git clone https://github.com/friuns2/openclaw-android-assistant.git
cd openclaw-android-assistant
npm install && npm run build
cd android && bash scripts/download-bootstrap.sh
bash scripts/build-server-bundle.sh && ./gradlew assembleDebug
adb install -r app/build/outputs/apk/debug/app-debug.apk
adb shell am start -n com.codex.mobile/.MainActivity

Or download the latest APK directly, or get it from Google Play.


๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Android APK โ”‚
โ”‚ โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ WebView โ”‚ โ”‚ APK Assets โ”‚ โ”‚
โ”‚ โ”‚ (Vue.js) โ”‚ โ”‚ bootstrap-aarch64.zip โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ server-bundle/ (Vue + Express) โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ proxy.js / bionic-compat.js โ”‚ โ”‚
โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ CodexServerManager โ”‚ โ”‚
โ”‚ โ”‚ Bootstrap โ†’ Node.js โ†’ Codex + OpenClaw โ†’ Auth โ”‚ โ”‚
โ”‚ โ”‚ Proxy โ†’ Gateway โ†’ Control UI โ†’ Web Server โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚ โ”‚ โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ Embedded Linux ($PREFIX) โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ codex-web-local โ†’ :18923 (HTTP, WebView target) โ”‚ โ”‚
โ”‚ โ”‚ โ””โ”€ codex app-server (native Rust/musl, JSON-RPC) โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ openclaw gateway โ†’ :18789 (WebSocket) โ”‚ โ”‚
โ”‚ โ”‚ openclaw ctrl UI โ†’ :19001 (static file server) โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ claw-code agent โ†’ Claude Code architecture โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ proxy.js โ†’ :18924 (CONNECT proxy, DNS/TLS) โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Services

PortServicePurpose
18789OpenClaw GatewayWebSocket control plane for agents, sessions, tools
18923codex-web-localHTTP server with Vue.js UI (WebView target)
18924CONNECT ProxyDNS/TLS bridge for musl-linked binaries
19001Control UI ServerStatic file server for OpenClaw dashboard

๐Ÿ”ฅ How It Works

๐Ÿง Embedded Linux

The APK bundles Termux's bootstrap-aarch64.zip โ€” a minimal Linux userland with sh, apt-get, dpkg-deb, SSL certificates, and core libraries. On first launch, it's extracted to the app's private storage at $PREFIX = /data/user/0/com.codex.mobile/files/usr.

๐Ÿฆ€ Native Rust Binary

The Codex CLI ships a 73MB native Rust binary compiled for aarch64-unknown-linux-musl. npm refuses to install it on Android, so we download the tarball directly from the npm registry and extract it manually.

๐Ÿ”Œ DNS/TLS Proxy

The musl-linked binary reads /etc/resolv.conf for DNS โ€” which doesn't exist on Android. A Node.js CONNECT proxy on port 18924 bridges this: Node.js uses Android's Bionic DNS resolver, and the native binary routes all HTTPS through HTTPS_PROXY.

๐Ÿค– Android Compatibility

The bionic-compat.js shim patches process.platform to return "linux", fixes os.cpus() and os.networkInterfaces() for Android's non-standard formats.

๐Ÿ”“ W^X Bypass

Android 10+ enforces SELinux W^X (Write XOR Execute) policies. We use targetSdk = 28 to bypass this, same approach as Termux (F-Droid).


๐Ÿš€ Startup Sequence

  1. ๐Ÿ”‹ Battery optimization exemption + foreground service
  2. ๐Ÿง Bootstrap extraction (Termux userland)
  3. ๐Ÿ“ฆ proot + Node.js + Python installation
  4. ๐Ÿ”ง bionic-compat.js extraction
  5. ๐Ÿฆž OpenClaw build deps + install + koffi build + path patching
  6. ๐Ÿฆ€ Claw Code / OpenClaude agent installation
  7. ๐Ÿ’ป Codex CLI + native platform binary installation
  8. โš™๏ธ Full-access config (approval_policy = "never")
  9. ๐Ÿ”Œ CONNECT proxy startup
  10. ๐Ÿ”‘ OAuth login (codex login via browser)
  11. โœ… Health check
  12. ๐Ÿ—๏ธ OpenClaw auth config + gateway + Control UI server
  13. ๐ŸŒ codex-web-local server startup
  14. ๐Ÿ“ฑ WebView loads http://127.0.0.1:18923/

๐Ÿ“ Project Structure

android/
โ”œโ”€โ”€ app/src/main/
โ”‚ โ”œโ”€โ”€ AndroidManifest.xml
โ”‚ โ”œโ”€โ”€ assets/
โ”‚ โ”‚ โ”œโ”€โ”€ proxy.js # CONNECT proxy (DNS/TLS bridge)
โ”‚ โ”‚ โ”œโ”€โ”€ bionic-compat.js # Android platform shim
โ”‚ โ”‚ โ””โ”€โ”€ server-bundle/ # Pre-built Vue + Express + deps
โ”‚ โ””โ”€โ”€ java/com/codex/mobile/
โ”‚ โ”œโ”€โ”€ BootstrapInstaller.kt # Linux environment setup
โ”‚ โ”œโ”€โ”€ CodexForegroundService.kt # Background persistence
โ”‚ โ”œโ”€โ”€ CodexServerManager.kt # Install, auth, proxy, OpenClaw, server
โ”‚ โ””โ”€โ”€ MainActivity.kt # WebView + setup orchestration
โ”œโ”€โ”€ scripts/
โ”‚ โ”œโ”€โ”€ download-bootstrap.sh # Fetch Termux bootstrap
โ”‚ โ””โ”€โ”€ build-server-bundle.sh # Bundle frontend into APK assets
src/ # codex-web-local (TypeScript + Vue)
โ”œโ”€โ”€ api/ # RPC client, gateway, SSE
โ”œโ”€โ”€ components/ # Vue components (composer, threads, sidebar)
โ”œโ”€โ”€ composables/ # useDesktopState (reactive state)
โ”œโ”€โ”€ server/ # Express + codex app-server bridge
โ””โ”€โ”€ cli/ # CLI entry point
clawcode-android/ # Claw Code / OpenClaude (Python + Rust)

๐ŸŽฏ Requirements

  • ๐Ÿ“ฑ Android 7.0+ (API 24) โ€” ARM64 device
  • ๐ŸŒ Internet connection โ€” for first-run setup + API calls
  • ๐Ÿ”‘ OpenAI account โ€” authenticated via OAuth browser flow
  • ๐Ÿ’พ ~500MB storage โ€” for Linux environment + Node.js + Codex + OpenClaw + Claw Code

๐Ÿงฌ Tech Stack

LayerTechnologyVersion
๐Ÿฆž AI GatewayOpenClaw2026.2.21-2
๐Ÿ’ป AI AgentOpenAI Codex CLI0.104.0
๐Ÿฆ€ AI AgentClaw Code / OpenClaudelatest
๐Ÿง  Modelgpt-5.3-codex (via Codex OAuth)โ€”
๐Ÿ”ฎ LLM SupportProvider-agnostic (Claude, OpenAI, local)โ€”
โš™๏ธ RuntimeNode.js (via Termux)24.13.0
๐Ÿ”ง Build ToolsClang/LLVM, CMake, Make, LLD21.1.8 / 4.2.3
๐Ÿ–ฅ๏ธ FrontendVue.js 3 + Vite + TailwindCSS3.x
๐Ÿ“ฑ AndroidKotlin + WebView2.1.0
๐Ÿง LinuxTermux bootstrap (aarch64)โ€”

๐Ÿ› Troubleshooting

ProblemSolution
App crashes on launchCheck adb logcat for errors
"Permission denied" executing binariesEnsure targetSdk = 28 in build.gradle.kts
OpenClaw gateway fails to startCheck ~/.openclaw/openclaw.json config and auth-profiles
koffi build failsVerify clang/cmake/make are installed and binary-patched
"No address associated with hostname"Check internet; CONNECT proxy may not be running
Login page doesn't openEnsure a default browser is set on the device
App killed in backgroundGrant battery optimization exemption in Android settings

๐Ÿ“œ Credits

  • ๐Ÿฆž OpenClaw โ€” Personal AI assistant by Peter Steinberger and community
  • ๐Ÿ’ป OpenAI Codex CLI โ€” Terminal-based coding agent
  • ๐Ÿฆ€ Claw Code โ€” Open-source Claude Code rewrite (48K+ โญ), rebranded as OpenClaude
  • ๐ŸŒ Claw Code Website โ€” Architecture docs, tool system, comparisons
  • ๐Ÿ“ฑ AidanPark/openclaw-android โ€” Android patches and bionic-compat.js
  • ๐Ÿง Termux โ€” Linux environment bootstrap for Android

Three AI agents. One APK. Your pocket. ๐Ÿ”ฌ They leaked Claude Code. We put it on a phone. ๐Ÿ˜

Download APK ยท Google Play ยท OpenClaw Docs ยท Project Spec

About

๐Ÿฆž AnyClaw โ€” OpenClaw + Codex + Claude Code on Android. Three AI agents in one APK. Claw Code / OpenClaude running in full Linux. No root. No server. No PC.

Topics

Resources

Contributing

Security policy

Stars

516 stars

Watchers

10 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages