Binder not in kernel (context: installing anbox)

Hello there! I have in mind to try anbox, an android compatibility layer for Linux. It requires two kernel modules to be installed: ashmem and binder. As far as I can tell, ashmem is supported by the manjaro kernel but binder is not:

$ ls -1 /dev/{ashmem,binder}
ls: cannot access '/dev/binder': No such file or directory
/dev/ashmem
$ uname -a
Linux zzzzzz 5.14.10-1-MANJARO #1 SMP PREEMPT Thu Oct 7 06:43:34 UTC 2021 x86_64 GNU/Linux

Is there a specific reason why binder is not supported? (for example, it’s a security no-go maybe?) I’ve seen workarounds where people install custome kernels from AUR, but I’m not too enthusiastic about diverging from the official manjaro kernels.

You don’t need to install custom kernel. According to ArchWiki, you can install anbox-modules-dkms from AUR to use anbox.

i also had same problem i solved it i will advise to keep in mind that these modules dont work with all kernel from my point of view i will only say to use these with only and only kernel 4.19 or 5.10 otherwise your kernel might crash on boot

1 Like

As far as I can tell, those AURs only work for a subset of kernels. They didn’t work with mine (5.14.10).

Hello folks!

Is anyone here using an android emulator? I was using the one that comes with the Android Studio, but it’s not really for daily usage outside of app development. Someone recommended Anbox, but it really doesn’t work with the default manjaro kernels. Any other options you found to be useful?

Thanks!

Hello folks!

Is anyone here using an android emulator? I was using the one that comes with the Android Studio, but it’s not really for daily usage outside of app development. Someone recommended Anbox, but it really doesn’t work with the default manjaro kernels. Any other options you found to be useful?

Thanks!

What do you hope to achieve that cannot be done otherwise?

Anbox looks like exactly what I’m looking for, but it’s not working with Manjaro kernels. I’m wondering if people have experience with similar tools. I found waydroid, but it also doesn’t work with manjaro because of the same kernel issues.

What kernel issues?

The binder kernel module is missing: Binder not in kernel (context: installing anbox) - #2 by cges30901

Have you tried to build the dkms package for the modules?

anbox-modules-dkms

Manjaro Kernels should normally support Anbox: https://gitlab.manjaro.org/packages/core/linux514/-/blob/master/PKGBUILD#L113-115

1 Like

Yes, as I explained above, anbox-modules-dkms doesn’t work.

Interesting, I still get the following from anbox system-info:

kernel:
  version: Linux version 5.14.10-1-MANJARO (builduser@fv-az72-723) (gcc (GCC) 11.1.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP PREEMPT Thu Oct 7 06:43:34 UTC 2021
  binder: false
  binderfs: false
  ashmem: true

ashmem is detected, but binder isn’t.

Nevermind, binder is in Manjaro kernel and Anbox works with Manjaro. But it does not work out of the box, and some fine tuning is required. Furthermore, if you follow the instructions in the Arch wiki, you can mess things up if you’re not careful (for example installing anbox-modules-dkms leads to things breaking).

I’ve seen lots of anbox-related questions in the forum. @philm & @linux-aarhus: How can I best record this knowledge so others do not have to spend as much time on this as I have?

If you feel up to it, you could create a “[HowTo] run anbox on Manjaro” topic in #contributions.

1 Like

I will do that! I still need to figure out how to connect Anbox to internet (broken atm), but I’ll wrie a guide once I get it working.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.