Goal of this project is to use Android Binder at Linux desktop environment. The most of source code was come from Android Source Repositories(Android 14). But, the source code was modified slightly for Linux dekstop.
- Kernel 5.16.x is required because of the definition of BINDER_ENABLE_ONEWAY_SPAM_DETECTION.
- Linux kernel's Binder must be enabled. https://www.kernel.org/doc/html/latest/admin-guide/binderfs.html
- libselinux and libsepol must be installed. http://userspace.selinuxproject.org/
- 'libc++' and 'fmt' must be installed too.
- CMake is used as a build system.
$ cd binder-linux $ source ./env.sh $ android_clone
$ m
Please refer following two external documents.
https://www.kernel.org/doc/html/latest/admin-guide/binderfs.html#mounting-binderfs https://wiki.archlinux.org/title/Anbox#Mounting_binderfs
Change output directory.
$ cout
Create binder device file
$ ./binder_device /dev/binderfs/binder-control binder $ chmod a+rw /dev/binderfs/binder
Run servicemanager
$ ./binder_sm /dev/binderfs/binder &
Run echo service
$ ./binder_test server &
Run echo client
$ ./binder_test
$ ninja install
binder-linux does not support AIDL compiler. Please use the AIDL compiler of Android build tools. https://developer.android.com/studio/releases/build-tools
Remove unnecesary libraries from build.