An open API service indexing awesome lists of open source software.

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

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.


$ 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

## 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.