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 +209 -213
- package/install.sh +144 -102
- package/package.json +34 -58
- package/patch.js +15 -0
- package/bin/openclaw +0 -8
- package/bin/openclawdx +0 -8
- package/lib/bionic-bypass.js +0 -64
- package/lib/env.js +0 -49
- package/lib/index.js +0 -576
- package/lib/installer.js +0 -494
- package/lib/postinstall.js +0 -36
- package/lib/utils.js +0 -123
- package/overlay_daemon.py +0 -105
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
|
|
6
|
-
|
|
7
|
-
## Features
|
|
8
|
-
|
|
9
|
-
- **Zero Root Required**: Runs in Termux +
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
|
|
161
|
-
###
|
|
162
|
-
-
|
|
163
|
-
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
###
|
|
178
|
-
|
|
179
|
-
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
- **
|
|
209
|
-
- **
|
|
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
|