Run OpenClaw AI Gateway on Android — standalone Flutter app with built-in terminal, web dashboard, optional dev tools, and one-tap setup. Also available as a Termux CLI package.
![]() Dashboard |
![]() Setup Wizard |
![]() Onboarding |
![]() Web Dashboard |
![]() Logs |
![]() Settings |
OpenClaw brings the OpenClaw AI gateway to Android. It sets up a full Ubuntu environment via proot, installs Node.js and OpenClaw, and provides a native Flutter UI to manage everything — no root required.
| Flutter App (Standalone) | Termux CLI | |
|---|---|---|
| Install | Build APK or download release | npm install -g openclaw-termux |
| Setup | Tap "Begin Setup" | openclawx setup |
| Gateway | Tap "Start Gateway" | openclawx start |
| Terminal | Built-in terminal emulator | Termux shell |
| Dashboard | Built-in WebView | Browser at localhost:18789 |
- One-Tap Setup — Downloads Ubuntu rootfs, Node.js 22, and OpenClaw automatically
- Built-in Terminal — Full terminal emulator with extra keys toolbar, copy/paste, clickable URLs
- Gateway Controls — Start/stop gateway with status indicator and health checks
- AI Providers — Configure API keys and select models for 7 providers (Anthropic, OpenAI, Google Gemini, OpenRouter, NVIDIA NIM, DeepSeek, xAI)
- SSH Remote Access — Start/stop SSH server, set root password, view connection info with copyable commands
- Configure Menu — Run
openclaw configurein a built-in terminal to manage gateway settings - Node Device Capabilities — 7 capabilities (15 commands) exposed to AI via WebSocket node protocol
- Token URL Display — Captures auth token from onboarding, shows it with a copy button
- Web Dashboard — Embedded WebView loads the dashboard with authentication token
- View Logs — Real-time gateway log viewer with search/filter
- Onboarding — Configure API keys and binding directly in-app
- Optional Packages — Install Go (Golang), Homebrew, and OpenSSH as optional dev tools
- Settings — Auto-start, battery optimization, system info, package status, re-run setup
- Foreground Service — Keeps the gateway alive in the background with uptime tracking
- Setup Notifications — Progress bar notifications during environment setup
After the initial setup completes, you can optionally install development tools directly from the app:
| Package | Install Method | Size |
|---|---|---|
| Go (Golang) | apt install golang |
~150 MB |
| Homebrew | Official installer (with root workaround) | ~500 MB |
| OpenSSH | apt install openssh-server |
~10 MB |
These are accessible from:
- Setup Wizard — Package cards appear after setup completes
- Dashboard — "Packages" card in Quick Actions
- Settings — Shows installation status under System Info
The Flutter app connects to the gateway as a node, exposing Android hardware to the AI. Permissions are requested proactively when the node is enabled.
| Capability | Commands | Permission |
|---|---|---|
| Camera | camera.snap, camera.clip, camera.list |
Camera |
| Canvas | canvas.navigate, canvas.eval, canvas.snapshot |
None (not implemented) |
| Flash | flash.on, flash.off, flash.toggle, flash.status |
Camera (torch) |
| Location | location.get |
Location |
| Screen | screen.record |
MediaProjection consent |
| Sensor | sensor.read, sensor.list |
Body Sensors |
| Haptic | haptic.vibrate |
None |
The gateway's openclaw.json is automatically patched before startup to clear denyCommands and set allowCommands for all 15 commands.
- One-Command Setup — Installs proot-distro, Ubuntu, Node.js 22, and OpenClaw
- Bionic Bypass — Fixes
os.networkInterfaces()crash on Android's Bionic libc - Smart Loading — Shows spinner until the gateway is ready
- Pass-through Commands — Run any OpenClaw command via
openclawx
Storage Permission — This app does NOT need full storage access to function. If prompted, deny the storage permission unless you specifically need proot to access
/sdcard. GrantingMANAGE_EXTERNAL_STORAGEallows the proot environment to read and modify all files on your device including photos, downloads, and documents. Previous versions requested this permission automatically on launch, which could lead to unintended data loss (see #67, #63). This has been fixed — storage access is now opt-in from Settings only.
Battery Optimization — Disable battery optimization for the app in Android Settings to prevent Android from killing the gateway process in the background. Without this, the gateway may crash silently after a few minutes.
First Launch — The initial setup downloads ~500MB (Ubuntu rootfs + Node.js). Ensure you have a stable internet connection and sufficient storage before starting.
- Download the latest APK from Releases
- Install the APK on your Android device
- Open the app and tap Begin Setup
- After setup completes, optionally install Go or Homebrew from the package cards
- Configure your API keys in Onboarding
- Tap Start Gateway on the dashboard
Or build from source:
git clone https://github.com/mithun50/openclaw-termux.git
cd openclaw-termux/flutter_app
flutter build apk --releasecurl -fsSL https://raw.githubusercontent.com/mithun50/openclaw-termux/main/install.sh | bashnpm install -g openclaw-termux
openclawx setup| Requirement | Details |
|---|---|
| Android | 10 or higher (API 29) |
| Storage | ~500MB for Ubuntu + Node.js + OpenClaw |
| Architectures | arm64-v8a, armeabi-v7a, x86_64 |
| Termux (CLI only) | From F-Droid (NOT Play Store) |
# First-time setup (installs proot + Ubuntu + Node.js + OpenClaw)
openclawx setup
# Check installation status
openclawx status
# Start OpenClaw gateway
openclawx start
# Run onboarding to configure API keys
openclawx onboarding
# Enter Ubuntu shell
openclawx shell
# Any OpenClaw command works directly
openclawx doctor
openclawx gateway --verbose┌───────────────────────────────────────────────────┐
│ Flutter App (Dart) │
│ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │
│ │ Terminal │ │ Gateway │ │ Web Dashboard│ │
│ │ Emulator │ │ Controls │ │ (WebView) │ │
│ └─────┬────┘ └─────┬────┘ └──────┬───────┘ │
│ │ │ │ │
│ ┌─────┴────────────┴─────────────┴─────────────┐ │
│ │ Native Bridge (Kotlin) │ │
│ └─────────────────┬────────────────────────────┘ │
│ │ │
│ ┌─────────────────┴────────────────────────────┐ │
│ │ Node Provider (WebSocket) │ │
│ │ Camera · Flash · Location · Screen │ │
│ │ Sensor · Haptic · Canvas │ │
│ └─────────────────┬────────────────────────────┘ │
└────────────────────┼──────────────────────────────┘
│
┌────────────────────┼──────────────────────────────┐
│ proot-distro │ Ubuntu │
│ ┌─────────────────┴──────────────────────────┐ │
│ │ Node.js 22 + Bionic Bypass │ │
│ │ ┌─────────────────────────────────────┐ │ │
│ │ │ OpenClaw AI Gateway │ │ │
│ │ │ http://localhost:18789 │ │ │
│ │ │ ← Node WS: 15 device commands │ │ │
│ │ └─────────────────────────────────────┘ │ │
│ │ Optional: Go, Homebrew │ │
│ └────────────────────────────────────────────┘ │
└───────────────────────────────────────────────────┘
flutter_app/lib/
├── main.dart # App entry point
├── constants.dart # App constants, URLs, author info
├── models/
│ ├── gateway_state.dart # Gateway status, logs, token URL
│ ├── node_state.dart # Node connection status
│ ├── node_frame.dart # WebSocket frame model (req/res/event)
│ ├── setup_state.dart # Setup wizard progress
│ ├── optional_package.dart # Optional package metadata (Go, Homebrew)
│ └── ai_provider.dart # AI provider data model (7 providers)
├── providers/
│ ├── gateway_provider.dart # Gateway state management
│ ├── node_provider.dart # Node capabilities + permission management
│ └── setup_provider.dart # Setup state management
├── screens/
│ ├── splash_screen.dart # Launch screen with routing
│ ├── setup_wizard_screen.dart # First-time setup + optional packages
│ ├── onboarding_screen.dart # API key configuration terminal
│ ├── dashboard_screen.dart # Main dashboard with quick actions
│ ├── terminal_screen.dart # Full terminal emulator
│ ├── configure_screen.dart # openclaw configure terminal
│ ├── web_dashboard_screen.dart # WebView for OpenClaw dashboard
│ ├── providers_screen.dart # AI provider list
│ ├── provider_detail_screen.dart # API key + model configuration
│ ├── ssh_screen.dart # SSH server management
│ ├── packages_screen.dart # Optional package manager
│ ├── package_install_screen.dart # Terminal-based package installer
│ ├── logs_screen.dart # Gateway log viewer
│ └── settings_screen.dart # App settings and about
├── services/
│ ├── native_bridge.dart # Kotlin platform channel bridge
│ ├── gateway_service.dart # Gateway lifecycle, health checks, config patching
│ ├── node_service.dart # Node WebSocket connection + invoke handling
│ ├── node_ws_service.dart # Raw WebSocket transport
│ ├── node_identity_service.dart # Device identity + crypto signing
│ ├── terminal_service.dart # proot shell configuration
│ ├── bootstrap_service.dart # Environment setup orchestration
│ ├── package_service.dart # Optional package status checking
│ ├── preferences_service.dart # Persistent settings (token URL, etc.)
│ ├── provider_config_service.dart # AI provider config read/write
│ ├── ssh_service.dart # SSH server management via native bridge
│ └── capabilities/
│ ├── capability_handler.dart # Base class with permission handling
│ ├── camera_capability.dart # Photo/video capture
│ ├── canvas_capability.dart # WebView stub (NOT_IMPLEMENTED)
│ ├── flash_capability.dart # Torch on/off/toggle
│ ├── location_capability.dart # GPS with timeout + fallback
│ ├── screen_capability.dart # Screen recording via MediaProjection
│ ├── sensor_capability.dart # Accelerometer, gyroscope, etc.
│ └── vibration_capability.dart # Haptic feedback
└── widgets/
├── gateway_controls.dart # Start/stop, URL display, copy button
├── node_controls.dart # Node enable/disable, status badge
├── terminal_toolbar.dart # Extra keys (Tab, Ctrl, Esc, arrows)
├── status_card.dart # Reusable status card
└── progress_step.dart # Setup wizard step indicator
When running onboarding (in-app or via openclawx onboarding):
- Binding: Select
Loopback (127.0.0.1)for non-rooted devices - API Keys: Add your Gemini/OpenAI/Claude keys
- Token URL: The app automatically captures and stores the auth token URL (e.g.
http://localhost:18789/#token=...)
Important: Disable battery optimization for the app to keep the gateway alive in the background.
For the Flutter app: Settings > Battery Optimization > tap to disable
For Termux: Android Settings > Apps > Termux > Battery > Unrestricted
Access the web dashboard at the token URL shown in the app (e.g. http://localhost:18789/#token=...).
The Flutter app automatically loads the dashboard with your auth token via the built-in WebView.
| Command | Description |
|---|---|
/status |
Check gateway status |
/think high |
Enable high-quality thinking |
/reset |
Reset session |
Versions before v1.8.4 automatically requested full storage access (MANAGE_EXTERNAL_STORAGE) on launch. Combined with symlinks inside the proot rootfs pointing to /sdcard, cleanup operations could follow those symlinks and delete real user files. This has been fixed — storage permission is no longer auto-requested, symlinks are not followed during deletion, and a path boundary check prevents any deletion outside the app's private directory. If you were affected, see #67.
To revoke storage permission: Android Settings > Apps > OpenClaw > Permissions > Files and media > Don't allow.
# Check status
openclawx status
# Re-run setup if needed
openclawx setup
# Make sure onboarding is complete
openclawx onboardingBionic Bypass not configured. Run setup again:
openclawx setupDisable battery optimization for the app in Android settings.
termux-setup-storageClick to expand manual installation steps
pkg update && pkg install -y proot-distro
proot-distro install ubuntuproot-distro login ubuntu
apt update && apt install -y curl
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs
npm install -g openclawmkdir -p ~/.openclaw
cat > ~/.openclaw/bionic-bypass.js << 'EOF'
const os = require('os');
const originalNetworkInterfaces = os.networkInterfaces;
os.networkInterfaces = function() {
try {
const interfaces = originalNetworkInterfaces.call(os);
if (interfaces && Object.keys(interfaces).length > 0) {
return interfaces;
}
} catch (e) {}
return {
lo: [{
address: '127.0.0.1',
netmask: '255.0.0.0',
family: 'IPv4',
mac: '00:00:00:00:00:00',
internal: true,
cidr: '127.0.0.1/8'
}]
};
};
EOFecho 'export NODE_OPTIONS="--require ~/.openclaw/bionic-bypass.js"' >> ~/.bashrc
source ~/.bashrcopenclaw onboarding # Select "Loopback (127.0.0.1)"
openclaw gateway --verboseContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Mithun Gowda B | NextGenX
- GitHub: @mithun50
- Email: mithungowda.b7411@gmail.com
- Instagram: @nexgenxplorer_nxg
- YouTube: @nexgenxplorer
- Play Store: NextGenX Apps
- Contact: nxgextra@gmail.com
MIT License - see LICENSE file for details.
Made with ❤️ for the Android community by Mithun Gowda B | NextGenX






