Skip to content

Enterprise · Device management

MDM Platform - Android Agent

Remote monitoring and control of Android device fleets, enforcing app and security policies through Device Owner, with remote screen sharing and input.

Role
Android Developer
Organisation
PT Sentuh Digital Teknologi
Platforms
Android

The client and product name are withheld under NDA. The architecture and engineering decisions below are accurate.

Context

IT administrators needed to monitor and control fleets of Android devices from a central web dashboard. The agent is the part that runs on every device, so it only works if it is always reachable and always trustworthy:

  • It has to keep a live, two-way link to the backend, without polling gaps.
  • It has to survive OEM battery and process managers that kill background services.
  • Remote control (input, screen streaming, app management) has to work across devices with different capabilities and permission levels.

Contribution

I built the Android agent: the always-on service on each device, its command channel, remote screen and input, policy enforcement through Device Owner, and the update engine.

Technical approach

  • MQTT for the always-on channel. One auto-reconnecting MQTT connection carries commands, telemetry, heartbeat, presence, and the app inventory. It also carries WebRTC signaling, so remote desktop did not need a second control channel.
  • WebRTC for remote screen and input. The screen is captured with MediaProjection at 24 fps with adaptive bitrate. Separate data channels carry remote input, clipboard sync, and focus state.
  • Pick the best input method per device. Devices differ in what they allow, so remote input chooses the strongest available backend: native input injection, Accessibility Service gestures, a custom transparent keyboard (IME) for text fields, and a root shell only as a last resort.
  • Device Owner for real control. Installing, removing, and suspending apps, app policies, network domain blocking, and peripheral controls go through the Android Device Policy Manager in Device Owner mode.
  • Two update paths. Admins can push an update, or the device can update itself from a catalog. Download progress is reported back to the dashboard over its own MQTT topic.
  • Staying alive on aggressive OEMs. A watchdog companion service, a boot receiver, WorkManager scheduling, and Doze mitigation keep the agent running on Xiaomi MIUI, Huawei EMUI, and Oppo ColorOS.

Outcome

Administrators get real-time visibility and control over their Android fleet: remote desktop, remote input, policy enforcement, and over-the-air updates, on the low-end and OEM-locked hardware where simple background services stop without warning.