has_biometric_enrolled
Verify enrolled fingerprints before a biometric flow: returns count from dumpsys fingerprint. If zero, bypass BiometricPrompt and route to enrollment or PIN path to avoid a stuck 'Touch the sensor' state.
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. |