Add ADB management and live car telemetry

This commit is contained in:
2026-07-31 22:23:12 +02:00
parent 34b31c4caf
commit 0e4ce931ec
12 changed files with 911 additions and 23 deletions
+17 -8
View File
@@ -12,7 +12,8 @@ The current MVP slice includes:
- field-level unavailable states when host data cannot be collected;
- authenticated Server-Sent Events for live status updates;
- allowlisted refresh-health, offline network-diagnostics, and sanitized support-bundle jobs;
- disabled-by-default, serial-pinned ADB status with read-only head-unit identity and display collection;
- disabled-by-default, serial-pinned ADB status, APK installation, package inventory, and validated app shortcuts;
- live MG4 speed, gear, and steering-angle telemetry with a dedicated visual Car dashboard;
- a responsive 1920×720-oriented setup, login, and dashboard UI;
- an idempotent Raspberry Pi installer with systemd start-on-boot support;
- atomic, dashboard-triggered Git updates with automatic verification and rollback safety;
@@ -202,16 +203,17 @@ The authenticated **Network** page refreshes every two seconds and reports:
The observer runs read-only as a separate root service and publishes a validated snapshot to the unprivileged application. It does not capture packet payloads, passwords, cookies, HTTP bodies, or HTTPS paths. DNS metadata comes from the system journal and follows its configured retention; the dashboard snapshot is overwritten rather than appended.
### Read-only ADB setup
### ADB setup
ADB integration is optional and disabled by default. It starts the ADB server when the
companion service boots. With no configured serial it automatically selects exactly one
attached device and refuses ambiguous multi-device connections; after selection every
command is serial-pinned. Commands use fixed server-side argument lists with a timeout
and 16 KiB output limit. The ADB authorization key persists in the companion data
command is serial-pinned. Commands use fixed server-side argument lists with timeouts
and bounded output. The ADB authorization key persists in the companion data
directory, so an already-authorized car reconnects after Pi reboot or USB reattachment.
The collector currently reads connection state, selected `getprop` identity fields, and
`wm size`/`wm density` only.
The dashboard can read identity and display information, list installed packages,
install a selected APK of at most 256 MB, and launch validated package or component
targets. It never accepts shell text or arbitrary ADB arguments.
On a deployed Pi, rerun `install.sh` once so `android-tools-adb` is present and the
service account receives the standard `plugdev` device-access group. Connect the head
@@ -231,8 +233,15 @@ ADB_SERIAL=
```
If the device is disconnected, offline, unauthorized, partially readable, or ADB is
missing, the dashboard reports that state without substituting generated data. Do not
add shell strings or state-changing commands to this collector.
missing, the dashboard reports that state without substituting generated data. APK
installation and app launches are administrator actions intended for a parked vehicle.
The Car page refreshes the three verified live properties from the captured MG4 unit:
`arcsoft.avm.mCurCarSpeed`, `arcsoft.avm.mCurCarGear`, and
`arcsoft.avm.mCurCarWheelAngle`. The property dump does not expose traction-battery or
range values. Those fields remain unavailable until a read-only Android bridge binds to
SAIC's exported vehicle service; head-unit battery data is deliberately not presented as
the car battery.
### System controls and shell