Home

Awesome

Build Status

Anbox Kernel Modules

This repository contains the kernel modules necessary to run the Anbox Android container runtime. They're split out of the original Anbox repository to make packaging in various Linux distributions easier.

Install Instruction

You need to have dkms and linux-headers on your system. You can install them by sudo apt install dkms or sudo yum install dkms (dkms is available in epel repo for CentOS).

Package name for linux-headers varies on different distributions, e.g. linux-headers-generic (Ubuntu), linux-headers-amd64 (Debian), kernel-devel (CentOS, Fedora), kernel-default-devel (openSUSE).

You can either run ./INSTALL.sh script to automate the installation steps or follow them manually below:

You can verify by loading these modules and checking the created devices:

 sudo modprobe ashmem_linux
 sudo modprobe binder_linux
 lsmod | grep -e ashmem_linux -e binder_linux
 ls -alh /dev/binder /dev/ashmem

You are expected to see output like:

binder_linux          114688  0
ashmem_linux           16384  0
crw-rw-rw- 1 root root  10, 55 Jun 19 16:30 /dev/ashmem
crw-rw-rw- 1 root root 511,  0 Jun 19 16:30 /dev/binder

Uninstall Instructions

ou can either run ./UNINSTALL.sh script to automate the installation steps or follow them manually below:

You must then restart your device. You can then verify modules were removed by trying to load the modules and checking the created devices:

 sudo modprobe ashmem_linux
 sudo modprobe binder_linux
 lsmod | grep -e ashmem_linux -e binder_linux
 ls -alh /dev/binder /dev/ashmem

You are expected to see output like:

modprobe: FATAL: Module ashmem_linux not found in directory /lib/modules/6.0.2-76060002-generic
modprobe: FATAL: Module binder_linux not found in directory /lib/modules/6.0.2-76060002-generic
ls: cannot access '/dev/binder': No such file or directory
ls: cannot access '/dev/ashmem': No such file or directory

Packaging:

Debian/Ubuntu:

sudo apt-get install devscripts dh-dkms -y 
git log --pretty=" -%an<%ae>:%aI - %s" > ./debian/changelog
debuild -i -us -uc -b 
ls -lrt ../anbox-modules-dkms_*.deb