anbox-modules icon indicating copy to clipboard operation
anbox-modules copied to clipboard

There is no /dev/binder.... binder is always missing in /dev/

Open danielkcaher opened this issue 4 years ago • 7 comments

daniel  optiplex  ../anbox-modules-master  sudo modprobe ashmem_linux

daniel  optiplex  ../anbox-modules-master  sudo modprobe binder_linux

daniel  optiplex  ../anbox-modules-master  lsmod | grep -e ashmem_linux -e binder_linux binder_linux 180224 0 ashmem_linux 20480 0

daniel  optiplex  ../anbox-modules-master  ls -alh /dev/binder /dev/ashmem ls: cannot access '/dev/binder': No such file or directory crw------- 1 root root 10, 58 Jun 13 12:27 /dev/ashmem

Please kindly help me out

danielkcaher avatar Jun 13 '20 18:06 danielkcaher

Can you please try the following (method from #49)?

$ sudo mkdir /dev/binderfs
$ sudo mount -t binder binder /dev/binderfs
$ anbox session-manager

ghost avatar Jun 18 '20 01:06 ghost

I had the same issue when I was using the anbox-modules-dkms package from the PPA. Installation worked fine when I used the install insctruction here: https://github.com/anbox/anbox-modules. But make sure you reboot after the installation for /dev/binder to show up.

damian101 avatar Jul 09 '20 15:07 damian101

Can you please try the following (method from #49)?

$ sudo mkdir /dev/binderfs
$ sudo mount -t binder binder /dev/binderfs
$ anbox session-manager

I tried this but I get

[ 2020-07-19 10:12:24] [session_manager.cpp:133@operator()] Failed to start as either binder or ashmem kernel drivers are not loaded

even though both drivers are loaded. Also sudo rmmod binder_linux fails with a busy message (even after unmounting). Is that normal?

Please help.

@quantitative-technologies Don't install the Anbox kernel modules from the PPA, they are not compatible with Linux kernel 5.0 and higher.

damian101 avatar Jul 20 '20 21:07 damian101

I have the same issue with Ubuntu 20.04, kernel 5.4.0, using the modules that come with the system:

$ sudo modprobe ashmem_linux
$ sudo modprobe binder_linux

$ lsmod | grep -e ashmem_linux -e binder_linux
ashmem_linux           20480  0
binder_linux          180224  0

$ ls -alh /dev/binder /dev/ashmem
ls: cannot access '/dev/binder': No such file or directory
crw------- 1 root root 10, 56 Aug 29 22:27 /dev/ashmem

$ sudo mkdir /dev/binderfs
$ sudo mount -t binder binder /dev/binderfs
$ anbox session-manager
[ 2020-08-29 20:30:48] [session_manager.cpp:133@operator()] Failed to start as either binder or ashmem kernel drivers are not loaded

In case it's useful:

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"

$ uname -a
Linux Fool 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

fwyzard avatar Aug 29 '20 20:08 fwyzard

same problem no /dev/binder even on ubuntu 20.04 with a custom-compiled 5.8 kernel /dev/ashmem works fine sudo mount -t binder binder /dev/binderfs works fine

happyme531 avatar Aug 30 '20 04:08 happyme531

Do the following command: $ anbox system-info

if the output looks like this:

...
kernel:
  version: Linux version 5.11.7android (mint@mint) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1 SMP Thu Mar 18 11:03:08 CET 2021
  binder: false
  ashmem: true

add the following lines to your $sudo nano /etc/fstab

#mount binderfs for anbox application
none                         /dev/binder binder   nofail  0      0

the argument nofail will make sure that if you boot a kernel without binder capabilities that it continues to boot and just throws an error.

reboot your computer and then do again: $ anbox system-info

...
kernel:
  version: Linux version 5.11.7android (mint@mint) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1 SMP Thu Mar 18 11:03:08 CET 2021
  binder: true
  ashmem: true

Normally the kernel source .config file should do this with the line: CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder,binderfs"

which should auto create those /dev/binder; /dev/hwbinder; /dev/vndbinder; /dev/binderfs device points. If not make sure you add the word binder.

But unfortunately it is still not working for me yet - either a bug or i miss something. So the fstab method works fine for me.

SoulInfernoDE avatar Mar 26 '21 06:03 SoulInfernoDE