Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
9963a7c
feat: add USB cable deployer (deploy_usb.py) + cert/firewall fixes
simeononsecurity Jun 30, 2026
f6728bd
fix: handle pyusb NoBackendError when libusb not installed
simeononsecurity Jun 30, 2026
a51f6ea
Update requirements.txt
simeononsecurity Jun 30, 2026
8e6b22b
docs: document pyusb/libusb/adb deps for USB deployer
simeononsecurity Jun 30, 2026
780a2e9
feat: add AT-interface health checks, settle pause, and resilient fal…
simeononsecurity Jun 30, 2026
b6fc196
feat: add SUID rootshell binary + fix orbic_app fd 0 crash
simeononsecurity Jun 30, 2026
756e6d1
feat: rootshell-based install flow + GitHub Actions + updated docs
simeononsecurity Jun 30, 2026
81f49f9
deploy_usb: auto-generate fresh SSL certs each deploy, kill ADB serve…
simeononsecurity Jul 5, 2026
f3796fc
deploy_usb: fix verification to use ADB port-forward + host curl
simeononsecurity Jul 5, 2026
9a31c5e
deploy_usb: poll port 8443 for 30s, use grep for busybox compat, grab…
simeononsecurity Jul 5, 2026
8639b66
deploy_usb: fix diagnostic stderr capture (busybox has no timeout cmd)
simeononsecurity Jul 5, 2026
029f36c
deploy_usb: fix cert permissions 644 (was 600 — orbic_app couldn't re…
simeononsecurity Jul 5, 2026
16b4165
pre-reboot verification: start orbic_app before reboot, verify TLS, t…
simeononsecurity Jul 6, 2026
746d2e3
fix: post-reboot verification only — SELinux blocks socket creation f…
simeononsecurity Jul 6, 2026
2c1906b
fix: post-reboot only verification, rootshell reboot cmd, SELinux soc…
simeononsecurity Jul 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/build-rootshell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build rootshell

on:
release:
types: [published]
workflow_dispatch:

jobs:
build:
name: Cross-compile rootshell (ARM)
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install ARM cross-compiler
run: |
sudo apt-get update
sudo apt-get install -y binutils-arm-linux-gnueabi

- name: Build rootshell from assembly
working-directory: orbic_fw_c
run: |
# Assemble — target ARMv7 (Cortex-A8), EABI5
arm-linux-gnueabi-as -meabi=5 -o rootshell.o rootshell.S
# Link — static, no libc
arm-linux-gnueabi-ld -o rootshell rootshell.o
# Strip — minimize binary size
arm-linux-gnueabi-strip rootshell
# Verify
file rootshell
ls -la rootshell

- name: Verify ELF properties
working-directory: orbic_fw_c
run: |
echo "=== File type ==="
file rootshell
echo ""
echo "=== ELF headers ==="
arm-linux-gnueabi-readelf -h rootshell
echo ""
echo "=== Size ==="
ls -la rootshell
echo ""
# Ensure it's a static ARM ELF
file rootshell | grep -q "ARM" || { echo "ERROR: not an ARM binary"; exit 1; }
file rootshell | grep -q "statically linked" || { echo "ERROR: not statically linked"; exit 1; }
echo "✓ rootshell is a valid static ARM ELF"

- name: Upload rootshell artifact
uses: actions/upload-artifact@v4
with:
name: rootshell-arm
path: orbic_fw_c/rootshell

- name: Attach rootshell to release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: orbic_fw_c/rootshell
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,17 @@ A terminal-styled custom firmware for the **Orbic RCL400** hotspot with hacking
- Orbic RCL400 hotspot
- **Windows:** ARM cross-compiler (included in `gcc_win/` folder)
- **macOS:** Custom ARM toolchain (included in `gcc_mac/` folder, built with crosstool-ng targeting kernel 3.2 for compatibility)
- Python 3 with `requests` and `cryptography` modules
- Python 3 with `requests` and `cryptography` modules (`pip install -r requirements.txt`)
- **USB cable deploy (`deploy_usb.py`) — optional:**
- `pyusb` Python package (`pip install pyusb`) + native **libusb** backend
- macOS: `brew install libusb`
- Linux: `sudo apt install libusb-1.0-0`
- `adb` (Android Debug Bridge) CLI on your PATH
- macOS: `brew install android-platform-tools`
- Linux: `sudo apt install adb`
- Windows: [platform-tools](https://developer.android.com/tools/releases/platform-tools)
- If `pyusb`/`libusb` are missing, `deploy_usb.py` automatically falls back to ADB-only mode.


## Building

Expand Down Expand Up @@ -135,6 +145,32 @@ This uploads and installs:

The firmware auto-starts on reboot (port 8443).

### Option C: USB Cable Deploy (no WiFi / no password)

Deploy entirely over a USB cable — no WiFi connection and no admin password
required. Mirrors Rayhunter's `orbic-usb` installer method.

```bash
# Install dependencies (see Requirements above)
pip install -r requirements.txt # includes pyusb
brew install libusb # macOS native backend (Linux: apt install libusb-1.0-0)
brew install android-platform-tools # adb CLI

# Generate certs (first time only) and deploy
cd orbic_fw_c && python3 gen_pki.py && cd ..
python3 deploy_usb.py

# Verify an existing install without redeploying
python3 deploy_usb.py --verify-only
```

`deploy_usb.py` switches the device from RNDIS to ADB mode over USB, pushes the
firmware/certs, configures the firewall, installs boot persistence, and starts
`orbic_app`. If `pyusb`/`libusb` are unavailable it falls back to ADB-only mode
(requires the device to already be in ADB mode). See
[`docs/deploy_usb_feature.md`](docs/deploy_usb_feature.md) for full details.


## Accessing

Open your browser to: **`https://192.168.1.1:8443/`**
Expand Down
9 changes: 6 additions & 3 deletions dagshell_boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ echo "=== BOOT $(date) ===" > $BOOTLOG
busybox nc -ll -p 24 -e /bin/sh &
echo "[OK] Shell on port 24" >> $BOOTLOG

# 2. Open HTTPS port (Port 8443)
# 2. Open HTTP and HTTPS ports (8080 and 8443)
iptables -I INPUT -p tcp --dport 8443 -j ACCEPT
echo "[OK] Port 8443 open" >> $BOOTLOG
iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
echo "[OK] Ports 8080 and 8443 open" >> $BOOTLOG

# 3. Configure DNS forwarding for dnsmasq
# CRITICAL: dnsmasq uses --dhcp-option-force=6,192.168.1.1 which makes
Expand Down Expand Up @@ -71,8 +72,10 @@ if [ -f "$CONFIG_FILE" ]; then
fi

# 7. Start DagShell
# NOTE: </dev/null keeps fd 0 open. Without it, socket() can return fd 0,
# which triggers the server_fd==0 exit check bug in the binary.
sleep 5
/data/orbic_app &
/data/orbic_app </dev/null &
echo "" >> $BOOTLOG
echo "[OK] orbic_app started PID=$!" >> $BOOTLOG
echo "=== BOOT COMPLETE ===" >> $BOOTLOG
Loading