ISS
← Field Notes
AI & Agents screenshot
June 20, 2026 · AI & Agents · 1 min read

Driving a Real Browser With Claude on an Android Phone

Re-implementing Chrome's Native Messaging wire protocol over WebSocket so an AI agent can drive a real browser on Android, with an ELF loader running Bun on bionic.

Getting an AI agent to drive a real browser on a phone runs straight into a wall: Chrome's Native Messaging API, the mechanism a desktop extension uses to talk to a local process, does not exist on Android. termux.tools is what I built to get past that wall. You can find it at termux.party.

Re-implementing the missing API

Native Messaging is how a browser extension hands work to native code on the machine. On desktop it is a documented pipe. On Android there is no such pipe to use, so the option was to fake the endpoint or to rebuild the protocol itself. I rebuilt it. termux.tools re-implements the Native Messaging wire protocol over WebSocket, which gives the extension side something to talk to that behaves like the real thing. With that channel in place, Claude can actually drive a real browser running on the phone, not a headless stub and not a remote desktop pretending to be mobile.

The layer underneath

Making that channel usable meant getting a proper runtime onto Android in the first place, and Android's libc is bionic, not glibc, so ordinary Linux binaries do not just run. This is where the binary surgery comes in. Underneath the WebSocket bridge sits a hand-written ELF loader that runs an unmodified Bun on bionic, plus a surgically de-telemetered build so the runtime is not chattering home. Loading an unmodified binary means I am not maintaining a forked Bun that drifts from upstream. I load the real thing and make the phone accept it.

The result is a full agent-driven browser stack living on a device that was never meant to host one. It is the kind of project where the interesting work is almost entirely below the API you were trying to call.

Have something that needs building, or stabilizing?

These notes are the work log. The paid work runs through Moonshine Labs, my product and engineering studio. Tell us what you're building, or grab a call.

Work with us →
the studio: moonshinelabs.io