Skip to content

Android VM in a Browser (via Apache Guacamole)

Running an Android VM in a web browser lets you run Android applications from any computer. This lets you test out apps, or even suspicious programs without compromising your actual device.

The setup:

Getting Started

To begin, first setup virt-manager in Docker, as well as Apache Guacamole, with the instructions here.

Once you have virt-manager in Docker running, download and install the Android-x86 image on the VM.

Then, enable the 'Display VNC' device in QEMU, choosing an appropriate unused port.

Finally, in Apache Guacamole, setup a VNC connection to the server (via host.docker.internal) on the port you chose earlier.

Note that you will need to add the following to your docker-compose.yml in order for the host to be accessible via host.docker.internal:

services:
    guacd:
        image: guacamole/guacd
        extra_hosts:
            - "host.docker.internal:host-gataeway"

Notes

  • Android-x86 does not support the MediaProjection API, so other VNC servers like droidVNC will not work.

    • This is why I use the VNC server from QEMU instead. Note that if you open the embedded viewer in virt-manager, it will disconnect other listening VNC viewers.
  • For full desktop support (free-form window resizing etc), use 'Taskbar' as the default home app.

  • When formatting the disk partitions, use MBR instead of GPT, otherwise grub will not work.
  • To get internet access on the Android VM, connect to VirtWifi.

Comments