https://github.com/hiking90/binder-linux
Android Binder for Linux Desktop
https://github.com/hiking90/binder-linux
android binder cpp
Last synced: about 2 months ago
JSON representation
Android Binder for Linux Desktop
- Host: GitHub
- URL: https://github.com/hiking90/binder-linux
- Owner: hiking90
- License: apache-2.0
- Created: 2016-08-14T14:23:17.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-06-17T11:59:56.000Z (4 months ago)
- Last Synced: 2025-06-17T12:43:44.774Z (4 months ago)
- Topics: android, binder, cpp
- Language: C++
- Homepage:
- Size: 342 KB
- Stars: 36
- Watchers: 2
- Forks: 16
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# About
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.## Prerequisites to build & run
1. Kernel 5.16.x is required because of the definition of BINDER_ENABLE_ONEWAY_SPAM_DETECTION.
1. Linux kernel's Binder must be enabled. https://www.kernel.org/doc/html/latest/admin-guide/binderfs.html
1. libselinux and libsepol must be installed. http://userspace.selinuxproject.org/
1. 'libc++' and 'fmt' must be installed too.
1. CMake is used as a build system.## Prepare
$ cd binder-linux
$ source ./env.sh
$ android_clone## Build
$ m## Mounting binderfs
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## Testing
Change output directory.
$ coutCreate binder device file
$ ./binder_device /dev/binderfs/binder-control binder
$ chmod a+rw /dev/binderfs/binderRun servicemanager
$ ./binder_sm /dev/binderfs/binder &Run echo service
$ ./binder_test server &Run echo client
$ ./binder_test## Install
$ ninja install## Aidl
binder-linux does not support AIDL compiler. Please use the AIDL compiler of Android build tools.
https://developer.android.com/studio/releases/build-tools## TODO
Remove unnecesary libraries from build.