Skip to main content

Android Virtual Device (AVD) Management

Endpoints for managing Android Virtual Devices (emulators) for testing.

AVD Listing

GET /api/avds

Lists all available Android Virtual Devices.

Response:

[
{
"name": "Pixel_6_API_34",
"device": "pixel_6",
"path": "/Users/user/.android/avd/Pixel_6_API_34.avd",
"target": "android-34",
"basedOn": "Pixel 6",
"sdcard": {
"size": "512M",
"path": "/Users/user/.android/avd/Pixel_6_API_34.avd/sdcard.img"
},
"skin": {
"name": "pixel_6",
"path": "/Users/user/Library/Android/sdk/skins/pixel_6"
}
}
]

AVD Control

POST /api/avds/start

Starts an Android Virtual Device emulator.

Request Body:

{
"avdName": "Pixel_6_API_34",
"options": {
"wipeData": false,
"noSnapshot": false,
"gpu": "auto",
"memory": "2048",
"cores": 2
}
}

Response:

{
"success": true,
"avdName": "Pixel_6_API_34",
"processId": 12345,
"message": "AVD started successfully",
"deviceId": "emulator-5554"
}

POST /api/avds/stop

Stops a running Android Virtual Device emulator.

Request Body:

{
"avdName": "Pixel_6_API_34",
"force": false
}

Response:

{
"success": true,
"avdName": "Pixel_6_API_34",
"message": "AVD stopped successfully"
}

Notes:

  • force: If true, forces the emulator to stop immediately
  • Graceful shutdown is attempted first, then force kill if needed