Android Emulator Plugin on Jenkins - How to extend timeout?
Asked Answered
S

2

12

I've managed to get the Android Emulator plugin setup and working on Jenkins. However, my problem is that it times out after 3 minutes. I am only running it on a very slow nettop Linux box (intel atom) so I imagine it will take MUCH longer to start the emulator.

Is there a way to extend the timeout? It looks like the emulator is starting; For the first few polls, its it reported as offline, then not.

My console output is below.

Thanks

Started by user Si Pickles
[EnvInject] - Loading node environment variables.
Building in workspace /var/lib/jenkins/jobs/mycompany_myapp/workspace
Updating svn://localhost/mycompany/code/trunk/myappProject at revision '2013-08-11T23:03:06.957 +0100'
At revision 98
no change for svn://localhost/mycompany/code/trunk/myappProject since the previous build
$ /var/lib/jenkins/tools/android-sdk/tools/android list target
[android] Using Android SDK: /var/lib/jenkins/tools/android-sdk
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb start-server
[android] Starting Android emulator
$ /var/lib/jenkins/tools/android-sdk/tools/emulator -no-boot-anim -ports 48437,50001 -avd google17 -no-snapshot-load -no-snapshot-save -no-window -no-audio
* daemon not running. starting it now on port 51447 *
* daemon started successfully *
Failed to Initialize backend EGL display
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
[android] Waiting for emulator to finish booting...
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
error: device offline
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:50001 shell getprop dev.bootcomplete

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:50001

[android] Timed-out after waiting 180 seconds for emulator
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:50001
[android] Stopping Android emulator

emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb kill-server

Archiving artifacts
Finished: NOT_BUILT
Spiritism answered 12/8, 2013 at 8:6 Comment(4)
Good question running into the same issue.Howard
I've ended up using a hardware device. You could also use Genymotion instead of the android emulator. Its way better.Spiritism
@SimonPickles How did you set up Genymotion in Jenkins?Untrue
Still unanswered! I think the plugin should expose a setting somewhere in the Jenkins webUI - that would fix this.Noeminoesis
S
-4

Solution: Use a hardware device.

Spiritism answered 18/3, 2014 at 13:2 Comment(1)
Ouch. Sorry for posting the way I eventually solved the problem. I know it doesnt answer MY OWN question but thought it may help someone. Using hardware was a lot quicker than mucking about with settings, and everyone has an old android phone somewhere, right?Spiritism
G
2

Which android OS version are you trying to use?

If you are using anything higher than Android 2.2 or 2.3.3 I would recommend changing your Android OS version to these because they boot up much faster.

Also, if you click the Advanced... button located under the "Common emulator options" header on the Jenkins configure page you could try playing around with setting up a Startup delay. This might help if your build requires a lot of processing before actually using the emulator for anything.

Apologies for the hybrid Answer/Comment, I would have just commented if I had the rep.

Gatian answered 17/3, 2014 at 21:47 Comment(0)
S
-4

Solution: Use a hardware device.

Spiritism answered 18/3, 2014 at 13:2 Comment(1)
Ouch. Sorry for posting the way I eventually solved the problem. I know it doesnt answer MY OWN question but thought it may help someone. Using hardware was a lot quicker than mucking about with settings, and everyone has an old android phone somewhere, right?Spiritism

© 2022 - 2024 — McMap. All rights reserved.