Marius Gripsgard authored 2 years ago
92eae373
Name | Last commit | Last update |
---|---|---|
hwtests | Add some hardware tests | 2 years ago |
src | Dont do first_stage, dont set time values and dont wait for coldboot | 2 years ago |
.gitignore | Inital commit | 2 years ago |
CMakeLists.txt | Hack togheter an init thingy | 2 years ago |
readme.md | Update readme a little | 2 years ago |
HIDL for linux
This builds and generates HIDL headers and binaries.
This is work in progress, expect bugs and failures!
How it works
HIDL/treble uses a server-client format all using androids binder, and all vendor libraries does only depend on a limited set of libraries from /system, this makes it easy for us to create a enviroment with the needed services and libraries the vendor services need. Also since they use binder we can call any hardware services from glibc without using libhybris. We can also easily support new devices since all that is needed is treble support and to rebuild the kernel with the reqired configs and our initrd.
How to test
You will need to mount /vendor partition and mount/provide /system (android 9.0)
Disable all inits from /system, we dont need any of these at this moment. (rm or mv /system/etc/init)
Start the init binary built from this project. Start hwservicemanager built from this project. Start vendor service you need (example: /vendor/bin/hw/android.hardware.vibrator@1.1-service) Run hw tests (example: hwtest_vibrator)
LL-NDK includes the following libraries: libEGL.so, libGLESv1_CM.so, libGLESv2.so, libGLESv3.so, libandroid_net.so, libc.so, libdl.so, liblog.so, libm.so, libnativewindow.so, libneuralnetworks.so, libsync.so, libvndksupport.so, and libvulkan.so,
binder-for-linux 配合 Android 10 以上 driver
README.md
binder-for-linux
binder-for-linux is an experimental project to evaluate the feasibility of porting Android Binder IPC subsystem to Ubuntu Linux.
Environment
Ubuntu 14.04.4 LTS
Linux Kernel 4.2.0-27
gcc 4.9.3
Codebase
Binder driver: mainline kernel 4.2.0-27-generic
Android Framework version: android-6.0.1_r46
Modifications
Make binder & ashmem driver dynamically loadable
Modified as a standard loadable kernel module
Use kallsyms and a shell script to generate symbol dependencies that are not exposed by kernel (e.g. get_vm_area)
Fix compatability issues after replacing Bionic C library with glibc
Fix compatibility issues of atomic library
Some are changed to use standard C++ atomic library (C++11 and gcc 4.9.3+ are required)
cutils/atomic.h is re-implemented with x86 atomic instructions
Dependencies to Android log daemon and SELinux library are removed
And other small fixes...
Get Started
To compile all from source,
$ ./project.sh makeall
Now you can install kernel modules (binder & ashmem) by,
$ ./project.sh insmod
Then run Service Manager in background,
$ sudo servicemanager/servicemanager &
We also prepared a benchmark program to perform correctness test and performance test,
$ sudo test/binderAddInts -n 100 -p 0 # correctness test with 100 iterations
$ sudo test/binderAddInts -n 10000 -p 4096 # performance test with 4K payload and 10000 iterations