Install Kernel Modules

Install with DKMS

In order to support the mandatory kernel subsystems ashmem and binder for the Android container you have to install two DKMS based kernel modules. The source for the kernel modules is maintained by the Anbox project here.

At the moment we only have packages prepared for Ubuntu in a PPA on Launchpad. If you want to help to get the packages in your favorite distribution please come and talk to us or submit a PR with the distribution specific packaging.

Install DKMS package from PPA

In order to add the PPA to your Ubuntu system please run the following commands:

$ sudo add-apt-repository ppa:morphis/anbox-support
$ sudo apt update
$ sudo apt install linux-headers-generic anbox-modules-dkms

These will add the PPA to your system and install the anbox-modules-dkms package which contains the ashmem and binder kernel modules. They will be automatically rebuild every time the kernel packages on your system update.

Note

Please install the corresponding header package for your running kernel, if you’re not using the default one.

After you installed the anbox-modules-dkms package you have to manually load the kernel modules. The next time your system starts they will be automatically loaded.

$ sudo modprobe ashmem_linux
$ sudo modprobe binder_linux

Now you should have two new nodes in your systems /dev directory:

$ ls -1 /dev/{ashmem,binder}
/dev/ashmem
/dev/binder

Install with in-tree modules

Android ashmem and binder modules are in linux kernel tree. So it’s possible to build them as in-tree modules.

You can enable them, by looking at the following configuration,

However if you don’t want these modules to be built-in for your kernel, you can apply the following patches, to build them as modules.

Debian has enabled these modules since kernel 4.17.3. So you don’t need to bother how to install. Currently kernel 4.17.3 and above are only available in Debian Unstable.

Other distributions are welcome to take these patches and enable them by default.