This is essentially a reproduction of an xda-developers forum post, but it was on the nth page of Google results.

Symptoms

  • inability to enrol/de-enrol fingerprints
  • “Fingerprint hardware not available” messages
  • Unable to unlock the device with fingerprints

Fix

This fix assumes you’re running TWRP, but anything which allows write access to /data should work.

  1. Boot into TWRP
  2. Go to Advanced > File Manager
  3. Navigate to /data/system/user/0 (assuming the default profile)
  4. Remove fpdata/user.db and settings_fingerprint.xml
  5. Reboot into Android and observe that fingerprints are gone and enrolment is working!