在proting fingerprint sensor的时候,厂商给出的guide里需要将vfmService这个已经编译好的bin档放入
机台的system/bin目录下
具体的做法如下:
首先在源码中搜寻是否有类似的做法,因为这个bin档不需要编译,所以直接看mk文件里是否能够cp进system.img
在/device/asus/Z00L/目录下的
Z00L.mk文件中发现有下面几行,是touch的配置文件的cp过程
PRODUCT_COPY_FILES += \
device/asus/Z00L/ft5x06_ts.idc:system/usr/idc/ft5x06_ts.idc \
device/asus/Z00L/ft5x06_ts.kl:system/usr/keylayout/ft5x06_ts.kl \
device/asus/Z00L/ft5x06_ts.kcm:system/usr/keychars/ft5x06_ts.kcm \
device/asus/Z00L/vfmService:system/bin/vfmService
由于我们确认touch的配置文件会被拷贝所以在这里加入了vfmService的cp过程
通过make systemimg之后看到了out/target/product/Z00L/system/bin目录下出现了vfmService。
还有一个权限问题,也就是这个文件cp过去之后是否可执行
这个问题很简单,在增加这个文件的时候也就是把这个文件放在device/asus/Z00L/这个目录下时直接
chmod 777 ./vfmService
然后git add之后这个权限被保留
如果想要在打包img的时候修改权限,则到/system/core/include/private/android_filesystem_config.h
这个文件里有对机台内的各个目录和文件赋予权限,类似
{ 00755, AID_ROOT, AID_ROOT, 0, "bin/*" },对目录下的文件赋予权限
{ 00755, AID_ROOT, AID_SHELL, 0, "system/bin" },对目录文件赋予权限
机台的system/bin目录下
具体的做法如下:
首先在源码中搜寻是否有类似的做法,因为这个bin档不需要编译,所以直接看mk文件里是否能够cp进system.img
在/device/asus/Z00L/目录下的
Z00L.mk文件中发现有下面几行,是touch的配置文件的cp过程
PRODUCT_COPY_FILES += \
device/asus/Z00L/ft5x06_ts.idc:system/usr/idc/ft5x06_ts.idc \
device/asus/Z00L/ft5x06_ts.kl:system/usr/keylayout/ft5x06_ts.kl \
device/asus/Z00L/ft5x06_ts.kcm:system/usr/keychars/ft5x06_ts.kcm \
device/asus/Z00L/vfmService:system/bin/vfmService
由于我们确认touch的配置文件会被拷贝所以在这里加入了vfmService的cp过程
通过make systemimg之后看到了out/target/product/Z00L/system/bin目录下出现了vfmService。
还有一个权限问题,也就是这个文件cp过去之后是否可执行
这个问题很简单,在增加这个文件的时候也就是把这个文件放在device/asus/Z00L/这个目录下时直接
chmod 777 ./vfmService
然后git add之后这个权限被保留
如果想要在打包img的时候修改权限,则到/system/core/include/private/android_filesystem_config.h
这个文件里有对机台内的各个目录和文件赋予权限,类似
{ 00755, AID_ROOT, AID_ROOT, 0, "bin/*" },对目录下的文件赋予权限
{ 00755, AID_ROOT, AID_SHELL, 0, "system/bin" },对目录文件赋予权限