Here is the properly formatted README.md file, combining the corrected commands with the original author's structure.
# Turn Your Old Android Into a 24/7 AI Employee
### OpenClaw Setup Guide for Android (Termux)
**Author:** Ali Solanki
Before starting, watch this full walkthrough video by Ali Solanki:
▶ https://youtu.be/hM5LHJByJZk
*“I Turned an Old Android into a 24/7 AI Employee (OpenClaw)”*
This guide follows the exact process demonstrated by Ali, with corrected and working commands you can execute directly on your Android device.
---
## What You’re Building
By the end of this guide, your Android phone will:
- Run OpenClaw locally
- Act as a 24/7 AI agent
- Be controllable from a web dashboard
- Operate without a PC or cloud server
---
## Requirements
Make sure you have:
- Android phone (Android 10 or above recommended)
- Stable internet connection
- Gemini API key (from Google AI Studio)
- Termux installed from **F-Droid** (not Play Store)
---
## Step 1: Install Termux
1. Go to **https://f-droid.org**
2. Download and install **F-Droid**
3. Search for **Termux**
4. Install Termux
5. Open the Termux app
---
## Step 2: Update Packages
Inside Termux, run:
```bash
pkg update && pkg upgrade -yThen install proot-distro:
pkg install proot-distro -yInstall Ubuntu:
proot-distro install ubuntuEnter the Ubuntu environment:
proot-distro login ubuntuInside the Ubuntu shell, run:
apt update && apt upgrade -y && apt install -y curl git build-essentialAdd the NodeSource repository for Node.js 22:
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -Install Node.js:
apt install -y nodejsVerify installation:
node -v
npm -vInstall OpenClaw globally:
npm install -g openclaw@latestVerify installation:
openclaw --versionCreate the hijack script:
cat <<'EOF' > /root/hijack.js
const os = require('os');
os.networkInterfaces = () => ({});
EOFMake it load automatically:
echo 'export NODE_OPTIONS="-r /root/hijack.js"' >> ~/.bashrc
source ~/.bashrcStart onboarding:
openclaw onboardWhen prompted for Gateway Bind, select:
127.0.0.1 (Loopback)
Start the agent:
openclaw gateway --verboseOpen your mobile browser and go to:
http://127.0.0.1:18789
Get your gateway token:
openclaw config get gateway.auth.tokenPaste the token into the dashboard login screen.
/status
Check agent health.
/think high
Enable deep reasoning mode.
/reset
Clear memory and restart the session.
termux-wake-lock- Go to Android Settings
- Apps → Termux
- Battery
- Disable optimization
For true 24/7 operation, keep the phone connected to power.
- Never share your API keys publicly
- Do not share your gateway token
- Use a separate Google account for AI keys if possible
- Automate research tasks
- Build a personal AI assistant
- Connect it to messaging apps
- Use it as a mobile automation node
If you followed each step correctly, your Android device is now running a fully functional AI agent locally.
Watch the full walkthrough again:
▶ https://youtu.be/hM5LHJByJZk