Skip to content

Feature request: decouple the host running Artemis from the machine the phone is plugged into (remote USB / browser-side device bridge) #102

Open

Description

@jsapede

Context

I'd like to run Artemis on a server while the phone stays connected by USB to a different machine — the laptop I actually sit in front of, which reaches the Artemis console over HTTPS from a network where I can install nothing and open no inbound port.

Today that split is not possible without building network plumbing. From reading the code, the only networked device mode is the remote ADB server endpoint:

  • AdbEndpoint (artemis/runtime/adb_endpoint.py) with mode = local | remote, exposed as ADB_HOST / ADB_PORT and applied to child processes as ADB_SERVER_SOCKET.
  • Console routes to probe / persist a remote endpoint, restricted to loopback unless ARTEMIS_ALLOW_REMOTE_ADB_CONFIGURATION=true.
  • The artemis-client README documents the "device host" pattern and recommends an SSH tunnel, noting the admin API has no authentication.

So separating the agent host from the device host currently requires an inbound, reachable adb endpoint: same LAN, VPN, ssh -R, or an ingress TCP route. When the machine holding the phone cannot accept installs or inbound connections, there is no supported path at all — and exposing port 5037 publicly is not an option, since the adb protocol is neither authenticated nor encrypted.

What I'd like to see

Either of these shapes would decouple the host running Artemis from the machine the phone is plugged into:

A. Browser-side bridge (zero install on the device machine). The console page claims the phone's ADB interface with WebUSB and forwards the adb traffic to the backend over the already-authenticated HTTPS/WebSocket session. The device host then needs no inbound path and no software, and the phone's USB traffic never leaves an authenticated channel. Prior art shows this is feasible: Tango / ya-webadb implements adb — including screen mirroring — over WebUSB in Chromium. Caveats: Chromium desktop only, secure context, per-device user gesture, and WAN latency on screenshot-heavy loops.

B. Outbound-only device satellite. A small artemis-client-side mode (or a dedicated daemon) that runs on the machine holding the USB device: it drives a local adb server and dials out to the Artemis host over an authenticated WebSocket, publishing the device. Because it is outbound-only it works behind NAT — no VPN, no SSH tunnel, no public port, and no unauthenticated adb socket on any network.

Question

Is either shape in scope? If yes, which one would you prefer — the zero-install browser bridge, or the outbound satellite? I'm happy to prototype whichever you point at, but I'd rather ask first than build the wrong half.

(I searched issues, PRs and discussions for webusb, remote usb, wireless, wsl and found nothing on this, so I'm opening a new thread rather than adding to an existing one.)

Activity

  1. Ashfaqbs commented on Sep 18, 2026

    @Ashfaqbs

    I'd vote for (B), the outbound-only satellite, for a few reasons grounded in what's already here:

    • AdbEndpoint (artemis/runtime/adb_endpoint.py) already models "an ADB server lives somewhere reachable over TCP" as its core abstraction (host/port, local()/from_mapping(), restricted to loopback unless ARTEMIS_ALLOW_REMOTE_ADB_CONFIGURATION=true). A satellite daemon slots into that same shape — it just becomes another way to populate an AdbEndpoint the runtime already knows how to consume, rather than adding a second device-transport code path alongside it.
    • WebUSB is Chromium-desktop-only and requires a live tab with a user gesture per device claim — that's a real constraint on a CI box or a headless admin console session, and it reintroduces exactly the "needs a browser open" dependency the outbound satellite avoids.
    • Outbound-only also matches the security posture the console routes already enforce (remote ADB is loopback-restricted by default, opt-in via an explicit env flag) — a satellite that dials out over an authenticated WebSocket never needs an inbound port opened on either side, so there's no new attack surface to gate behind a flag.
    • adb itself is unauthenticated/unencrypted on the wire (called out in the artemis-client README's SSH-tunnel recommendation). A satellite terminates the local adb connection on the same machine as the phone and only puts the already-authenticated WebSocket on the network, so the raw adb protocol never leaves localhost either side — WebUSB doesn't buy that, since the browser tab and the backend are still separate trust boundaries.

    Happy to prototype the satellite daemon (Python, dialing out via websockets, publishing an AdbEndpoint-compatible target) if that's the direction you'd take — wanted to check before building given the two shapes really are different amounts of work.

  2. jsapede commented on Sep 18, 2026

    @jsapede
    Author

    I'd vote A, because doesn't need to install app / daemon on locjed enterprise laptop

  3. Ashfaqbs commented on Sep 18, 2026

    @Ashfaqbs

    That's a fair point I hadn't weighed properly — "locked enterprise laptop, can install nothing" is exactly the scenario in the original request, and I was answering it with a design that needs a daemon installed there. That's a real strike against B for that specific case.

    Where I'd still push back a little on A alone: it trades the install requirement for a live Chromium tab with a user gesture per device claim, so it doesn't work headless (CI, an unattended admin console session) and adds WAN-latency-sensitive screenshot traffic through the browser tab rather than straight to the backend. Those aren't hypothetical for this project specifically — Artemis already runs unattended device-driven test suites.

    So maybe this isn't actually an either/or: A covers the "can't install anything, human is watching a browser tab" case, B covers the "can install a small daemon, want headless/CI-friendly" case, and they're not mutually exclusive to ship. Curious whether the maintainers see room for both, or would rather pick one to keep the surface area small for a first version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions