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
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)
- Go to F-Droid.org
- Download and install F-Droid
- Search for Termux
- Install Termux
- Open the Termux app
pkg update && pkg upgrade -y
pkg install proot-distro
proot-distro install ubuntu
proot-distro login ubuntu
apt update && apt upgrade -y
apt install -y curl
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs
node -v
npm -v
apt update
apt install -y git
npm install -g openclaw@latest
After installation, check:
openclaw --version
Create the hijack script:
cat <<EOF > /root/hijack.js
const os = require('os');
os.networkInterfaces = () => ({});
EOF
Make it load automatically:
echo 'export NODE_OPTIONS="-r /root/hijack.js"' >> ~/.bashrc
source ~/.bashrc
Start onboarding:
openclaw onboard
When prompted for Gateway Bind, select:
127.0.0.1 (Loopback)
Start the agent:
openclaw gateway --verbose
Open your mobile browser and go to:
http://127.0.0.1:18789
Get your gateway token: start new terminal session login ubuntu run -
cat ~/.openclaw/openclaw.json
openclaw config get gateway.auth.token
Paste 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

