Skip to content

Repository files navigation

๐Ÿฆ€ Claw Code Mobile

๐Ÿš€ Claude Code on Your Phone โ€” Full Linux, No Server, No PC ๐Ÿš€

AndroidClaw CodeKotlinPythonRustStatusLicense


They said you can't run Claude Code on a phone.They said you need a Mac, a server, SSH, a terminal.We put an entire Linux distro inside an APK and proved them wrong.


 โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•
โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ•— โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•
โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ•”โ–ˆโ–ˆโ–ˆโ•”โ• โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
โ•šโ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ• โ•šโ•โ• โ•šโ•โ•โ•โ•šโ•โ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•
M O B I L E ยท O N ยท Y O U R ยท P H O N E

Download APK ยท Claw Code Website ยท Google Play ยท Project Spec


๐Ÿคฏ What Is This?

People run Claude Code on MacBooks. On cloud servers. On expensive Linux workstations with 64GB RAM.

We run it on a phone.

This project takes the Claw Code agent framework โ€” the open-source clean-room rewrite of Claude Code's architecture with 48K+ stars โ€” and packages it into a single Android APK with a complete embedded Linux environment. No root. No Termux. No server. No SSH tunnels. No second device.

You pull your phone out of your pocket, open the app, and start coding with an AI agent. That's it. That's the product.

๐Ÿง  TL;DR โ€” Full Claw Code + AI coding agent running natively on Android in an embedded Linux environment extracted from the APK. One app. Zero dependencies. Your pocket is now a dev workstation.


๐Ÿ“ฑ Screenshots


๐Ÿ’ฌ AI Coding Agent
Full conversational coding with streaming responses, reasoning visibility, and danger-full-access mode.

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

Yes, that's a full AI coding agent. Yes, it's running on a phone. Yes, it writes and executes code.


๐ŸŒ What Can You Do With This?

FeatureDescription
๐Ÿฆ€Claw Code AgentFull Claude Code architecture agent โ€” reads codebase, writes code, runs commands autonomously
๐ŸงEmbedded LinuxComplete Linux userland extracted from APK โ€” sh, apt, Node.js, Python, SSL certs
โšกRust CoreNative Rust binary (aarch64-musl) โ€” 73MB of raw performance running on ARM64
๐Ÿ’ฌConversational CodingStreaming responses with reasoning visibility and multi-thread sessions
๐Ÿ”“Full Auto-ApprovalNo permission popups โ€” danger-full-access sandbox mode by default
๐Ÿ”‹Background ExecutionForeground service keeps everything alive when you switch apps
๐Ÿ”‘OAuth LoginOne-time browser-based auth โ€” shared across all agent sessions
๐Ÿ“ดOffline BootstrapLinux environment extracted from APK โ€” works without internet after setup
๐Ÿ› ๏ธ19 Built-in ToolsFile I/O, shell execution, Git operations, web scraping, notebook editing
๐Ÿง Query EngineLLM API calls, response streaming, caching, multi-step orchestration
๐Ÿ”ŒMCP SupportModel Context Protocol with 6 transport types โ€” connect external tool servers
๐Ÿ—๏ธMulti-AgentSpawn sub-agents to parallelize complex tasks in isolated contexts

โšก Quick Start

# ๐Ÿ”“ Just download and install
adb install -r claw-code-mobile.apk
adb shell am start -n com.codex.mobile/.MainActivity
# โœˆ๏ธ and you're flying

Or download the APK directly. Open it. Login. Code.

๐Ÿ”ง Build from Source

git clone https://github.com/friuns2/claw-code-android.git
cd claw-code-android
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

๐Ÿ“ Project Structure

