The full OpenAI Codex CLI — running natively on your Android phone. No root. No Termux. One APK.
OpenAI's Codex CLI is a terminal-based AI coding agent that reads codebases, writes code, and executes commands. It's incredible — but desktop-only.
We put it on Android. This APK bundles an entire Linux environment, installs Node.js and the native Rust Codex binary, wires up a Vue.js web UI, and serves it all through a WebView. Full AI coding agent in your pocket.
Full conversational UI with streaming responses, reasoning visibility, model selection, and multi-thread sessions.
73MB Rust binary (aarch64-musl) running natively — not emulated. Full codex app-server with JSON-RPC.
Complete Termux-derived userland with sh, apt, Node.js, npm, SSL certs — extracted from APK assets.
Node.js CONNECT proxy bridges Android's DNS to the musl binary. No /etc/resolv.conf needed.
Pre-configured with approval_policy = "never" and danger-full-access sandbox mode.
Foreground service + battery optimization exemption keeps the server alive when you switch apps.
User taps Send
→ 🖥️ Vue ThreadComposer → useDesktopState → codexGateway
→ 📡 POST /codex-api/rpc { method: "turn/start" }
→ 🔌 Express bridge → JSON-RPC stdin → codex app-server
→ 🦀 Native Rust binary → HTTPS via proxy → OpenAI API
→ 📤 stdout JSON-RPC notifications (streaming)
→ 📺 SSE EventSource → live typing in WebView
Four layers: Vue frontend → Express server → JSON-RPC stdio bridge → Native Rust binary.
All running locally on your phone at 127.0.0.1:18923.
# 🔨 Clone the repo
git clone https://github.com/friuns2/codex-app-android.git
cd codex-app-android
# 📦 Install deps & build frontend
npm install && npm run build
# 🐧 Download Termux bootstrap (one-time)
cd android && bash scripts/download-bootstrap.sh
# 📱 Bundle, build, install, launch
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
Request Doze exemption, start foreground service with persistent notification.
Extract Termux bootstrap zip into app's private storage. Fix hardcoded paths.
Download and extract Node.js 24 .deb packages from Termux repos via apt-get.
Extract pre-built server bundle from APK. Install native Rust binary from npm registry.
Write full-access config. Start Node.js CONNECT proxy for DNS/TLS bridging.
OAuth via browser → health check → start Express server → load WebView.
| Layer | Technology | Version |
|---|---|---|
| 🤖 AI Engine | OpenAI Codex CLI | 0.104.0 |
| 🦀 Native Binary | Rust (musl, aarch64) | — |
| 🟢 Runtime | Node.js (Termux) | 24.13.0 |
| 🌐 Frontend | Vue.js 3 + Vite + Tailwind | 3.x |
| 🔌 Backend | Express + JSON-RPC bridge | — |
| 📱 Android | Kotlin + WebView | 2.1.0 |