Running genie-free android emulator on debian

I want to run espresso tests in a jenkins emulator on a headless debian. I also use it to create screenshots for publication.

Jenkins build error with the following messages:

$ /opt/android-sdk-linux/tools/android list target [android] Using Android SDK: /opt/android-sdk-linux [android] Setting hardware properties: hw.ramSize: 1536 vm.heapSize: 128 hw.gpu.enabled: yes $ /opt/android-sdk-linux/platform-tools/adb start-server * daemon not running. starting it now on port 5826 * * daemon started successfully * $ /opt/android-sdk-linux/platform-tools/adb start-server [android] Starting Android emulator $ /opt/android-sdk-linux/tools/emulator -ports 5824,5825 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_480_1920x1080_Google_Inc._Google_APIs_22_google_apis-x86_64 -no-snapshot-load -no-snapshot-save -no-window emulator: WARNING: Host CPU is missing the following feature(s) required for x86_64 emulation: SSE4.1 SSE4.2 POPCNT Hardware-accelerated emulation may not work properly! [android] Emulator did not appear to start; giving up $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:5825 [android] Stopping Android emulator $ /opt/android-sdk-linux/platform-tools/adb kill-server [htmlpublisher] Archiving HTML reports... [htmlpublisher] Archiving at PROJECT level /var/lib/jenkins/workspace/PublishCupido/PingAndroidClient/build/spoon/release to /var/lib/jenkins/jobs/PublishCupido/htmlreports/Screenshots Finished: NOT_BUILT 

I guess this is due to a timeout due to very slow emulation.

When I run the emulator on the command line, I see:

 /opt/android-sdk-linux/tools/emulator -ports 8196,8197 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_480_1920x1080_Google_Inc._Google_APIs_22_google_apis-x86_64 -no-snapshot-load -no-snapshot-save -no-window -show-kernel emulator: WARNING: Host CPU is missing the following feature(s) required for x86_64 emulation: SSE4.1 SSE4.2 POPCNT Hardware-accelerated emulation may not work properly! Failed to open lib64EGL_translator Failed to init_egl_dispatch emulator: ERROR: OpenGLES initialization failed! emulator: ERROR: OpenGLES emulation library could not be initialized! emulator: WARNING: Could not initialize OpenglES emulation, using software renderer. Killed 

I can’t say much about the missing processor features, can I ???

But you need to be able to run the GPU.

 # ldconfig -lv /opt/android-sdk-linux/tools/lib/lib64EGL_translator.so lib64EGL_translator.so -> lib64EGL_translator.so # ldconfig -p | grep lib64 lib64EGL_translator.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/lib64EGL_translator.so 

a

 # ldconfig -v | grep lib64 ldconfig: Can't stat /lib/i486-linux-gnu: No such file or directory ldconfig: Can't stat /usr/lib/i486-linux-gnu: No such file or directory ldconfig: Path `/lib/x86_64-linux-gnu' given more than once ldconfig: Path `/usr/lib/x86_64-linux-gnu' given more than once ldconfig: /lib/i386-linux-gnu/ld-2.13.so is the dynamic linker, ignoring ldconfig: /lib/x86_64-linux-gnu/ld-2.13.so is the dynamic linker, ignoring 

Creating a link manually does not change anything:

 # ln -s /opt/android-sdk-linux/tools/lib/lib64EGL_translator.so /usr/lib/x86_64-linux-gnu/ # ldconfig 
  • Is my processor old for KVM?
  • How can I provide the missing library?
  • What else can I do to speed up emulation?
  • How to increase / avoid timeout?
  • What else can I do to use the emulator with jenkins?

thanks

+6
source share

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


All Articles