openclaw-droid 2.1.0 → 3.0.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/README.md CHANGED
@@ -1,213 +1,209 @@
1
- # OpenClaw Droid
2
-
3
- > **The Android AI Gateway Installer** by [NosytLabs](https://github.com/NosytLabs)
4
-
5
- Turn your Android device into a 24/7 AI Gateway. Run OpenClaw, connect to Gemini/Claude/OpenAI, and automate from your phone with zero root.
6
-
7
- ## Features
8
-
9
- - **Zero Root Required**: Runs in Termux + Proot (Ubuntu container).
10
- - **24/7 Operation**: Optimized for long-running background sessions.
11
- - **Visual Overlay**: Live status on screen (Termux:GUI).
12
- - **Hardware Acceleration**: llama.cpp builds for ARM64.
13
- - **Bionic Bypass**: Fixes Android 10+ network restrictions.
14
-
15
- ## Prerequisites
16
-
17
- - **Android**: 10 or newer.
18
- - **Termux**: F-Droid version only.
19
- - **API Key**: Gemini API from Google AI Studio (free tier), Anthropic, or OpenAI.
20
-
21
- ## Installation
22
-
23
- ### Option 1: One-Command Installer
24
-
25
- ```bash
26
- curl -fsSL https://raw.githubusercontent.com/NosytLabs/openclaw-droid/main/install.sh | bash
27
- ```
28
-
29
- ### Option 2: NPM Installer
30
-
31
- ```bash
32
- pkg update -y && pkg upgrade -y
33
- pkg install nodejs-lts git -y
34
- npm install -g openclaw-droid
35
- openclaw setup
36
- ```
37
-
38
- ### Option 3: Manual Install (Full Control)
39
-
40
- 1. **Prepare Termux**
41
- ```bash
42
- termux-setup-storage
43
- pkg update -y && pkg upgrade -y
44
- pkg install nodejs-lts git proot-distro termux-api -y
45
- ```
46
-
47
- 2. **Install Ubuntu**
48
- ```bash
49
- proot-distro install ubuntu
50
- proot-distro login ubuntu
51
- ```
52
-
53
- 3. **Setup Inside Ubuntu**
54
- ```bash
55
- apt update && apt upgrade -y
56
- apt install curl git build-essential python3 -y
57
- curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
58
- apt install nodejs -y
59
- npm install -g openclaw@latest
60
- ```
61
-
62
- 4. **Configure Bionic Bypass (Crucial)**
63
- Android blocks `os.networkInterfaces()` which causes System Error 13. Use this hijack script:
64
- ```bash
65
- cat <<'EOF' > /root/hijack.js
66
- const os = require('os');
67
- const originalNetworkInterfaces = os.networkInterfaces;
68
- os.networkInterfaces = function() {
69
- try {
70
- const interfaces = originalNetworkInterfaces.call(os);
71
- if (interfaces && Object.keys(interfaces).length > 0) return interfaces;
72
- } catch (e) {}
73
- return {
74
- lo: [{
75
- address: '127.0.0.1',
76
- netmask: '255.0.0.0',
77
- family: 'IPv4',
78
- mac: '00:00:00:00:00:00',
79
- internal: true,
80
- cidr: '127.0.0.1/8'
81
- }]
82
- };
83
- };
84
- EOF
85
-
86
- echo 'export NODE_OPTIONS="-r /root/hijack.js"' >> ~/.bashrc
87
- source ~/.bashrc
88
- ```
89
-
90
- 5. **Onboarding Wizard**
91
- ```bash
92
- openclaw onboarding
93
- ```
94
- When asked for Gateway Bind, select **Loopback (127.0.0.1)**.
95
-
96
- 6. **Launch**
97
- ```bash
98
- openclaw start
99
- ```
100
-
101
- ## Usage
102
-
103
- - **Start the Gateway**
104
- ```bash
105
- openclaw start
106
- ```
107
- - **Run Setup Wizard**
108
- ```bash
109
- openclaw setup
110
- ```
111
- - **Run Onboarding**
112
- ```bash
113
- openclaw onboarding
114
- ```
115
- - **Run Gateway (Verbose Logs)**
116
- ```bash
117
- openclaw gateway --verbose
118
- ```
119
- - **Test Overlay**
120
- ```bash
121
- openclaw overlay "Hello Android!"
122
- ```
123
-
124
- ## Verified Commands
125
-
126
- - `/status` Check health.
127
- - `/think high` — Deep reasoning mode.
128
- - `/reset` — Clear session memory.
129
-
130
- ## Dashboard
131
-
132
- - URL: `http://127.0.0.1:18789`
133
- - Token: `openclaw config get gateway.auth.token` or read `~/.openclaw/openclaw.json`
134
-
135
- ## 24/7 Mode (Recommended)
136
-
137
- ```bash
138
- pkg install tmux -y
139
- tmux new -s openclaw
140
- openclaw start
141
- ```
142
-
143
- Detach with `Ctrl+b` then `d` and keep Termux running.
144
-
145
- ## Overlay
146
-
147
- The overlay reads text from `~/overlay.txt` or `/root/overlay.txt` and displays it on-screen. It only shows when Termux:GUI is installed and running in a foreground Termux session.
148
-
149
- ```bash
150
- pkg install termux-gui -y
151
- openclaw overlay
152
- echo "Hello" > ~/overlay.txt
153
- ```
154
-
155
- ## Troubleshooting
156
-
157
- ### Permission Denied (Storage)
158
- - Run `termux-setup-storage`.
159
- - Grant Files and Media permission in Android Settings > Apps > Termux.
160
-
161
- ### Process Killed Automatically
162
- - Disable battery optimization for Termux.
163
- - Use `termux-wake-lock` or enable Wake Lock in the notification.
164
- - Keep the Termux notification active.
165
-
166
- ### System Error 13 (Network)
167
- - Ensure Bionic Bypass is active.
168
- - For manual install, confirm `NODE_OPTIONS` points to `/root/hijack.js`.
169
-
170
- ### Gateway Crashes on Startup
171
- - Run `openclaw onboarding` and select **Loopback (127.0.0.1)** for binding.
172
-
173
- ### Dashboard Not Loading
174
- - Ensure gateway is running with `openclaw start`.
175
- - Check `openclaw doctor` inside Ubuntu: `proot-distro login ubuntu` then `openclaw doctor`.
176
-
177
- ### Web Gateway Token Missing
178
- - Read the token from `~/.openclaw/openclaw.json` or use `openclaw config get gateway.auth.token`.
179
- - Paste it in the web gateway UI: Overview → Gateway Access → Gateway Token.
180
-
181
- ### Overlay Not Showing
182
- - Install Termux:GUI from F-Droid.
183
- - Run `pkg install termux-gui` and grant overlay permissions.
184
- - Keep overlay daemon running in foreground: `openclaw overlay`.
185
-
186
- ### OpenClaw Command Runs in Ubuntu but Starts Termux Binary
187
- - Inside Ubuntu: `npm uninstall -g openclaw` then `npm install -g openclaw@latest`.
188
-
189
- ### Ubuntu Install or Update Fails
190
- - Re-run setup: `openclaw setup`.
191
- - Ensure free space: `df -h`.
192
-
193
- ### Build Takes Forever
194
- - llama.cpp compilation can take 15–30 minutes on mobile; keep the session open.
195
-
196
- ### EACCES or TMPDIR Errors
197
- - Ensure Termux temp dir exists: `mkdir -p $PREFIX/tmp`.
198
-
199
- ### Security Tips
200
- - Never share API keys or gateway tokens in screenshots or videos.
201
- - Rotate keys after demo recordings.
202
-
203
- ## Useful Resources
204
-
205
- - **[OpenClaw](https://github.com/openclaw/openclaw)**: Core AI Gateway.
206
- - **[ClawHub](https://clawhub.ai/)**: Discover and install skills.
207
- - **[OpenClaw Skills](https://github.com/openclaw/skills)**: Official skill library.
208
- - **[CellHasher](https://github.com/cellhasher)**: Termux tools and scripts.
209
- - **[CrabWalk](https://github.com/crabwalk)**: Mobile-first AI optimizations.
210
-
211
- ## License
212
-
213
- MIT © [NosytLabs](https://github.com/NosytLabs)
1
+ # OpenClaw Droid
2
+
3
+ > **The Android AI Gateway Installer** by [NosytLabs](https://github.com/NosytLabs)
4
+
5
+ Turn your Android device into a 24/7 AI Gateway using OpenClaw with proot-distro Ubuntu.
6
+
7
+ ## Features
8
+
9
+ - **Zero Root Required**: Runs in Termux + proot-distro Ubuntu container
10
+ - **Full Linux Environment**: Complete Ubuntu container with Node.js 22
11
+ - **24/7 Operation**: Optimized for long-running background sessions
12
+ - **Easy Installation**: One-command installer with automatic setup
13
+
14
+ ## Prerequisites
15
+
16
+ - **Android**: 10 or newer
17
+ - **Termux**: F-Droid version only (https://f-droid.org/packages/com.termux/)
18
+ - **API Key**: OpenClaw API key or compatible AI service
19
+
20
+ ## Installation
21
+
22
+ ### Quick Install (Recommended)
23
+
24
+ Run this single command in Termux:
25
+
26
+ ```bash
27
+ curl -fsSL https://raw.githubusercontent.com/NosytLabs/openclaw-droid/main/install.sh | bash
28
+ ```
29
+
30
+ This will:
31
+ 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
+ 8. Run onboarding wizard
39
+
40
+ ### Manual Install
41
+
42
+ If you prefer step-by-step installation:
43
+
44
+ **Step 1: Update Termux and install dependencies**
45
+ ```bash
46
+ pkg update && pkg upgrade -y
47
+ pkg install proot-distro -y
48
+ ```
49
+
50
+ **Step 2: Install Ubuntu container**
51
+ ```bash
52
+ proot-distro install ubuntu
53
+ ```
54
+
55
+ **Step 3: Configure auto-login**
56
+ ```bash
57
+ echo "proot-distro login ubuntu" >> ~/.bashrc
58
+ ```
59
+
60
+ **Step 4: Login to Ubuntu**
61
+ ```bash
62
+ proot-distro login ubuntu
63
+ ```
64
+
65
+ **Step 5: Update Ubuntu and install Node.js 22**
66
+ ```bash
67
+ apt update && apt upgrade -y
68
+ curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
69
+ apt install -y nodejs
70
+ ```
71
+
72
+ **Step 6: Install OpenClaw**
73
+ ```bash
74
+ npm install -g openclaw
75
+ ```
76
+
77
+ **Step 7: Create network interface patch**
78
+ ```bash
79
+ cat << 'EOF' > /root/patch.js
80
+ 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
+ };
95
+ EOF
96
+ ```
97
+
98
+ **Step 8: Configure environment**
99
+ ```bash
100
+ echo "export NODE_OPTIONS='--require /root/patch.js'" >> ~/.bashrc
101
+ ```
102
+
103
+ **Step 9: Run onboarding**
104
+ ```bash
105
+ export NODE_OPTIONS='--require /root/patch.js'
106
+ openclaw onboard
107
+ ```
108
+
109
+ **Step 10: Start the gateway**
110
+ ```bash
111
+ openclaw gateway --token YOUR_TOKEN
112
+ ```
113
+
114
+ ## Usage
115
+
116
+ ### Start the AI Gateway
117
+ ```bash
118
+ openclaw gateway --token YOUR_TOKEN
119
+ ```
120
+
121
+ ### Run onboarding wizard
122
+ ```bash
123
+ openclaw onboard
124
+ ```
125
+
126
+ ### Analyze a website
127
+ ```bash
128
+ openclaw analyze https://example.com
129
+ ```
130
+
131
+ ### Get help
132
+ ```bash
133
+ openclaw --help
134
+ ```
135
+
136
+ ## Access the Dashboard
137
+
138
+ Once the gateway is running, open your browser to:
139
+
140
+ ```
141
+ http://127.0.0.1:18789/chat?
142
+ ```
143
+
144
+ ## Troubleshooting
145
+
146
+ ### Gateway not starting
147
+ - Ensure Ubuntu container is running: `proot-distro login ubuntu`
148
+ - Check Node.js version: `node -v` (should be v22.x)
149
+ - Verify network patch is applied: `ls /root/patch.js`
150
+
151
+ ### Network interface errors
152
+ - The patch.js file fixes Android network restrictions
153
+ - Make sure `NODE_OPTIONS` is set: `echo $NODE_OPTIONS`
154
+ - Reapply the patch if needed
155
+
156
+ ### Termux crashes or kills process
157
+ - Disable battery optimization for Termux in Android settings
158
+ - Keep Termux notification active
159
+ - Consider using tmux for persistent sessions: `pkg install tmux -y`
160
+
161
+ ### Ubuntu container issues
162
+ - Reinstall container: `proot-distro remove ubuntu && proot-distro install ubuntu`
163
+ - Check disk space: `df -h`
164
+
165
+ ## Advanced Usage
166
+
167
+ ### 24/7 Mode with tmux
168
+ ```bash
169
+ pkg install tmux -y
170
+ tmux new -s openclaw
171
+ proot-distro login ubuntu
172
+ openclaw gateway --token YOUR_TOKEN
173
+ ```
174
+
175
+ Detach with `Ctrl+b` then `d`. Reattach with `tmux attach -t openclaw`.
176
+
177
+ ### Update OpenClaw
178
+ ```bash
179
+ proot-distro login ubuntu
180
+ npm update -g openclaw
181
+ ```
182
+
183
+ ## Project Structure
184
+
185
+ ```
186
+ openclaw-droid/
187
+ ├── install.sh # Main installer script
188
+ ├── patch.js # Network interface patch
189
+ ├── README.md # This file
190
+ ├── LICENSE # MIT License
191
+ └── package.json # NPM package configuration
192
+ ```
193
+
194
+ ## Useful Resources
195
+
196
+ - **[OpenClaw](https://github.com/openclaw/openclaw)**: Core AI Gateway
197
+ - **[ClawHub](https://clawhub.ai/)**: Discover and install skills
198
+ - **[OpenClaw Skills](https://github.com/openclaw/skills)**: Official skill library
199
+ - **[Termux Wiki](https://wiki.termux.com/)**: Termux documentation
200
+ - **[proot-distro](https://github.com/termux/proot-distro)**: Linux distro manager
201
+
202
+ ## License
203
+
204
+ MIT © [NosytLabs](https://github.com/NosytLabs)
205
+
206
+ ## Support
207
+
208
+ - **Issues**: https://github.com/NosytLabs/openclaw-droid/issues
209
+ - **Discussions**: https://github.com/NosytLabs/openclaw-droid/discussions