[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-185":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":9,"totalLinesOfCode":9,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":9,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":16,"starSnapshotCount":16,"syncStatus":38,"lastSyncTime":39,"discoverSource":40},185,"openclaw-android","AidanPark\u002Fopenclaw-android","AidanPark","Run OpenClaw on Android with a single command — no proot, no Linux",null,"https:\u002F\u002Fgithub.com\u002FAidanPark\u002Fopenclaw-android","Java",1606,201,22,10,0,7,25,83,21,19.92,false,"main",[25,26,27,28,29,30,31,32,33,34],"ai","ai-agent","android","low-power","nodejs","openclaw","self-hosted","termux","repurpose-phone","homelab","2026-06-12 02:00:09","# OpenClaw on Android\n\n[한국어](README.ko.md) | [中文](README.zh.md)\n\n\u003Cimg src=\"docs\u002Fimages\u002Fopenclaw_android.jpg\" alt=\"OpenClaw on Android\">\n\n![Android 7.0+](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAndroid-7.0%2B-brightgreen)\n![Termux](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTermux-Required-orange)\n![No proot](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fproot--distro-Not%20Required-blue)\n![License MIT](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FAidanPark\u002Fopenclaw-android)\n![GitHub Stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FAidanPark\u002Fopenclaw-android)\n\nBecause Android deserves a shell.\n\n## No Linux install required\n\nThe standard approach to running OpenClaw on Android requires installing proot-distro with Linux, adding 700MB-1GB of overhead. OpenClaw on Android eliminates this by installing just the glibc dynamic linker (ld.so), letting you run OpenClaw without a full Linux distribution.\n\n**Standard approach**: Install a full Linux distribution in Termux via proot-distro.\n\n```\n┌───────────────────────────────────────────────────┐\n│ Linux Kernel                                      │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ Android · Bionic libc · Termux                │ │\n│ │ ┌───────────────────────────────────────────┐ │ │\n│ │ │ proot-distro · Debian\u002FUbuntu              │ │ │\n│ │ │ ┌───────────────────────────────────────┐ │ │ │\n│ │ │ │ GNU glibc                             │ │ │ │\n│ │ │ │ Node.js → OpenClaw                    │ │ │ │\n│ │ │ └───────────────────────────────────────┘ │ │ │\n│ │ └───────────────────────────────────────────┘ │ │\n│ └───────────────────────────────────────────────┘ │\n└───────────────────────────────────────────────────┘\n```\n\n**This project**: No proot-distro — just the glibc dynamic linker.\n\n```\n┌───────────────────────────────────────────────────┐\n│ Linux Kernel                                      │\n│ ┌───────────────────────────────────────────────┐ │\n│ │ Android · Bionic libc · Termux                │ │\n│ │ ┌───────────────────────────────────────────┐ │ │\n│ │ │ glibc ld.so (linker only)                 │ │ │\n│ │ │ ld.so → Node.js → OpenClaw                │ │ │\n│ │ └───────────────────────────────────────────┘ │ │\n│ └───────────────────────────────────────────────┘ │\n└───────────────────────────────────────────────────┘\n```\n\n| | Standard (proot-distro) | This project |\n|---|---|---|\n| Storage overhead | 1-2GB (Linux + packages) | ~200MB |\n| Setup time | 20-30 min | 3-10 min |\n| Performance | Slower (proot layer) | Native speed |\n| Setup steps | Install distro, configure Linux, install Node.js, fix paths... | Run one command |\n\n## \u003Cimg src=\"docs\u002Fimages\u002Fclaw-icon.svg\" width=\"28\" alt=\"Claw icon\"> Claw App\n\nA standalone Android app is also available. It bundles a terminal emulator and a WebView-based UI into a single APK — no Termux required.\n\n- One-tap setup: bootstrap, Node.js, and OpenClaw installed from within the app\n- Built-in dashboard for gateway control, runtime info, and tool management\n- Works independently of Termux — installing the app does not affect an existing Termux + `oa` setup\n\nDownload the APK from the [Releases](https:\u002F\u002Fgithub.com\u002FAidanPark\u002Fopenclaw-android\u002Freleases) page.\n\n## Requirements\n\n- Android 7.0 or higher (Android 10+ recommended)\n- ~1GB free storage\n- Wi-Fi or mobile data connection\n\n## What It Does\n\nThe installer automatically resolves the differences between Termux and standard Linux. There's nothing you need to do manually — the single install command handles all of these:\n\n1. **glibc environment** — Installs the glibc dynamic linker (via pacman's glibc-runner) so standard Linux binaries run without modification\n2. **Node.js (glibc)** — Downloads official Node.js linux-arm64 and wraps it with an ld.so loader script (no patchelf, which causes segfault on Android)\n3. **Path conversion** — Automatically converts standard Linux paths (`\u002Ftmp`, `\u002Fbin\u002Fsh`, `\u002Fusr\u002Fbin\u002Fenv`) to Termux paths\n4. **Temp folder setup** — Configures an accessible temp folder for Android\n5. **Service manager bypass** — Configures normal operation without systemd\n6. **OpenCode integration** — If selected, installs OpenCode using proot + ld.so concatenation for Bun standalone binaries\n\n## Step-by-Step Setup (from a fresh phone)\n\n1. [Prepare Your Phone](#step-1-prepare-your-phone)\n2. [Install Termux](#step-2-install-termux)\n3. [Initial Termux Setup](#step-3-initial-termux-setup)\n4. [Install OpenClaw](#step-4-install-openclaw) — one command\n5. [Start OpenClaw Setup](#step-5-start-openclaw-setup)\n6. [Start OpenClaw (Gateway)](#step-6-start-openclaw-gateway)\n\n### Step 1: Prepare Your Phone\n\nConfigure Developer Options, Stay Awake, charge limit, and battery optimization. See the [Keeping Processes Alive guide](docs\u002Fdisable-phantom-process-killer.md) for step-by-step instructions.\n\n### Step 2: Install Termux\n\n> **Important**: The Play Store version of Termux is discontinued and will not work. You must install from F-Droid.\n\n1. Open your phone's browser and go to [f-droid.org](https:\u002F\u002Ff-droid.org)\n2. Search for `Termux`, then tap **Download APK** to download and install\n   - Allow \"Install from unknown sources\" when prompted\n\n### Step 3: Initial Termux Setup\n\nOpen the Termux app and paste the following command to install curl (needed for the next step).\n\n```bash\npkg update -y && pkg install -y curl\n```\n\n> You may be asked to choose a mirror on first run. Pick any — a geographically closer mirror will be faster.\n\n### Step 4: Install OpenClaw\n\n> **Tip: Use SSH for easier typing**\n> From this step on, you can type commands from your computer keyboard instead of the phone screen. See the [Termux SSH Setup Guide](docs\u002Ftermux-ssh-guide.md) for details.\n\nPaste the following command in Termux.\n\n```bash\ncurl -sL myopenclawhub.com\u002Finstall | bash && source ~\u002F.bashrc\n```\n\nEverything is installed automatically with a single command. This takes 3–10 minutes depending on network speed and device. Wi-Fi is recommended.\n\nOnce complete, the OpenClaw version is displayed along with instructions to run `openclaw onboard`.\n\n### Step 5: Start OpenClaw Setup\n\nAs instructed in the installation output, run:\n\n```bash\nopenclaw onboard\n```\n\nFollow the on-screen instructions to complete the initial setup.\n\n![openclaw onboard](docs\u002Fimages\u002Fopenclaw-onboard.png)\n\n### Step 6: Start OpenClaw (Gateway)\n\nOnce setup is complete, start the gateway:\n\n> **Important**: Run `openclaw gateway` directly in the Termux app on your phone, not via SSH. If you run it over SSH, the gateway will stop when the SSH session disconnects.\n\nThe gateway occupies the terminal while running, so open a new tab for it. Tap the **hamburger icon (☰)** on the bottom menu bar, or swipe right from the left edge of the screen (above the bottom menu bar) to open the side menu. Then tap **NEW SESSION**.\n\n\u003Cimg src=\"docs\u002Fimages\u002Ftermux_menu.png\" width=\"300\" alt=\"Termux side menu\">\n\nIn the new tab, run:\n\n```bash\nopenclaw gateway\n```\n\n\u003Cimg src=\"docs\u002Fimages\u002Ftermux_tab_1.png\" width=\"300\" alt=\"openclaw gateway running\">\n\n> To stop the gateway, press `Ctrl+C`. Do not use `Ctrl+Z` — it only suspends the process without terminating it.\n\n## Keeping Processes Alive\n\nAndroid may kill background processes or throttle them when the screen is off. See the [Keeping Processes Alive guide](docs\u002Fdisable-phantom-process-killer.md) for all recommended settings (Developer Options, Stay Awake, charge limit, battery optimization, and Phantom Process Killer).\n\n## Access the Dashboard from Your PC\n\nSee the [Termux SSH Setup Guide](docs\u002Ftermux-ssh-guide.md) for SSH access and dashboard tunnel setup.\n\n## Managing Multiple Devices\n\nIf you run OpenClaw on multiple devices on the same network, use the \u003Ca href=\"https:\u002F\u002Fmyopenclawhub.com\" target=\"_blank\">Dashboard Connect\u003C\u002Fa> tool to manage them from your PC.\n\n- Save connection settings (IP, token, ports) for each device with a nickname\n- Generates the SSH tunnel command and dashboard URL automatically\n- **Your data stays local** — Connection settings (IP, token, ports) are saved only in your browser's localStorage and are never sent to any server.\n\n## CLI Reference\n\nAfter installation, the `oa` command is available for managing your installation:\n\n| Option | Description |\n|--------|-------------|\n| `oa --update` | Update OpenClaw and Android patches |\n| `oa --install` | Install optional tools (tmux, code-server, AI CLIs, etc.) |\n| `oa --uninstall` | Remove OpenClaw on Android |\n| `oa --backup` | Create a full backup of OpenClaw data |\n| `oa --restore` | Restore from a backup |\n| `oa --status` | Show installation status and all installed components |\n| `oa --version` | Show version |\n| `oa --help` | Show available options |\n\n## Update\n\n```bash\noa --update && source ~\u002F.bashrc\n```\n\nThis single command updates all installed components at once:\n\n- **OpenClaw** — Core package (`openclaw@latest`)\n- **code-server** — Browser IDE\n- **OpenCode** — AI coding assistant\n- **AI CLI tools** — Claude Code, Gemini CLI, Codex CLI (Termux)\n- **Android patches** — Compatibility patches from this project\n\nAlready up-to-date components are skipped. Components you haven't installed are not touched — only what's already on your device gets updated. Safe to run multiple times.\n\n> If the `oa` command is not available (older installations), run it with curl:\n> ```bash\n> curl -sL myopenclawhub.com\u002Fupdate | bash && source ~\u002F.bashrc\n> ```\n\n## Backup & Restore\n\nOpenClaw's built-in backup command (`openclaw backup create`) often fails on Android because it relies on hardlinks, which are blocked in Android's app-private storage. The `oa --backup` command works around this by using `tar` directly while maintaining full compatibility with the OpenClaw backup specification.\n\nTo create a backup:\n```bash\noa --backup\n```\nBackups are stored in `~\u002F.openclaw-android\u002Fbackup\u002F` with a timestamped filename (e.g., `2026-03-14T00-00-00.000Z-openclaw-backup.tar.gz`). You can also specify a custom path: `oa --backup ~\u002Fmy-backups\u002F`. Each backup includes your configuration, state, workspaces, and agents.\n\nTo restore from a backup:\n```bash\noa --restore\n```\nThis command lists all available backups in the default backup directory. Simply select the number of the backup you wish to restore. The tool automatically detects the platform from the backup manifest and handles the restoration to `~\u002F.openclaw\u002F`. Note that this will overwrite existing data, so a confirmation is required.\n\n## Troubleshooting\n\nSee the [Troubleshooting Guide](docs\u002Ftroubleshooting.md) for detailed solutions.\n\n## Performance\n\nCLI commands like `openclaw status` may feel slower than on a PC. This is because each command needs to read many files, and the phone's storage is slower than a PC's, with Android's security processing adding overhead.\n\nHowever, **once the gateway is running, there's no difference**. The process stays in memory so files don't need to be re-read, and AI responses are processed on external servers — the same speed as on a PC.\n\n## Local LLM on Android\n\nOpenClaw supports local LLM inference via [node-llama-cpp](https:\u002F\u002Fgithub.com\u002Fwithcatai\u002Fnode-llama-cpp). The prebuilt native binary (`@node-llama-cpp\u002Flinux-arm64`) is included with the installation and loads successfully under the glibc environment — **local LLM is technically functional on the phone**.\n\nHowever, there are practical constraints:\n\n| Constraint | Details |\n|------------|---------|\n| RAM | GGUF models need at least 2-4GB of free memory (7B model, Q4 quantization). Phone RAM is shared with Android and other apps |\n| Storage | Model files range from 4GB to 70GB+. Phone storage fills up fast |\n| Speed | CPU-only inference on ARM is very slow. Android does not support GPU offloading for llama.cpp |\n| Use case | OpenClaw primarily routes to cloud LLM APIs (OpenAI, Gemini, etc.) which respond at the same speed as on a PC. Local inference is a supplementary feature |\n\nFor experimentation, small models like TinyLlama 1.1B (Q4, ~670MB) can run on the phone. For production use, cloud LLM providers are recommended.\n\n> **Why `--ignore-scripts`?** The installer uses `npm install -g openclaw@latest --ignore-scripts` because node-llama-cpp's postinstall script attempts to compile llama.cpp from source via cmake — a process that takes 30+ minutes on a phone and fails due to toolchain incompatibilities. The prebuilt binaries work without this compilation step, so the postinstall is safely skipped.\n\n\u003Cdetails>\n\u003Csummary>Technical Documentation for Developers\u003C\u002Fsummary>\n\n## Installed Components\n\nThe installer sets up infrastructure, platform packages, and optional tools across multiple package managers. Core infrastructure and platform dependencies are installed automatically; optional tools are individually prompted during install.\n\n### Core Infrastructure\n\n| Component | Role | Install Method |\n|-----------|------|----------------|\n| git | Version control, npm git dependencies | `pkg install` |\n\n### Agent Platform Runtime Dependencies\n\nThese are controlled by the platform's `config.env` flags. For OpenClaw, all are installed:\n\n| Component | Role | Install Method |\n|-----------|------|----------------|\n| [pacman](https:\u002F\u002Fwiki.archlinux.org\u002Ftitle\u002FPacman) | Package manager for glibc packages | `pkg install` |\n| [glibc-runner](https:\u002F\u002Fgithub.com\u002Ftermux-pacman\u002Fglibc-packages) | glibc dynamic linker — enables standard Linux binaries on Android | `pacman -Sy` |\n| [Node.js](https:\u002F\u002Fnodejs.org\u002F) v22 LTS (linux-arm64) | JavaScript runtime for OpenClaw | Direct download from nodejs.org |\n| python | Build scripts for native C\u002FC++ addons (node-gyp) | `pkg install` |\n| make | Makefile execution for native modules | `pkg install` |\n| cmake | CMake-based native module builds | `pkg install` |\n| clang | C\u002FC++ compiler for native modules | `pkg install` |\n| binutils | Binary utilities (llvm-ar) for native builds | `pkg install` |\n\n### OpenClaw Platform\n\n| Component | Role | Install Method |\n|-----------|------|----------------|\n| [OpenClaw](https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fopenclaw) | AI agent platform (core) | `npm install -g` |\n| [clawdhub](https:\u002F\u002Fgithub.com\u002FAidanPark\u002Fclawdhub) | Skill manager for OpenClaw | `npm install -g` |\n| [PyYAML](https:\u002F\u002Fpyyaml.org\u002F) | YAML parser for `.skill` packaging | `pip install` |\n| libvips | Image processing headers for sharp build | `pkg install` (on update) |\n\n### Optional Tools (prompted during install)\n\nEach tool is offered via an individual Y\u002Fn prompt. You choose which ones to install.\n\n| Component | Role | Install Method |\n|-----------|------|----------------|\n| [tmux](https:\u002F\u002Fgithub.com\u002Ftmux\u002Ftmux) | Terminal multiplexer for background sessions | `pkg install` |\n| [ttyd](https:\u002F\u002Fgithub.com\u002Ftsl0922\u002Fttyd) | Web terminal — access Termux from a browser | `pkg install` |\n| [dufs](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fdufs) | HTTP\u002FWebDAV file server for browser-based file transfer | `pkg install` |\n| [android-tools](https:\u002F\u002Fdeveloper.android.com\u002Ftools\u002Fadb) | ADB for disabling Phantom Process Killer | `pkg install` |\n| [code-server](https:\u002F\u002Fgithub.com\u002Fcoder\u002Fcode-server) | Browser-based VS Code IDE | Direct download from GitHub |\n| [OpenCode](https:\u002F\u002Fopencode.ai\u002F) | AI coding assistant (TUI). Auto-installs [Bun](https:\u002F\u002Fbun.sh\u002F) and [proot](https:\u002F\u002Fproot-me.github.io\u002F) as dependencies | `bun install -g` |\n| [Chromium](https:\u002F\u002Fwww.chromium.org\u002F) | Browser automation for OpenClaw (~400MB) | Custom install script |\n| [Playwright](https:\u002F\u002Fplaywright.dev\u002F) | Browser automation library (requires Chromium). Auto-configures `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH` | Custom install script |\n| [Claude Code](https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-code) (Anthropic) | AI CLI tool | `npm install -g` |\n| [Gemini CLI](https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-cli) (Google) | AI CLI tool | `npm install -g` |\n| [Codex CLI](https:\u002F\u002Fgithub.com\u002FDioNanos\u002Fcodex-termux) (Termux fork of OpenAI Codex) | AI CLI tool | `npm install -g` |\n\n## Project Structure\n\n```\nopenclaw-android\u002F\n├── bootstrap.sh                # curl | bash one-liner installer (downloader)\n├── install.sh                  # Platform-aware installer (entry point)\n├── oa.sh                       # Unified CLI (installed as $PREFIX\u002Fbin\u002Foa)\n├── post-setup.sh               # Claw App post-bootstrap setup (OTA delivery)\n├── update.sh                   # Thin wrapper (downloads and runs update-core.sh)\n├── update-core.sh              # Lightweight updater for existing installations\n├── uninstall.sh                # Clean removal (orchestrator)\n├── patches\u002F\n│   ├── glibc-compat.js        # Node.js runtime patches (os.cpus, networkInterfaces)\n│   ├── argon2-stub.js          # JS stub for argon2 native module (code-server)\n│   ├── termux-compat.h         # C header for Bionic native builds (sharp)\n│   ├── spawn.h                 # POSIX spawn stub header\n│   ├── systemctl               # systemd stub for Termux\n│   ├── apply-patches.sh        # Legacy patch orchestrator (v1.0.2 compat)\n│   └── patch-paths.sh          # Legacy path fixer (v1.0.2 compat)\n├── scripts\u002F\n│   ├── lib.sh                  # Shared function library (colors, platform detection, prompts)\n│   ├── check-env.sh            # Pre-flight environment check\n│   ├── install-infra-deps.sh   # Core infrastructure packages (L1)\n│   ├── install-glibc.sh        # glibc-runner installation (L2 conditional)\n│   ├── install-nodejs.sh       # Node.js glibc wrapper installation (L2 conditional)\n│   ├── install-build-tools.sh  # Build tools for native modules (L2 conditional)\n│   ├── backup.sh               # Backup and restore OpenClaw data (oa --backup\u002F--restore)\n│   ├── build-sharp.sh          # Build sharp native module (image processing)\n│   ├── install-chromium.sh     # Install Chromium for browser automation\n│   ├── install-playwright.sh   # Install Playwright browser automation library\n│   ├── install-code-server.sh  # Install\u002Fupdate code-server (browser IDE)\n│   ├── install-opencode.sh     # Install OpenCode\n│   ├── setup-env.sh            # Configure environment variables\n│   └── setup-paths.sh          # Create directories and symlinks\n├── platforms\u002F\n│   ├── openclaw\u002F               # OpenClaw platform plugin\n│   │   ├── config.env          # Platform metadata and dependency declarations\n│   │   ├── env.sh              # Platform-specific environment variables\n│   │   ├── install.sh          # Platform package install (npm, patches, clawdhub)\n│   │   ├── update.sh           # Platform package update\n│   │   ├── uninstall.sh        # Platform package removal\n│   │   ├── status.sh           # Platform status display\n│   │   ├── verify.sh           # Platform verification checks\n│   │   └── patches\u002F            # Platform-specific patches\n│   │       ├── openclaw-apply-patches.sh\n│   │       ├── openclaw-patch-paths.sh\n│   │       └── openclaw-build-sharp.sh\n├── tests\u002F\n│   └── verify-install.sh       # Post-install verification (orchestrator + platform)\n└── docs\u002F\n    ├── disable-phantom-process-killer.md    # Keeping Processes Alive guide (EN)\n    ├── disable-phantom-process-killer.ko.md # Keeping Processes Alive guide (KO)\n    ├── termux-ssh-guide.md     # Termux SSH setup guide (EN)\n    ├── termux-ssh-guide.ko.md  # Termux SSH setup guide (KO)\n    ├── troubleshooting.md      # Troubleshooting guide (EN)\n    ├── troubleshooting.ko.md   # Troubleshooting guide (KO)\n    └── images\u002F                 # Screenshots and images\n```\n\n## Architecture\n\nThe project uses a **platform-plugin architecture** that separates platform-agnostic infrastructure from platform-specific code:\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│  Orchestrators (install.sh, update-core.sh, uninstall.sh)  │\n│  ── Platform-agnostic. Read config.env and delegate.       │\n├─────────────────────────────────────────────────────────────┤\n│  Shared Scripts (scripts\u002F)                                  │\n│  ── L1: install-infra-deps.sh (always)                     │\n│  ── L2: install-glibc.sh, install-nodejs.sh,               │\n│         install-build-tools.sh (conditional on config.env) │\n│  ── L3: Optional tools (user-selected)                     │\n├─────────────────────────────────────────────────────────────┤\n│  Platform Plugins (platforms\u002F\u003Cname>\u002F)                       │\n│  ── config.env: declares dependencies (PLATFORM_NEEDS_*)  │\n│  ── install.sh \u002F update.sh \u002F uninstall.sh \u002F ...            │\n└─────────────────────────────────────────────────────────────┘\n```\n\n**Dependency layers:**\n\n| Layer | Scope | Examples | Controlled by |\n|-------|-------|----------|---------------|\n| L1 | Infrastructure (always installed) | git, `pkg update` | Orchestrator |\n| L2 | Platform runtime (conditional) | glibc, Node.js, build tools | `config.env` flags |\n| L3 | Optional tools (user-selected) | tmux, code-server, AI CLIs | User prompts |\n\nEach platform declares its L2 dependencies in `config.env`:\n\n```bash\n# platforms\u002Fopenclaw\u002Fconfig.env\nPLATFORM_NEEDS_GLIBC=true\nPLATFORM_NEEDS_NODEJS=true\nPLATFORM_NEEDS_BUILD_TOOLS=true\n```\n\nThe orchestrator reads these flags and conditionally runs the corresponding install scripts. A platform that doesn't need certain dependencies simply sets the corresponding flags to `false` and those heavy dependencies are skipped entirely.\n\n## Detailed Installation Flow\n\nRunning `bash install.sh` executes the following 8 steps in order.\n\n### [1\u002F8] Environment Check — `scripts\u002Fcheck-env.sh`\n\nValidates that the current environment is suitable before starting installation.\n\n- **Termux detection**: Checks for the `$PREFIX` environment variable. Exits immediately if not in Termux\n- **Architecture check**: Runs `uname -m` to verify CPU architecture (aarch64 recommended, armv7l supported, x86_64 treated as emulator)\n- **Disk space**: Ensures at least 1000MB free on the `$PREFIX` partition. Errors if insufficient\n- **Existing installation**: If `openclaw` command already exists, shows current version and notes this is a reinstall\u002Fupgrade\n- **Node.js pre-check**: If Node.js is already installed, shows version and warns if below 22\n- **Phantom Process Killer** (Android 12+): Shows an informational note about the Phantom Process Killer with a link to the [disable guide](docs\u002Fdisable-phantom-process-killer.md)\n\n### [2\u002F8] Platform Selection\n\nSelects the platform to install. Currently hardcoded to `openclaw`. Future versions will present a selection UI when multiple platforms are available.\n\nLoads the platform's `config.env` via `load_platform_config()` from `scripts\u002Flib.sh`, which exports all `PLATFORM_*` variables for use by subsequent steps.\n\n### [3\u002F8] Optional Tools Selection (L3)\n\nPresents 11 individual Y\u002Fn prompts (via `\u002Fdev\u002Ftty`) for optional tools:\n\n- tmux, ttyd, dufs, android-tools\n- Chromium, Playwright\n- code-server, OpenCode\n- Claude Code, Gemini CLI, Codex CLI (Termux)\n\nAll selections are collected upfront before any installation begins. This allows the user to make all decisions at once and walk away during the install.\n\n### [4\u002F8] Core Infrastructure (L1) — `scripts\u002Finstall-infra-deps.sh` + `scripts\u002Fsetup-paths.sh`\n\nAlways runs regardless of platform selection.\n\n**install-infra-deps.sh:**\n- Runs `pkg update -y && pkg upgrade -y` to refresh and upgrade packages\n- Installs `git` (required for npm git dependencies and repo cloning)\n\n**setup-paths.sh:**\n- Creates `$PREFIX\u002Ftmp` and `$HOME\u002F.openclaw-android\u002Fpatches` directories\n- Displays standard Linux path mappings (`\u002Fbin\u002Fsh`, `\u002Fusr\u002Fbin\u002Fenv`, `\u002Ftmp`) to Termux equivalents\n\n### [5\u002F8] Platform Runtime Dependencies (L2)\n\nConditionally installs runtime dependencies based on the platform's `config.env` flags:\n\n| Flag | Script | What it installs |\n|------|--------|-----------------|\n| `PLATFORM_NEEDS_GLIBC=true` | `scripts\u002Finstall-glibc.sh` | pacman, glibc-runner (provides `ld-linux-aarch64.so.1`) |\n| `PLATFORM_NEEDS_NODEJS=true` | `scripts\u002Finstall-nodejs.sh` | Node.js v22 LTS linux-arm64, grun-style wrapper scripts |\n| `PLATFORM_NEEDS_BUILD_TOOLS=true` | `scripts\u002Finstall-build-tools.sh` | python, make, cmake, clang, binutils |\n\nEach script is self-contained with pre-checks and idempotent behavior (skips if already installed).\n\n### [6\u002F8] Platform Package Install (L2) — `platforms\u002F\u003Cplatform>\u002Finstall.sh`\n\nDelegates to the platform's own install script. For OpenClaw, this:\n\n1. Sets `CPATH` for glib-2.0 headers (needed for native module builds)\n2. Installs PyYAML via pip (for `.skill` packaging)\n3. Copies `glibc-compat.js` to `~\u002F.openclaw-android\u002Fpatches\u002F`\n4. Installs `systemctl` stub to `$PREFIX\u002Fbin\u002F`\n5. Runs `npm install -g openclaw@latest --ignore-scripts`\n6. Applies platform-specific patches via `openclaw-apply-patches.sh`\n7. Installs `clawdhub` (skill manager) and `undici` dependency if needed\n8. Runs `openclaw update` (includes building native modules like sharp)\n\n**[6.5] Environment Variables + CLI + Marker:**\n\nAfter platform install, the orchestrator:\n- Runs `setup-env.sh` to write the `.bashrc` environment block\n- Evaluates the platform's `env.sh` for platform-specific variables\n- Writes the platform marker file (`~\u002F.openclaw-android\u002F.platform`)\n- Installs `oa` CLI and `oaupdate` wrapper to `$PREFIX\u002Fbin\u002F`\n- Copies `lib.sh`, `setup-env.sh`, and the platform directory to `~\u002F.openclaw-android\u002F` for use by the updater and uninstaller\n\n### [7\u002F8] Install Optional Tools (L3)\n\nInstalls the tools selected in Step 3:\n\n- **Termux packages**: tmux, ttyd, dufs, android-tools — installed via `pkg install`\n- **code-server**: Browser-based VS Code IDE with Termux-specific workarounds (replace bundled node, patch argon2, handle hard link failures)\n- **OpenCode**: AI coding assistant using proot + ld.so concatenation for Bun standalone binaries\n- **Chromium**: Browser automation support for OpenClaw (~400MB)\n- **Playwright**: Browser automation library (`playwright-core` via npm). Auto-sets `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH` and `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD` environment variables. Installs Chromium automatically if not already present\n- **AI CLI tools**: Claude Code, Gemini CLI, Codex CLI (Termux) — installed via `npm install -g`\n\n### [8\u002F8] Verification — `tests\u002Fverify-install.sh`\n\nRuns a two-tier verification:\n\n**Orchestrator checks (FAIL level):**\n\n| Check Item | PASS Condition |\n|------------|---------------|\n| Node.js version | `node -v` >= 22 |\n| npm | `npm` command exists |\n| TMPDIR | Environment variable is set |\n| OA_GLIBC | Set to `1` |\n| glibc-compat.js | File exists in `~\u002F.openclaw-android\u002Fpatches\u002F` |\n| .glibc-arch | Marker file exists |\n| glibc dynamic linker | `ld-linux-aarch64.so.1` exists |\n| glibc node wrapper | Wrapper script at `~\u002F.openclaw-android\u002Fbin\u002Fnode` |\n| Directories | `~\u002F.openclaw-android`, `$PREFIX\u002Ftmp` exist |\n| .bashrc | Contains environment variable block |\n\n**Orchestrator checks (WARN level, non-critical):**\n\n| Check Item | PASS Condition |\n|------------|---------------|\n| code-server | `code-server --version` succeeds |\n| opencode | `opencode` command available |\n\n**Platform verification** — delegates to `platforms\u002F\u003Cplatform>\u002Fverify.sh`:\n\n| Check Item | PASS Condition |\n|------------|---------------|\n| openclaw | `openclaw --version` succeeds |\n| CONTAINER | Set to `1` |\n| clawdhub | Command available |\n| ~\u002F.openclaw | Directory exists |\n\nAll FAIL-level items pass → PASSED. Any FAIL → shows reinstall instructions. WARN items do not cause failure.\n\n## Lightweight Updater Flow — `oa --update`\n\nRunning `oa --update` (or `oaupdate` for backward compatibility) downloads the latest release tarball from GitHub and executes the following 5 steps.\n\n### [1\u002F5] Pre-flight Check\n\nValidates the minimum conditions for updating.\n\n- Checks `$PREFIX` exists (Termux environment)\n- Checks `curl` is available\n- Detects platform from `~\u002F.openclaw-android\u002F.platform` marker file\n- Detects architecture: glibc (`.glibc-arch` marker) or Bionic (legacy)\n- Migrates old directory name if needed (`.openclaw-lite` → `.openclaw-android` — legacy compatibility)\n- **Phantom Process Killer** (Android 12+): Shows an informational note with a link to the [disable guide](docs\u002Fdisable-phantom-process-killer.md)\n\n### [2\u002F5] Download Latest Release\n\nDownloads the full repository tarball from GitHub and extracts to a temp directory. Validates that all required files exist:\n\n- `scripts\u002Flib.sh`\n- `scripts\u002Fsetup-env.sh`\n- `platforms\u002F\u003Cplatform>\u002Fconfig.env`\n- `platforms\u002F\u003Cplatform>\u002Fupdate.sh`\n\n### [3\u002F5] Update Core Infrastructure\n\nUpdates shared files used by the updater, uninstaller, and CLI:\n\n- Copies the latest platform directory to `~\u002F.openclaw-android\u002Fplatforms\u002F`\n- Updates `lib.sh` and `setup-env.sh` in `~\u002F.openclaw-android\u002Fscripts\u002F`\n- Updates patch files (`glibc-compat.js`, `argon2-stub.js`, `spawn.h`, `systemctl`)\n- Updates `oa` CLI and `oaupdate` wrapper in `$PREFIX\u002Fbin\u002F`\n- Updates `uninstall.sh` in `~\u002F.openclaw-android\u002F`\n- If Bionic architecture detected, performs automatic glibc migration\n- Runs `setup-env.sh` to refresh `.bashrc` environment block\n\n### [4\u002F5] Update Platform\n\nDelegates to `platforms\u002F\u003Cplatform>\u002Fupdate.sh`. For OpenClaw, this:\n\n- Installs build dependencies (`libvips`, `binutils`)\n- Updates `openclaw` npm package to latest version\n- Re-applies platform-specific patches\n- Rebuilds sharp native module if openclaw was updated\n- Updates\u002Finstalls `clawdhub` (skill manager)\n- Installs `undici` for clawdhub if needed (Node.js v24+)\n- Migrates skills from `~\u002Fskills\u002F` to `~\u002F.openclaw\u002Fworkspace\u002Fskills\u002F` if needed\n- Installs PyYAML if missing\n\n### [5\u002F5] Update Optional Tools\n\nUpdates tools that are already installed:\n\n- **code-server**: Runs `install-code-server.sh` in update mode. Skipped if not installed\n- **OpenCode**: Updates if installed; offers to install if not. Requires glibc architecture\n- **Chromium**: Updates if installed. Skipped if not installed\n- **AI CLI tools** (Claude Code, Gemini CLI, Codex CLI (Termux)): Compares installed vs latest npm version, updates if needed. Tools not installed are not offered for installation\n\n\u003C\u002Fdetails>\n\n## License\n\nMIT\n","OpenClaw on Android 是一个允许用户在安卓设备上通过单一命令运行 OpenClaw 的项目，无需安装 proot 或 Linux 系统。其核心功能是仅需安装 glibc 动态链接器即可直接运行 OpenClaw，大幅减少了存储开销（约200MB）并提升了性能。此外，该项目还提供了一个独立的安卓应用程序版本，内置终端模拟器和基于 WebView 的用户界面，使得配置过程更加简便快捷。适合那些希望在旧手机或平板上搭建简易家庭实验室、运行AI代理程序以及进行低功耗计算任务的用户使用。",2,"2026-06-11 02:31:24","trending"]