4 ms·
Since Binder is a kernel feature, how do they get it to work?
by pizzalife 2y ago
Since Binder is a kernel feature, how do they get it to work?
- homebrewer 2y agoYou're expected to install a kernel that has the module, or build it yourself. I use linux-zen which ships binder out of the box.
- yonatan8070 2y agoAccrding to the Arch Wiki, it uses the kernel modules. Have a look at section 1.4 here: https://wiki.archlinux.org/title/Waydroid https://wiki.archlinux.org/title/Waydroid
- refulgentis 2y agowritten 6 years ago: "The binder kernel driver has been present in the upstream Linux kernel for quite a while now." https://brauner.io/2019/01/09/android-binderfs.html https://brauner.io/2019/01/09/android-binderfs.html
- jeroenhd 2y agoWhile it's part of upstream Linux, many kernels come with it disabled because it has a long history of security issues and basically nothing but Android uses it. It also liked to trigger kernel panics for me on Ubuntu 22.04, but that could be a weird hardware issue.
- refulgentis 2y agoAh, interesting...man, software is fun. I wouldn't have guessed in a million years that it could cause panics as an optional component, like, it shouldn't be running code unless it is being used, and it shouldn't be called because it isn't mandatory in the kernel. I guess I'm still grokking software complexity, Linux, and how much work an OS is truly is, 25 years after I built my first Linux box...because in another sense, of course that could happen.
- Muromec 2y agoWhat does this binder thing even do? I get it's an IPC something, but why does android need it's own special kernel-level IPC?
- teraflop 2y agoThere's some general information about it here: https://elinux.org/Android_Binder https://elinux.org/Android_Binder A binder transaction behaves sort of like a syscall, in the sense that a client process can immediately, synchronously transfer control to a server thread, rather than just enqueueing a message to be processed whenever the server gets around to it. This enables Android to separate many of its components into different processes (at different privilege levels), and use binder for RPCs that are on the "critical path" for user interaction, without incurring impractical amounts of overhead or latency.
- esprehn 2y agoWikipedia has a good explanation of Binder and the history which goes way back to Be OS. https://en.wikipedia.org/wiki/OpenBinder https://en.wikipedia.org/wiki/OpenBinder It's more like a micro services framework that abstracts threads and processes. Fuchsia takes the approach to the conclusion and powers the entire OS through a similar system: https://fuchsia.dev/fuchsia-src/concepts/fidl/overview https://fuchsia.dev/fuchsia-src/concepts/fidl/overview
- tuananh 2y agoeasiest way is to use zen kernel because it's already baked in.
- WhyNotHugo 2y agoYour host kernel needs to have binderfs.
- buyucu 2y agoBinder has been on the mainline Linux kernel for a long long time.