Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emulator does not start when multiple android devices are connected #293

Open
dsouzadarryl opened this issue Nov 22, 2022 · 0 comments
Open

Comments

@dsouzadarryl
Copy link

Hi,

I am using android-emulator-runner to run UI tests on the self hosted runner (mac/x64) for Github action. The machine already has few android devices connected via USB for running few end to end tests. Therefore running UI tests fails to launch the emulator with the below error.

Launch Emulator
  /bin/sh -c \printf 'hw.cpu.ncore=2
  ' >> /Users/macbeast/.android/avd/test.avd/config.ini
  Starting emulator.
  /bin/sh -c \/Users/macbeast/Library/Android/Sdk/emulator/emulator -avd test -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none &
  ERROR   | Unknown AVD name [test], use -list-avds to see valid list.
  ERROR   | ANDROID_AVD_HOME is defined but there is no file test.ini in $ANDROID_AVD_HOME
  ERROR   | (Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/avd and $HOME/.android/avd)
  INFO    | Android emulator version 31.3.13.0 (build_id 9189900) (CL:N/A)
  /Users/macbeast/Library/Android/Sdk/platform-tools/adb shell getprop sys.boot_completed
  * daemon not running; starting now at tcp:5037
  * daemon started successfully
  adb: more than one device/emulator
  The process '/Users/macbeast/Library/Android/Sdk/platform-tools/adb' failed with exit code 1

It would be great if all the adb commands specify the emulator instance adb -s emulator-5554 like you do in killEmulator() method.

Cheers

@dsouzadarryl dsouzadarryl changed the title Does not work when multiple android devices are connected Emulator does not start when multiple android devices are connected Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant