openclaw-droid 3.0.5 → 3.10.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.

Files changed (4) hide show
  1. package/README.md +18 -5
  2. package/hijack.js +14 -1
  3. package/install.sh +52 -10
  4. package/package.json +34 -34
package/README.md CHANGED
@@ -74,17 +74,30 @@ apt install -y nodejs
74
74
  npm install -g openclaw
75
75
  ```
76
76
 
77
- **Step 7: Create network interface patch**
77
+ **Step 7: Create network interface patch (Bionic Bypass)**
78
78
  ```bash
79
- cat << 'EOF' > /root/hijack.js
79
+ cat << 'JS' > /root/patch.js
80
80
  const os = require('os');
81
- os.networkInterfaces = () => ({});
82
- EOF
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
+ JS
83
96
  ```
84
97
 
85
98
  **Step 8: Configure environment**
86
99
  ```bash
87
- echo 'export NODE_OPTIONS="-r /root/hijack.js"' >> ~/.bashrc
100
+ echo 'export NODE_OPTIONS="--require /root/patch.js"' >> ~/.bashrc
88
101
  source ~/.bashrc
89
102
  ```
90
103
 
package/hijack.js CHANGED
@@ -1,2 +1,15 @@
1
1
  const os = require('os');
2
- os.networkInterfaces = () => ({});
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
+ };
package/install.sh CHANGED
@@ -39,22 +39,64 @@ else
39
39
  fi
40
40
 
41
41
  echo -e "\n${BLUE}[3/6]${NC} Checking Ubuntu container..."
42
- UBUNTU_INSTALLED="false"
43
- if proot-distro list 2>/dev/null | grep -qE '(^|[[:space:]])ubuntu([[:space:]]|$)'; then
44
- UBUNTU_INSTALLED="true"
45
- fi
46
42
 
47
- if [ "$UBUNTU_INSTALLED" = "true" ]; then
43
+ # Function to check if ubuntu is installed
44
+ check_ubuntu_installed() {
45
+ # Check if directory exists (most reliable method for proot-distro)
46
+ if [ -d "$PREFIX/var/lib/proot-distro/installed-rootfs/ubuntu" ]; then
47
+ return 0
48
+ fi
49
+ # Fallback to list command
50
+ if proot-distro list 2>/dev/null | grep -q "ubuntu.*(installed)"; then
51
+ return 0
52
+ fi
53
+ # Final check: can we actually login?
54
+ if proot-distro login ubuntu -- true 2>/dev/null; then
55
+ return 0
56
+ fi
57
+ return 1
58
+ }
59
+
60
+ if check_ubuntu_installed; then
61
+ echo -e " ${GREEN}✓${NC} Ubuntu is already installed."
62
+
63
+ # Try to verify it's working
48
64
  if proot-distro login ubuntu -- true 2>/dev/null; then
49
- echo -e " ${GREEN}✓${NC} Ubuntu is already installed and working. Skipping installation."
65
+ echo -e " ${GREEN}✓${NC} Ubuntu container is working correctly."
50
66
  else
51
- echo -e " ${YELLOW}Ubuntu is already installed but login failed. Continuing setup...${NC}"
67
+ echo -e " ${YELLOW}Warning: Ubuntu is installed but might be damaged.${NC}"
68
+ echo -e " ${YELLOW}Attempting to reinstall/repair...${NC}"
69
+
70
+ # Backup if exists (optional, but safe)
71
+ if [ -d "$PREFIX/var/lib/proot-distro/installed-rootfs/ubuntu" ]; then
72
+ mv "$PREFIX/var/lib/proot-distro/installed-rootfs/ubuntu" "$PREFIX/var/lib/proot-distro/installed-rootfs/ubuntu.bak.$(date +%s)" || true
73
+ fi
74
+
75
+ # Force reinstall
76
+ if ! proot-distro install ubuntu; then
77
+ echo -e "${RED}Error:${NC} Failed to reinstall Ubuntu container."
78
+ exit 1
79
+ fi
52
80
  fi
53
81
  else
54
82
  echo -e " ${YELLOW}Installing Ubuntu...${NC}"
55
- if ! proot-distro install ubuntu; then
56
- echo -e "${RED}Error:${NC} Failed to install Ubuntu container."
57
- exit 1
83
+ # Capture output to temporary file to avoid confusing user with "already installed" errors if it recovers
84
+ INSTALL_LOG=$(mktemp)
85
+ if ! proot-distro install ubuntu > "$INSTALL_LOG" 2>&1; then
86
+ # If install fails, check if it's because it's already installed/working
87
+ if proot-distro login ubuntu -- true 2>/dev/null; then
88
+ echo -e " ${GREEN}✓${NC} Ubuntu was already installed (verified)."
89
+ rm -f "$INSTALL_LOG"
90
+ else
91
+ echo -e "${RED}Error:${NC} Failed to install Ubuntu container."
92
+ echo -e "Installation Output:"
93
+ cat "$INSTALL_LOG"
94
+ rm -f "$INSTALL_LOG"
95
+ exit 1
96
+ fi
97
+ else
98
+ # Install successful (or silent success)
99
+ rm -f "$INSTALL_LOG"
58
100
  fi
59
101
  fi
60
102
 
package/package.json CHANGED
@@ -1,34 +1,34 @@
1
- {
2
- "name": "openclaw-droid",
3
- "version": "3.0.5",
4
- "description": "OpenClaw Droid - Android AI Gateway Installer with proot-distro Ubuntu",
5
- "files": [
6
- "install.sh",
7
- "hijack.js",
8
- "README.md",
9
- "LICENSE"
10
- ],
11
- "keywords": [
12
- "openclaw",
13
- "termux",
14
- "android",
15
- "ai",
16
- "gateway",
17
- "openclaw-droid",
18
- "nosytlabs",
19
- "ai-gateway",
20
- "android-ai",
21
- "termux-ai",
22
- "proot-distro"
23
- ],
24
- "author": "NosytLabs",
25
- "license": "MIT",
26
- "repository": {
27
- "type": "git",
28
- "url": "git+https://github.com/NosytLabs/openclaw-droid.git"
29
- },
30
- "homepage": "https://github.com/NosytLabs/openclaw-droid#readme",
31
- "bugs": {
32
- "url": "https://github.com/NosytLabs/openclaw-droid/issues"
33
- }
34
- }
1
+ {
2
+ "name": "openclaw-droid",
3
+ "version": "3.10.0",
4
+ "description": "OpenClaw Droid - Android AI Gateway Installer with proot-distro Ubuntu",
5
+ "files": [
6
+ "install.sh",
7
+ "hijack.js",
8
+ "README.md",
9
+ "LICENSE"
10
+ ],
11
+ "keywords": [
12
+ "openclaw",
13
+ "termux",
14
+ "android",
15
+ "ai",
16
+ "gateway",
17
+ "openclaw-droid",
18
+ "nosytlabs",
19
+ "ai-gateway",
20
+ "android-ai",
21
+ "termux-ai",
22
+ "proot-distro"
23
+ ],
24
+ "author": "NosytLabs",
25
+ "license": "MIT",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/NosytLabs/openclaw-droid.git"
29
+ },
30
+ "homepage": "https://github.com/NosytLabs/openclaw-droid#readme",
31
+ "bugs": {
32
+ "url": "https://github.com/NosytLabs/openclaw-droid/issues"
33
+ }
34
+ }