Skip to main content

Overview

The OCA installer is an 8-step modular orchestrator (install.sh):
bootstrap.sh
    └── install.sh
            ├── Step 1: Environment Check
            ├── Step 2: Platform Selection (OpenClaw)
            ├── Step 3: Tools & Features Selection
            ├── Step 4: Core Infrastructure (L1)
            ├── Step 5: Platform Runtime Dependencies (L2)
            ├── Step 6: Platform Package Install (L2)
            ├── [6.5]: Env vars + CLI + Marker
            ├── Step 7: Optional Tools & Features (L3)
            └── Step 8: Verification

Step 1 — Environment Check

Script: scripts/check-env.sh Validates: Termux is active, CPU is aarch64, Android version is detectable, wake lock enabled.
You should see [OK] Environment check passed (3 checks) before proceeding.

Step 2 — Platform Selection

Auto-selects the openclaw platform, loading platforms/openclaw/config.env:
PLATFORM_NAME="OpenClaw"
PLATFORM_NEEDS_GLIBC=true
PLATFORM_NEEDS_NODEJS=true
PLATFORM_NEEDS_BUILD_TOOLS=true

Step 3 — Tools & Features Selection

Interactive prompts. See Quick Start for a recommendation guide.

Steps 4 & 5 — Runtime Dependencies

L1: Core packages

git, curl, wget, python3, pip3, patchelf, binutils

L2: glibc (scripts/install-glibc.sh)

Installs glibc-runner — provides ld-linux-aarch64.so.1 that Node.js linux-arm64 needs.

L2: Node.js v24 (scripts/install-nodejs.sh)

Downloads official Node.js v24.x linux-arm64 tarball from nodejs.org. Creates a grun-based wrapper:
exec "$PREFIX/bin/grun" "$(dirname "$0")/node.real" "$@"
Also writes the DNS fix ($PREFIX/glibc/etc/resolv.conf) to prevent EAI_AGAIN on Android 12+.
Why linux-arm64? OpenClaw’s native modules (like sharp, koffi) assume glibc. Using the official binary + glibc-runner bypasses Bionic libc limitations entirely.

Step 6 — Platform Package Install

Script: platforms/openclaw/install.sh
  1. Copies glibc-compat.js and argon2-stub.js patches
  2. Configures DNS resolver
  3. Runs npm install -g openclaw@latest --ignore-scripts
  4. Installs clawdhub + undici dependency
  5. Runs openclaw update (builds native modules — may take 5–10 mins)

Step 7 — Optional Tools Install

Installs selected tools: Termux packages via pkg, AI CLIs via npm install -g.

Step 8 — Verification

Script: tests/verify-install.sh Checks: node --version, openclaw --version, oca in PATH, platform marker file.

Manual reinstall

# Reinstall Node.js only
bash ~/.oca/scripts/install-nodejs.sh

# Reinstall OpenClaw package only
bash ~/.oca/platforms/openclaw/install.sh

# Full reinstall
oca --uninstall && curl -sL https://raw.githubusercontent.com/PsProsen-Dev/OpenClaw-On-Android/master/bootstrap.sh | bash