Anbox kernel modules
Go to file
Anthony 96d5d960fe binder: fix NULL lock dereference in shrinker on Linux >= 6.13
Since Linux 6.13 the list_lru walk callback no longer receives the lru
lock; it lives in struct list_lru_one. binder_alloc_free_page_no_lock()
passes NULL as the lock, so binder_alloc_free_page() ends up calling
spin_unlock(NULL) as soon as kswapd runs the binder shrinker:

  BUG: kernel NULL pointer dereference, address: 0000000000000000
  RIP: 0010:_raw_spin_unlock+0x9/0x40
  Call Trace:
   binder_alloc_free_page+0xe1/0x360 [binder_linux]
   __list_lru_walk_one+0xdf/0x230
   list_lru_walk_node+0x52/0x230
   binder_shrink_scan+0xa7/0x100 [binder_linux]
   do_shrink_slab+0x154/0x3a0
   ...
   kswapd+0x1e2/0x360

The machine then hangs, typically under memory pressure, right after
resuming from suspend, or while writing a hibernation image.

Fall back to &lru->lock when no lock is passed, as upstream binder does.
2026-10-03 00:02:40 +02:00
binder binder: fix NULL lock dereference in shrinker on Linux >= 6.13 2026-10-03 00:02:40 +02:00
debian Remove ashmem 2025-08-01 07:22:20 +02:00
scripts Remove ashmem 2025-08-01 07:22:20 +02: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 Remove ashmem 2025-08-01 07:22:20 +02:00
anbox.conf Remove ashmem 2025-08-01 07:22:20 +02:00
INSTALL.sh Add old static symlinks needed by gbinder (waydroid) 2026-04-20 06:29:36 +02:00
README.md Remove ashmem 2025-08-01 07:22:20 +02:00
UNINSTALL.sh Add old static symlinks needed by gbinder (waydroid) 2026-04-20 06:29:36 +02:00

Anbox Kernel Module

This repository contains the kernel module 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 module and checking the created device:

 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 module:

     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 module was removed by trying to load the module and checking the created device:

 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