How mohamed-kilany/watchdog works
watchdog remotely operates an Android Camera2 device and delivers live frames and recordings to a host for browser viewing, capture, and analysis. The main workflow is host provisioning over ADB, camera capture and streaming from the app, then host-side presentation and media analysis. The README documents the product-level connections; sampled source and the SOURCE INDEX support selected internal links. Several host capabilities are named in the README but their implementations were not sampled, so those nodes use exact crate directories and their internal wiring is omitted.
Main entry points: CaptureService.kt Capture service · main.rs Host CLI · app.ts Web app shell · FramePipeline.kt Frame pipeline
Components 20
Host runtime
- Host CLI
crates/host/src/main.rs - Device provisioning
crates/device/src/provision.rs - Native ADB
crates/adb/src/manager.rs - Device session
crates/device/src/session.rs - Web UI server
crates/ui-server/src/lib.rs
Android device
- Capture service
android/app/src/main/kotlin/app/watchdog/remote/CaptureService.kt - Camera controls
android/app/src/main/kotlin/app/watchdog/remote/camera/Camera2Controller.kt - Frame pipeline
android/app/src/main/kotlin/app/watchdog/remote/pipeline/FramePipeline.kt - Wire protocol
android/app/src/main/kotlin/app/watchdog/remote/protocol/JsonMessages.kt - Device logging
android/app/src/main/kotlin/app/watchdog/remote/log/DeviceLog.kt
Web interface
- Web app shell
ui/src/app.ts - Camera controls UI
ui/src/components/wd-control-panel.ts - Control presets
ui/src/presets.ts
Analysis and services
- Integration API
crates/api - MCP server
crates/mcp - Media library
crates/media - Media analyzers
crates/analyzers - Scheduler
crates/scheduler
Other components
- Operator
- Browser user
Connections 21
- Operator → Host CLI: runs commands
README.md - Host CLI → Device provisioning: provisions device
- Device provisioning → Native ADB: installs and forwards
README.md - Native ADB → Device session: connects device
- Device session → Capture service: launches app
README.md - Capture service → Camera controls: controls camera
android/app/src/main/kotlin/app/watchdog/remote/CaptureService.kt - Capture service → Frame pipeline: starts pipeline
android/app/src/main/kotlin/app/watchdog/remote/CaptureService.kt - Camera controls → Frame pipeline: produces frames
- Capture service → Wire protocol: parses commands
android/app/src/main/kotlin/app/watchdog/remote/CaptureService.kt - Capture service → Device logging: streams logs
android/app/src/main/kotlin/app/watchdog/remote/log/DeviceLog.kt - Frame pipeline → Web UI server: streams live frames
README.md - Capture service → Media library: pushes recordings
README.md - Host CLI → Web UI server: serves web UI
README.md - Host CLI → Integration API: serves API
README.md - Host CLI → MCP server: serves MCP
README.md - Browser user → Web app shell: uses interface
README.md - Web app shell → Web UI server: probes host
ui/src/app.ts - Web app shell → Camera controls UI: updates panels
ui/src/app.ts - Web app shell → Control presets: loads presets
ui/src/app.ts - Media library → Media analyzers: provides media
- Scheduler → Media analyzers: schedules analysis