Android Emulator extension

This is the Android Emulator extension. It lets engineers discover installed Android Virtual Devices (AVDs), start and stop emulators, see which AVDs are currently running, and create new AVDs — all from a sidebar in VS Code or Cursor. Use the built-in wizard to choose a device profile and system image, then create the AVD via avdmanager.
Features
UI (Activity Bar -> Mobile device icon)
- Android Emulators activity-bar view with an AVDs tree listing installed virtual devices.
- Refresh toolbar button on the AVDs view to reload the list.
- Start (play) inline action on each stopped AVD; Stop (square) inline action on each running AVD.
- Start / Stop context-menu entries on AVD tree items.
- Create New AVD… item at the bottom of the AVDs tree (shown when empty or when AVDs exist) to launch the creation wizard.
- Status rows when needed: Loading AVDs…, Set Android SDK Path…, Failed to list AVDs, No AVDs installed.
Commands (Command Palette → category Android Emulator)
- Refresh AVD List — reload installed and running AVDs.
- Start AVD — launch the selected virtual device.
- Stop AVD — shut down the running emulator for the selected AVD.
- Set Android SDK Path... — pick or type the SDK root folder.
- Create New AVD... — launch the wizard to create a new AVD (select device profile, system image, and name).
- Open Android Emulator Settings — open this extension's settings.
- Show AVDs View — open the Android Emulators sidebar.
Requirements
A functional Android SDK installation containing:
- the emulator tool (Android Emulator package via SDK Manager),
- platform-tools (
adb, used to detect running emulators and to stop them),
- cmdline-tools (Android SDK Command-line Tools (latest) via SDK Manager) to create new AVDs with the built-in wizard (provides
avdmanager), and
- a Java runtime (JDK 17 or newer, via
JAVA_HOME or on PATH; Android Studio's bundled JBR works) when creating AVDs.
You can start with zero AVDs; the sidebar includes a Create New AVD… action to create your first one.
Extension Settings
This extension contributes the following setting:
androidEmulator.androidSdkPath: Custom path to the Android SDK root (the folder containing the emulator, platform-tools, and cmdline-tools subfolders). Highest precedence for resolution. Leave empty to use environment variables or platform defaults. This setting is also used when locating avdmanager for the Create New AVD wizard.
Known Issues
None at this time.
Release Notes
0.0.2
- Create New AVD tree item with avdmanager wizard - guides users through device profile, system image, and AVD name selection.
- Cross-platform ZIP extraction using
yauzl for spaced paths support.
- Java preflight validation (requires JDK 17+).
- Fix Windows AVD creation when SDK path contains spaces.
- Automatic AVD list refresh after creation.
0.0.1
- Android Emulators activity-bar sidebar with a refreshable AVD tree and per-item Start/Stop actions.
- AVD listing via
emulator -list-avds and safe, non-blocking emulator startup via process spawn.
- Stop running emulators with inline stop action and
androidEmulator.stopAvd command.
- Running-state detection with play/stop codicons; running AVDs show Stop on initial refresh.
- Robust AVD name resolution with legacy fallbacks for early-boot detection.
- Configurable
androidEmulator.androidSdkPath setting with precedence over ANDROID_HOME, ANDROID_SDK_ROOT, and platform defaults.
Set Android SDK Path... command with folder picker and manual path fallback.
Open Android Emulator Settings and Show AVDs View commands.
- Tree states for loading, SDK-missing, empty, list-error, and ready views with actionable prompts.
Usage
Open the Android Emulators sidebar from the activity bar (mobile device icon), or run Show AVDs View from the Command Palette. The AVDs tree lists your installed virtual devices and ends with a Create New AVD… item. Use the toolbar Refresh button to reload the list, or create a new AVD directly from the tree (the list refreshes automatically after creation).
If the SDK cannot be found, click Set Android SDK Path… in the tree or run Set Android SDK Path... from the Command Palette. You can also set androidEmulator.androidSdkPath via Open Android Emulator Settings. The Create New AVD wizard will guide you to install cmdline-tools or set the SDK path when needed.
Commands
| Command |
Title |
Description |
androidEmulator.refreshAvds |
Refresh AVD List |
Reload installed and running AVDs in the sidebar |
androidEmulator.startAvd |
Start AVD |
Launch the selected virtual device |
androidEmulator.stopAvd |
Stop AVD |
Shut down the running emulator for the selected AVD |
androidEmulator.setAndroidSdkPath |
Set Android SDK Path... |
Pick or type the SDK root folder and persist it to settings |
androidEmulator.createAvd |
Create New AVD... |
Create a new AVD using the wizard (device profile, system image, name) |
androidEmulator.openSettings |
Open Android Emulator Settings |
Open the Settings editor filtered to this extension |
androidEmulator.showAvdsView |
Show AVDs View |
Open the Android Emulators sidebar |
UI
| Location |
Control |
Action |
| Activity bar |
Android Emulators (mobile icon) |
Opens the sidebar |
| AVDs view title |
Refresh |
Reloads the AVD list |
| AVD tree item (stopped) |
Start inline icon or context menu |
Starts that AVD |
| AVD tree item (running) |
Stop inline icon or context menu |
Stops that AVD |
| AVD tree item |
Click AVD name |
Same as the inline Start or Stop action |
| AVDs tree (bottom) |
Create New AVD… |
Opens the Create AVD wizard |
| Tree (SDK not found) |
Set Android SDK Path… |
Opens the SDK path picker |
| Tree (empty) |
Create New AVD… |
Creates your first AVD |
CI and coverage badges
Unit tests run on every push and pull request to main via GitHub Actions. The Unit tests badge reflects that workflow; the Coverage badge reads from a public gist updated by CI when tests pass.
Local commands: npm test and npm run test:coverage (uses c8).