Can I run Android emulators on Mac M2 and M4 instances?

Last updated: July 10, 2026

Context

You may want to run Android E2E tests using emulators in your Codemagic workflow on mac_mini_m2 instances. When attempting to start an Android emulator on Apple Silicon machines, you might encounter errors such as "HVF error: HV_UNSUPPORTED" with arm64-v8a system images, or "CPU Architecture 'x86_64' is not supported by the QEMU2 emulator on aarch64 host" when trying to use x86_64 images.

Answer

No, Android emulators are not supported on mac_mini_m2 and mac_mini_m4 instances. This limitation exists because the Apple Virtualization Framework does not support nested virtualization on Apple Silicon machines.

To run Android emulator-based E2E tests on Codemagic, you need to use a Linux instance instead. Here's how to configure your workflow:

  1. Change your instance type from mac_mini_m2 or mac_mini_m4to linux_x2 or linux_x4

  2. Specify the Ubuntu version in your workflow configuration:

workflows:
  example:
    instance_type: linux_x2 # linux_x4 is also available on request

You can check the Linux instance documentation to see which Ubuntu images have the specific Android emulator versions you need for your testing requirements.

This configuration will allow you to successfully run Android emulators and execute your E2E tests in the Codemagic environment.