Nicholas QuandtSoftware & systems engineering

Device integration

Reliable device control starts with knowing what happened.

Android, desktop hosts and a relay cooperate on device actions. Sessions, receipts and recovery rules prevent a lost response from becoming a silently repeated action.

Personal prototypeEvidence reviewed 2026-10-11
Android / JavaGoPythonAuthenticated protocols
Session-bound actions and response receipts

The problem

A command can succeed even when its response is lost. Retrying a read is often harmless; repeating a click, typed message or file mutation may not be. Reconnection therefore needs a record of identity and outcome, not just another request.

Remoraid connects an Android client with native computer hosts and a relay. Commands are authenticated and bound to an active target session. The local USB path uses authorized ADB reverse; remote relay paths have separate credentials and leases. Capabilities are explicit so a limited target does not inherit general desktop or shell access.

My contribution

Built the Android client, relay protocol, cross-platform host integration and recovery fixtures. The project integrates existing operating-system automation APIs and the upstream Hermes agent framework. Its custom contribution is the device bridge, session ownership, result journal, interface and lifecycle behavior.

Engineering decisions

Bind actions to a current session

Heartbeats maintain short leases. Session changes, disconnection or expiry invalidate stale queued commands. Desktop input checks the expected foreground window; Android coordinate input can reject a changed screen instead of sending a stale gesture.

Separate execution from delivery

Android persists encrypted response receipts separately from executing the action. Recovery can retransmit a known result without invoking the action again. An interrupted mutation whose outcome cannot be proved remains uncertain rather than being automatically retried.

Bound background work

Network reads, screenshot work and status refreshes have explicit limits. Slow read-only providers have a bounded worker allowance. The interface can show cached state and a disconnection while one refresh is blocked, then resume polling automatically.

A failure that shaped the design

The important failure fixture accepts a prompt and then loses its response. After a relay restart, recovery keeps the original submission identity and looks up that original run. Mismatched receipts and unavailable ownership checks hold the operation instead of creating a second submission.

Evidence and scope

These are reviewed recorded results unless explicitly described as current public-access verification. Application tests and physical-device checks were not rerun for this portfolio.

CheckRecorded resultConditions & limits
Phone transportA recorded 20-request live phone.info sample measured 100.24 ms p95 round-trip time, compared with 237.98 ms for an earlier polling candidate.October 7, build 99; sequential transport requests, excluding model inference. Not a general task-completion benchmark.
Physical Android controlsThe installed Fold7 candidate passed a temporary app's click, Unicode text, submit, long press, scroll, capture, tap, swipe and held-drag checks.A controlled live fixture, not arbitrary-app compatibility.
RecoveryRecorded fixtures cover lost responses, relay restart, original submission identity, process restart, failed acknowledgments and corrupted receipt state.Implementation and recorded acceptance reviewed; not rerun during portfolio preparation.

Walk through the recovery path

An illustrated explanation of the design. This is not a live application or a recording of a device trial.

  1. 01

    Authorize

    Bind the request ID and intended target to the current authenticated session.

  2. 02

    Execute

    Check foreground or screen state, then perform the action once.

  3. 03

    Persist

    Store the response receipt. Delivery may still fail after execution.

  4. 04

    Recover

    Return the recorded result, or report uncertainty when the original outcome cannot be established.

Remaining limits

  • An unavailable result cannot prove whether a mutation happened. The system preserves that uncertainty.
  • Provider/model time, target-app responsiveness and OS permissions still affect completion. Physical Mac/Linux reconnection and desktop authorization were not repeated in the cited acceptance.

Evidence references

These filenames identify the source and acceptance records used to prepare this write-up. Private application files are not published as part of the portfolio.

  • protocol.md — leases, session-bound actions and signed-update rollback
  • PERFORMANCE.md — October 7 build-99 measurements and limitations
  • android/.../ResultJournal.java — persistent response receipts
  • tools/test_performance_recovery.py — lost-response and restart fixtures
  • tools/test_phone_delivery.py — receipt and acknowledgment persistence

Revision: cb3858b20d5ff2aab898e11a24b58f5de01d4c13

Private development prototype. This write-up describes the cited acceptance snapshot; later local changes are not presented as part of those measured results.