Cord

github.com →
A Mac menu bar app that shares an Android phone’s mobile data over USB when macOS can’t use the phone’s own tethering.

I wanted to use my phone’s mobile data on my Mac over a USB cable. Android has a USB tethering switch for this, but on my phone it uses RNDIS, a Microsoft protocol macOS does not support. Some Android builds can switch to NCM, which macOS does support. Mine stored the setting and kept using RNDIS.

Paid tools such as EasyTether work around this with an app on the phone and a driver on the Mac. Cord does the same job with open-source parts and nothing installed from a store.

Getting traffic onto the phone

With USB debugging on, adb can run programs on the phone as its shell user, and that user is allowed to open network connections. Cord copies sing-box into the phone’s temporary directory and runs it there as a small SOCKS proxy. adb forward makes that proxy reachable from the Mac through the cable.

That gives one program on the Mac a way out through the phone. To route the whole Mac, a second copy of sing-box creates a virtual network interface, or TUN. It sends every connection through the proxy, answers DNS through the phone, and carries UDP inside TCP.

Staying online with Wi-Fi off

The first version worked with Wi-Fi on and failed with it off. Requests by IP address still went through the phone, but name lookups did not. With no active network service, macOS had no DNS server to ask, so lookups failed before they reached the tunnel.

Cord now registers the TUN with macOS as a network service with its own DNS server, which is how VPN clients appear to the system. After that, macOS treats the cable as the primary connection.

Plug in and it works

A small Go daemon runs as root under launchd, since creating the interface needs administrator rights. It runs adb as my user, so the phone’s existing authorisation still applies. When the phone appears, it starts the proxy, connects the forward, brings up the tunnel, and registers it. A health check sends a SOCKS greeting every few seconds. On unplug or failure, the daemon removes everything in reverse order, and the Mac returns to Wi-Fi.

The binaries are copied to a root-owned directory, so nothing in my home folder runs as root.

The menu bar

A SwiftUI menu bar app shows upload and download rates in a fixed-width column, so the menu bar does not shift as the numbers change. Its panel shows a short traffic graph, data used, open connections, and pause and reconnect controls. When the phone is not ready, it shows what to check: USB debugging, file-transfer mode, or authorisation.

Letting an agent use the phone

Once the cable was in, the phone was within reach of the Mac in a new way. I started asking a coding agent to do small things on it: check which Gemini plan my account had, open an app, find a setting. It could, through adb commands and screenshots, but it worked like someone operating a phone with their eyes half-closed.

It guessed tap positions from images. A swipe meant to open the lock screen found no lock screen and glide-typed two letters into a chat box instead. A Back press meant to close a menu closed the whole app, and the next tap landed in whatever was underneath. When the phone had gone to sleep, the first screenshot came back black.

Each mistake pointed to something the agent was missing. It needed to read the screen as a list of named buttons rather than a picture, so it could tap “About device” instead of a pair of coordinates. It needed to see what each action had done before deciding on the next. It needed to wake the phone first, wait while an app loaded, and scroll until something came into view.

That became cordd mcp, a Model Context Protocol server that Claude Code and Codex can use. It reads Android’s own description of the screen, and every tap or keypress returns the screen as it looks afterwards. With it, asking an agent to open Settings and read the Android version took three tool calls.

The phone holds my accounts, so I kept the server narrow. It runs as my user rather than as root and offers no general shell. Password fields are masked before anything leaves the phone. It tells agents to leave passwords, PINs, and payments to me and to check with me before sending or deleting anything, and both clients ask before each tool call.

Limits

ping does not work through the tunnel, and UDP is slower inside TCP. Speed depends on the mobile signal more than on USB. Agents can type only ASCII text through adb. I have only used Cord with a Realme phone on Android 13 and an Apple Silicon Mac.

Technical highlights

  • No phone app — A proxy runs from adb in the phone’s temporary directory; no root and nothing to install from a store
  • Whole-Mac routing — A TUN interface registered as a macOS network service, so the Mac stays online with Wi-Fi off
  • Plug in and it works — A launchd daemon notices the phone, connects, health-checks, and cleans up on unplug
  • Agent control — Coding agents read the phone’s screen as named buttons and act on it over the same cable