Bug 1189456 - Add ashmem and binder drivers
Summary: Add ashmem and binder drivers
Status: RESOLVED WONTFIX
: 1219258 (view as bug list)
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: openSUSE Kernel Bugs
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-16 07:31 UTC by Martin Hauke
Modified: 2024-07-19 14:38 UTC (History)
9 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Hauke 2021-08-16 07:31:07 UTC
Anbox, ReDroid and other Android emulation/abstraction solutions need the ashmem and binder linux drivers.
These drivers are part of the mainline kernel since a some time.

https://anbox.io/
https://docs.anbox.io/userguide/install_kernel_modules.html
https://hub.docker.com/r/redroid/redroid

The debian guys are using patches for having these drivers built as modules:
https://docs.anbox.io/userguide/install_kernel_modules.html#install-with-in-tree-modules
Comment 1 Takashi Iwai 2021-08-16 12:32:28 UTC
All those android drivers are built-in only, and that's enough reason to push back for now, unfortunately.

The patches to build them as modules look promising, but they have to be upstreamed at first, as we have a policy "upstream first".
Comment 2 Takashi Iwai 2021-08-18 16:08:39 UTC
And those hackish patches for making modular would be hardly accepted by upstream; there has been already an attempt but failed:
  https://lore.kernel.org/linux-fsdevel/20180730143710.14413-1-christian@brauner.io
Comment 3 Jiri Slaby 2023-01-24 06:28:58 UTC
I'm afraid there is a little we can do about this until a proper solution is provided (and merged).
Comment 4 roke beedell 2023-10-10 15:04:34 UTC
So basically we'll never get WayDroid in the official repositories, then?
Comment 5 Takashi Iwai 2023-10-10 15:24:14 UTC
Right.  It has to be addressed in the upstream at first.
Comment 6 Dead Mozay 2023-10-12 05:38:29 UTC
Waydroid does not require any patches, you only need the included module already available in the kernel

CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
Comment 7 hui 2024-01-28 17:58:41 UTC
*** Bug 1219258 has been marked as a duplicate of this bug. ***
Comment 8 Dmitry Markov 2024-01-29 09:24:50 UTC
*** Bug 1219258 has been marked as a duplicate of this bug. ***
Comment 9 Takashi Iwai 2024-01-29 12:45:33 UTC
To repeat the point: as mentioned in comment 1, the problem is that binder stuff is provided only for built-in kernel.  That is, even if that's just a matter of a few kconfig knobs, enabling them will bring a potential problem on the kernel core unconditionally, and that's what we can't accept for the default kernel (that can be used for servers and other serious usages).

And, allowing binder to be built as modules needs some changes, and this was declined by the upstream.  This part has to be addressed in the upstream at first.

Meanwhile, building an unofficial kernel with the enablement of binder config is pretty easy.  I've set up OBS repos for Tumbleweed and Leap 15.5 kernels with the enablement of binder.  Those are found in OBS home:tiwai:kernel:binder-stable and home:tiwai:kernel:binder-sle15-sp5 repos, respectively.
  http://download.opensuse.org/repositories/home:/tiwai:/kernel:/binder-stable/standard/
  http://download.opensuse.org/repositories/home:/tiwai:/kernel:/binder-sle15-sp5/pool/

You can use those kernels instead of the official ones.  Those are linked targets, hence they will follow the Tumbleweed and SLE15-SP5 kernel changes and be rebuilt automatically upon each update.

Note that the above kernels are unofficial builds, and it means that you'd need to turn off Secure Boot.

Give it a try, and let me know if it's still something missing.
Comment 10 roke beedell 2024-01-29 16:29:34 UTC
(In reply to Takashi Iwai from comment #5)
> Right.  It has to be addressed in the upstream at first.

Do you know where I can track the issue describing what needs to be done upstream? Without it being present in this thread, the rationale for the WONTFIX is missing its most important element.
Comment 11 Ivan Ivanov 2024-01-29 16:56:41 UTC
It was described in comment#1. It should be possible to build 
Android IPC as "loadable module", not just as build-in module.

"CONFIG_ANDROID_BINDER_IPC=m"
Comment 12 Takashi Iwai 2024-01-29 16:59:09 UTC
And see comment 2.