openclaw-droid 2.0.2 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,204 +1,210 @@
1
- # OpenClaw Droid 🤖
2
-
3
- > **Run OpenClaw AI Gateway on Android via Termux**
4
- > One-command setup. Optimized for mobile. Bionic Bypass included.
5
-
6
- ![License](https://img.shields.io/badge/license-MIT-blue.svg)
7
- ![Platform](https://img.shields.io/badge/platform-Android%20%7C%20Termux-green.svg)
8
- ![Version](https://img.shields.io/npm/v/openclaw-droid.svg)
9
-
10
- **OpenClaw Droid** makes running [OpenClaw](https://github.com/openclaw/openclaw) on Android effortless. It handles environment setup (proot-distro, Ubuntu, Node.js) and fixes Android-specific issues automatically.
11
-
12
- ## 🚀 Why OpenClaw Droid?
13
-
14
- Running standard Node.js AI tools on Android is painful because of:
15
- * **Bionic libc**: Android's C library differs from Linux (glibc), breaking `os.networkInterfaces()` and DNS lookups.
16
- * **Permissions**: Termux has restricted access to system resources.
17
- * **Environment**: Many tools expect a full Linux userland (Ubuntu/Debian).
18
-
19
- **OpenClaw Droid solves this by:**
20
- 1. Creating a lightweight **Ubuntu** container inside Termux.
21
- 2. Injecting a **Bionic Bypass** script to fix networking.
22
- 3. Providing a simple CLI (`openclaw`) to manage the gateway.
23
-
24
- ## 📦 Installation
25
-
26
- ### Prerequisites
27
- * **Android 10+**
28
- * **Termux** (Install from [F-Droid](https://f-droid.org/packages/com.termux/), NOT Play Store)
29
- * **Termux:API** and **Termux:GUI** apps (from F-Droid)
30
- * ~2GB free storage
31
-
32
- ### Required Apps Setup
33
-
34
- 1. **Install Termux** from [F-Droid](https://f-droid.org/packages/com.termux/)
35
- 2. **Install Termux:API** from [F-Droid](https://f-droid.org/packages/com.termux.api/)
36
- 3. **Install Termux:GUI** from [F-Droid](https://f-droid.org/packages/com.termux.gui/)
37
- 4. **Grant permissions** in Android Settings:
38
- - Go to Settings → Apps → Termux → Permissions
39
- - Grant all permissions (Camera, Microphone, Storage, Location, etc.)
40
- - Repeat for Termux:API and Termux:GUI
41
- 5. **Disable battery optimization** for Termux:
42
- - Go to Settings → Apps → Termux → Battery
43
- - Set to "Unrestricted" or "Don't optimize"
44
- 6. **Grant storage permissions** in Termux:
45
- ```bash
46
- termux-setup-storage
47
- ```
48
-
49
- ### Install Required Packages
50
-
51
- Update package lists and install essential tools:
52
-
53
- ```bash
54
- # Update package lists
55
- pkg update && pkg upgrade
56
-
57
- # Install x11-repo (required for termux-gui)
58
- pkg install -y x11-repo
59
-
60
- # Install required packages
61
- pkg install -y git python nodejs-lts proot-distro termux-api termux-gui
62
-
63
- # Verify installations
64
- node --version
65
- python --version
66
- ```
67
-
68
- ### One-Command Setup
69
- Open Termux and run:
70
-
71
- ```bash
72
- curl -fsSL https://raw.githubusercontent.com/NosytLabs/openclaw-droid/main/install.sh | bash
73
- ```
74
-
75
- Or via npm:
76
-
77
- ```bash
78
- npm install -g openclaw-droid
79
- openclaw setup
80
- ```
81
-
82
- **IMPORTANT:** Use `npm install -g openclaw@latest` installation method (not bash script) as it's more reliable on Android. The installation may take 15-30 minutes due to llama.cpp compilation from scratch.
83
-
84
- ## 🎮 Usage
85
-
86
- ### 1. Initialize
87
- First, configure your API keys:
88
-
89
- ```bash
90
- openclaw onboarding
91
- ```
92
- > **IMPORTANT:** Select **Loopback (127.0.0.1)** for Binding.
93
-
94
- ### 2. Start Gateway
95
- Launch the OpenClaw gateway:
96
-
97
- ```bash
98
- openclaw start
99
- ```
100
-
101
- **Recommended:** Run the gateway in a tmux session for better process management:
102
-
103
- ```bash
104
- # Install tmux first if not installed
105
- pkg install tmux
106
-
107
- # Start a new tmux session
108
- tmux new -s openclaw
109
-
110
- # Run the gateway
111
- openclaw start
112
-
113
- # Detach from tmux (keep it running): Ctrl+B, then D
114
- # Reattach to tmux session: tmux attach -t openclaw
115
- ```
116
-
117
- The dashboard will be available at:
118
- - **http://127.0.0.1:18789** (on the phone)
119
- - **http://<phone-ip>:18789** (from other devices on WiFi, requires gateway.bind = lan)
120
-
121
- ### 3. Enable Screen Overlay (Optional)
122
-
123
- To allow OpenClaw to display overlay messages on your screen:
124
-
125
- ```bash
126
- # In a separate tmux window or terminal:
127
- tmux new-window
128
- cd ~
129
- python ~/overlay_daemon.py
130
- ```
131
-
132
- Or use the built-in command:
133
-
134
- ```bash
135
- openclaw overlay
136
- ```
137
-
138
- Now OpenClaw can write to the screen by creating `~/overlay.txt`:
139
-
140
- ```bash
141
- printf 'Hello from OpenClaw!' > ~/overlay.txt
142
- ```
143
-
144
- The overlay daemon watches for changes to `~/overlay.txt` and displays the content as a screen overlay. This is useful for displaying status updates, notifications, or important information to the user.
145
-
146
- ### 4. Other Commands
147
-
148
- | Command | Description |
149
- | :--- | :--- |
150
- | `openclaw status` | Check installation health |
151
- | `openclaw update` | Update OpenClaw to latest version |
152
- | `openclaw shell` | Open Ubuntu shell |
153
- | `openclaw repair` | Re-install dependencies if broken |
154
- | `openclaw <cmd>` | Run any OpenClaw command (e.g., `openclaw doctor`) |
155
-
156
- ## ⚠️ Troubleshooting
157
-
158
- **"Setup not complete" error**
159
- * Run `openclaw setup` again.
160
- * If it persists, run `openclaw repair`.
161
-
162
- **Process killed in background**
163
- * Go to Android Settings → Apps → Termux → Battery → **Unrestricted**.
164
-
165
- **Permission denied errors**
166
- * Run `termux-setup-storage` to grant storage permissions
167
- * Ensure Termux:API and Termux:GUI have proper permissions
168
-
169
- **Cannot access /tmp/openclaw errors**
170
- * OpenClaw requires a custom TMPDIR on Termux. The installer should configure this automatically.
171
- * If you still see these errors, manually add to `~/.bashrc`:
172
- ```bash
173
- echo 'export TMPDIR="$PREFIX/tmp"' >> ~/.bashrc
174
- echo 'export TMP="$TMPDIR"' >> ~/.bashrc
175
- echo 'export TEMP="$TMPDIR"' >> ~/.bashrc
176
- echo 'if [ ! -d "$TMPDIR" ]; then mkdir -p "$TMPDIR"; fi' >> ~/.bashrc
177
- source ~/.bashrc
178
- mkdir -p /data/data/com.termux/files/usr/tmp/openclaw
179
- ```
180
-
181
- **"systemd not found" errors**
182
- * These are normal on Android/Termux and can be safely ignored.
183
- * OpenClaw will function without systemd.
184
-
185
- **Installation fails on dependencies**
186
- * Some dependencies may fail to install initially. Install them manually:
187
- ```bash
188
- pkg install -y python git proot-distro
189
- npm install -g openclaw@latest
190
- ```
191
- * The llama.cpp compilation takes 15-30 minutes - let it complete.
192
-
193
- **"E: unable to locate package termux-git" errors**
194
- * Install Termux from F-Droid and update repositories: `pkg update && pkg upgrade`
195
- * Use `pkg install git` (the Termux package name is `git`, not `termux-git`)
196
-
197
- **Gateway not accessible from other devices**
198
- * Ensure `gateway.bind` is set to `lan` in your openclaw.json
199
- * Check your phone's IP address: `ip addr show wlan0`
200
- * Access via: `http://<phone-ip>:18789`
201
-
202
- ## 📜 License
203
-
204
- MIT License.
1
+ # OpenClaw Droid 🤖
2
+
3
+ > **Run OpenClaw AI Gateway on Android via Termux**
4
+ > One-command setup. Optimized for mobile. Bionic Bypass included.
5
+
6
+ ![License](https://img.shields.io/badge/license-MIT-blue.svg)
7
+ ![Platform](https://img.shields.io/badge/platform-Android%20%7C%20Termux-green.svg)
8
+ ![Version](https://img.shields.io/npm/v/openclaw-droid.svg)
9
+
10
+ **OpenClaw Droid** makes running [OpenClaw](https://github.com/openclaw/openclaw) on Android effortless. It handles environment setup (proot-distro, Ubuntu, Node.js) and fixes Android-specific issues automatically.
11
+
12
+ ## 🚀 Why OpenClaw Droid?
13
+
14
+ Running standard Node.js AI tools on Android is painful because of:
15
+ * **Bionic libc**: Android's C library differs from Linux (glibc), breaking `os.networkInterfaces()` and DNS lookups.
16
+ * **Permissions**: Termux has restricted access to system resources.
17
+ * **Environment**: Many tools expect a full Linux userland (Ubuntu/Debian).
18
+
19
+ **OpenClaw Droid solves this by:**
20
+ 1. Creating a lightweight **Ubuntu** container inside Termux.
21
+ 2. Injecting a **Bionic Bypass** script to fix networking.
22
+ 3. Providing a simple CLI (`openclaw`) to manage the gateway.
23
+
24
+ ## 📦 Installation
25
+
26
+ ### Prerequisites
27
+ * **Android 10+**
28
+ * **Termux** (Install from [F-Droid](https://f-droid.org/packages/com.termux/), NOT Play Store)
29
+ * **Termux:API** and **Termux:GUI** apps (from F-Droid)
30
+ * ~2GB free storage
31
+
32
+ ### Required Apps Setup
33
+
34
+ 1. **Install Termux** from [F-Droid](https://f-droid.org/packages/com.termux/)
35
+ 2. **Install Termux:API** from [F-Droid](https://f-droid.org/packages/com.termux.api/)
36
+ 3. **Install Termux:GUI** from [F-Droid](https://f-droid.org/packages/com.termux.gui/)
37
+ 4. **Grant permissions** in Android Settings:
38
+ - Go to Settings → Apps → Termux → Permissions
39
+ - Grant all permissions (Camera, Microphone, Storage, Location, etc.)
40
+ - Repeat for Termux:API and Termux:GUI
41
+ 5. **Disable battery optimization** for Termux:
42
+ - Go to Settings → Apps → Termux → Battery
43
+ - Set to "Unrestricted" or "Don't optimize"
44
+ 6. **Grant storage permissions** in Termux:
45
+ ```bash
46
+ termux-setup-storage
47
+ ```
48
+
49
+ ### Install Required Packages
50
+
51
+ Update package lists and install essential tools:
52
+
53
+ ```bash
54
+ # Update package lists
55
+ pkg update && pkg upgrade
56
+
57
+ # Install x11-repo (required for termux-gui)
58
+ pkg install -y x11-repo
59
+
60
+ # Install required packages
61
+ pkg install -y git python nodejs-lts proot-distro termux-api termux-gui
62
+
63
+ # Verify installations
64
+ node --version
65
+ python --version
66
+ ```
67
+
68
+ If termux-gui is unavailable, continue without it (overlay features disabled).
69
+
70
+ ### One-Command Setup
71
+ Open Termux and run:
72
+
73
+ ```bash
74
+ curl -fsSL https://raw.githubusercontent.com/NosytLabs/openclaw-droid/main/install.sh | bash
75
+ ```
76
+
77
+ Or via npm:
78
+
79
+ ```bash
80
+ npm install -g openclaw-droid
81
+ openclaw setup
82
+ ```
83
+
84
+ **IMPORTANT:** Use `npm install -g openclaw@latest` installation method (not bash script) as it's more reliable on Android. The installation may take 15-30 minutes due to llama.cpp compilation from scratch.
85
+
86
+ ## 🎮 Usage
87
+
88
+ ### 1. Initialize
89
+ First, configure your API keys:
90
+
91
+ ```bash
92
+ openclaw onboarding
93
+ ```
94
+ > **IMPORTANT:** Select **Loopback (127.0.0.1)** for Binding.
95
+
96
+ ### 2. Start Gateway
97
+ Launch the OpenClaw gateway:
98
+
99
+ ```bash
100
+ openclaw start
101
+ ```
102
+
103
+ **Recommended:** Run the gateway in a tmux session for better process management:
104
+
105
+ ```bash
106
+ # Install tmux first if not installed
107
+ pkg install tmux
108
+
109
+ # Start a new tmux session
110
+ tmux new -s openclaw
111
+
112
+ # Run the gateway
113
+ openclaw start
114
+
115
+ # Detach from tmux (keep it running): Ctrl+B, then D
116
+ # Reattach to tmux session: tmux attach -t openclaw
117
+ ```
118
+
119
+ The dashboard will be available at:
120
+ - **http://127.0.0.1:18789** (on the phone)
121
+ - **http://<phone-ip>:18789** (from other devices on WiFi, requires gateway.bind = lan)
122
+
123
+ ### 3. Enable Screen Overlay (Optional)
124
+
125
+ To allow OpenClaw to display overlay messages on your screen:
126
+
127
+ ```bash
128
+ # In a separate tmux window or terminal:
129
+ tmux new-window
130
+ cd ~
131
+ python ~/overlay_daemon.py
132
+ ```
133
+
134
+ Or use the built-in command:
135
+
136
+ ```bash
137
+ openclaw overlay
138
+ ```
139
+
140
+ Now OpenClaw can write to the screen by creating `~/overlay.txt`:
141
+
142
+ ```bash
143
+ printf 'Hello from OpenClaw!' > ~/overlay.txt
144
+ ```
145
+
146
+ The overlay daemon watches for changes to `~/overlay.txt` and displays the content as a screen overlay. This is useful for displaying status updates, notifications, or important information to the user.
147
+
148
+ ### 4. Other Commands
149
+
150
+ | Command | Description |
151
+ | :--- | :--- |
152
+ | `openclaw status` | Check installation health |
153
+ | `openclaw update` | Update OpenClaw to latest version |
154
+ | `openclaw shell` | Open Ubuntu shell |
155
+ | `openclaw repair` | Re-install dependencies if broken |
156
+ | `openclaw <cmd>` | Run any OpenClaw command (e.g., `openclaw doctor`) |
157
+
158
+ ## ⚠️ Troubleshooting
159
+
160
+ **"Setup not complete" error**
161
+ * Run `openclaw setup` again.
162
+ * If it persists, run `openclaw repair`.
163
+
164
+ **Process killed in background**
165
+ * Go to Android Settings → Apps → Termux → Battery → **Unrestricted**.
166
+
167
+ **Permission denied errors**
168
+ * Run `termux-setup-storage` to grant storage permissions
169
+ * Ensure Termux:API and Termux:GUI have proper permissions
170
+
171
+ **Cannot access /tmp/openclaw errors**
172
+ * OpenClaw requires a custom TMPDIR on Termux. The installer should configure this automatically.
173
+ * If you still see these errors, manually add to `~/.bashrc`:
174
+ ```bash
175
+ echo 'export TMPDIR="$PREFIX/tmp"' >> ~/.bashrc
176
+ echo 'export TMP="$TMPDIR"' >> ~/.bashrc
177
+ echo 'export TEMP="$TMPDIR"' >> ~/.bashrc
178
+ echo 'if [ ! -d "$TMPDIR" ]; then mkdir -p "$TMPDIR"; fi' >> ~/.bashrc
179
+ source ~/.bashrc
180
+ mkdir -p /data/data/com.termux/files/usr/tmp/openclaw
181
+ ```
182
+
183
+ **"systemd not found" errors**
184
+ * These are normal on Android/Termux and can be safely ignored.
185
+ * OpenClaw will function without systemd.
186
+
187
+ **Installation fails on dependencies**
188
+ * Some dependencies may fail to install initially. Install them manually:
189
+ ```bash
190
+ pkg install -y python git proot-distro
191
+ npm install -g openclaw@latest
192
+ ```
193
+ * The llama.cpp compilation takes 15-30 minutes - let it complete.
194
+
195
+ **"E: unable to locate package termux-git" errors**
196
+ * Install Termux from F-Droid and update repositories: `pkg update && pkg upgrade`
197
+ * Use `pkg install git` (the Termux package name is `git`, not `termux-git`)
198
+
199
+ **"E: unable to locate package termux-gui" errors**
200
+ * Run `pkg install x11-repo` then retry `pkg install termux-gui`
201
+ * If it still fails, continue without termux-gui (overlay features disabled)
202
+
203
+ **Gateway not accessible from other devices**
204
+ * Ensure `gateway.bind` is set to `lan` in your openclaw.json
205
+ * Check your phone's IP address: `ip addr show wlan0`
206
+ * Access via: `http://<phone-ip>:18789`
207
+
208
+ ## 📜 License
209
+
210
+ MIT License.