The native Android engine behind MationX
MationX Client
The app that runs on every phone in a MationX fleet. It executes compiled automations through Android's Accessibility Service, stays connected to the cloud through outages and updates, and keeps every project encrypted for the one device it was meant for.
- When
- Mar 2026 – now
- Role
- Sole engineer
- Status
- 106 releases · Google Play
- ~42klines of Kotlin
- 106releases shipped
- 13trigger types
- 71→40 MBAPK size after ABI work


How it fits together
- 1Socket.IO / FCM / HTTP
- 2Command inbox (exactly once)
- 3Decrypt project
- 4Dataflow engine
- 5Accessibility actions
Execution engine
- A dataflow interpreter for the AST with real joins: live and dead tokens, per-node in-degree tracking and parallel branches on coroutines, so loops and joins can coexist.
- Per-trigger concurrency modes (drop, restart, parallel, queue with acknowledgements), waits on time, on elements appearing or disappearing, and on shared data.
- Server calls retry with exponential backoff and know which requests are safe to replay, so an AI call or a spreadsheet append is never doubled.
- A selector engine that matches on regex, numeric ranges and screen bounds, with an AI fallback only when a normal selector misses.
Security and reliability
- Each project is encrypted for one phone: RSA-OAEP with a key held in the Android KeyStore, wrapping an AES-GCM payload. Snapshots are signed with ECDSA.
- Commands arrive over Socket.IO, an HTTP pull on reconnect or an FCM nudge; a persisted ledger guarantees each runs exactly once.
- A watchdog and package-replaced receiver bring the service, triggers and proxy back after updates or reboots.
- Separate Google Play and sideload builds: the sideload build adds silent self-updates and a device-wide SOCKS5 proxy over VpnService; the Play build stays within policy.
- Live screen mirroring and remote touch over WebRTC, for debugging a phone in a fleet from the browser.
Stack
KotlinJetpack ComposeAccessibility ServiceRoomWorkManagerSocket.IOFCMWebRTCprotobuf