How do I install the anbox modules in kernel 6.0.0-11.2-liquorix-amd64?
Juan_David95
Status: Curious
Joined: 12 Dec 2022
Posts: 8
Reply Quote
friends, I'm trying to use anbox but when I try to check the kernel modules for anbox they don't show up with these commands:

sudo ls -l /lib/modules/`uname -r`/kernel/drivers/android/binder_linux.ko

sudo ls -l /lib/modules/`uname -r`/kernel/drivers/staging/android/ashmem_linux.ko

Is there any way to install them in the kernel? option that I prefer because I use this version of the kernel and it works well for me:

Linux JuanDavid 6.0.0-11.2-liquorix-amd64 #1 ZEN SMP PREEMPT_DYNAMIC liquorix 6.0-8.1~bullseye (2022-12-02 x86_64 GNU/Linux

on github they say that this kernel version has the modules for anbox 5.14.0-6.4-liquorix-amd64. https://github.com/anbox/anbox/issues/1910

If it cannot be installed in my kernel version, is there a more up-to-date version that has the anbox modules?
Back to top
Juan_David95
Status: Curious
Joined: 12 Dec 2022
Posts: 8
Reply Quote
I tried kernel 5.14.0-19.2-liquorix-amd64 and I like it because on my PC it is faster than 6.0 and it manages swap very well; It looks like it's well patched. But I get the same error:

:: Code ::
sudo modprobe ashmem_linux
modprobe: FATAL: Module ashmem_linux not found in directory /lib/modules/5.14.0-19.2-liquorix-amd64

:: Code ::
sudo modprobe binder_linux
modprobe: FATAL: Module binder_linux not found in directory /lib/modules/5.14.0-19.2-liquorix-amd64


"Debian has enabled these modules since kernel 4.17.3. So you don’t need to bother how to install. Currently kernel 4.17.3 and above are only available in Debian Unstable." this says the anbox page https://docs.anbox.io/userguide/install_kernel_modules.html

In the debian kernel if the modules appear:
:: Code ::
sudo ls -l /lib/modules/`uname -r`/kernel/drivers/staging/android/ashmem_linux.ko
[sudo] password for juan:
-rw-r--r-- 1 root root 28507 dic 13 15:46 /lib/modules/5.10.0-20-amd64/kernel/drivers/staging/android/ashmem_linux.ko


but apparently this does not apply to liquorix. how do i install them?
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1135
Reply Quote
In kernel 5.19, ashmem was removed in favor of memfd: github.com/zen-kernel/zen-kernel/issues/293

Anbox should have been updated to support that. If it doesn't, that means it's incompatible with kernel 5.19 or higher.

Also, I'm not sure why you're trying to modprobe with _linux at the end.

:: Code ::
$ modinfo binder
name:           binder
filename:       (builtin)
license:        GPL v2
file:           drivers/android/binder
parm:           debug_mask:uint
parm:           devices:charp
$ modinfo ashmem
modinfo: ERROR: Module ashmem not found.


Also per Arch Wiki, Anbox is incompatible with 5.19 and later kernels: wiki.archlinux.org/title/Anbox#Using_Linux-Zen
:: Quote ::
Warning: According to this commit in linux kernel there are no ashmem any longer in versions from 5.18 but memfd is here instead. However, anbox developers didn't fix their software to use memfd so there is high probability that anbox will not work with linux-zen kernel at all for some time.


EDIT: Upstream issue, it appears there's no resolution and they're asking for donations to support engineering to port to memfd or something else: github.com/anbox/anbox/issues/2042
Back to top
Juan_David95
Status: Curious
Joined: 12 Dec 2022
Posts: 8
Reply Quote
Humm given the new information you gave me I did the tests in liquorix 5.14 and this is the output:

:: Code ::
$ uname -a
Linux JuanDavid 5.14.0-19.2-liquorix-amd64 #1 ZEN SMP PREEMPT liquorix 5.14-25.1~bullseye (2021-11-17) x86_64 GNU/Linux
juan@JuanDavid:~
$ modinfo binder
name:           binder
filename:       (builtin)
license:        GPL v2
file:           drivers/android/binder
parm:           debug_mask:uint
parm:           devices:charp
juan@JuanDavid:~
$ modinfo ashmem
modinfo: ERROR: Module ashmem not found.


Apparently in liquorix the version 5.14 of the kernel also lacks the ashmem module.

you are using this guide to successfully install anbox https://www.linkedin.com/pulse/aplicaciones-android-en-debian-luis-guti%C3%A9rrez-l%C3%B3pez/?originalSubdomain=es
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1135
Reply Quote
Everyone seems to have different experiences with Anbox on Liquorix. Part of it must be the poor documentation online. I just googled "liquorix" and "anbox" and found this post claiming Liquorix works: github.com/anbox/anbox/issues/1910#issuecomment-926000409

IMO, I recommend you switch away from Anbox. It's considered unmaintained at this point and Waydroid is the way to go. Considering Anbox won't and probably won't even work with kernel 5.19 and later, you can consider Anbox unsupported by Liquorix.
Back to top
Juan_David95
Status: Curious
Joined: 12 Dec 2022
Posts: 8
Reply Quote
You are right, I was reading and I have realized that anbox has many flaws when it comes to emulating android apps. WayDroid promises to be better. I'll do the tests and see how it goes.

Thank you for paying attention to this question.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours