Emulator Not Booting via AVD Manager

I’ve been trying to use the new AVD Manager for our Espresso Tests workflow as follows (on Android & Docker, on Ubuntu 16.04):

+------------------------------------------------------------------------------+

| (0) avd-manager@0.9.1                                                        |
+------------------------------------------------------------------------------+
| id: avd-manager                                                              |
| version: 0.9.1                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2017-12-19T16:43:21Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[16:43:21]  * [OK] Step dependency (go) installed, available. 
Configs:
- Version: 21
- Resolution: 240x426
- Density: 120
- Orientation: portrait
- Tag: google_apis
- ABI: x86
- Profile: Nexus 5X
- ID: WP_EMULATOR
- CustomCommandFlags: -no-window -no-audio -debug-init -no-boot-anim
- Overwrite: true
- CustomConfig:
disk.dataPartition.size=1024M
hw.camera.back=emulated
hw.camera.front=emulated
hw.keyboard=yes
hw.gpu.enabled=true
hw.gpu.mode=swiftshader
hw.ramSize=1536
runtime.network.latency=none
runtime.network.speed=full
showDeviceFrame=no
skin.dynamic=yes
skin.path=_no_skin
skin.path.backup=_no_skin
vm.heapSize=384
Ensure sdk packages: [emulator tools platform-tools system-images;android-21;google_apis;x86]
- Done
Create AVD
- Done
Start emulator

However, my workflow seems to fail at the Wait for Android Emulator step:

+------------------------------------------------------------------------------+

| (5) wait-for-android-emulator@1.0.2                                          |
+------------------------------------------------------------------------------+
| id: wait-for-android-emulator                                                |
| version: 1.0.2                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2017-12-19T16:49:26Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[16:49:26] Start installing (golang) with apt-get       
INFO[16:49:26]  * [OK] Step dependency (go) installed, available. 
Configs:
- emulatorSerial: emulator-5554
- bootTimeout: 300
- AndroidHome: /opt/android-sdk-linux
Waiting for emulator boot
> Checking if device booted...
Waiting for emulator boot timed out after 300 seconds
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | wait-for-android-emulator@1.0.2 (exit code: 1)                | 304 sec  |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...com/bitrise-steplib/steps-wait-for-android-emulator/issues |
| Source: https://github.com/bitrise-steplib/steps-wait-for-android-emulator   |
+---+---------------------------------------------------------------+----------+

This seems to occur for the many different several different setups of the Virtual Device that I have tried (ranging from API 26 to API 21).

2 Likes

Hi @osama,

Thanks for reporting the issue!

Our team is already working on a fix, in the meantime they suggest to:

  1. In the aws-manager step, locate the Custom hardware config input (Customize category)
  2. And replace hw.gpu.mode=swiftshader with hw.gpu.mode=host

This should make the x86 emulator to boot.

P.S.: this issue it seems is a result of some new, updated android emulator package; the tooling team is working on a fix.

If you’d have any questions just let us know! :slight_smile:

1 Like

Hey @osama

Just fixed the issue, will release a new version of the step within couple of hours.
The new 27.0.2 emulator package version seems to be broken.

1 Like

The new version is just out now, please update the step version in your workflow(s) :slight_smile:

2 Likes