How to use Android emulator via VNC

white_gecko picture white_gecko · Oct 20, 2012 · Viewed 8.8k times · Source

I want to provide access to an Android emulator via VNC to let people test my App.

So far I could start the Android emulator with following command:

emulator -avd ice -verbose -qemu -vnc :2

I could also connect to it at port 5902 but I can't do any input, I don't know how to forward my mouse to the qemu.

Answer

naizheng TAN picture naizheng TAN · Dec 30, 2013

I guess the parameter "-qemu -vnc" will not work for android emulator's input. There are two hints: (1) the "-vnc" parameters are directed to qemu instead of android-emulator, and qemu-vnc may not support android's inputs (2)the VNC protocol does not define the "drag"/"move" which is a common operation for mobile.

However, there is a solution for your requirement:

  1. Shut down the display of the emulator (optional) by using:

    emulator @avd -no-window

  2. Install a vnc server. I recommend fastdroid-vnc, which is pretty good. (https://code.google.com/p/fastdroid-vnc/)

In this way, your emulator display is just like the effect of "-qemu -vnc :2" with inputs. BTW, the "drag" is still not working.