No SDK, no APK, no Android Studio. A plain shell script running inside Termux reports the phone's basic health to the same dashboard the Windows/Linux agents use.
Status: written and syntax-checked, but not run on a real Android device from the session that built it — no phone/emulator was available. Same honesty bar as the rest of this project's deployment guides: treat the first real run as the first real test.
Install both from F-Droid (recommended — the Play Store build of Termux is outdated and unmaintained):
- Termux
- Termux:API (optional, only needed for battery readings — everything else works without it)
Open Termux and run:
pkg update && pkg install curl termux-apiEasiest path: open this file's raw URL from the GitHub release/repo in the phone's browser and
save it, or curl it directly from Termux once you know where it's hosted, e.g.:
curl -o opscc-agent.sh https://raw.githubusercontent.com/unupunct/OpsCommandCenter/main/src/OpsCommandCenter.Agent.Android/opscc-agent.sh
chmod +x opscc-agent.shFirst run needs the server address (saved automatically for next time):
./opscc-agent.sh --server=http://<server-ip>:5252 --interval=30Optional --name=my-phone sets a friendly device name; otherwise it auto-generates one from
the device model + a stable per-device ID (needed because the dashboard requires unique
computer names, and two identical phone models would otherwise collide).
Leave this running in the Termux session — it loops forever, posting a heartbeat every
--interval seconds, until you press Ctrl+C.
Android aggressively kills background apps to save battery. Two things help:
-
termux-wake-lock: the script calls this automatically at startup if Termux:API is installed — prevents Android from suspending Termux while a wake lock is held. -
Termux:Boot (separate app, F-Droid link): install it, then create
~/.termux/boot/opscc-agentcontaining:#!/data/data/com.termux/files/usr/bin/bash termux-wake-lock cd ~ ./opscc-agent.sh
(
chmod +xit too.) This starts the agent automatically when the phone boots, without needing to manually open Termux each time.
Device model, Android version/build, CPU (best-effort — Android doesn't expose a clean single
CPU model string to unprivileged apps, so this falls back to the CPU ABI like arm64-v8a), RAM,
uptime, battery %, and full-disk encryption state (ro.crypto.state — a genuine analog of
BitLocker, both being OS-level disk encryption). Not reported (left as "n/a" on the
dashboard, never guessed): disk health/wear, disk temperature, antivirus status — none of these
have a meaningful equivalent reachable from an unprivileged Termux shell.