openclaw-droid 2.0.6 → 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 -210
- package/install.sh +72 -53
- package/package.json +34 -62
- package/patch.js +15 -0
- package/SECURITY.md +0 -210
- 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 -490
- package/lib/postinstall.js +0 -36
- package/lib/utils.js +0 -117
- package/overlay_daemon.py +0 -105
package/README.md
CHANGED
|
@@ -1,210 +1,209 @@
|
|
|
1
|
-
# OpenClaw Droid
|
|
2
|
-
|
|
3
|
-
> **
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
```bash
|
|
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
|
-
```bash
|
|
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
|
-
```bash
|
|
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
|
-
MIT License.
|
|
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
|
package/install.sh
CHANGED
|
@@ -1,79 +1,104 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
3
|
-
# OpenClaw Droid Installer
|
|
4
|
-
# One-liner: curl -fsSL https://raw.githubusercontent.com/NosytLabs/openclaw-droid/main/install.sh | bash
|
|
5
|
-
#
|
|
6
|
-
|
|
7
2
|
set -e
|
|
8
3
|
|
|
9
|
-
# Colors
|
|
10
4
|
RED='\033[0;31m'
|
|
11
5
|
GREEN='\033[0;32m'
|
|
12
|
-
YELLOW='\033[1;33m'
|
|
13
6
|
BLUE='\033[0;34m'
|
|
7
|
+
YELLOW='\033[1;33m'
|
|
14
8
|
NC='\033[0m'
|
|
15
9
|
|
|
16
10
|
echo -e "${BLUE}"
|
|
17
11
|
echo "╔═══════════════════════════════════════════╗"
|
|
18
|
-
echo "║
|
|
19
|
-
echo "║
|
|
12
|
+
echo "║ OPENCLAW DROID INSTALLER ║"
|
|
13
|
+
echo "║ NosytLabs 2026 ║"
|
|
20
14
|
echo "╚═══════════════════════════════════════════╝"
|
|
21
15
|
echo -e "${NC}"
|
|
22
16
|
|
|
23
|
-
# Check if running in Termux
|
|
24
17
|
if [ -z "$TERMUX_VERSION" ]; then
|
|
25
|
-
echo -e "${
|
|
18
|
+
echo -e "${RED}Error:${NC} This script must be run inside Termux."
|
|
19
|
+
echo -e "Install Termux from F-Droid: ${BLUE}https://f-droid.org/packages/com.termux/${NC}"
|
|
20
|
+
exit 1
|
|
26
21
|
fi
|
|
27
22
|
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
echo -e "\n${BLUE}[1/6]${NC} Updating Termux packages..."
|
|
24
|
+
# Set non-interactive mode to avoid prompts
|
|
25
|
+
export DEBIAN_FRONTEND=noninteractive
|
|
30
26
|
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
# Attempt update, but don't exit if it fails (common due to repo mirrors or dependency conflicts)
|
|
28
|
+
# We use -o Dpkg::Options::="--force-confnew" to automatically accept new config files
|
|
29
|
+
if ! pkg update -y -o Dpkg::Options::="--force-confnew" || ! pkg upgrade -y -o Dpkg::Options::="--force-confnew"; then
|
|
30
|
+
echo -e "${YELLOW}Warning: Termux package update had issues.${NC}"
|
|
31
|
+
echo -e "Attempting to proceed. If installation fails, try running 'pkg remove nodejs' manually."
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
echo -e "\n${BLUE}[2/6]${NC} Installing proot-distro..."
|
|
35
|
+
# Check if proot-distro is already installed to avoid re-installation issues
|
|
36
|
+
if command -v proot-distro &> /dev/null; then
|
|
37
|
+
echo -e " ${GREEN}✓${NC} proot-distro already installed."
|
|
38
|
+
else
|
|
39
|
+
if ! pkg install proot-distro -y; then
|
|
40
|
+
echo -e "${RED}Error:${NC} Failed to install proot-distro."
|
|
41
|
+
echo -e "${YELLOW}Tip:${NC} Try running 'pkg remove nodejs' if you have dependency conflicts, then run this script again."
|
|
42
|
+
exit 1
|
|
43
|
+
fi
|
|
44
|
+
fi
|
|
33
45
|
|
|
34
|
-
|
|
35
|
-
echo -e "\n${BLUE}[2/3]${NC} Installing Ubuntu environment..."
|
|
46
|
+
echo -e "\n${BLUE}[3/6]${NC} Installing Ubuntu container..."
|
|
36
47
|
if proot-distro list | grep -q "ubuntu.*(installed)"; then
|
|
37
|
-
echo -e " ${GREEN}✓${NC} Ubuntu
|
|
48
|
+
echo -e " ${GREEN}✓${NC} Ubuntu container already installed."
|
|
38
49
|
else
|
|
39
|
-
|
|
50
|
+
echo -e " ${YELLOW}Installing Ubuntu...${NC}"
|
|
51
|
+
if ! proot-distro install ubuntu; then
|
|
52
|
+
echo -e "${RED}Error:${NC} Failed to install Ubuntu container."
|
|
53
|
+
echo -e "Check your internet connection and disk space."
|
|
54
|
+
exit 1
|
|
55
|
+
fi
|
|
40
56
|
fi
|
|
41
57
|
|
|
42
|
-
|
|
58
|
+
echo -e "\n${BLUE}[4/6]${NC} Configuring auto-login..."
|
|
43
59
|
if ! grep -q "proot-distro login ubuntu" ~/.bashrc; then
|
|
44
60
|
echo "proot-distro login ubuntu" >> ~/.bashrc
|
|
45
|
-
echo -e "
|
|
61
|
+
echo -e " ${GREEN}✓${NC} Auto-login configured."
|
|
62
|
+
else
|
|
63
|
+
echo -e " ${GREEN}✓${NC} Auto-login already configured."
|
|
46
64
|
fi
|
|
47
65
|
|
|
66
|
+
echo -e "\n${BLUE}[5/6]${NC} Creating internal setup script..."
|
|
48
67
|
TERMUX_HOME="$HOME"
|
|
49
|
-
INTERNAL_SCRIPT="$TERMUX_HOME/
|
|
68
|
+
INTERNAL_SCRIPT="$TERMUX_HOME/openclaw_internal_setup.sh"
|
|
50
69
|
|
|
51
|
-
# Create the internal setup script
|
|
52
70
|
cat << 'EOF' > "$INTERNAL_SCRIPT"
|
|
53
71
|
#!/bin/bash
|
|
54
72
|
set -e
|
|
55
73
|
|
|
56
|
-
# Colors inside proot
|
|
57
74
|
GREEN='\033[0;32m'
|
|
58
75
|
BLUE='\033[0;34m'
|
|
76
|
+
YELLOW='\033[1;33m'
|
|
59
77
|
NC='\033[0m'
|
|
60
78
|
|
|
61
|
-
echo -e "\n${BLUE}[
|
|
79
|
+
echo -e "\n${BLUE}[6/6]${NC} Setting up OpenClaw in Ubuntu..."
|
|
80
|
+
|
|
81
|
+
# Cleanup locks in case of previous failures
|
|
82
|
+
rm -f /var/lib/dpkg/lock-frontend /var/lib/dpkg/lock
|
|
83
|
+
dpkg --configure -a || true
|
|
62
84
|
|
|
63
|
-
|
|
64
|
-
|
|
85
|
+
echo -e "\n${YELLOW}Updating Ubuntu packages...${NC}"
|
|
86
|
+
export DEBIAN_FRONTEND=noninteractive
|
|
87
|
+
apt update && apt upgrade -y -o Dpkg::Options::="--force-confnew"
|
|
65
88
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
89
|
+
echo -e "\n${YELLOW}Installing Node.js 22 from NodeSource...${NC}"
|
|
90
|
+
# Check if already installed
|
|
91
|
+
if ! command -v node &> /dev/null; then
|
|
92
|
+
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
|
93
|
+
apt install -y nodejs
|
|
94
|
+
else
|
|
95
|
+
echo -e " ${GREEN}✓${NC} Node.js already installed."
|
|
96
|
+
fi
|
|
70
97
|
|
|
71
|
-
|
|
72
|
-
echo -e " Installing OpenClaw..."
|
|
98
|
+
echo -e "\n${YELLOW}Installing OpenClaw globally...${NC}"
|
|
73
99
|
npm install -g openclaw
|
|
74
100
|
|
|
75
|
-
|
|
76
|
-
echo -e " Applying network patch..."
|
|
101
|
+
echo -e "\n${YELLOW}Creating network interface patch...${NC}"
|
|
77
102
|
cat << 'JS' > /root/patch.js
|
|
78
103
|
const os = require('os');
|
|
79
104
|
os.networkInterfaces = function() {
|
|
@@ -92,34 +117,28 @@ os.networkInterfaces = function() {
|
|
|
92
117
|
};
|
|
93
118
|
JS
|
|
94
119
|
|
|
95
|
-
|
|
120
|
+
echo -e "\n${YELLOW}Configuring environment...${NC}"
|
|
96
121
|
if ! grep -q "NODE_OPTIONS" /root/.bashrc; then
|
|
97
122
|
echo "export NODE_OPTIONS='--require /root/patch.js'" >> /root/.bashrc
|
|
98
123
|
fi
|
|
99
124
|
|
|
100
|
-
|
|
101
|
-
echo -e "\n${GREEN}Starting OpenClaw Onboarding...${NC}"
|
|
125
|
+
echo -e "\n${GREEN}Starting OpenClaw onboarding...${NC}"
|
|
102
126
|
export NODE_OPTIONS='--require /root/patch.js'
|
|
103
|
-
openclaw onboard
|
|
104
|
-
|
|
105
|
-
echo -e "\n${GREEN}Installation complete!${NC}"
|
|
106
|
-
echo -e "To start OpenClaw in the future:"
|
|
107
|
-
echo -e "1. Run 'proot-distro login ubuntu'"
|
|
108
|
-
echo -e "2. Run 'openclaw gateway'"
|
|
127
|
+
openclaw onboard || echo -e "${YELLOW}Onboarding skipped or already completed.${NC}"
|
|
109
128
|
|
|
110
|
-
|
|
111
|
-
|
|
129
|
+
echo -e "\n${GREEN}╔═══════════════════════════════════════════╗${NC}"
|
|
130
|
+
echo -e "${GREEN}║ INSTALLATION COMPLETE! ║${NC}"
|
|
131
|
+
echo -e "${GREEN}╚═══════════════════════════════════════════╝${NC}"
|
|
112
132
|
EOF
|
|
113
133
|
|
|
114
134
|
chmod +x "$INTERNAL_SCRIPT"
|
|
115
135
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
proot-distro login ubuntu --bind "$TERMUX_HOME":/mnt/termux -- bash /mnt/termux/
|
|
136
|
+
echo -e "\n${BLUE}Entering Ubuntu container to run setup...${NC}"
|
|
137
|
+
# Run the internal script
|
|
138
|
+
proot-distro login ubuntu --bind "$TERMUX_HOME":/mnt/termux -- bash /mnt/termux/openclaw_internal_setup.sh
|
|
119
139
|
|
|
120
|
-
|
|
140
|
+
echo -e "\n${GREEN}Cleaning up temporary files...${NC}"
|
|
121
141
|
rm -f "$INTERNAL_SCRIPT"
|
|
122
142
|
|
|
123
|
-
echo -e "\n${
|
|
124
|
-
|
|
125
|
-
echo -e "${GREEN}═══════════════════════════════════════════${NC}"
|
|
143
|
+
echo -e "\n${BLUE}Logging you into Ubuntu now...${NC}"
|
|
144
|
+
exec proot-distro login ubuntu
|