View, create, boot, and interact with local iOS Simulators and Android emulators without leaving GitHub Copilot or VS Code. Mobile Canvas gives your agent the same controls through MCP, so it can deploy, navigate, inspect, and capture evidence on the device you are watching.
Live H.264 video at ~58 FPS on iOS and ~50 FPS on Android, with real tap, drag, scroll, and keyboard input. Everything runs locally on loopback; nothing is uploaded anywhere.
Add this repository as a Copilot plugin marketplace, install mobile-canvas, then open the Mobile Device canvas:
/plugin marketplace add Redth/mobile-canvas-ghcp
/plugin install mobile-canvas@mobile-canvas-ghcp
Reload Copilot after installation. The plugin registers the canvas and all
mobile_device_* tools together; there is no separate executable download.
Install Mobile Canvas from the Visual Studio Marketplace, reload VS Code, and open Mobile from the Activity Bar. The Marketplace automatically selects the package matching your platform.
The extension includes the native runtimes and registers the
mobile_device_* tools with Copilot Chat automatically. No global tool or
mcp.json is required. See the VS Code guide for remote
workspace behavior, manual MCP setup, and development commands.
Both hosts still require Xcode for iOS or the Android SDK for Android; see Requirements.
The production legacy backend remains the default in both hosts. This source preview wires the same scoped Ailoha backend into the installed canvas, VS Code view/Chat tools, and MCP entrypoints. It does not change the product version, identifiers, Marketplace package, or stable runtime channel.
The source now pins the anonymously published @ailoha/cli@0.2.5-preview.7
launcher graph in both hosts, including its exact tarball integrity and source
provenance. Once a reviewed host package is installed in a separately qualified
environment,
start the GitHub Copilot host with MOBILE_CANVAS_BACKEND=ailoha, or set
"mobileCanvas.backend": "ailoha" in VS Code's application settings and reload
the window. Without that prepared, exact-pinned public graph, opt-in reports
unavailable rather than starting the legacy engine. Refreshed Mobile Canvas
embedded-web native release artifacts and normal installed-host routing remain
separate gates; this SDK source/package qualification is not a production
cutover or a normal-install-ready release.
The opt-in covers authoritative provider/runtime/device-type/template catalogs, compatible iOS/Android create+boot, inventory/selection, advertised start/stop/reboot, PNG screenshots, observed-geometry tap/held-press/swipe/scroll, and complete ALHV H.264 access units. Device control and System inspection require no app instrumentation; App inspection does. Creation uses exact host/provider catalog choices and one canonical operation; accepted retries do not submit another create or boot. Destructive reset/delete without scoped human consent remains unsupported where genuine scoped approval is unavailable. The read-only System lens uses the selected Target Host target; canonical app inventory, launch, terminate, cold relaunch and Android app-op reads use native target identities. Source-conditional staged installation remains unsupported in installed hosts until a compatible approved public runtime and host artifact capability are available; uninstall and app-op mutation use source-conditional fenced CLI actions with captured native app evidence, scoped human approval and effective readback. They remain unsupported in installed hosts until the compatible reviewed public CLI and native host capabilities are packaged; ordinary uninstall/app-op routes cannot substitute. The App lens requires an explicitly selected verified native runtime instance in the canonical named context. Workspace application evidence cannot bind an agent. Recording uses the verified scoped CLI only when recovery is positively advertised; keyboard/buttons and broader controls remain unsupported. See the Ailoha adapter contract for ownership, setup, package evidence and remaining gates.
Mobile Canvas lets an agent work on the same device you see. Ask Copilot to reproduce a bug, navigate a flow, capture evidence, or inspect accessibility without switching tools or wiring up a separate MCP server.
Boot an iPhone simulator, install my app, and walk through sign in.
Find the Settings button on the Android emulator and tap it.
Take a screenshot of the current screen and describe any layout issues.
Agent actions automatically select the target device. An animated cursor and accent glow make every automated interaction visible, so you can follow along and take over at any time.
![]() |
![]() |
The following feature list describes the production legacy default, not the bounded Ailoha opt-in preview.
Device management
- Discover installed runtimes/system images, device types, and existing devices.
- Create and automatically boot devices headlessly, then restart, shut down, show their native window, erase, or delete them. Showing an Android emulator restarts it with its window enabled.
- Erase and delete always require an explicit confirmation.
Live interaction
- Live Annex-B H.264 decoded with WebCodecs, with automatic PNG polling whenever the stream is unavailable.
- Tap, long press, drag, swipe, wheel scroll, text, keys, and device buttons, mapped correctly at every view scale and orientation.
- PNG screenshots and bounded video recordings written to disk.
Agent control
- 24 canvas actions for common device operations, plus 61 MCP tools covering device, app, file, diagnostics, settings, and hardware operations. See the compatibility baseline for the exact names and migration invariants.
- Every target-changing call returns the full device record, including the
udid/serial you need to hand to a deploy command. - When an agent drives the device, the canvas shows an accent-coloured glow and an animated cursor so a human watching can tell automation from their own input.
| Requirement | |
|---|---|
| iOS | macOS and a full Xcode installation with Simulator runtimes |
| Android | Android SDK with emulator and adb; avdmanager and Java are needed only to create or delete AVDs |
| Optional iOS fallbacks | idb (provides idb_companion), plus Screen Recording and Accessibility permission for ScreenCaptureKit window capture |
The bundled mobile-screencap helper provides iOS touch, keyboard, buttons,
rotation, accessibility hierarchy, and direct video capture. Xcode 26 uses
Simulator.app; Xcode 27 uses Device Hub. Neither visible app needs to be open
for headless input or hierarchy reads.
Android-only workflows do not require Xcode. When Xcode is unavailable, Mobile Canvas keeps Android emulators usable and marks iOS as unavailable.
Likewise, Java is not required to run or control existing Android emulators.
It is used indirectly by avdmanager only when Mobile Canvas creates or deletes
an AVD.
Meta's idb metapackage is not required for ui_tree, ui_find, or ui_tap.
It remains an optional compatibility input fallback and the final live-video
fallback if the bundled native paths cannot start. Mobile Canvas only reports
its absence when an operation actually needs it. To install it, current
Homebrew versions require explicitly trusting the third-party tap:
brew tap facebook/fb
brew trust facebook/fb
brew install facebook/fb/idbThen add the installed executable to your shell environment. For zsh:
echo "export IDB_COMPANION_PATH=\"$(brew --prefix idb-companion)/bin/idb_companion\"" >> ~/.zshrc
source ~/.zshrcConfirm that the configured path points to the executable:
test -x "$IDB_COMPANION_PATH" && "$IDB_COMPANION_PATH" --versionAndroid emulators must be started with -gpu host. A software-rendered AVD
drops video from ~50 FPS to ~3 FPS.
| Platform | iOS Simulator | Android emulator | Video |
|---|---|---|---|
| macOS | yes | yes | H.264 |
| Windows | no | yes | screenshot polling |
| Linux | no | yes | screenshot polling |
iOS control requires Xcode's simctl and the bundled CoreSimulator helper, so it
is macOS-only. Android works everywhere; hardware H.264 encoding currently runs
through the same macOS helper, so elsewhere the canvas falls back to screenshot
polling.
git clone https://github.com/Redth/mobile-canvas-ghcp
cd mobile-canvas-ghcp
./scripts/build.sh # Native AOT binary + universal Swift capture helper
./scripts/install.sh # Installs into ~/.copilot/extensions/mobile-canvasReload Copilot afterwards so it picks up the extension. Source installs register
as Mobile Device (Local) (mobile-device-local), so a development build can
coexist with the marketplace plugin without registering the same canvas ID twice.
For a plain CLI/MCP install without the canvas:
dotnet tool install -g MobileCanvas.ToolAsk Copilot to open the Mobile Device canvas, or open it from the canvas picker. Select a running device, or create one from an installed runtime.
From the CLI:
mobile-canvas devices list --json
mobile-canvas devices boot <id> --wait
mobile-canvas input tap <id> --x 100 --y 200
mobile-canvas screenshot <id> --output shot.png
mobile-canvas host status
mobile-canvas guideEvery query command accepts --json and --schema, so output composes safely
with jq.
All 24 tools are available both as canvas actions and as MCP tools named
mobile_device_*:
| Group | Tools |
|---|---|
| Discovery | list, get, catalog, select, get_selected, display |
| Lifecycle | create, boot, shutdown, restart, reveal, erase, delete |
| Input | tap, long_press, swipe, type_text, press_key, press_button, rotate |
| Media | screenshot, recording_start, recording_stop, recording_status |
A typical agent flow is list → select → read udid from the result → deploy
your app to that exact device → drive it with the input tools.
The Marketplace installs a self-contained package on supported desktop targets;
the universal fallback downloads and verifies its pinned runtime on first use.
Agent actions select and animate the same device in the live Activity Bar view.
The view follows the active VS Code theme while preserving the GitHub canvas
appearance elsewhere. Attach the selected device, a fresh screenshot, or its
accessibility tree to chat with #mobileDevice, #mobileScreenshot, or
#mobileUiTree.
The extension runs locally for Remote SSH, Dev Containers, and Codespaces.
vscode.dev is unsupported.
GitHub Copilot app VS Code extension CLI / other agent
└─ extension.mjs ├─ Activity Bar webview └─ mobile-canvas mcp
│ canvas actions └─ MCP context proxy │
└──────────────────┬───────────────┬────────────────────┘
▼
mobile-canvas host (per-user, per-protocol singleton)
├─ HTTP + WebSocket UI transport
├─ per-panel selected-device state
└─ platform backends
├─ iOS simctl + bundled CoreSimulator helper + optional idb
└─ Android emulator gRPC + adb
The host is started on demand, binds only to 127.0.0.1, and authenticates
canvas panels with a scoped reload grant exchanged for a rotating session cookie.
The grant remains in the URL fragment so a host-restored renderer can reconnect
without exposing the credential in an HTTP request.
It exits after an idle grace period and never shuts down a device
implicitly, so detaching a panel is always safe.
GitHub Copilot and VS Code releases using the same host protocol share the newest
compatible host. Hosts are isolated under ~/.mobile-canvas/hosts/v<protocol>/,
so an older installation using the legacy location and future incompatible
protocol versions can run at the same time without replacing each other's
process. A release that makes a backwards-incompatible host API change must bump
MobileCanvasProtocol.Version; package versions alone do not create extra hosts.
Video is deliberately split from input on both platforms:
| Concern | iOS | Android |
|---|---|---|
| Frames | CoreSimulator IOSurface (ScreenCaptureKit fallback) | emulator gRPC streamScreenshot |
| Encode | VideoToolbox H.264 | same VideoToolbox H.264 |
| Input | bundled CoreSimulator HID (Indigo/DTUHID), GSEvent rotation; optional idb fallback |
emulator gRPC streamInputEvent |
| Lifecycle | simctl |
emulator/avdmanager + gRPC |
Raw Android frames are encoded before they reach the browser, so only ~1-2 Mbps crosses to the canvas instead of the 41-577 MiB/s the emulator emits.
All .NET subprocess launches go through IProcessRunner: RunAsync collects
text output, while Start(ProcessStartInfo) returns a caller-owned process for
binary ADB transfers and long-lived emulator, capture, HID, recording, and host
sessions. Callers keep responsibility for draining pipes, cancellation, and
cleanup; binary stdout is never decoded as text. Custom runners must implement
Start to support those workflows (the default rejects them rather than
bypassing the runner). Both UI hosts use this same backend boundary.
dotnet build MobileCanvas.slnx
dotnet test tests/MobileCanvas.Tests/MobileCanvas.Tests.csproj
npm ci --prefix vscode --ignore-scripts
npm test --prefix vscode
npm run package --prefix vscode
npm run ailoha:manifest -- --output .build/ailoha-source-manifest.json
./scripts/build.sh # builds one architecture into .build/bin/<rid>
./scripts/release.sh # rebuilds macOS release assets for local validationTwo things to know before you change anything:
- Web assets are embedded resources. Any change to
web/needs a republish, not a file copy.extension.mjsis the opposite — it is copied directly and is not part of the binary. dotnet publishdoes not build the Swift helper.scripts/build.shbuilds both. A stale helper fails only later, at stream start; check it withmobile-screencap --helpand confirmaccessibility,framebuffer,hid,hid-doctor, and Android'sencodesubcommands exist.
The Ailoha source manifest is a deterministic inventory of every tracked or
unignored source file, its destination under imports/mobile-canvas, and its
byte-exact hash. It also records the current backend operations, API/WebSocket
routes, MCP tools, and canvas actions so Ailoha can measure feature parity
against code. The aggregate snapshot authenticates the destination root, every
complete import record, and that surface inventory, so neither mapping nor
parity metadata can drift independently from the imported source. Repository
attributes require LF text checkouts so clean snapshots are byte-stable across
platforms. Ailoha uses the manifest to pin and verify imports while this
repository remains the implementation source of truth. Pass --require-clean
for an importable release snapshot.
The approved Ailoha integration roadmap describes the intended engine migration; it is not a claim that the cutover has been implemented. The compatibility baseline records the current product identities, tool/action inventory, and behavior that migration adapters must preserve.
Changing src/ or native/ requires the Release runtimes workflow. It builds
each Native AOT RID on its native OS, publishes checksummed release assets, and
packages both host extensions from those exact binaries. See
How the executable ships.
MIT. See LICENSE.




