6

I've installed anbox from the default repositories.

The ashmem and binder modules are loaded:

$ lsmod | grep _linux
binder_linux          163840  0
ashmem_linux           20480  0

The anbox-container-manager system service is running:

$ systemctl status anbox-container-manager
● anbox-container-manager.service - Anbox Container Manager
   Loaded: loaded (/lib/systemd/system/anbox-container-manager.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-11-08 12:17:33 GMT; 7min ago
     Docs: man:anbox(1)
  Process: 1239 ExecStartPre=/sbin/modprobe ashmem_linux (code=exited, status=0/SUCCESS)
  Process: 1250 ExecStartPre=/sbin/modprobe binder_linux (code=exited, status=0/SUCCESS)
  Process: 1265 ExecStartPre=/usr/share/anbox/anbox-bridge.sh start (code=exited, status=0/SUCCESS)
 Main PID: 1334 (anbox)
    Tasks: 9 (limit: 4915)
   Memory: 11.3M
   CGroup: /system.slice/anbox-container-manager.service
           └─1334 /usr/bin/anbox container-manager --daemon --privileged --data-path=/var/lib/anbox

Nov 08 12:17:33 frog systemd[1]: Starting Anbox Container Manager...
Nov 08 12:17:33 frog systemd[1]: Started Anbox Container Manager.

But when I try to start the session manager it claims the kernel modules are not installed:

$ anbox session-manager
[ 2019-11-08 12:25:39] [session_manager.cpp:130@operator()] Failed to start as either binder or ashmem kernel drivers are not loaded

Is this a known issue?

Tom
  • 1,054
  • 3
  • 14
  • 25
  • What happens on `sudo modprobe binder_linux`? – Pilot6 Nov 08 '19 at 12:28
  • @Pilot6 - the modprobe appears to succeed, but the `anbox session-manager` result is still the same. – Tom Nov 08 '19 at 12:38
  • There' no anbox-modules package in the Anbox PPA for Ubuntu 19.10: https://launchpad.net/~morphis/+archive/ubuntu/anbox-support/+packages and those are required to get it to work, even though Anbox is installed via snap. – Logix Nov 09 '19 at 12:14
  • The modules are now in the mainline kernel & the package is (should be) unnecessary. – Tom Nov 11 '19 at 20:56
  • 1
    After installing Anbox via Ubuntu Software on 19.10 today, I get the same error. However in https://github.com/anbox/anbox/issues/1273 it is said that the issue should be fixed soon (in fact that already could have happened around these days). So keeping fingers crossed .. – Cor Nouws Nov 22 '19 at 15:08
  • Can you verify if binder is loaded via `anbox system-info`? – Fuseteam Dec 14 '19 at 02:01
  • https://superuser.com/a/1590708/511639 This resolved the issue for me on 20.04 – Doug Maurer Oct 06 '20 at 22:00

2 Answers2

2

The kernel modules are there, but /dev/binder isn't—because that's not the way the binder_linux module works, now. morphis however consider it not a bug, because they have a pull request to make anbox work with the current binder_linux module. As far as I can tell, you should be able to make it work with the "edge" channel of the snap. I.e.,

sudo snap install --devmode --edge anbox

but my experience with snaps is non-existent

Auspex
  • 1,088
  • 1
  • 10
  • 24
1

Same error here today, my system:

$ uname -a
Linux ntg-pc 5.3.0-26-generic #28-Ubuntu SMP Wed Dec 18 05:37:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

One thing I've noticed is that although modprobe works ok, only /dev/ashmem is created...

sudo modprobe ashmem_linux
$ sudo modprobe binder_linux
$ lsmod | grep -e ashmem_linux -e binder_linux
2:ashmem_linux           20480  0
3:binder_linux          163840  0
$ ls -alh /dev/binder /dev/ashmem
ls: cannot access '/dev/binder': No such file or directory
crw------- 1 root root 10, 53 Jan 21 19:10 /dev/ashmem
ntg
  • 521
  • 6
  • 17