🤖 Codex App Android

The full OpenAI Codex CLI — running natively on your Android phone. No root. No Termux. One APK.

Works on Android 7+ Codex CLI v0.104.0 Node.js 24 + Vue 3
📥 Download APK ⭐ View on GitHub ⚡ Quick Start

🤯 What Is This?

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.

💬 Chat Interface

Full conversational UI with streaming responses, reasoning visibility, model selection, and multi-thread sessions.

🦀 Native Binary

73MB Rust binary (aarch64-musl) running natively — not emulated. Full codex app-server with JSON-RPC.

🐧 Embedded Linux

Complete Termux-derived userland with sh, apt, Node.js, npm, SSL certs — extracted from APK assets.

🌐 DNS Proxy Bridge

Node.js CONNECT proxy bridges Android's DNS to the musl binary. No /etc/resolv.conf needed.

🔓 Full Auto-Approval

Pre-configured with approval_policy = "never" and danger-full-access sandbox mode.

🔋 Background Execution

Foreground service + battery optimization exemption keeps the server alive when you switch apps.

🏗️ Architecture

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.

Quick Start

# 🔨 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

🧩 Startup Sequence

1

Battery & Service

Request Doze exemption, start foreground service with persistent notification.

2

Bootstrap Extraction

Extract Termux bootstrap zip into app's private storage. Fix hardcoded paths.

3

Node.js Installation

Download and extract Node.js 24 .deb packages from Termux repos via apt-get.

4

Codex CLI + Web UI

Extract pre-built server bundle from APK. Install native Rust binary from npm registry.

5

Config & Proxy

Write full-access config. Start Node.js CONNECT proxy for DNS/TLS bridging.

6

Auth & Launch

OAuth via browser → health check → start Express server → load WebView.

📊 Tech Stack

LayerTechnologyVersion
🤖 AI EngineOpenAI Codex CLI0.104.0
🦀 Native BinaryRust (musl, aarch64)
🟢 RuntimeNode.js (Termux)24.13.0
🌐 FrontendVue.js 3 + Vite + Tailwind3.x
🔌 BackendExpress + JSON-RPC bridge
📱 AndroidKotlin + WebView2.1.0