我有Android O HIDL的问题。失败日志显示它无法找到服务。
但是我可以通过adb shell ps -A | grep fingerprint
system 18758 1 17408 3276 pipe_wait 7c79e93e08 R android.hardware.biometrics.fingerprint@2.1-service`
有人能给我一个如何解决问题的提示吗?我查了https://source.android.com/devices/architecture/hidl/但无法得到解决方案。
错误日志:
08-21 06:00:35.864 1890 2264 V FingerprintService: mDeamon was null, reconnect to fingerprint
08-21 06:00:35.864 1890 2264 I system_server: Looking for service android.hardware.biometrics.fingerprint@2.1::IBiometricsFingerprint/default
08-21 06:00:35.864 2240 2240 D wpa_supplicant: nl80211: Set mode ifindex 24 iftype 2 (STATION)
08-21 06:00:35.866 566 566 W /system/bin/hwservicemanager: getTransportFromManifest: Cannot find entry android.hardware.biometrics.fingerprint@2.1::IBiometricsFingerprint in either framework or device manifest, using default transport.
08-21 06:00:35.866 1890 2264 E system_server: service android.hardware.biometrics.fingerprint@2.1::IBiometricsFingerprint declares transport method EMPTY but framework expects hwbinder.
08-21 06:00:35.867 1890 2264 E FingerprintService: Failed to get biometric interface
08-21 06:00:35.867 1890 2264 E FingerprintService: android.os.RemoteException: HwBinder Error: (-2147483648)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.os.HwBinder.getService(Native Method)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.hardware.biometrics.fingerprint.V2_1.IBiometricsFingerprint.getService(IBiometricsFingerprint.java:44)
08-21 06:00:35.867 1890 2264 E FingerprintService: at com.android.server.fingerprint.FingerprintService.getFingerprintDaemon(FingerprintService.java:239)
08-21 06:00:35.867 1890 2264 E FingerprintService: at com.android.server.fingerprint.FingerprintService$FingerprintServiceWrapper.isHardwareDetected(FingerprintService.java:1198)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.hardware.fingerprint.IFingerprintService$Stub.onTransact(IFingerprintService.java:156)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.os.Binder.execTransact(Binder.java:674)
08-21 06:00:35.867 1890 2264 W FingerprintService: fingerprint HIDL not available
答案 0 :(得分:2)
我已成功在HiKey上执行的Android 8.1上运行我的指纹HAL 修改文件后的96板如下。
首先,添加HIDL配置以将设备声明为供应商或者您将使VTS失败是必要的。
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>
其次,在您在下面的文件中定义后,将启动finger服务。
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
最后,通过使用&#34; adb shell&#34;等终端命令检查finger服务是否已在Android系统中启动并运行和&#34; ps | grep finger&#34;。
欢迎提出任何建议。
答案 1 :(得分:1)
我发现我需要将代码添加到manifest.xml中 (参考https://source.android.com/devices/architecture/vintf/objects)
renderXXX()