5

I am trying to run the emulator on the Jenkins server. But I keep getting this error that Jenkins is unable to start the emulator becoz of the error below until it times out:

[android] Waiting 10 seconds before starting emulator...

$ /opt/android-sdk-linux/platform-tools/adb start-server

* daemon not running. starting it now on port 9666 *
* daemon started successfully *
$ /opt/android-sdk-linux/platform-tools/adb start-server
[android] Starting Android emulator
$ /opt/android-sdk-linux/tools/emulator64-arm -ports 9664,9665 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_320_HVGA_android-19_armeabi-v7a -no-snapshot-load -no-snapshot-save -no-window -no-audio -gpu off

resize2fs 1.42.13 (17-May-2015)
The filesystem is already 51200 (4k) blocks long.  Nothing to do!

$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665
unable to connect to localhost:9665: Connection refused
[android] Waiting for emulator to finish booting...
$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:9665
error: no such device 'localhost:9665'
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:9665
error: no such device 'localhost:9665'
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found
$ /opt/android-sdk-linux/platform-tools/adb connect localhost:9665

$ /opt/android-sdk-linux/platform-tools/adb -s localhost:9665 shell getprop init.svc.bootanim
error: device 'localhost:9665' not found

What should I do to get over this darn issue?

revolutionary
  • 3,314
  • 4
  • 36
  • 53
  • are you able to fix this issue? I'm running into the same issue and still didn't able to find any fix. Did you find any fix? – Waqas Dec 16 '15 at 15:50

1 Answers1

0

I had the same issue and it turned out that adb was crashing. In my case the cause for the crash was a permission error. Try deleting the file /tmp/adb.log before running the job. Please see this thread for more information: Is it possible to fake a specific path for a process?

You could also add the -verbose option to the emulator to see more output that might help.

Community
  • 1
  • 1
3k-
  • 2,467
  • 2
  • 23
  • 24