# Device Hub: leased iOS simulators and Android emulators

> Give each agent its own locked iOS simulator or Android emulator, drive and mark up live mirrors in Stage, and borrow devices from a paired Mac or Linux computer.

- **Category:** Setup and safety
- **Updated:** 2026-12-01
- **Reading time:** 9 min
- **Canonical page:** https://cmdbrief.com/guides/device-hub-simulators

## Quick verdict

- Device Hub gives each agent an exclusive lock on its own iOS simulator or Android emulator — up to 3 devices per agent and 4 running concurrently by default — so parallel agents never clobber one shared `booted` device.
- Stage shows a live mirror beside the lead (targeting 60 fps with native iOS capture and about 30 fps over Android emulator gRPC), with **Take over** / **Give back** and frame markup pins and arrows sent straight to the lead.
- Use the **Devices** menu beside **Builds and tests** to run a workspace’s iOS simulators on another paired Mac or its Android emulators on a paired Mac or Linux computer.

## What you get

- **Your computer:** Lead and crew agents hold exclusive leases; Stage device panel mirrors the screen live; Take over, Give back, and Mark up pins
- **Local or paired Mac / Linux lender:** Boots iOS simulators (Mac) or Android emulators (Mac/Linux); Enforces locks via `xcrun`, `xcodebuild`, and `adb` shims; Holds off idle sleep while lending a device
- **Your computer → Local or paired Mac / Linux lender:** acquire, builds, and taps
- **Local or paired Mac / Linux lender → Your computer:** live mirror frames and test output
- **Connection:** Runs locally, or over the encrypted direct line (same network or Tailscale)

