How to run an Android emulator from Shell on an Ubuntu server

I installed the Android SDK and JDK on Ubuntu Server 14.04 x64. But when I run AVD, I got

error: "SDL initialization failed, the reason is that there is no video device available"

I am following this https://stackoverflow.com/a/312632/how-to-setup-suploads-suite-query-suite/questions/1075742/...

Should I install any desktop on an Ubuntu server?

+5
source share
3 answers

Try to start the emulator without a GUI by following these steps:

From: http://paulemtz.blogspot.com/2013/05/android-testing-in-headless-emulator.html

Then, to start the headless emulator:

 emulator -avd test -no-skin -no-audio -no-window 

The "-no-skin" option removes the emulator buttons, such as the home and other hardware keyboard keys.

The "-no-audio" option disables sound support.

Finally, the -no-window option disables the display of the emulator's graphical window.

Note that -avd test will need to be modified to reference your own emulator image (AVD).

+8
source

with

 emulator -avd test -no-audio -no-window 

I can run the emulator on the server, but the device is still offline.

 adb kill-server adb start-server 

could not help. I think the emulator does not start correctly. Any help?

0
source

You cannot run the emulator in the Ubuntu server version. The emulator requires a GUI . What server OS do not have.

Use Ubuntu Desktop OS Rather

Then connect the server and the desktop , get the APK and download it.

If you still want to use Ubuntu Server with a graphical interface, refer to this and submit the question using Ubuntu server tags.

-1
source

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


All Articles