Anbox kernel modules
Go to file
Rahammetoela 4dfdec531d
dropped ashmem in the debian and scripts folder
2024-10-02 09:51:00 -03:00
binder Fixes for kernel 6.8 2024-02-10 08:49:38 +01:00
debian dropped ashmem in the debian and scripts folder 2024-10-02 09:51:00 -03:00
scripts dropped ashmem in the debian and scripts folder 2024-10-02 09:51:00 -03:00
.gitignore Update binder to the latest version 2021-09-26 18:54:51 +02:00
.travis.yml travis: Add kernel v5.4 2020-01-01 20:29:30 +01:00
99-anbox.rules drop ashmem 99-anbox.rules 2024-10-02 09:14:11 -03:00
INSTALL.sh drop ashmem from INSTALL.sh 2024-10-02 09:18:32 -03:00
README.md drop ashmem from README.md 2024-10-02 09:17:33 -03:00
UNINSTALL.sh drop ashmem from UNINSTALL.sh 2024-10-02 09:19:52 -03:00
anbox.conf drop ashmem from anbox.conf 2024-10-02 09:15:10 -03:00

README.md

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:

  • First install the configuration files:

     sudo cp anbox.conf /etc/modules-load.d/
     sudo cp 99-anbox.rules /lib/udev/rules.d/
    
  • Then copy the module sources to /usr/src/:

     sudo cp -rT binder /usr/src/anbox-binder-1
    
  • Finally use dkms to build and install:

     sudo dkms install anbox-binder/1
    

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

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

You are expected to see output like:

binder_linux          114688  0
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:

  • First use dkms to remove the modules:

     sudo dkms remove anbox-binder/1
    
  • Then remove the module sources from /usr/src/:

     sudo rm -rf /usr/src/anbox-binder-1
    
  • Finally remove the configuration files:

     sudo rm -f /etc/modules-load.d/anbox.conf
     sudo rm -f /lib/udev/rules.d/99-anbox.rules 
    

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 binder_linux
 lsmod | grep -e binder_linux
 ls -alh /dev/binder

You are expected to see output like:

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

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