Run on Android (Termux)
You can run the standalone linux-arm64 deskfleet-daemon inside Termux (proot-distro) to turn an Android phone or tablet into a DeskFleet Machine—hosting Agents, PTY terminals, file transfers, and optional native screen streaming and remote touch/keyboard control.
1. Prepare Termux
- Install Termux (and optionally Termux:Boot) from F-Droid or GitHub Releases.
- Grant Termux Unrestricted battery usage in Android Settings, and on Android 14+ enable Developer options → Disable child process restrictions so background Agent processes are not terminated.
- Acquire a wake lock and set up an
aarch64Linux container:
sh
termux-wake-lock
pkg update && pkg install proot-distro
proot-distro install ubuntu
proot-distro login ubuntu2. Install and enroll deskfleet-daemon
Inside the Ubuntu container:
- Install TLS root certificates, then download
deskfleet-linux-arm64.tar.gzfrom GitHub Releases and extract it:shapt update && apt install -y ca-certificates tar -xzf deskfleet-linux-arm64.tar.gz - Start the daemon and generate an enrollment bundle for your backend and Team:sh
./deskfleet-daemon & ./deskfleet-daemon prepare-enrollment --server-url https://your-backend.example --team-id <TEAM_ID> - In the DeskFleet desktop, Web, or mobile client, open Add machine → Another machine, paste the output, and save the issued credential JSON.
- Import the credential on the device:sh
./deskfleet-daemon enroll --server-url https://your-backend.example < machine-credentials.json
3. Enable screen streaming and control (optional)
To view and control the native Android screen from DeskFleet, point DESKFLEET_ANDROID_SCRCPY_SERVER to an upstream scrcpy-server JAR (v2.4+ or v3.x) and provide a UID 2000 (shell) bridge:
- Wireless Debugging (
adb): Pair Wireless Debugging on the device and connect over loopback (adb connect 127.0.0.1:<port>). - Shizuku or Root (
DESKFLEET_ANDROID_SHELL): SetDESKFLEET_ANDROID_SHELL="rish -c"(Shizuku) orDESKFLEET_ANDROID_SHELL="su -c"(root) so streaming stays connected on mobile data without Wi-Fi ADB.
sh
export DESKFLEET_ANDROID_SCRCPY_SERVER=/root/scrcpy-server-v3.1
# Optional: override shell bridge, ADB serial, or protocol version
# export DESKFLEET_ANDROID_SHELL="rish -c"
./deskfleet-daemon4. Run as a background service
To avoid starting the daemon manually after opening Termux or rebooting:
- In Termux (outside
proot-distro), installrunitsupervision:shpkg install termux-services mkdir -p "$PREFIX/var/service/deskfleet" cat > "$PREFIX/var/service/deskfleet/run" <<'EOF' #!/data/data/com.termux/files/usr/bin/sh exec proot-distro login ubuntu -- /root/deskfleet-daemon EOF chmod +x "$PREFIX/var/service/deskfleet/run" sv-enable deskfleet - With Termux:Boot installed, create
~/.termux/boot/deskfleet.sh(chmod +x) containingtermux-wake-lockso Termux starts its services automatically after the device unlocks following a reboot.