openclaw-droid 1.0.2 โ 1.0.5
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 +127 -77
- package/install.sh +3 -3
- package/lib/index.js +1 -1
- package/lib/installer.js +5 -1
- package/lib/utils.js +10 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,77 +1,127 @@
|
|
|
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
|
-
1
|
|
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
|
-
|
|
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 powerful agents, connect to LLMs (Gemini, Claude, OpenAI), and automate tasks directly from your phoneโno root required.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Zero Root Required**: Runs entirely in user-space using Termux and Proot.
|
|
10
|
+
- **24/7 Operation**: optimized for long-running background tasks with wake locks.
|
|
11
|
+
- **Visual Overlay**: Display AI thoughts and status directly on your Android screen (requires Termux:GUI).
|
|
12
|
+
- **Hardware Acceleration**: Auto-compiles llama.cpp for ARM64/mobile performance.
|
|
13
|
+
- **Bionic Bypass**: Automatically fixes Android 10+ "System Error 13" networking restrictions.
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
|
|
17
|
+
- **Android Device**: Android 10 or higher.
|
|
18
|
+
- **Termux**: Installed from **F-Droid** (Do not use the Play Store version).
|
|
19
|
+
- **API Key**: Gemini API (free tier available), Anthropic, or OpenAI.
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
### Option 1: Automatic Installation (Recommended)
|
|
24
|
+
|
|
25
|
+
Run these commands in Termux:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Update packages
|
|
29
|
+
pkg update -y && pkg upgrade -y
|
|
30
|
+
|
|
31
|
+
# Install Node.js and Git
|
|
32
|
+
pkg install nodejs-lts git -y
|
|
33
|
+
|
|
34
|
+
# Install OpenClaw Droid
|
|
35
|
+
npm install -g openclaw-droid
|
|
36
|
+
|
|
37
|
+
# Run the setup wizard
|
|
38
|
+
openclaw setup
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Option 2: Manual Installation
|
|
42
|
+
|
|
43
|
+
If the automatic installer fails or you prefer full control:
|
|
44
|
+
|
|
45
|
+
1. **Prepare Environment**:
|
|
46
|
+
```bash
|
|
47
|
+
termux-setup-storage
|
|
48
|
+
pkg update -y && pkg upgrade -y
|
|
49
|
+
pkg install nodejs-lts git proot-distro termux-api -y
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
2. **Install Ubuntu Environment**:
|
|
53
|
+
```bash
|
|
54
|
+
proot-distro install ubuntu
|
|
55
|
+
proot-distro login ubuntu
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
3. **Setup Inside Ubuntu**:
|
|
59
|
+
```bash
|
|
60
|
+
# (Inside Ubuntu prompt)
|
|
61
|
+
apt update && apt upgrade -y
|
|
62
|
+
apt install curl git build-essential python3 -y
|
|
63
|
+
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
|
64
|
+
apt install nodejs -y
|
|
65
|
+
npm install -g openclaw@latest
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
4. **Configure Bionic Bypass (Fix Network Errors)**:
|
|
69
|
+
OpenClaw requires a networking fix for Android.
|
|
70
|
+
Create `~/.openclaw/bionic-bypass.js` with the content from [this repo](https://github.com/NosytLabs/openclaw-droid/blob/main/lib/bionic-bypass.js) and add to `.bashrc`:
|
|
71
|
+
```bash
|
|
72
|
+
export NODE_OPTIONS="--require /root/.openclaw/bionic-bypass.js"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
5. **Launch**:
|
|
76
|
+
```bash
|
|
77
|
+
openclaw start
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Usage
|
|
81
|
+
|
|
82
|
+
- **Start the Gateway**:
|
|
83
|
+
```bash
|
|
84
|
+
openclaw start
|
|
85
|
+
```
|
|
86
|
+
- **Run Setup Wizard**:
|
|
87
|
+
```bash
|
|
88
|
+
openclaw setup
|
|
89
|
+
```
|
|
90
|
+
- **Test Overlay**:
|
|
91
|
+
```bash
|
|
92
|
+
openclaw overlay "Hello Android!"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Troubleshooting
|
|
96
|
+
|
|
97
|
+
### Permission Denied (Storage)
|
|
98
|
+
If you see `EACCES` when accessing files:
|
|
99
|
+
1. Run `termux-setup-storage`
|
|
100
|
+
2. Grant "Files and Media" permission in Android Settings > Apps > Termux.
|
|
101
|
+
|
|
102
|
+
### Process Killed Automatically
|
|
103
|
+
Android aggressively kills background apps.
|
|
104
|
+
1. Run `openclaw setup` and ensure "Wake Lock" is enabled.
|
|
105
|
+
2. Disable "Battery Optimization" for Termux in Android Settings.
|
|
106
|
+
3. Keep the Termux notification active.
|
|
107
|
+
|
|
108
|
+
### System Error 13 (Permission Denied / Network)
|
|
109
|
+
This is a known Android 10+ kernel restriction on `getifaddrs`.
|
|
110
|
+
**Fix**: Ensure the **Bionic Bypass** is active. The installer sets this up automatically. If you installed manually, see Option 2, Step 4.
|
|
111
|
+
|
|
112
|
+
### GUI Overlay Not Showing
|
|
113
|
+
1. Install the **Termux:GUI** app from F-Droid.
|
|
114
|
+
2. Install the `termux-gui` package: `pkg install termux-gui`.
|
|
115
|
+
3. Ensure "Draw over other apps" permission is granted to Termux:GUI.
|
|
116
|
+
|
|
117
|
+
## Useful Resources
|
|
118
|
+
|
|
119
|
+
- **[OpenClaw](https://github.com/openclaw/openclaw)**: The core AI Gateway repository.
|
|
120
|
+
- **[ClawHub](https://clawhub.ai/)**: Discover, share, and install new skills for your AI agent.
|
|
121
|
+
- **[OpenClaw Skills](https://github.com/openclaw/skills)**: Official library of verified skills.
|
|
122
|
+
- **[CellHasher](https://github.com/cellhasher)**: Essential Termux tools and scripts.
|
|
123
|
+
- **[CrabWalk](https://github.com/crabwalk)**: Mobile-first AI optimizations.
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
MIT ยฉ [NosytLabs](https://github.com/NosytLabs)
|
package/install.sh
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
set -e
|
|
3
3
|
|
|
4
|
-
# OpenClaw Droid Installer v1.0.
|
|
4
|
+
# OpenClaw Droid Installer v1.0.5
|
|
5
5
|
# NosytLabs
|
|
6
6
|
|
|
7
7
|
RED='\033[0;31m'
|
|
@@ -11,9 +11,9 @@ NC='\033[0m'
|
|
|
11
11
|
|
|
12
12
|
echo -e "${BLUE}"
|
|
13
13
|
echo "โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ"
|
|
14
|
-
echo "โ OPENCLAW DROID v1.0.
|
|
14
|
+
echo "โ OPENCLAW DROID v1.0.5 โ"
|
|
15
15
|
echo "โ The Android AI Gateway โ"
|
|
16
|
-
echo "โ
|
|
16
|
+
echo "โ โ"
|
|
17
17
|
echo "โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ"
|
|
18
18
|
echo -e "${NC}"
|
|
19
19
|
|
package/lib/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import { fileURLToPath } from 'url';
|
|
|
19
19
|
import { logger, safeExecSync } from './utils.js';
|
|
20
20
|
|
|
21
21
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
22
|
-
const VERSION = '
|
|
22
|
+
const VERSION = '1.0.5';
|
|
23
23
|
|
|
24
24
|
let activeIntervals = [];
|
|
25
25
|
let activeProcesses = [];
|
package/lib/installer.js
CHANGED
|
@@ -389,7 +389,11 @@ EOF
|
|
|
389
389
|
`;
|
|
390
390
|
|
|
391
391
|
try {
|
|
392
|
-
safeExecSync(`proot-distro login ubuntu -- bash -c '${setupScript}'`, {
|
|
392
|
+
safeExecSync(`proot-distro login ubuntu -- bash -c '${setupScript}'`, {
|
|
393
|
+
stdio: 'inherit',
|
|
394
|
+
timeout: 3600000,
|
|
395
|
+
disableSanitization: true
|
|
396
|
+
});
|
|
393
397
|
return true;
|
|
394
398
|
} catch (err) {
|
|
395
399
|
logger.error('Failed to setup Ubuntu:', err);
|
package/lib/utils.js
CHANGED
|
@@ -44,16 +44,22 @@ function sanitizeCommand(cmd) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
function safeExecSync(command, options = {}) {
|
|
47
|
-
const
|
|
48
|
-
|
|
47
|
+
const { disableSanitization, ...execOptions } = options;
|
|
48
|
+
const cmdToRun = disableSanitization ? command : sanitizeCommand(command);
|
|
49
|
+
|
|
50
|
+
if (disableSanitization) {
|
|
51
|
+
logger.debug(`Executing (unsafe): ${cmdToRun}`);
|
|
52
|
+
} else {
|
|
53
|
+
logger.debug(`Executing: ${cmdToRun}`);
|
|
54
|
+
}
|
|
49
55
|
|
|
50
56
|
const defaultOptions = {
|
|
51
57
|
stdio: 'pipe',
|
|
52
58
|
timeout: 30000,
|
|
53
|
-
...
|
|
59
|
+
...execOptions
|
|
54
60
|
};
|
|
55
61
|
|
|
56
|
-
return execSync(
|
|
62
|
+
return execSync(cmdToRun, defaultOptions);
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
function safeWriteFileSync(filePath, content, encoding = 'utf8') {
|