This is a virtual HAL implementation that is backed by system properties instead of actual hardware. It's intended for testing and UI development on debuggable builds to allow devices to masquerade as alternative device types and for emulators.
You can either run the FakeFaceEngine on a real device or a virtual device/cuttlefish. This document should help you to get started on either one.
After setting up a device, go ahead and try out enrolling & authenticating
Note, I'm running this via a cloudtop virtual device.
$ adb root $ adb shell settings put secure com.android.server.biometrics.AuthService.hidlDisabled 1 $ adb reboot
PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.biometrics.face.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/android.hardware.biometrics.face.xml PRODUCT_PACKAGES += \ android.hardware.biometrics.face-service.example \
# This is a temporary workaround $ adb root $ adb shell setprop persist.vendor.face.virtual.type RGB $ adb shell setprop persist.vendor.face.virtual.strength strong $ adb shell locksettings set-pin 0000 $ adb reboot
# authenticar_id,bucket_id:duration:(true|false).... $ adb shell setprop vendor.face.virtual.next_enrollment 1,0:500:true,5:250:true,10:150:true,15:500:true $ adb shell am start -n com.android.settings/.biometrics.face.FaceEnrollIntroduction # If you would like to get rid of the enrollment, run the follwoing command $ adb shell setprop persist.vendor.face.virtual.enrollments \"\"
# If enrollment hasn't been setup $ adb shell setprop persist.vendor.face.virtual.enrollments 1 $ adb shell cmd face sync # After enrollment has been setup $ adb shell setprop vendor.face.virtual.operation_authenticate_duration 800 $ adb shell setprop vendor.face.virtual.enrollment_hit 1 # Power button press to simulate auth $ adb shell input keyevent 26