๐Ÿฆ€ claw-code-android/
โ”œโ”€โ”€ ๐Ÿ“ฑ 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, server
โ”‚ โ”‚ โ””โ”€โ”€ MainActivity.kt # ๐Ÿ“ฑ WebView + setup orchestration
โ”‚ โ””โ”€โ”€ ๐Ÿ› ๏ธ scripts/
โ”‚ โ”œโ”€โ”€ download-bootstrap.sh # ๐Ÿ“ฅ Fetch Termux bootstrap
โ”‚ โ””โ”€โ”€ build-server-bundle.sh # ๐Ÿ“ฆ Bundle frontend into APK assets
โ”œโ”€โ”€ ๐Ÿฆ€ rust/ # Rust performance core (6 crates)
โ”œโ”€โ”€ ๐Ÿ src/ # Python agent workspace
โ”‚ โ”œโ”€โ”€ commands.py # โŒ˜ 15 slash commands
โ”‚ โ”œโ”€โ”€ tools.py # ๐Ÿ”ง 19 built-in tools
โ”‚ โ”œโ”€โ”€ query_engine.py # ๐Ÿง  Core query engine
โ”‚ โ”œโ”€โ”€ models.py # ๐Ÿ”ฎ LLM provider abstraction
โ”‚ โ””โ”€โ”€ main.py # ๐Ÿš€ Entry point
โ”œโ”€โ”€ ๐ŸŒ docs/ # GitHub Pages website
โ””โ”€โ”€ ๐Ÿ“– README.md # You are here

๐Ÿ—๏ธ Architecture

Four layers. One APK. Your phone is a Linux workstation now.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Android APK โ”‚
โ”‚ โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ WebView โ”‚ โ”‚ APK Assets โ”‚ โ”‚
โ”‚ โ”‚ (Vue.js) โ”‚ โ”‚ bootstrap-aarch64.zip โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ server-bundle/ (Vue + Express) โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ proxy.js / bionic-compat.js โ”‚ โ”‚
โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ CodexServerManager โ”‚ โ”‚
โ”‚ โ”‚ Bootstrap โ†’ Node.js โ†’ Claw Code Agent โ†’ Auth โ”‚ โ”‚
โ”‚ โ”‚ Proxy โ†’ Query Engine โ†’ Tool System โ†’ Web Server โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚ โ”‚ โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ Embedded Linux ($PREFIX) โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ claw-code agent โ†’ :18923 (HTTP, WebView target) โ”‚ โ”‚
โ”‚ โ”‚ โ””โ”€ Rust core (native aarch64-musl, JSON-RPC) โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ gateway โ†’ :18789 (WebSocket) โ”‚ โ”‚
โ”‚ โ”‚ control UI โ†’ :19001 (static file server) โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ proxy.js โ†’ :18924 (CONNECT proxy, DNS/TLS) โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”Œ Services

PortServicePurpose
๐Ÿ”— 18789GatewayWebSocket control plane for agents, sessions, tools
๐ŸŒ 18923Web ServerHTTP server with Vue.js UI (WebView target)
๐Ÿ”Œ 18924CONNECT ProxyDNS/TLS bridge for musl-linked Rust binary
๐Ÿ“Š 19001Control UIStatic file server for agent dashboard

๐Ÿ”ฅ How It Works

They shipped an entire operating system inside an Android app. Absolute madlads.

๐Ÿง 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. No root required.

๐Ÿฆ€ Native Rust Binary

The Claw Code framework 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. Because we don't take "no" for an answer.

๐Ÿ”Œ 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 gap: Node.js uses Android's Bionic DNS resolver, and the native binary routes all HTTPS through HTTPS_PROXY.

๐Ÿค– Android Compatibility Layer

The bionic-compat.js shim patches process.platform to return "linux", fixes os.cpus() and os.networkInterfaces() for Android's non-standard formats. Android thinks it's running Linux. We don't correct it.

๐Ÿ”“ 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). Security researchers love this one.


๐Ÿš€ Startup Sequence

  1. ๐Ÿ”‹ Battery optimization exemption + foreground service
  2. ๐Ÿง Bootstrap extraction (Termux userland)
  3. ๐Ÿ“ฆ Node.js + Python installation
  4. ๐Ÿ”ง Build tools (clang, cmake, make, lld)
  5. ๐Ÿฆ€ Claw Code agent + native Rust binary installation
  6. โš™๏ธ Full-access config (approval_policy = "never")
  7. ๐Ÿ”Œ CONNECT proxy startup
  8. ๐Ÿ”‘ OAuth login via browser
  9. ๐Ÿ—๏ธ Gateway + Control UI + Web Server
  10. ๐Ÿ“ฑ WebView loads http://127.0.0.1:18923/

