I am trying to use the Jenkins Android Emulator with Cloudbees and I am often experiencing this kind of output:
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:44194 shell getprop dev.bootcomplete
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:44194 shell getprop dev.bootcomplete
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb disconnect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:44194 shell getprop dev.bootcomplete
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:44194 shell getprop dev.bootcomplete
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:44194 shell getprop dev.bootcomplete
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb disconnect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:44194 shell getprop dev.bootcomplete
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:44194 shell getprop dev.bootcomplete
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
[android] Timed-out after waiting 720 seconds for emulator
$ /opt/android/android-sdk-linux/platform-tools/adb disconnect localhost:44194
[android] Stopping Android emulator
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
$ /opt/android/android-sdk-linux/platform-tools/adb kill-server
Finished: NOT_BUILT
I am using andoird-19 as target but I have tried several. I have also tried to reproduce the case on my local jenkins instance and it happens the same.
This gets worse when I try to load from snapshot: if I don't start from snapshot the emulator starts in the 50% of the cases, if I use the snapshots then it would always fail.
I am using emulator-arm as executable, since I read about some bugs with the 64bit version. Not sure it applies to r19 as well though.
Any idea?