Kernel Modules: Binder and Ashmem are not included in Manjaro Kernel!

Anbox requires the kernel modules binder and ashmem, which are excluded from the manjaro kernel. I'm having no success installing them seperately and I don't know how I cleanly install a custom compiled kernel without screwing my system + can't find out how? Is there another way to install the kernel modules maybe?

I need some help. Will this be fixed? If not how do I fix it?

1 Like

Why not use the dkms packages in the AUR that will dynamically give you the modules?

 aur/anbox-image 1:2018.07.19-1 (+68 1.23) 
    Android image for running in Anbox
 aur/anbox-modules-dkms-git 1:r1096.ea2b7a3-1 (+135 2.92) 
    Required kernel module sources for Android
 aur/anbox-git 1:r1096.ea2b7a3-1 (+135 2.92) 
    Running Android in a container
1 Like

Look at the most recent comment by holdengreen (that is me): My system fails to build the modules from the AUR. I don't know why it fails. My kernel version is more recent and the package is a year old. Maybe I can find the sources for those modules and build them myself if nothing else works?

According to this it is particular for kernel 5.7+

The easiest thing I think would be to install any earlier kernel (5.4 is LTS) and its headers, then use the DKMS package.
Otherwise, you are correct, you would need to build the kernel with the relevant options as shown on the archwiki page.

Thanks! I installed 5.4 alongside 5.7 and 4x and it runs wonderfully with binder and ashmem enabled. Now I'm of to solve the next GL crash in Anbox.

Will you please share your process in step! currently I am in kernel 5.7, I can't remove that. So I want to run kernel 5.4 alongside of 5.7 to run anbox successfully.

In manjaro we just use mhwd-kernel or Manjaro Settings Manager to install (or remove) kernels.
Just install whatever one you want and select it from grub at boot.

Actually my idea is I want manjaro to run on 5.7 but I just want those kernel module from kernel 5.4 which are missing on kernel 5.7 and needed to run anbox. I want to run kernel 5.4 alongside with kernel 5.7.

You cant boot 2 kernels at once. That isnt what OP did.
Their initial problems were because they were running 5.7 .. the solution is to use a different kernel.
As shown in the linked Archwiki page, starting with kernel 5.7 in order to use Anbox you need to compile the kernel with specific options. Manjaro (and most other) kernels are not built that way ... so if you for whatever reason do not want to use a kernel earlier than 5.7 you would need to build 5.7+ yourself manually with those options.

What steps should I take to rebuild kernel 5.7. What I understand so far is, I have to download the kernel source and edit/modify the config file with above options and then compile or install? or something else?

I first installed anbox-modules-dkms-git from the AUR and then installed linux54 + linux54-headers with pacman, while the kernel installs you should see the dkms modules being installed also.

From your boot menu select Advanced options for Manjaro Linux and select the 5.4 Kernel to boot, it is installed alongside existing kernels.

I researched custom kernel compiling, if you can figure out how to do it properly then please show us. I still have a lot of questions...

Theres docs out there.
The Archwiki will provide both the ABS and the 'old school' way:

But .. manjaro kernels are different. There are patches and other things besides the generic kernel.
Not to mention handled/recognized by tools like mhwd/MSM.
So probably best to refer to some of the threads around here.. ex:

I tried to rebuild the kernel 5.7 based on above instruction. The steps I took as followed:
First I git clone the kernel source from manjaro gitlab. Then I extracted the archive. I edited/modified the config file with the options which are required for anbox. Then I ran this command "updpkgsums" on the same folder. after that I ran this command "makepkg -sri" to compile and install the kernel, which it did install the kernel without any error but I stiil can't find those two (ashmem_linux, binder_linux) kernel module needed for anbox! What did I wrong and what steps should I follow to rebuild kernel 5.7 with those option?
might be helpful

Maybe someone misses to read important stuff ...

Oh yeah. That whole concept is the bulk of this thread. :sweat_smile:
How I glazed over that it was the same offending 5.7+ .. I dont know.

@archmanjaro if you successfully built 5.7 with the correct options .. you still need to follow the archwiki here:

I'm assuming you are missing these last steps:

[note - make sure you have the headers for your kernel as well!]

#4. Enable binder:

sudo mkdir -p /dev/binderfs
sudo mount -t binder binder /dev/binderfs

#5. Start/enable the following services:

systemctl enable anbox-container-manager.service --now

I did try to mount binder but I got error "binder filesystem unknown". I think my building process was wrong, especially editing the config file. I modified the config file with text editor nano. then I did run "updpkgsums" to update pkgbuild. then I ran makepkg -sri, which compile and install the kernel without any error. But after install and reboot, I couldn't find those options on current config.gz. What did I wrong during the rebuild process?

This topic was automatically closed after 180 days. New replies are no longer allowed.

Forum kindly sponsored by