Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Android emulator via VNC

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.

like image 992
white_gecko Avatar asked Oct 20 '12 20:10

white_gecko


1 Answers

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.

like image 171
naizheng TAN Avatar answered Sep 22 '22 02:09

naizheng TAN