openclaw-droid 3.10.0 → 4.20.0

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/LICENSE CHANGED
@@ -1,21 +1,19 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Mithun Gowda B
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
package/README.md CHANGED
@@ -1,8 +1,10 @@
1
- # OpenClaw Droid
1
+ # OpenClaw Droid v4.20 - Android AI Gateway Installer
2
2
 
3
- > **The Android AI Gateway Installer** by [NosytLabs](https://github.com/NosytLabs)
3
+ > **The Ultimate Android AI Gateway Installer** by [NosytLabs](https://github.com/NosytLabs)
4
4
 
5
- Turn your Android device into a 24/7 AI Gateway using OpenClaw with proot-distro Ubuntu.
5
+ Transform your Android device into a powerful 24/7 AI Gateway with OpenClaw and proot-distro Ubuntu. Now with enhanced systemd compatibility and seamless gateway management.
6
+
7
+ **Keywords**: Android AI Gateway, OpenClaw Android, Termux AI Gateway, proot-distro Ubuntu, Android AI Agent, Mobile AI Gateway, OpenClaw Installer, Android AI Tools, AI Gateway Setup, Termux AI Tools
6
8
 
7
9
  ## Features
8
10
 
@@ -10,6 +12,10 @@ Turn your Android device into a 24/7 AI Gateway using OpenClaw with proot-distro
10
12
  - **Full Linux Environment**: Complete Ubuntu container with Node.js 22
11
13
  - **24/7 Operation**: Optimized for long-running background sessions
12
14
  - **Easy Installation**: One-command installer with automatic setup
15
+ - **Bionic Bypass**: Automatically patches Android network restrictions
16
+ - **Systemd Compatibility**: Enhanced proot-distro compatibility with fake systemctl
17
+ - **Seamless Gateway Management**: Automatic service management without systemd
18
+ - **V4.20 Release**: Latest stable version with improved reliability
13
19
 
14
20
  ## Prerequisites
15
21
 
@@ -29,12 +35,12 @@ curl -fsSL https://raw.githubusercontent.com/NosytLabs/openclaw-droid/main/insta
29
35
 
30
36
  This will:
31
37
  1. Update Termux packages
32
- 2. Install proot-distro
33
- 3. Set up Ubuntu container
34
- 4. Configure auto-login to Ubuntu
35
- 5. Install Node.js 22
36
- 6. Install OpenClaw globally
37
- 7. Apply network interface patch
38
+ 2. Install proot-distro and Ubuntu
39
+ 3. Configure auto-login
40
+ 4. Install Node.js 22 and OpenClaw
41
+ 5. Apply network patch
42
+ 6. Install proot-distro compatibility wrapper
43
+ 7. Configure systemd fallback for gateway management
38
44
  8. Run onboarding wizard
39
45
 
40
46
  ### Manual Install
@@ -65,39 +71,27 @@ proot-distro login ubuntu
65
71
  **Step 5: Update Ubuntu and install Node.js 22**
66
72
  ```bash
67
73
  apt update && apt upgrade -y
74
+ apt install curl git build-essential -y
68
75
  curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
69
76
  apt install -y nodejs
70
77
  ```
71
78
 
72
79
  **Step 6: Install OpenClaw**
73
80
  ```bash
74
- npm install -g openclaw
81
+ npm install -g openclaw@latest
75
82
  ```
76
83
 
77
84
  **Step 7: Create network interface patch (Bionic Bypass)**
78
85
  ```bash
79
- cat << 'JS' > /root/patch.js
86
+ cat << 'JS' > /root/hijack.js
80
87
  const os = require('os');
81
- os.networkInterfaces = function() {
82
- return {
83
- "lo": [
84
- {
85
- "address": "127.0.0.1",
86
- "netmask": "255.0.0.0",
87
- "family": "IPv4",
88
- "mac": "00:00:00:00:00:00",
89
- "internal": true,
90
- "cidr": "127.0.0.1/8"
91
- }
92
- ]
93
- };
94
- };
88
+ os.networkInterfaces = () => ({});
95
89
  JS
96
90
  ```
97
91
 
98
92
  **Step 8: Configure environment**
99
93
  ```bash
100
- echo 'export NODE_OPTIONS="--require /root/patch.js"' >> ~/.bashrc
94
+ echo 'export NODE_OPTIONS="-r /root/hijack.js"' >> ~/.bashrc
101
95
  source ~/.bashrc
102
96
  ```
103
97
 
@@ -135,6 +129,21 @@ openclaw analyze https://example.com
135
129
  openclaw --help
136
130
  ```
137
131
 
132
+ ### Check gateway status
133
+ ```bash
134
+ openclaw-service-manager status
135
+ ```
136
+
137
+ ### Stop the gateway
138
+ ```bash
139
+ openclaw-service-manager stop
140
+ ```
141
+
142
+ ### Restart the gateway
143
+ ```bash
144
+ openclaw-service-manager restart
145
+ ```
146
+
138
147
  ## Access the Dashboard
139
148
 
140
149
  Once the gateway is running, open your browser to:
@@ -143,54 +152,132 @@ Once the gateway is running, open your browser to:
143
152
  http://127.0.0.1:18789
144
153
  ```
145
154
 
146
- ## Troubleshooting
155
+ **Note**: To use the Web Gateway chat, copy the `token` from `~/.openclaw/openclaw.json` and paste it in the dashboard under **Overview -> Gateway Access**.
156
+ You can also fetch the token with `openclaw config get gateway.auth.token`.
147
157
 
148
- ### Gateway not starting
149
- - Ensure Ubuntu container is running: `proot-distro login ubuntu`
150
- - Check Node.js version: `node -v` (should be v22.x)
151
- - Verify network patch is applied: `ls /root/hijack.js`
158
+ ## Verifying Installation
152
159
 
153
- ### Network interface errors
154
- - The hijack.js file fixes Android network restrictions
155
- - Make sure `NODE_OPTIONS` is set: `echo $NODE_OPTIONS`
156
- - Reapply the patch if needed
160
+ After installation completes, you can verify everything is working by running:
157
161
 
158
- ### Termux crashes or kills process
159
- - Disable battery optimization for Termux in Android settings
160
- - Keep Termux notification active
161
- - Consider using tmux for persistent sessions: `pkg install tmux -y`
162
+ ```bash
163
+ # From Termux (outside Ubuntu)
164
+ bash verify.sh
165
+ ```
166
+
167
+ This will check:
168
+ - Termux/Ubuntu environment
169
+ - proot-distro and Ubuntu container
170
+ - Node.js and npm installation
171
+ - OpenClaw global package
172
+ - Termux shortcut and Ubuntu command
173
+ - Network bypass script
174
+ - Environment configuration
162
175
 
163
- ### Ubuntu container issues
164
- - Reinstall container: `proot-distro remove ubuntu && proot-distro install ubuntu`
165
- - Check disk space: `df -h`
176
+ If all checks pass, you're ready to use OpenClaw!
166
177
 
167
- ## Advanced Usage
178
+ ### Quick Test Commands
168
179
 
169
- ### 24/7 Mode with tmux
180
+ **From Termux (after reopening):**
170
181
  ```bash
171
- pkg install tmux -y
172
- tmux new -s openclaw
173
- proot-distro login ubuntu
174
- openclaw gateway --verbose
182
+ openclaw --help
175
183
  ```
176
184
 
177
- Detach with `Ctrl+b` then `d`. Reattach with `tmux attach -t openclaw`.
185
+ **From inside Ubuntu:**
186
+ ```bash
187
+ openclaw --help
188
+ ```
178
189
 
179
- ### Update OpenClaw
190
+ Both should show the OpenClaw help menu.
191
+
192
+ ## Troubleshooting
193
+
194
+ ### "openclaw: command not found"
195
+ If you see this error after installation:
196
+ 1. Ensure you are inside Ubuntu (`proot-distro login ubuntu`)
197
+ 2. Run `source ~/.bashrc` to reload your path
198
+ 3. If that fails, run `npm install -g openclaw@latest` again inside Ubuntu
199
+
200
+ ### Gateway not starting / System Error 13
201
+ This usually means the network patch isn't applied.
202
+ 1. Check if patch exists: `ls /root/hijack.js`
203
+ 2. Check if NODE_OPTIONS is set: `echo $NODE_OPTIONS`
204
+ 3. It should print `--require /root/hijack.js`. If empty, run `export NODE_OPTIONS="--require /root/hijack.js"`
205
+
206
+ ### "systemctl --user unavailable" error
207
+ This is automatically handled in v4.20 with our proot-distro compatibility wrapper. The installer creates a fake systemctl that provides fallback functionality for gateway management.
208
+
209
+ ### Gateway service management issues
210
+ Use the built-in service manager:
211
+ - Check status: `openclaw-service-manager status`
212
+ - Start service: `openclaw-service-manager start`
213
+ - Stop service: `openclaw-service-manager stop`
214
+ - Restart service: `openclaw-service-manager restart`
215
+
216
+ ### Termux crashes or kills process
217
+ Android kills background apps to save battery.
218
+ 1. **Disable Battery Optimization**: Go to Android Settings -> Apps -> Termux -> Battery -> Unrestricted
219
+ 2. **Acquire Wake Lock**: Run `termux-wake-lock` in a separate Termux session
220
+ 3. **Use tmux**: `pkg install tmux -y` then run `tmux` before logging into Ubuntu. This keeps your session alive even if the app closes.
221
+
222
+ ## Pro Tips
223
+
224
+ - **Keep it Alive**: Android will kill Termux in the background. Run `termux-wake-lock` in a separate Termux session and disable "Battery Optimization" for Termux.
225
+ - **The UI**: Access your dashboard by going to `http://127.0.0.1:18789` in your phone's browser. Get your token using `openclaw config get gateway.auth.token`.
226
+ - **Security**: Never show your full API keys or Gateway tokens in videos. Revoke keys if exposed.
227
+ - **Remote Access**: Install `openssh` in Termux to SSH into your phone from your PC.
228
+ - **Reset**: If things get messy, you can reinstall Ubuntu: `proot-distro remove ubuntu && proot-distro install ubuntu`
229
+
230
+ ## What's New in v4.20
231
+
232
+ ### Enhanced proot-distro Compatibility
233
+ - **Fake systemctl**: Automatically creates a compatibility layer for systemd commands
234
+ - **Service Manager**: Built-in service management without requiring systemd
235
+ - **Gateway Auto-Start**: Seamless gateway startup without manual intervention
236
+ - **Error Handling**: Improved error messages and recovery mechanisms
237
+
238
+ ### Improved Installation Process
239
+ - **One-Command Setup**: Enhanced installer with automatic compatibility detection
240
+ - **Systemd Fallback**: Automatic fallback when systemd is unavailable
241
+ - **Better Logging**: Enhanced logging for troubleshooting installation issues
242
+ - **Service Management**: Integrated service manager for gateway control
243
+
244
+ ### Enhanced User Experience
245
+ - **Simplified Commands**: Use `openclaw-service-manager` for gateway control
246
+ - **Better Status Reporting**: Clear status messages for service operations
247
+ - **Automatic Recovery**: Self-healing mechanisms for common issues
248
+ - **Backward Compatibility**: Maintains compatibility with existing OpenClaw features
249
+
250
+ ## Verified Commands
251
+
252
+ Once the gateway is live, use these chat commands in your linked WhatsApp/Telegram:
253
+
254
+ - `/status` — Check the health of your pocket agent
255
+ - `/think high` — Put the bot in "deep reasoning" mode
256
+ - `/reset` — Clear the current session memory
257
+
258
+ ## Additional Resources
259
+
260
+ ### Access the Web Gateway
261
+ To chat using the web gateway, copy the `token` value from `~/.openclaw/openclaw.json` and paste it at:
262
+ ```
263
+ http://127.0.0.1:18789
264
+ ```
265
+ Navigate to **Overview → Gateway Access → Gateway Token**.
266
+
267
+ ### Get Gateway Token
180
268
  ```bash
181
- proot-distro login ubuntu
182
- npm update -g openclaw
269
+ openclaw config get gateway.auth.token
183
270
  ```
184
271
 
185
272
  ## Project Structure
186
273
 
187
274
  ```
188
275
  openclaw-droid/
189
- ├── install.sh # Main installer script
190
- ├── hijack.js # Network interface patch
191
- ├── README.md # This file
192
- ├── LICENSE # MIT License
193
- └── package.json # NPM package configuration
276
+ ├── install.sh # Main installer script
277
+ ├── hijack.js # Network interface patch (reference)
278
+ ├── openclaw-wrapper.sh # proot-distro compatibility wrapper
279
+ ├── README.md # This file
280
+ └── package.json # NPM package configuration
194
281
  ```
195
282
 
196
283
  ## Useful Resources
package/bin/openclaw ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ console.log("This package 'openclaw-droid' is an installer script.");
3
+ console.log("Please run the install.sh script to install the OpenClaw Android Gateway.");
4
+ console.log("Usage: curl -fsSL https://raw.githubusercontent.com/NosytLabs/openclaw-droid/main/install.sh | bash");
package/hijack.js CHANGED
@@ -1,15 +1,2 @@
1
1
  const os = require('os');
2
- os.networkInterfaces = function() {
3
- return {
4
- "lo": [
5
- {
6
- "address": "127.0.0.1",
7
- "netmask": "255.0.0.0",
8
- "family": "IPv4",
9
- "mac": "00:00:00:00:00:00",
10
- "internal": true,
11
- "cidr": "127.0.0.1/8"
12
- }
13
- ]
14
- };
15
- };
2
+ os.networkInterfaces = () => ({});