When several coding agents build and run mobile tests in parallel, pointing every shell at `booted` causes races, overwritten app installs, and broken UI assertions. **Device Hub** (on by default under Settings › Coordination › Device Hub, alongside [workspace coordination](https://cmdbrief.com/guides/worktrees-heavy-jobs-and-dev-servers)) turns simulators and emulators into exclusive leases owned by each agent’s pane.

- An agent requests a device with `cmdbrief_device_acquire` and returns it with `cmdbrief_device_release` (or inspects active holds with `cmdbrief_devices_list`). No other agent can lease or drive a held device until it is released or its pane closes.
- Each agent may hold up to **3 devices**, capped by **Simulators at once** (**4** by default across the computer, since each booted iOS simulator uses roughly 1–2 GB and each Android emulator roughly 2 GB).
- A lease belongs to the pane, not a single chat session: it survives **Clear**, **Clear + recent**, handoffs, and app restarts while the pane remains open or on the resume list.
- Android emulators are created from CmdBrief’s built-in Pixel profiles without requiring `avdmanager` or a Java runtime, and start headless without cluttering your desktop.
- Physical devices are not supported by Device Hub; USB phones or unleased emulators remain untouched by the shims.

## iOS simulators vs Android emulators

| Capability | iOS simulators | Android emulators |
| --- | --- | --- |
| Where they run | macOS only (Apple silicon, macOS 26+) | macOS and Linux x86_64 (Coming soon on Windows) |
| Built-in profiles | Xcode device types (defaults to newest plain iPhone) | Pixel 7, Pixel 8 (default), Pixel 9, 9 Pro, 9 Pro XL, Pixel Tablet, Medium Phone, Small Phone |
| Pool naming | `CmdBrief · <agent> · <model>` while leased (`CmdBrief · <model>` idle) | `CmdBrief_<profile>_API_<n>` in `$ANDROID_AVD_HOME` or `~/.android/avd` |
| Live mirror rate | Targets **60 fps** with native iOS capture (30 fps with `idb` fallback) | About **30 fps** via the emulator gRPC service (falls back to `adb screencap` stills) |
| Shim enforcement | `xcrun` and `xcodebuild` shims rewrite `booted` and block other agents’ UDIDs | `adb` shim routes device calls to the agent’s serial and blocks input while you drive |
| Borrow from another computer | From a paired **Mac** via Devices › **iOS simulators** | From a paired **Mac** or **Linux** computer via Devices › **Android emulators run on** |

*Both platforms share the same per-agent cap (3) and machine-wide Simulators at once cap (default 4).*

Your own terminal outside an agent pane keeps working normally: `booted` resolves to a simulator no agent holds, and only an agent’s locked device is refused (override with `CMDBRIEF_DEVICE_SHIM=off` if you ever need direct access). For full platform availability across Mac, Linux, and Windows, see [Features](https://cmdbrief.com/features), [Install CmdBrief](https://cmdbrief.com/guides/install-cmdbrief), and [Pair another Mac or Windows PC](https://cmdbrief.com/guides/pair-mac-and-windows).

## Check tools and set your concurrency cap

**Step 1 of 3 · You do this** (Settings › Coordination › Device Hub)

1. Open **Settings › Coordination › Device Hub** and confirm **Device Hub**, **Show the device beside the lead in Stage**, and **Mirror the device screen** are on (all three are on by default).
2. Adjust **Simulators at once** (default **4**) if you have limited RAM or want more concurrent devices on a high-memory Mac or Linux box. You can also reach this setting from **Adjust limits…** in the sidebar’s shared-machine strip.
3. On macOS, install Xcode with an iOS simulator runtime for iOS work. For Android, install the Android SDK (`platform-tools`, `emulator`, and a system image matching your CPU ABI). CmdBrief never downloads SDK packages on its own.

**Verify simulator and emulator prerequisites**

```bash
# macOS: confirm Xcode simulator runtimes
xcrun simctl list runtimes

# macOS or Linux: check Android SDK tools
adb version
emulator -list-avds

# Linux x86_64 only: allow KVM access for hardware-accelerated emulators
sudo gpasswd -a "$USER" kvm
```

On Linux, CmdBrief looks for the SDK in `ANDROID_HOME`, `ANDROID_SDK_ROOT`, `~/Android/Sdk`, system paths (`/usr/lib/android-sdk`, `/opt/android-sdk`), and `PATH`. If your Linux box has an accessible GPU (`/dev/nvidia0` or `/dev/dri/renderD*`), CmdBrief starts emulators with `-gpu host` automatically and falls back if a boot exits early. Custom flags can be supplied via `CMDBRIEF_ANDROID_EMULATOR_ARGS`.

**Check it worked**

| Where | Run or do | Pass |
| --- | --- | --- |
| Sidebar | Look under **Agents › Simulators** after an agent leases a device | The lease lists the holder and model; clicking it opens an iOS simulator window, and right-clicking lets you take the lease back. |
| Stage | Click **Device** in the crew header or **Open a device** in a lead pane | The panel opens beside the lead, prepares the device, and starts mirroring. |

## Drive and mark up a live device in Stage

**Step 2 of 3 · You do this** (Stage device panel)

Whenever an agent in a Stage tab holds a simulator or emulator — or when you open one yourself via **Open a device**, the panel’s `+`, or the crew header’s **Device** button — the device panel appears between the lead’s pane and the crew column. Devices you open yourself are pinned so they stay open even if the lead stops, and clicking **Run on device** asks the lead to build and run the app there.

- **One driver at a time:** click **Take over** to interact directly with the mirror (press-and-drag, wheel scroll, Option-drag pinch on native iOS, typing, plus **Home**, **Lock**, **App switcher**, **Screenshot**, and **Relaunch**). While you drive, the `idb` and `adb` shims refuse the agent’s input commands while still allowing reads, screenshots, and app installs. Click **Give back** (or quit CmdBrief) to return control.
- **See what the agent taps:** recent agent taps, swipes, launches, and screenshots show on the mirror for six seconds as rings, arrows, or labels.
- **Mark up frozen frames:** click **Mark up** to freeze the screen and place **Element** (snaps to the accessibility element under your click), **Pin**, **Arrow**, **Rectangle**, or whole-screen **Note** annotations tagged **Change**, **Question**, or **Keep**.
- **Send straight to the lead:** **Send N marks** delivers one structured message (mark numbers, types, notes, coordinates in device points, and element labels) with an annotated full-resolution still. **Attach frame** drops a clean still into the lead’s composer. Sent markup pictures are kept under `<app support>/device-marks/<workspace>/sent/` for two weeks.

> **Tip:** The same Stage column also hosts agent-driven [Browser panes](https://cmdbrief.com/guides/browser-panes-and-chrome-extension) as tabs beside your simulators, using the same **Take over** / **Give back** and **Mark up** workflow.

## Borrow simulators or emulators from a paired computer

**Step 3 of 3 · You do this** (Devices menu beside Builds and tests)

Since CmdBrief 0.5.98 (see the [changelog](https://cmdbrief.com/changelog)), the workspace, lead, lead pane, and Stage menus include a **Devices** menu right next to **Builds and tests** (also editable in Workspace settings). It shows each paired computer’s free device slots and lets your local agents borrow devices running elsewhere:

1. Pair the lending computer with **Full use** (see [Pair another Mac or Windows PC](https://cmdbrief.com/guides/pair-mac-and-windows) or [Add a Linux build machine](https://cmdbrief.com/guides/linux-build-machine)). On the lending computer, make sure both **Take builds and tests from my other computers** (`cmdbrief builder on` on Linux) and **Device Hub** are turned on.
2. To lend **Android emulators** from a paired **Mac** or **Linux** computer, open **Devices › Android emulators run on** and select that computer. The emulator boots headless there, the lender holds off idle sleep (`systemd-inhibit` on Linux, `caffeinate -i` on macOS — a closed laptop lid still sleeps), and your local `adb` reaches it over CmdBrief’s per-lender `127.0.0.1` relay.
3. To lend **iOS simulators** from another paired **Mac**, open **Devices › iOS simulators** and select that Mac. Your agents’ simulators boot there, `xcodebuild -destination 'platform=iOS Simulator,id=<udid>'` builds and tests run there, and the live mirror streams back to your Stage panel with **Take over**, **Mark up**, and **Attach frame**.

> **Warning:** **Security caveat for Mac build computers:** running `xcodebuild test` against a simulator on a paired Mac requires turning on **Let builds run simulator tests** in that Mac’s **Settings › Computers**. It is **off by default** because enabling it lets simulator test runs read other programs’ command-line arguments and environment on that Mac (such as a token an agent was started with). When off, simulator tests sent to that Mac are refused immediately — naming the setting instead of hanging — and fall back to running on the Mac that asked.

Keep two boundaries in mind when borrowing devices: a Mac borrowing iOS simulators never silently falls back to local simulators, and local `xcrun simctl` or `idb --udid` commands aimed at a borrowed simulator are refused because those tools only reach local runtimes. For borrowed Android emulators, CmdBrief’s `adb` relay blocks `adb emu`, `adb forward`, and `adb reverse`, and Gradle `installDebug` is not automatically wired through the relay yet.

**Check it worked**

| Where | Run or do | Pass |
| --- | --- | --- |
| Stage device panel | Open a lent device in your workspace | The tab reads `<model> · <computer>` with an `on <computer>` indicator, and the lender lists the holder as `<agent> on <your computer>`. |
| Linux lender (optional) | `cmdbrief builder status` | Shows the builder switch is on, free slots, and which computers have full use (see the [CLI reference](https://cmdbrief.com/guides/cmdbrief-cli-reference)). |

## If it fails

| What it says | Fix |
| --- | --- |
| Acquire answers that all simulator slots are in use | Wait for a running agent to release its lease (CmdBrief messages turned-away agents once a slot frees), right-click an idle lease in **Agents › Simulators** to take it back, or raise **Simulators at once** in Settings › Coordination › Device Hub. |
| Linux emulator fails because `/dev/kvm` cannot be opened | **You:** Run `sudo gpasswd -a "$USER" kvm`, then sign out and back in so KVM hardware acceleration is available. |
| Simulator test on a paired Mac is refused naming “Let builds run simulator tests” | **You:** Only enable **Let builds run simulator tests** in that lending Mac’s Settings › Computers if you accept that test runs there can inspect other processes’ arguments and environment; otherwise leave it off so simulator tests stay local. |
| Stage panel says `<computer> is out of reach` with a 10-minute timer | The lending computer went to sleep or left the network. Wake it or reconnect Tailscale within 10 minutes to keep the lease; after 10 minutes both sides close it. |
| `adb emu`, `adb forward`, or `adb reverse` is refused on a lent emulator | CmdBrief’s `adb` relay blocks console and port-forwarding calls because they would target the wrong computer. Run those commands locally or run the agent directly on that host. |
| Android emulators are dimmed on Windows | Android emulators for agents are still marked **Coming soon** on Windows, and iOS simulators always require a Mac. |

## Questions

### Does Device Hub work with physical iPhones or Android phones over USB?

No. Device Hub leases iOS simulators and Android emulators only. A physical phone connected over USB is ignored by CmdBrief’s shims and passes through directly.

### Can a Linux computer or Windows PC borrow iOS simulators from my Mac?

A Mac lends its iOS simulators to paired computers with full use (including another Mac via Devices › iOS simulators). On Linux and Windows, local iOS simulator menus stay hidden because Apple simulators require macOS.

### Why does the Android emulator mirror sometimes drop from ~30 fps to stills?

CmdBrief streams live Android frames over the emulator’s local gRPC service (about 30 fps while the screen moves). If that gRPC service is unavailable or a call fails, the mirror automatically falls back to `adb screencap` stills so you never lose visibility.

### What happens to leased simulators when CmdBrief restarts?

Panes on the resume list keep their leases across a restart (and simulators are booted again once their agent resumes). Any pool simulator or emulator left running with no active lease is cleaned up automatically on startup.

## Primary sources

Provider terms and product behavior can change. Confirm plan, pricing, model, and permission details in the current official documentation.

- [Apple Developer: Running your app in Simulator](https://developer.apple.com/documentation/xcode/running-your-app-in-simulator-or-on-a-device)
- [Android Developers: Start the emulator from the command line](https://developer.android.com/studio/run/emulator-commandline)
- [Android Developers: Android Debug Bridge (adb)](https://developer.android.com/tools/adb)

## Keep reading

- Setup and safety: [Browser panes and agent browser steps](https://cmdbrief.com/guides/browser-panes-and-chrome-extension)
- Setup and safety: [Pair another Mac or Windows PC with CmdBrief](https://cmdbrief.com/guides/pair-mac-and-windows)
- Setup and safety: [Worktrees, heavy-job slots, and managed dev servers](https://cmdbrief.com/guides/worktrees-heavy-jobs-and-dev-servers)
- Setup and safety: [Add a Linux build machine for your Mac’s agents](https://cmdbrief.com/guides/linux-build-machine)
- Setup and safety: [Set up Voice Agent with OpenAI Realtime or xAI Grok](https://cmdbrief.com/guides/voice-agent-setup)

---

Markdown mirror of https://cmdbrief.com/guides/device-hub-simulators, generated at build time from the same data the HTML page renders. Machine-readable index: https://cmdbrief.com/llms.txt
