Android O HIDL not available

徘徊边缘 提交于 2019-12-05 07:24:33

I've succeeded in running my fingerprint HAL on Android 8.1 executing on HiKey 96 board after modified files as below.

Firstly, it's necessary that adding HIDL configures to declare a device as a vendor or you would get VTS failed.

About HIDL configures
device/linaro/hikey/manifest.xml
+<hal format="hidl">
    <name>android.hardware.biometrics.fingerprint</name>
    <transport>hwbinder</transport>
    <version>2.1</version>
    <interface>
        <name>IBiometricsFingerprint</name>
        <instance>default</instance>
    </interface>
</hal>

Secondly, finger service will be started after you define it in the file below.

device/linaro/hikey/device-common.mk
+#init finger service and copy
 android.hardware.biometrics.fingerprint@2.1-service.rc to 
 system/vendor/etc/init
+PRODUCT_PACKAGES += \
    +android.hardware.biometrics.fingerprint@2.1-service
    +# copy permission file of finger service
+PRODUCT_COPY_FILES += \
    +frameworks/native/data/etc/android.hardware.fingerprint.xml:system/etc
    /permissions/android.hardware.fingerprint.xml

Finally, check finger service has been started and running in Android system by using terminal commands such as "adb shell" and "ps | grep finger".

Any suggestion is welcome.

I found out that I need to add the code to the manifest.xml
(Ref. https://source.android.com/devices/architecture/vintf/objects )

    <hal format="hidl">
        <name>android.hardware.biometrics.fingerprint</name>
        <transport>hwbinder</transport>
        <impl level="generic"></impl>
        <version>2.1</version>
        <interface>
            <name>IBiometricsFingerprint</name>
            <instance>default</instance>
        </interface>
    </hal>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!