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. Note: The virtual face HAL feature development will be done in phases. Refer to this doc often for the latest supported features
The face virtual hal is automatically built in in all debug builds (userdebug and eng) for the latest pixel devices and CF. The instructions in this doc applies to all
On pixel devicse (non-CF), by default (after manufacture reset), Face VHAL is not enabled. Therefore real Face HAL is used. Face VHAL enabling is gated by the following two AND conditions:
##Getting Stared
A basic use case for a successful authentication via Face VHAL is given as an exmple below.
$ adb root $ adb shell device_config put biometrics_framework com.android.server.biometrics.face_vhal_feature true $ adb shell settings put secure biometric_virtual_enabled 1 $ adb shell setprop persist.vendor.face.virtual.strength strong $ adb shell setprop persist.vendor.face.virtual.type RGB $ adb reboot
$ adb shell locksettings set-pin 0000 $ adb shell setprop persist.vendor.face.virtual.enrollments 1 $ adb shell cmd face syncadb shell cmd face sync
To authenticate successfully, the captured (hit) must match the enrollment id set above. To trigger authentication failure, set the hit id to a different value.
$ adb shell setprop vendor.face.virtual.operation_authenticate_duration 800 $ adb shell setprop vendor.face.virtual.enrollment_hit 1
Refer to face.sysprop for full supported features of authentication, such as error and acquiredInfo insertion
# 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 $ walk thru the manual enrollment process by following screen instructions # If you would like to get rid of the enrollment, run the follwoing command $ adb shell setprop persist.vendor.face.virtual.enrollments \"\"