Skip to contentSkip to conversation

RFE: Make ANDROID_BINDER_IPC tristate

DISCUSSION Diederik de Haas 2 participants 7 messages Aug 16, 2025 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

Programs like Waydroid allows people to run Android in a Linux container but it needs ANDROID_BINDER_IPC to do that.
It would be really helpful if ANDROID_BINDER_IPC could be dynamically loaded when someone wants to use Waydroid (and unload when no longer needed). But currently ANDROID_BINDER_IPC is a 'bool' so either you have it at all times or you will never have it.

So hereby the request to make ANDROID_BINDER_IPC tristate so people that want to use it can load it when needed.

Debian has a patch to make it tristate since 2018, but it would be so much more useful to have it tristate upstream.

Cheers,
Diederik

#1 lore raw
Quoted 9 lines · Diederik de Haas

Hi,

Programs like Waydroid allows people to run Android in a Linux container but it needs ANDROID_BINDER_IPC to do that.
It would be really helpful if ANDROID_BINDER_IPC could be dynamically loaded when someone wants to use Waydroid (and unload when no longer needed). But currently ANDROID_BINDER_IPC is a 'bool' so either you have it at all times or you will never have it.

Quoted 5 lines

So hereby the request to make ANDROID_BINDER_IPC tristate so people that want to use it can load it when needed.

Debian has a patch to make it tristate since 2018, but it would be so much more useful to have it tristate upstream.

Please submit a patch to do so!

#2 lore raw
Quoted 11 lines · Greg Kroah-Hartman
Quoted 8 lines · Diederik de Haas

Programs like Waydroid allows people to run Android in a Linux container but it needs ANDROID_BINDER_IPC to do that.

So hereby the request to make ANDROID_BINDER_IPC tristate so people that want to use it can load it when needed.

Debian has a patch to make it tristate since 2018, but it would be so much more useful to have it tristate upstream.

Please submit a patch to do so!

I would have if I thought I had the knowledge/skills to do that, but I don't.

#4 lore raw
In reply to a message not in the archive
Quoted 5 lines · Todd Kjos

This is not feasible since binder relies on many kernel internal functions and data that cannot be exported for loadable module. Patches for this have been attempted in the past, but soundly rejected. You can see some of that discussion at
https://lore.kernel.org/lkml/[email protected]/.

That seems to be the upstreaming attempt (or at least trying to start a discussion about it) of the initial patch.
A lot could've happened in these 7 years, but apparently not enough for a different outcome. Good to know, thanks :-)

FWIW these are the current ones:
https://salsa.debian.org/kernel-team/linux/-/blob/debian/6.16.1-1_exp1/debian/patches/debian/export-symbols-needed-by-binder.patch
https://salsa.debian.org/kernel-team/linux/-/blob/debian/6.16.1-1_exp1/debian/patches/debian/android-enable-building-binder-as-module.patch

Cheers,
Diederik

Quoted 13 lines
Quoted 10 lines · Diederik de Haas
Quoted 9 lines · Greg Kroah-Hartman
Quoted 8 lines · Diederik de Haas

Programs like Waydroid allows people to run Android in a Linux container but it needs ANDROID_BINDER_IPC to do that.

So hereby the request to make ANDROID_BINDER_IPC tristate so people that want to use it can load it when needed.

Debian has a patch to make it tristate since 2018, but it would be so much more useful to have it tristate upstream.

#5 lore raw
In reply to Diederik de Haas
Quoted 7 lines · Diederik de Haas
Quoted 5 lines · Todd Kjos

This is not feasible since binder relies on many kernel internal functions and data that cannot be exported for loadable module. Patches for this have been attempted in the past, but soundly rejected. You can see some of that discussion at
https://lore.kernel.org/lkml/[email protected]/.

Quoted 7 lines

That seems to be the upstreaming attempt (or at least trying to start a discussion about it) of the initial patch.
A lot could've happened in these 7 years, but apparently not enough for a different outcome. Good to know, thanks :-)

FWIW these are the current ones:
https://salsa.debian.org/kernel-team/linux/-/blob/debian/6.16.1-1_exp1/debian/patches/debian/export-symbols-needed-by-binder.patch

Ah, that makes more sense, that patch is not going to be accepted upsteam sorry.

greg k-h

#6 lore raw
Quoted 13 lines · Greg Kroah-Hartman
Quoted 12 lines · Diederik de Haas
Quoted 5 lines · Todd Kjos

This is not feasible since binder relies on many kernel internal functions and data that cannot be exported for loadable module. Patches for this have been attempted in the past, but soundly rejected. You can see some of that discussion at
https://lore.kernel.org/lkml/[email protected]/.

That seems to be the upstreaming attempt (or at least trying to start a discussion about it) of the initial patch.
A lot could've happened in these 7 years, but apparently not enough for a different outcome. Good to know, thanks :-)

Quoted 5 lines
Quoted 2 lines

FWIW these are the current ones:
https://salsa.debian.org/kernel-team/linux/-/blob/debian/6.16.1-1_exp1/debian/patches/debian/export-symbols-needed-by-binder.patch

Ah, that makes more sense, that patch is not going to be accepted upsteam sorry.

I deliberately didn't link to those patches in my OP as I wanted to know if it was possible/feasible at all (perhaps with some rework). I was pretty sure if I had, the discussion would've only been about that specific implementation.

The functionality (ie having the possibility to run Waydroid) seems appealing (even ideal) to me, but (for myself) I didn't want to make it built-in and having it available as a loadable module seems like a great way to have both options in my (and other's) kernel. And a functionality which should be available upstream if at all.

Cheers,
Diederik