参考文档:http://blog.chinaunix.net/uid-149881-id-4728064.html
编译工作
libhybris Building
代码地址:https://github.com/mer-hybris/libhybris
- Install required packages.
sudo apt-get install make automake autoconf libtool pkg-config
- Get Android headers. Download the tar.gz directly from the package repository page, select the correct Android API level (23 in my case for Android 6.0.1) and put the headers in
usr/include/android-headers
.wget https://launchpad.net/ubuntu/+archive/primary/+files/android-headers_23.orig.tar.gz tar -xvzf android-headers_23.orig.tar.gz sudo mv -f android-headers-23/23 /usr/include/android-headers rm -rf android-headers_23.orig.tar.gz android-headers-23
- Get libhybris source and enter the directory
git clone git@github.com:libhybris/libhybris.git cd libhybris/hybris
- Run the auto configuration
./autogen.sh --with-android-headers=/usr/include/android-headers --prefix=/opt/libhybris
- Build
make
- Install
sudo make install
libhardware Building
代码地址:https://github.com/mer-hybris/android_hardware_libhardware