1.安装依赖库
# sudo apt-get install make automake autoconf libtool pkg-config gawk libwayland-dev
libegl1-mesa-dev wayland-protocols libwayland-bin
2.提取Android头文件(Android6.0 API 23为例子)
# wget https://launchpad.net/ubuntu/+archive/primary/+files/android-headers_23.orig.tar.gz
Or
# https://github.com/ubports/android-headers
注:或者下载最新NDK提取需要api级别头文件
<1>.方式一
# tar -xvzf android-headers_23.orig.tar.gz
# sudo mkdir -p /usr/include/android-headers
# sudo cp -rf android-headers-23/23 /usr/include/android-headers
注意如果不行,则需要获取android源头文件
<2>.方式二
# cd libhybris/utils
# ./extract-headers.sh android8.1.0/ /home/android-headers 8 1 0 //8 1 0:为android源码版本
# cp -rf /home/android-headers /usr/local/include
注意:需要下载、配置ARM交叉编译环境
3.下载libhybris库,编译、安装到ARM环境下(注意不是x86)
# git clone https://github.com/libhybris/libhybris.git
# cd libhybris/hybris
//注释掉:tests
# emacs Makefile.am
+13 #tests
# sudo cp hardware/.libs/libhardware.so* /u