AdvancedBiometricPromptCompat
AdvancedBiometricPromptCompat copied to clipboard
Incorrect behavior of face authentication on Honor Play device
Device: Honor Play Android version: 9 There are problems with face authentication on Honor Play. The dialog displays text about fingerprint scanner even though biometric type is BIOMETRIC_FACE and authentication not working on this device.
Video:
https://user-images.githubusercontent.com/17468894/168077078-d8ac97fe-aa5e-4dd0-a1bb-af788b911660.mp4
Logs:
The library does not develop directly for Honor, but as I know, cause Honor is a sub-brand of Huawei, I expect that some API's can also be accessible on Honor devices. I'll try to investigate why FaceId doesn't work on Honor, I hope it's some minor changes.
Due to texts - used 'system' terma that exists in com.android.internal.R$string
. Probably I need to get a dump from some Huawei/Honor device to get more realistic strings ID's, cause now used 'default' for fingerprint/biometric
In log2.txt
there are lines:
FaceCamera - Occurs error validateClientPermissionsLocked:1066: Caller "dev.skomlach.biometric.app" (PID 10176, UID 6983) cannot open camera "1" without camera permission
So, it seems like permission problem
Okay, can you try test APK with Camera permission request? https://github.com/sergeykomlach/AdvancedBiometricPromptCompat/blob/main/app/app-debug.apk
Nothing changed. First time there was a face dialog which didn't authenticate. And second time it was just HARDWARE_UNAVAILABLE error
log.txt
@sandboiii sorry for late response. I start fixing device specific issues, and problem with Honor Play now in work. Can you try to test APK on your device?
Hey, text about fingerprint is fixed, but face biometric still doesn't work. Some events like [CheckBiometric.onUIOpened()] are missing from logs for unknown reason.
https://user-images.githubusercontent.com/17468894/188454070-9ce43a80-3a8a-4a84-90ac-92b84cf13760.mp4
I also tested face biometric on huawei p50 pro and it also doesn't work both current main branch and apk which you provided. But at least there are more logs with all events.
https://user-images.githubusercontent.com/17468894/188453381-6cd983d3-0695-4765-9550-946612aba4fb.mp4
@sandboiii Let's try step-by-step :)
- Honor Play - yes, the title should be fixed. Also from the video, I noticed that, at least, failed face recognition events were delivered to UI. Still not clear is possible to re-run the BiometricAuth flow -previously HARDWARE_NOT_AVAILABLE error happens. In two words: On Huawei/Honor devices we have 2 FaceManagers - "Huawei3dFaceManager" and "legacy" FaceManager. See code
From the logs from May 12, it seems like Honor Play was able to obtain both of them, but used "3dFace" in this case. But "legacy" implementation is still able to "listen" for events. In the test APK that I provide, I keep only "legacy" FaceManager to get maybe some progress or degradation in comparison with old implementation. So the next step - probably make sense to create a build only with "Huawei3dFaceManager" and check it too.
- Huawei P50 Pro: This is another case. From the video - I see the issue with the device model (and sensors).
But according to toast with "onSuccess Confirmed=BIOMETRIC_FACE" the FaceUnlock works pretty well and very fast.
Yeah, sorry about p50 😬. I actually asked another person to test this app and they didn't know what was supposed to happen. So they said that it didn't work, but actually it does.
@sandboiii I see :) Okay, let's close the issue about Huawei P50) If back to Honor Play. I prepare the build Huawei3DFaceManager.APK - plz check it, and some difference in behavior I hope we will notice. Thank you
Face auth seems to be working successfully, however person who tested this said that authentication succeeds even if you close the camera with your finger or if you turn screen away from your face. Also send logs button crashes the app, so they couldn't provide the logs. I will attach logcat stacktrace soon.
https://user-images.githubusercontent.com/17468894/189064000-35cb7b77-34d3-4c9e-af07-be56afd51bf8.mp4
Not very clear - user cancel dialog or "manager" do this. I don't see any fails/errors/success-related Toasts :(
@sandboiii any new tests/logs from the latest build?
I hope to get it this week, please wait a little bit more
Here are the logs, crash doesn't happen anymore cor-l29 Huawei3dFaceManager.txt