Android O HIDL unavailable

I have a problem with Android O HIDL. The crash log shows that it cannot find the service.

However, I can see it on adb shell ps -A | grep fingerprint adb shell ps -A | grep fingerprint

 system 18758 1 17408 3276 pipe_wait 7c79e93e08 R android.hardware.biometrics.fingerprint@2.1-service ` 

Can someone give me a hint how to solve the problem? I checked https://source.android.com/devices/architecture/hidl/ but could not get the solution.

Error Log:

 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 
+5
source share
2 answers

I found out that I need to add code in manifest.xml
(Link 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> 
+1
source

I managed to run my HAL fingerprint on Android 8.1, executable on HiKey 96 after the modified files, as shown below.

First, you need to add the HIDL to configure the device to be declared as a provider, or that you lose 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> 

Secondly, the finger service will start 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, verify that the finger service has been started and is running on the Android system using terminal commands such as "adb shell" and "ps | grep finger".

Any suggestion is welcome.

+1
source

Source: https://habr.com/ru/post/1271098/


All Articles