$npx -y skills add stablyai/orca --skill orca-emulator-androidControl an Android emulator / device from inside Orca using the orca CLI. Use for listing/booting AVDs, taps, swipes, typing, hardware buttons (incl. Back and Recents), rotation, app install/launch, runtime permissions, the accessibility tree, and logcat — driving a real adb-co
| 1 | # Orca Emulator — Android (adb / emulator powered) |
| 2 | |
| 3 | Drive an Android emulator or adb-connected device **from within Orca** using |
| 4 | `ORCA emulator ...` commands. The Android backend shells out to the Android SDK |
| 5 | (`adb`, `emulator`, `avdmanager`) that Android Studio installs, so it works on |
| 6 | Windows, Linux, and macOS — unlike the iOS backend (`orca-emulator`), which is |
| 7 | macOS-only. Device control uses `adb shell input`, so it works without any extra |
| 8 | streaming server. |
| 9 | |
| 10 | > **Status:** device discovery + lifecycle + full input/capability control are |
| 11 | > live. The embedded 60fps **visual pane** (scrcpy/H.264) is in development — for |
| 12 | > now, watch the device in Android Studio's emulator window while you drive it |
| 13 | > from the CLI. |
| 14 | |
| 15 | ## CLI executable |
| 16 | |
| 17 | Choose the Orca executable once: use the `ORCA_CLI_COMMAND` environment value when set; |
| 18 | otherwise use `orca-dev` in a dev session exposing `ORCA_DEV_REPO_ROOT`, `orca-ide` on |
| 19 | Linux outside an Orca-managed terminal, and `orca` everywhere else. Never try bare |
| 20 | `orca` first on unmanaged Linux because it normally resolves to the GNOME screen reader. |
| 21 | |
| 22 | In every command example — fenced blocks, tables, and prose — `ORCA` is a documentation |
| 23 | placeholder. Replace it with the chosen executable before running the command; do not |
| 24 | create a shell variable or run `ORCA` literally. The command examples are intentionally |
| 25 | shell-neutral for POSIX shells, PowerShell, and cmd.exe. |
| 26 | |
| 27 | ## When to use |
| 28 | |
| 29 | - List, boot, and target Android emulators/AVDs and physical devices. |
| 30 | - **Tap, swipe, type, press hardware buttons (home/back/recents/power/volume), |
| 31 | rotate** a running Android device. |
| 32 | - **Install** an APK, **launch** an app, **grant/revoke** runtime permissions. |
| 33 | - Read the **accessibility tree** (`uiautomator`) or capture **logcat**. |
| 34 | - Run an arbitrary `adb shell` command via `exec`. |
| 35 | |
| 36 | ## When NOT to use |
| 37 | |
| 38 | - iOS simulators → use the `orca-emulator` skill (macOS only). |
| 39 | - Building the app → use Gradle / `./gradlew assembleDebug`, then `install`. |
| 40 | - Camera/sensor injection → not supported yet (Android virtual-scene is out of |
| 41 | scope for now). |
| 42 | - Remote/SSH device control → out of scope; the SDK + device are local to the host. |
| 43 | |
| 44 | ## Prerequisites (surfaced by Orca) |
| 45 | |
| 46 | - **Android Studio / Android SDK** installed, with `ANDROID_HOME` (or |
| 47 | `ANDROID_SDK_ROOT`) set. Orca also checks the per-OS default location |
| 48 | (`%LOCALAPPDATA%\Android\Sdk`, `~/Library/Android/sdk`, `~/Android/Sdk`). |
| 49 | - `adb` + `emulator` on the SDK path; at least one **AVD** (create in Android |
| 50 | Studio ▸ Device Manager) or a connected device with USB debugging. |
| 51 | - A device that is **booted and `adb`-visible** for input/capability commands |
| 52 | (an AVD that is still shutdown can be listed but must be booted first). |
| 53 | |
| 54 | Orca returns a clear message when the SDK is missing |
| 55 | (`Android SDK not found. Install Android Studio and set ANDROID_HOME.`). |
| 56 | |
| 57 | ## Mental model |
| 58 | |
| 59 | ```text |
| 60 | ┌────────────────────────┐ |
| 61 | │ orca CLI (agents) │ e.g. ORCA emulator tap 0.5 0.7 --device emulator-5554 |
| 62 | └───────────┬────────────┘ |
| 63 | │ RPC |
| 64 | ▼ |
| 65 | ┌────────────────────────┐ resolves backend by device |
| 66 | │ EmulatorBridge (router)│ ─────────────────────────────► AndroidEmulatorBackend |
| 67 | └────────────────────────┘ │ adb / emulator / avdmanager |
| 68 | ▼ |
| 69 | Android emulator / device |
| 70 | ``` |
| 71 | |
| 72 | Orca owns backend routing and the per-worktree active-device registry. The |
| 73 | Android backend converts Orca's normalized 0–1 coordinates to device pixels and |
| 74 | issues `adb shell input` events; AVD names resolve to running adb serials. |
| 75 | |
| 76 | ## Common operations |
| 77 | |
| 78 | Use `--json` for agent-friendly output. Coordinates are **normalized 0..1** |
| 79 | (top-left origin) — never pixels; Orca converts using the live screen size. |
| 80 | |
| 81 | | Goal | Command | Notes | |
| 82 | |----------------------------|----------------------------------------------------------------|-------| |
| 83 | | List devices + AVDs | `ORCA emulator devices --json` | Cross-platform; shows iOS + Android with a platform column, booted vs shutdown. | |
| 84 | | Single tap | `ORCA emulator tap <x> <y> --device <serial>` | Normalized 0..1. Preferred for single taps. | |
| 85 | | Swipe / gesture | `ORCA emulator gesture '<json>' --device <serial>` | adb approximates the path by its endpoints (start→end). | |
| 86 | | Type text |