๐ŸŽฏ Requirements

  • ๐Ÿ“ฑ Android 7.0+ (API 24) โ€” ARM64 device
  • ๐ŸŒ Internet connection โ€” for first-run setup + API calls
  • ๐Ÿ”‘ API key โ€” for your chosen LLM provider
  • ๐Ÿ’พ ~500MB storage โ€” for Linux environment + Node.js + Rust core + agent framework

๐Ÿงฌ Tech Stack

LayerTechnologyVersion
๐Ÿฆ€ Agent FrameworkClaw Code (Python + Rust)latest
๐Ÿง  Rust Core6-crate workspace, 16 runtime modulesโ€”
๐Ÿ”ง Tool System19 built-in, permission-gated toolsโ€”
โŒ˜ Commands15 slash commandsโ€”
๐Ÿ”ฎ LLM SupportProvider-agnostic (Claude, OpenAI, local)โ€”
๐ŸŒ RuntimeNode.js (Termux)24.x
๐Ÿ–ฅ๏ธ FrontendVue.js 3 + Vite + TailwindCSS3.x
๐Ÿ“ฑ AndroidKotlin + WebView2.1.0
๐Ÿง LinuxTermux bootstrap (aarch64)โ€”

๐Ÿ†š Claw Code Mobile vs. Desktop

AspectDesktop (Mac/Linux/Server)Mobile (This App)
๐Ÿ–ฅ๏ธ PlatformmacOS, Linux, WSLAndroid 7.0+ (ARM64)
๐Ÿ“ฆ Installationpip install + terminalDownload APK โ†’ open โ†’ done
๐Ÿ”ง DependenciesPython, Rust, terminal emulatorNothing. Zero. Nada.
๐Ÿง LinuxNative OSEmbedded in APK
๐Ÿฆ€ Rust BinaryNative installExtracted from npm registry
๐ŸŒ DNSSystem resolverCONNECT proxy bridge
๐Ÿ”‹ BackgroundTerminal stays openForeground service
๐Ÿ’ฐ Server Costs$0-โˆž depending on cloud$0. It's your phone.
๐Ÿ“ PortabilityCarry your laptopCarry your pocket

๐Ÿ› Troubleshooting

ProblemSolution
๐Ÿ’ฅ App crashes on launchCheck adb logcat for errors
๐Ÿ”’ "Permission denied" executing binariesEnsure targetSdk = 28 in build.gradle.kts
๐Ÿฆ€ Rust binary fails to startVerify aarch64 architecture, check CONNECT proxy
๐ŸŒ "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
๐Ÿงฐ Build tools failVerify clang/cmake/make are installed and binary-patched

๐Ÿค Contributing

Found a bug? Want a feature? Have a wild idea about running more things on phones that shouldn't run on phones?

Open an issue ยท Submit a PR


โญ Star This Repo

If you believe AI coding agents should run everywhere โ€” not just on expensive machines behind SSH tunnels โ€” smash that star button. โญ

If you ever wished you could code on the bus, in a coffee shop, or while waiting at the dentist with a full AI agent that reads your codebase and writes code autonomously โ€” this is for you.

StarsForks


๐Ÿ“œ Credits

  • ๐Ÿฆ€ Claw Code โ€” Open-source AI coding agent framework (48K+ โญ)
  • ๐ŸŒ Claw Code Website โ€” Architecture docs & comparison
  • ๐Ÿ“ฑ AidanPark/openclaw-android โ€” Android patches and bionic-compat.js
  • ๐Ÿง Termux โ€” Linux environment bootstrap for Android

Built by shoving an entire Linux distro + AI agent framework into an APK ๐Ÿ”ฌ Your pocket called. It wants to write some code. ๐Ÿ˜

Download APK ยท Claw Code ยท Google Play

About

๐Ÿฆ€ Claude Code on your phone โ€” Full Linux environment, Rust core, 19 tools, zero dependencies. No server. No PC. Just your pocket.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

28 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages