Mobile developers using MacStadium VDI often need Android emulator access alongside their macOS desktop for testing, debugging, or running Android apps in parallel with their Citrix-managed session. Android emulators cannot run inside a macOS virtual machine. The Apple Virtualization Framework does not support nested virtualization, so the emulator has no access to the hardware hypervisor it requires. Running an emulator inside a VM is not a supported path. MacStadium VDI solves this by running the Android emulator natively on the Apple Silicon host node, on the same physical machine as your macOS VM. An ADB relay is automatically configured between the host-side emulator and your VM, so your desktop session can reach the Android device over ADB without manual network setup or a third-party emulator service.Documentation Index
Fetch the complete documentation index at: https://macstadiuminc-fix-saml-sso-formatting-di524.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before setting up Android Virtual Devices, ensure:- MacStadium VDI is deployed and operational (see the Deployment Guide)
- Ansible runner has
sshpassinstalled - The target macOS VM is running on a host node where the Android SDK will be installed
Install the Android SDK
Run this on the Ansible runner to install the Android SDK on your host nodes. This installs:- Homebrew (if not already present)
- Eclipse Temurin JDK 21
- Android command-line tools, platform-tools, and emulator packages
socat(used to set up the ADB relay between the host and your VM)- A
run-avdscript at/opt/orka/bin/run-avd
JAVA_HOME, ANDROID_HOME, and PATH in the host’s .zshrc.
Install SDK Platforms and System Images
Once the Android SDK is installed, install the platform and system images you want to use for your AVDs.android-35 with default and google_apis system images by default. To specify a different platform or image types:
platform— Android platform to install (default:android-35)image_types— comma-separated list of system image types (default:default,google_apis)
Create an Android Virtual Device
AVDs are tied to a specific VM. The AVD name is derived automatically from the VM name using the pattern{vm_name}-avd-{index}, where the index increments for each additional AVD on that VM (e.g. my-vm-avd-0, my-vm-avd-1).
Run with --tags plan first to preview which host the AVD will be created on:
vm_name(required) — name of the running VM the AVD should be associated withplatform— Android platform to use (default:android-35)image_type— system image type (default:default)run_avd— whether to start the AVD immediately after creation (default:true)cpu— vCPUs to allocate to the AVDmemory— memory in MB to allocate to the AVD
Manage Android Virtual Devices
Start, stop, or delete an AVD
Useavd.yml to bring an AVD to a desired state. The playbook is idempotent - it will not attempt to start an already running AVD, stop an already stopped one, or delete one that does not exist.
desired_state: running, stopped, absent
When only one AVD exists for a VM, it is selected automatically. If multiple AVDs exist, specify which one using avd_index:
List AVDs
To list all AVDs across all hosts:Delete an AVD
To delete a specific AVD by index:vm_name— name of the VM the AVD is associated withavd_index— index of the AVD to delete (e.g.0formy-vm-avd-0)
Uninstall SDK Platforms and System Images
To uninstall a specific platform and all of its system images from host nodes:android-35 by default. To target a different platform:

