openclaw-droid 2.0.1 → 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.

Potentially problematic release.


This version of openclaw-droid might be problematic. Click here for more details.

package/README.md CHANGED
@@ -1,197 +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 required packages
58
- pkg install -y git python nodejs-lts tmux nvim proot-distro termux-api termux-gui
59
-
60
- # Verify installations
61
- node --version
62
- python --version
63
- ```
64
-
65
- ### One-Command Setup
66
- Open Termux and run:
67
-
68
- ```bash
69
- curl -fsSL https://raw.githubusercontent.com/NosytLabs/openclaw-droid/main/install.sh | bash
70
- ```
71
-
72
- Or via npm:
73
-
74
- ```bash
75
- npm install -g openclaw-droid
76
- openclaw setup
77
- ```
78
-
79
- **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.
80
-
81
- ## 🎮 Usage
82
-
83
- ### 1. Initialize
84
- First, configure your API keys:
85
-
86
- ```bash
87
- openclaw onboarding
88
- ```
89
- > **IMPORTANT:** Select **Loopback (127.0.0.1)** for Binding.
90
-
91
- ### 2. Start Gateway
92
- Launch the OpenClaw gateway:
93
-
94
- ```bash
95
- openclaw start
96
- ```
97
-
98
- **Recommended:** Run the gateway in a tmux session for better process management:
99
-
100
- ```bash
101
- # Install tmux first if not installed
102
- pkg install tmux
103
-
104
- # Start a new tmux session
105
- tmux new -s openclaw
106
-
107
- # Run the gateway
108
- openclaw start
109
-
110
- # Detach from tmux (keep it running): Ctrl+B, then D
111
- # Reattach to tmux session: tmux attach -t openclaw
112
- ```
113
-
114
- The dashboard will be available at:
115
- - **http://127.0.0.1:18789** (on the phone)
116
- - **http://<phone-ip>:18789** (from other devices on WiFi, requires gateway.bind = lan)
117
-
118
- ### 3. Enable Screen Overlay (Optional)
119
-
120
- To allow OpenClaw to display overlay messages on your screen:
121
-
122
- ```bash
123
- # In a separate tmux window or terminal:
124
- tmux new-window
125
- cd ~
126
- python ~/overlay_daemon.py
127
- ```
128
-
129
- Or use the built-in command:
130
-
131
- ```bash
132
- openclaw overlay
133
- ```
134
-
135
- Now OpenClaw can write to the screen by creating `~/overlay.txt`:
136
-
137
- ```bash
138
- printf 'Hello from OpenClaw!' > ~/overlay.txt
139
- ```
140
-
141
- 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.
142
-
143
- ### 4. Other Commands
144
-
145
- | Command | Description |
146
- | :--- | :--- |
147
- | `openclaw status` | Check installation health |
148
- | `openclaw update` | Update OpenClaw to latest version |
149
- | `openclaw shell` | Open Ubuntu shell |
150
- | `openclaw repair` | Re-install dependencies if broken |
151
- | `openclaw <cmd>` | Run any OpenClaw command (e.g., `openclaw doctor`) |
152
-
153
- ## ⚠️ Troubleshooting
154
-
155
- **"Setup not complete" error**
156
- * Run `openclaw setup` again.
157
- * If it persists, run `openclaw repair`.
158
-
159
- **Process killed in background**
160
- * Go to Android Settings → Apps → Termux → Battery → **Unrestricted**.
161
-
162
- **Permission denied errors**
163
- * Run `termux-setup-storage` to grant storage permissions
164
- * Ensure Termux:API and Termux:GUI have proper permissions
165
-
166
- **Cannot access /tmp/openclaw errors**
167
- * OpenClaw requires a custom TMPDIR on Termux. The installer should configure this automatically.
168
- * If you still see these errors, manually add to `~/.bashrc`:
169
- ```bash
170
- echo 'export TMPDIR="$PREFIX/tmp"' >> ~/.bashrc
171
- echo 'export TMP="$TMPDIR"' >> ~/.bashrc
172
- echo 'export TEMP="$TMPDIR"' >> ~/.bashrc
173
- echo 'if [ ! -d "$TMPDIR" ]; then mkdir -p "$TMPDIR"; fi' >> ~/.bashrc
174
- source ~/.bashrc
175
- mkdir -p /data/data/com.termux/files/usr/tmp/openclaw
176
- ```
177
-
178
- **"systemd not found" errors**
179
- * These are normal on Android/Termux and can be safely ignored.
180
- * OpenClaw will function without systemd.
181
-
182
- **Installation fails on dependencies**
183
- * Some dependencies may fail to install initially. Install them manually:
184
- ```bash
185
- pkg install -y python git proot-distro
186
- npm install -g openclaw@latest
187
- ```
188
- * The llama.cpp compilation takes 15-30 minutes - let it complete.
189
-
190
- **Gateway not accessible from other devices**
191
- * Ensure `gateway.bind` is set to `lan` in your openclaw.json
192
- * Check your phone's IP address: `ip addr show wlan0`
193
- * Access via: `http://<phone-ip>:18789`
194
-
195
- ## 📜 License
196
-
197
- 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.