Q 4.0 Anbox inside Whonix


Has anyone succeed to run Anbox inside Whonix on the Qubes 4.0?

This how-to looks easy but I struggle with the understanding (how it works) of the headers/VM kernel and some of the required modules ashmem and binder.

Else, has anyone managed to run an Android (even AndroidX86) inside a Qubes? I would like to avoid to build my own .iso (300GB disk storage that I don’t have)


Also see:

I’ve done it. It wasn’t as bad as I thought it would be. The only tricky part is that you have to set kernel to “none” in VM settings, unmount /dev/xvdd inside the template, and then (re)install the kernel and anbox, without rebooting between steps. I made the mistake of installing while /dev/xvdd was still mounted, and then unsurprisingly the anbox kernel modules disappeared upon reboot.

Also be careful not to stop the VM between setting kernel to “none” and reinstalling the kernel, or presumably the VM will be temporarily unbootable.

Finally, don’t forget to make the android image file persistent (and local to the AppVM rather than the TemplateVM) using bind-dirs.sh, if that’s how you intend to use it.

From what I remember, the rest was pretty much just like installing any other package.

You might want to make a clone of the Whonix template first and install anbox in the clone, so that you can easily start over if something goes wrong.

Good luck :slight_smile:


Thanks @Cappire for the tips
@adw I’ve went through the Git issue but @Cappire pointed out my issue with Kernel

  1. Create new qubes (Standalone qube copied from a template -> debian-10, sys-whonix as NetVM)

  2. Go to settings and select Kernel none and Virtualization HVM

  3. Start a terminal in the newly created qube (updated & upgraded)
    sudo apt-get update && sudo apt-get dist-upgrade
    sudo apt-get install linux-image-amd64 linux-headers-amd64 adb fastboot anbox

  4. Get the .img and verify signature https://www.whonix.org/wiki/Anbox
    sudo mv android_amd64.img /var/lib/anbox/android.img

  5. you need to issue the following command to load the respective kernel modules without rebooting
    sudo modprobe ashmem_linux
    sudo modprobe binder_linux

Thank you!