I’ve been trying to create android emulators with unique ports to run appium tests in parallel using pabot. I don’t believe the orb is suitable, but I found the cimg/android
images also don’t work. I’ve since tried a mac executor and installing android sdk, tools myself. However, I’ve been getting errors and don’t see my devices. Wondering what the recommend approach would be for something like this?
HVF error: HV_UNSUPPORTED
qemu-system-aarch64-headless: failed to initialize HVF: Invalid argument
jobs:
android:
executor: xcode
steps:
- checkout
- setup_android # jdk, SDK Tools
- run:
name: Accept Android SDK licenses
command: yes | sdkmanager --licenses || true
- run:
name: Debug system images already available
command: sdkmanager --list
- run:
name: Install Android system image
command: sdkmanager --install "system-images;android-35;google_apis;arm64-v8a"
- run:
name: Check devices
command: avdmanager list devices
- run:
name: Create emulators
command: |
avdmanager create avd -n test_avd_1 -k "system-images;android-35;google_apis;arm64-v8a" -d "pixel_6" --force
avdmanager create avd -n test_avd_2 -k "system-images;android-35;google_apis;arm64-v8a" -d "pixel_6" --force
- run:
name: Restart adb
command: |
adb kill-server
adb start-server
- run:
name: Start emulators
command: |
$ANDROID_HOME/emulator/emulator -avd test_avd_1 -port 5556 -no-snapshot -no-window -no-audio -accel off &
$ANDROID_HOME/emulator/emulator -avd test_avd_2 -port 5558 -no-snapshot -no-window -no-audio -accel off &
sleep 60
- run:
name: Print devices
command: adb devices -l