#How to install on Android:

1 messages Β· Page 1 of 1 (latest)

keen imp
#

How to install on Android:

Improve it, figure it out. It's quite limited because we can't do full access things, but it works.

Use the F-droid APKs or it won't work properly.

https://f-droid.org/packages/com.termux/
https://f-droid.org/packages/com.termux.api/

Here’s the step-by-step command set that will actually install successfully, even on Termux, without relying on pkg reset.

Do it exactly in this order.

  1. Update and install basics
pkg update && pkg upgrade -y
pkg install -y tmux which git python nodejs-lts clang make cmake pkg-config termux-api

  1. Start tmux (do everything from here inside tmux)
tmux

  1. Quick Termux:API test (proves API wiring)
termux-torch on
termux-torch off
termux-battery-status
termux-tts-speak "Termux API working"

  1. Storage access
termux-setup-storage

  1. Install OpenClaw (attempt #1)
npm install -g openclaw@latest

  1. Verify OpenClaw exists
openclaw --version

If this prints a version, continue.

  1. Set Termux temp vars (required on Android)
echo 'export TMPDIR="$PREFIX/tmp"' >> ~/.bashrc
echo 'export TMP="$TMPDIR"' >> ~/.bashrc
echo 'export TEMP="$TMPDIR"' >> ~/.bashrc
source ~/.bashrc
mkdir -p "$PREFIX/tmp/openclaw"

  1. One-shot patch of hardcoded /tmp/openclaw
grep -R "/tmp/openclaw" "$PREFIX" | cut -d: -f1 | sort -u | xargs -r sed -i 's|/tmp/openclaw|'"$PREFIX"'/tmp/openclaw|g'

Verify (should print nothing):

grep -R "/tmp/openclaw" "$PREFIX"

  1. Onboarding (skip system service)
openclaw onboard

  1. Start gateway
openclaw gateway

  1. Discord (UI steps you must do)

In Discord Developer Portal β†’ your app β†’ Bot:

  • Enable MESSAGE CONTENT INTENT
  • Enable SERVER MEMBERS INTENT
  • Enable PRESENCE INTENT
  • Save
    Re-invite bot with scopes bot + applications.commands.
    Then restart gateway:
openclaw gateway restart

You have to grant Android Permissions to the Termux: API app.