has_biometric_enrolled
Check whether any fingerprint is enrolled on an Android device, reporting the count from dumpsys fingerprint. Use this before starting a biometric flow to avoid prompting users when no fingerprint is available.
Instructions
Report whether any fingerprint is enrolled (and how many), from dumpsys fingerprint. Check this BEFORE a biometric flow: with nothing enrolled, fingerprint_touch can never satisfy a BiometricPrompt — it just sits on "Touch the sensor" — so branch to enrolling one or to the PIN path instead of guessing. Works on emulators and physical devices. Note: the framework exposes only an enrolled COUNT, never which finger id is enrolled, and a wrong fingerprint_touch id trips a HAL lockout after a few tries — so enroll deterministically rather than sweeping ids.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serial | No | Target device serial (adb -s). Optional when exactly one device is attached. |