Reputation: 5086
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.
Upvotes: 9
Views: 13175
Reputation: 1805
You can achieve this by starting a vnc server on your machine on display :2
, informing android emulator to use this display and start the emulator:
vncserver :2 -geometry 1080x1920 -depth 24
export DISPLAY=2
emulator -avd avd_name -qemu
There are several vnc servers for Linux. I recommend tightvnc (package tightvncserver
on Ubuntu).
vncserver
will probably run your xstartup
script located at folder .vnc
on your home folder. If you don't want that, just comment all lines on this file (deleting the file won't help).
geometry
should be screen dimensions of your avd. And it should have no skin.
Upvotes: 0
Reputation: 167
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:
Shut down the display of the emulator (optional) by using:
emulator @avd -no-window
In this way, your emulator display is just like the effect of "-qemu -vnc :2" with inputs. BTW, the "drag" is still not working.
Upvotes: 7