Hi I've configured Android development environment in a remote dedicated server running Ubuntu 20.04 with the help of the tutorial https://proandroiddev.com/how-to-setup-android-sdk-without-android-studio-6d60d0f2812a.

Installed related tools by sdkmanager --install platform-tools emulator "build-tools;30.0.3" "platforms;android-30" "extras;android;m2repository" "extras;google;m2repository" "system-images;android-30;google_apis;x86_64" "system-images;android-30;google_apis_playstore;x86_64" "patcher;v4"

Created the avd by avdmanager --verbose create avd --force --name "generic_30" --package "system-images;android-30;google_apis;x86_64" --tag "google_apis" --abi "x86_64"

I had to install apt-get install libgl1-mesa-dev libglu1-mesa-dev to run the Android Emulator.

Ran the emulator with emulator -avd generic_30 -noaudio -no-window -no-boot-anim -gpu off -screen touch and it ran with desired output.

emulator: Android emulator version (build_id 7285888) (CL:N/A)
emulator: ERROR: FeatureControlImpl.cpp:269: Feature control already exists in create() call
handleCpuAcceleration: feature check for hvf
emulator: feeding guest with passive gps data, in headless mode
emulator: WARNING: Your AVD has been configured with an in-guest renderer, but the system image does not support guest rendering.Falling back to 'swiftshader_indirect' mode.
cannot add library /home/arnab/.android/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed
added library /home/arnab/.android/emulator/lib64/vulkan/libvulkan.so
cannot add library /home/arnab/.android/emulator/lib64/vulkan/libvulkan.so.1: full
emulator: INFO: GrpcServices.cpp:301: Started GRPC server at, security: Local
Your emulator is out of date, please update by launching Android Studio:
 - Start Android Studio
 - Select menu "Tools > Android > SDK Manager"
 - Click "SDK Tools" tab
 - Check "Android Emulator" checkbox
 - Click "OK"

emulator: INFO: boot completed
emulator: INFO: boot time 24232 ms
emulator: Increasing screen off timeout, logcat buffer size to 2M.
emulator: Revoking microphone permissions for Google App.

From my Windows 10 machine created SSH tunnel with the command ssh -NL 5554:localhost:5554 -L 5555:localhost:5555 user@xx.xx.xx.xx and connected adb with adb connect

With the command I could see that the device is also connected.

Connected devices & emulators
Searching for devices...
│ # │ Device Name             │ Platform │ Device Identifier │ Type   │ Status    │ Connection Type │
│ 1 │ sdk_gphone_x86_64_arm64 │ Android  │    │ Device │ Connected │ USB             │

Until this everything has worked as expected (or I think so).

Now my question is how to show the emulator window in my local Windows machine? It's possible I think. At-least this is how SauceLabs or other online mobile test suites may be working. Do you know any solutions as such for this?

  • What you are asking is just the standard x11 forwarding e.g. via SSH which works with all X11 programs. On Windows side you need an X11 server for displaying the forwarded windows. Alternatively you can install xrdp on the server and use Remote Desktop Client to start a GUI session on the server. Or you can try to use scrcpy via adb connection.
    – Robert
    Apr 28, 2021 at 8:42
  • I tried with xrdp first. But it didn't work due to some unknown reason. And the emulator screen always remained black. Also somehow VNC also didn't work for me. I'll surely look into scrcpy.
    – Arnab Das
    Apr 28, 2021 at 16:34


You must log in to answer this question.

Browse other questions tagged .