Skip to content

Architecture

Both install modes share all upper-layer code. The only difference is in the privilege layer, isolated behind a PrivilegeBackend interface.

Dual Backend

SystemBackendRemoteBackend
Privilege sourcePlatform signing (uid system)ADB shell (uid 2000)
Input injectionInputManager reflectionAIDL proxy to PrivilegedService
ScreenshotSurfaceControl.screenshot()ImageReader from VD Surface
VD task managementActivityTaskManager reflectionPrivilegedService proxy

The backend is selected automatically at runtime based on the detected privilege level.

Agent Loop

┌─────────────────────────────────────────────┐
│                                             │
│   Observe (screenshot + a11y tree)          │
│        ↓                                    │
│   Think (LLM)                               │
│        ↓                                    │
│   Act (tap / type / swipe / launch / ...)   │
│        ↓                                    │
│   Repeat until done or failed               │
│                                             │
└─────────────────────────────────────────────┘

The loop runs until the LLM returns a finish action (task complete) or fail action (unable to complete).