Jenkins can't run emulator

I am trying to run an emulator on a Jenkins server. But I keep getting this error that Jenkins cannot start the emulator due to the error below until the time runs 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 overcome this problem?

+5
source share
1 answer

I had the same problem and it turned out that adb was crashing. In my case, the reason for the failure was a permission error. Try deleting the /tmp/adb.log file before starting the job. See this topic for more information: Is it possible to fake a specific path for a process?

You can also add the -verbose to the emulator to see more results that may help.

0
source

Source: https://habr.com/ru/post/1235721/


All Articles