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
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.
Yes, that's a full AI coding agent. Yes, it's running on a phone. Yes, it writes and executes code.
| Feature | Description | |
|---|---|---|
| ๐ฆ | Claw Code Agent | Full Claude Code architecture agent โ reads codebase, writes code, runs commands autonomously |
| ๐ง | Embedded Linux | Complete Linux userland extracted from APK โ sh, apt, Node.js, Python, SSL certs |
| โก | Rust Core | Native Rust binary (aarch64-musl) โ 73MB of raw performance running on ARM64 |
| ๐ฌ | Conversational Coding | Streaming responses with reasoning visibility and multi-thread sessions |
| ๐ | Full Auto-Approval | No permission popups โ danger-full-access sandbox mode by default |
| ๐ | Background Execution | Foreground service keeps everything alive when you switch apps |
| ๐ | OAuth Login | One-time browser-based auth โ shared across all agent sessions |
| ๐ด | Offline Bootstrap | Linux environment extracted from APK โ works without internet after setup |
| ๐ ๏ธ | 19 Built-in Tools | File I/O, shell execution, Git operations, web scraping, notebook editing |
| ๐ง | Query Engine | LLM API calls, response streaming, caching, multi-step orchestration |
| ๐ | MCP Support | Model Context Protocol with 6 transport types โ connect external tool servers |
| ๐๏ธ | Multi-Agent | Spawn sub-agents to parallelize complex tasks in isolated contexts |
# ๐ Just download and install
adb install -r claw-code-mobile.apk
adb shell am start -n com.codex.mobile/.MainActivity
# โ๏ธ and you're flyingOr download the APK directly. Open it. Login. Code.
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๐ฆ 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
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) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Port | Service | Purpose |
|---|---|---|
| ๐ 18789 | Gateway | WebSocket control plane for agents, sessions, tools |
| ๐ 18923 | Web Server | HTTP server with Vue.js UI (WebView target) |
| ๐ 18924 | CONNECT Proxy | DNS/TLS bridge for musl-linked Rust binary |
| ๐ 19001 | Control UI | Static file server for agent dashboard |
They shipped an entire operating system inside an Android app. Absolute madlads.
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.
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.
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.
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.
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.
- ๐ Battery optimization exemption + foreground service
- ๐ง Bootstrap extraction (Termux userland)
- ๐ฆ Node.js + Python installation
- ๐ง Build tools (clang, cmake, make, lld)
- ๐ฆ Claw Code agent + native Rust binary installation
- โ๏ธ Full-access config (
approval_policy = "never") - ๐ CONNECT proxy startup
- ๐ OAuth login via browser
- ๐๏ธ Gateway + Control UI + Web Server
- ๐ฑ WebView loads
http://127.0.0.1:18923/
- ๐ฑ 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
| Layer | Technology | Version |
|---|---|---|
| ๐ฆ Agent Framework | Claw Code (Python + Rust) | latest |
| ๐ง Rust Core | 6-crate workspace, 16 runtime modules | โ |
| ๐ง Tool System | 19 built-in, permission-gated tools | โ |
| โ Commands | 15 slash commands | โ |
| ๐ฎ LLM Support | Provider-agnostic (Claude, OpenAI, local) | โ |
| ๐ Runtime | Node.js (Termux) | 24.x |
| ๐ฅ๏ธ Frontend | Vue.js 3 + Vite + TailwindCSS | 3.x |
| ๐ฑ Android | Kotlin + WebView | 2.1.0 |
| ๐ง Linux | Termux bootstrap (aarch64) | โ |
| Aspect | Desktop (Mac/Linux/Server) | Mobile (This App) |
|---|---|---|
| ๐ฅ๏ธ Platform | macOS, Linux, WSL | Android 7.0+ (ARM64) |
| ๐ฆ Installation | pip install + terminal |
Download APK โ open โ done |
| ๐ง Dependencies | Python, Rust, terminal emulator | Nothing. Zero. Nada. |
| ๐ง Linux | Native OS | Embedded in APK |
| ๐ฆ Rust Binary | Native install | Extracted from npm registry |
| ๐ DNS | System resolver | CONNECT proxy bridge |
| ๐ Background | Terminal stays open | Foreground service |
| ๐ฐ Server Costs | $0-โ depending on cloud | $0. It's your phone. |
| ๐ Portability | Carry your laptop | Carry your pocket |
| Problem | Solution |
|---|---|
| ๐ฅ App crashes on launch | Check adb logcat for errors |
| ๐ "Permission denied" executing binaries | Ensure targetSdk = 28 in build.gradle.kts |
| ๐ฆ Rust binary fails to start | Verify aarch64 architecture, check CONNECT proxy |
| ๐ "No address associated with hostname" | Check internet; CONNECT proxy may not be running |
| ๐ Login page doesn't open | Ensure a default browser is set on the device |
| ๐ App killed in background | Grant battery optimization exemption in Android settings |
| ๐งฐ Build tools fail | Verify clang/cmake/make are installed and binary-patched |
Found a bug? Want a feature? Have a wild idea about running more things on phones that shouldn't run on phones?
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.
- ๐ฆ 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

