Here are my steps to enroll a fingerprint on the emulator by only using adb command (tested on a x86_64, Google API 28 emulator):
- Set the lock screen passcode to be 1111
$ adb shell locksettings set-pin 1111
$ adb shell am start -a android.settings.SECURITY_SETTINGS
$ adb shell input tap 274 1469
- Tap the Next button on the confirm screen
$ adb shell input tap 914 1704
NOTE: the tap's coordinate was getting on the same emulator by enabling the Show Touch Location under the Developer Options setting.
- Enter the passcode in the confirmation screen
$ adb shell input text 1111 && adb shell input keyevent 66
- Execute the following command for at least 3 times to finish the fingerprint enrollment
$ adb -e emu finger touch 1
- Finally, close the screen
$ adb shell input tap 914 1704
Updated:
To find the location for the click/tap action (e.g. 914 1704
) enable the Pointer location
in the Developer Option
as attached image
