Fingerprints have become a standard method of authorization on Android smartphones, but few people think about where exactly is this biometric data stored how they are protected. Unlike passwords or PINs, which the user enters consciously, a fingerprint is read automaticallyโraising privacy concerns. For example, can attackers extract your fingerprint from the device's memory? Or what happens to the data when you reset the phone to factory settings?
In this article we will look in detail the architecture of fingerprint storage in Android, including:
- ๐ Physical location data (where exactly in the phone memory they are stored).
- ๐ Protection mechanismsthat prevent unauthorized access.
- โ ๏ธ Potential vulnerabilities and methods of their operation (including real cases of leaks).
- ๐ฑ Differences between manufacturers (Samsung, Xiaomi, Google Pixel etc.).
It is important to understand that Fingerprint in Android is never stored as an original image โinstead, the system operates with a mathematical hash, but even this requires reliable protection. If you're planning to sell your phone, reset it, or are just concerned about security, this information will help you make informed decisions.
Yes, this is my main method|Yes, but only for some applications|No, I prefer PIN/password|No, I don't trust biometrics-->
1. Fingerprint storage architecture in Android: from scanner to chip
When you put your finger on the scanner, Android does not save its image in the device memory. Instead, the following happens:
- Reading: The scanner (optical, ultrasonic or capacitive) captures the unique features of the papillary pattern.
- Conversion: The algorithm converts the pattern into
biometric templateโa set of numeric data (hash) that cannot be reversed by turning it into the original fingerprint. - Storage: The template is stored in a protected memory area inaccessible even to the operating system.
Key moment: the fingerprint never leaves the device. Even when you use it to log into banking applications (for example SberBank Online or Tinkoff), the application only receives confirmation of the match, but not the pattern itself. This rule is enshrined in the standard Android Biometric API and is controlled at the level Trusted Execution Environment (TEE).
However physical location the template depends on the hardware platform:
- ๐ฑ Modern smartphones (2018 and newer): Templates are stored in
Secure Enclave(u Apple) or similar chips in Qualcomm (QSEE), Samsung (Knox), Huawei (iTrustee). - ๐ Old devices (until 2016 year): Templates could be stored in regular memory (
/data/system/users/0/), but with output Android 7.0 Nougat this was prohibited. - โ ๏ธ Chinese firmware (some models Xiaomi, Oppo, Vivo): Deviations from the standard are possible, for example, storing hashes in encrypted section
/vendor.
โ ๏ธ Attention: If your smartphone was released before 2017 or runs on custom firmware (for example LineageOS), the fingerprint protection mechanisms may be weakened. Before selling such a device, it is recommended to manually delete all biometric data through Settings โ Security โ Biometrics.
2. Where exactly is the fingerprint stored: file paths and memory sections
Technically, fingerprint templates are stored in the following memory sections (access to them is blocked even for rootusers without special tools):
| Section/path | Description | Availability | Manufacturers |
|---|---|---|---|
/data/system/users/0/biometrics/ |
Standard location for templates (Android 7.0+). The files are encrypted with a key tied to the hardware chip. | Only for TEE | Google, Samsung, OnePlus |
/vendor/fingerprint/ |
Alternative storage for devices with proprietary scanner drivers. | Only for the scanner driver | Xiaomi, Huawei, Meizu |
Secure Enclave / TEE |
Hardware module (for example, Qualcomm QSEE or Samsung Knox). Templates are stored in isolated memory. | Impossible without physical hacking | All flagships 2018+ |
/persist/biometrics/ |
Outdated path (Android 6.0 and below). The data could remain after the reset. | Vulnerable on older devices | LG, Sony (models before 2017) |
For example, on Samsung Galaxy S22 templates are stored in Knox, and on Google Pixel 7 โ in Titan M2. An attempt to read this data through ADB or a file manager with rootaccess will result in an error:
adb shell ls /data/system/users/0/biometrics/
ls: /data/system/users/0/biometrics/: Permission denied
Even if you gain physical access to the memory (for example, through chip-off analysis), the data will be encrypted using a unique device key, which is stored in the same secure chip. This makes retrieving fingerprints extremely difficult - but not impossible for government agencies or advanced hackers.
Is it possible to copy a fingerprint from one phone to another?
Theoretically, no, since the template is tied to the hardware key of a specific device. However, in 2021, researchers from Tencent demonstrated an attack BrutePrintthat allows you to select patterns on some devices through vulnerabilities in the data exchange protocol between the scanner and the chip. The attack required physical access and specialized equipment, but proved that absolute protection does not exist.
3. How biometric data is protected: TEE, encryption and hardware keys
Android uses a multi-layered fingerprint security system:
- Trusted Execution Environment (TEE): An isolated runtime environment where biometric data is processed. Even the Android kernel does not have access to it.
- Hardware encryption: Templates are encrypted with a key that is generated in
Secure Enclaveand never leaves the chip. - Binding to the device: The template is tied to a unique chip identifier (for example,
Unique Device Secrety Qualcomm). - Limit attempts: After 5 unsuccessful unlocking attempts, a PIN code is required (configured in
Settings โ Security โ Biometrics).
For example, Google Pixel uses a chip Titan Mthat:
- ๐ Stores cryptographic keys in isolated memory.
- ๐ก๏ธ Blocked after detecting physical attacks (for example, attempts to overheat or laser scanning).
- ๐ Generates new keys when the phone is reset, making old patterns invalid.
However not all manufacturers implement protection in the same wayFor example:
- ๐ Samsung Knox certified according to the standard Common Criteria EAL5+, which guarantees protection against physical attacks.
- โ ๏ธ Some budget smartphones (for example, Redmi or Realme) may use simplified mechanisms that are vulnerable to attacks via
ADBorFastboot.
โ ๏ธ Attention: If you use custom recovery (TWRP) or firmware all biometric data is automatically deleted on the first boot, this is due to the fact that the encryption keys are bound. to the stock firmware, and resetting them makes the templates unreadable.
4. What happens to fingerprints when resetting, selling or repairing a phone
Many users fear that after a reset to factory settings (Factory Reset), fingerprints may remain in the device's memory. In fact:
- โ Modern devices (Android 8.0+): Templates are deleted along with the encryption keys. data-i="157">Modern devices (Android 8.0+) Samsung Galaxy it controls Knox, and on Pixel โ Titan M.
- โ Old devices (Android 6.0 and below): In some cases, template files could remain in
/data/system/, but without the decryption key they are useless. - ๐ง During repair: If the motherboard is replaced, all biometric data is lost, since it is tied to the original chip.
To ensure that fingerprints are removed before sale:
Remove all fingerprints manually through Settings โ Security โ Biometrics
Reset to factory settings (Settings โ System โ Reset)
Format the internal memory (if the phone supports it)
Remove the SIM card and memory card-->
If you are selling a phone with root access or custom firmware be sure to reflash it to the stock version. Otherwise, the new owner will theoretically be able to restore your biometric data (although this is extremely unlikely without specialized equipment).
Before resetting, disable your Google account and delete all accounts in Settings โ Accounts. This will prevent the device from being blocked through Factory Reset Protection (FRP).
5. Real vulnerabilities: cases of leaks and methods of attack
Despite multi-layered protection, in the history of Android there were cases when fingerprints were able to be extracted or deceived the system:
| Vulnerability | Description | Affected devices | Consequences |
|---|---|---|---|
BrutePrint (2021) |
Attack through pattern matching due to weak protection of the channel between the scanner and the chip. | Xiaomi Mi 11, Oppo Reno Ace, Vivo X60 Pro | Requires physical access and equipment, but proves vulnerability. |
Fingerprint Sensor Spoofing (2019) |
Use of fake fingerprints (for example, from gel or 3D printing) for deception scanner. | Samsung Galaxy S10, OnePlus 7 Pro | Successful unlocking in 10โ15% of cases (according to Kaspersky). |
Qualcomm QSEE Exploit (2016) |
Vulnerability in chips Qualcomm, allowing data to be read from TEE. |
Device on Snapdragon 810/820 (for example LG G5) | Fixed in the 2017 security patches. |
The most famous case is leakage of biometric data from the database Suprema Biostar 2 in 2019, when hackers gained access to 1 million fingerprints. However, this concerned external systems (for example, access control systems), and not smartphones. Such massive leaks were not recorded on Android devices.
Nevertheless, risks remain:
- ๐ต๏ธ Physical access: If an attacker gets your phone, he can try to extract templates through
chip-offanalysis (expensive and difficult, but possible for intelligence agencies). - ๐ฑ Outdated devices: Smartphones before 2017 (for example Samsung Galaxy S6) are more vulnerable due to weak isolation
TEE. - ๐ Connecting to a PC: With an unlocked bootloader (
OEM Unlock), theoretically you can intercept scanner data viaADB, but this requires in-depth knowledge.
โ ๏ธ Attention: If your phone stolen, immediately remove it from the list of trusted devices in your Google account (myaccount.google.com/security). This will block access to the data, even if the attacker can fool the fingerprint scanner.
6 How to check if your fingerprint is stored. secure
To make sure your biometric data is secure:
- Check the Android version:
- ๐ฑ
Settings โ About phone โ Android version. - ๐ Minimum secure version - Android 8.0 Oreo (released in 2017).
- ๐ฑ
- Make sure you have hardware protection:
- ๐ก๏ธ On Samsung check the status Knox in
Settings โ Biometrics and security โ Knox. - ๐ On Google Pixel availability Titan M is indicated in the model characteristics.
- ๐ก๏ธ On Samsung check the status Knox in
- Check the biometric settings:
Settings โ Security โ Biometrics โ Fingerprint SettingsMake sure that is enabled:
- โ Requires PIN/password after reboot.
- โ Limit entry attempts (for example, 5 attempts).
If your device does not meet these criteria, consider the following measures:
- ๐ Update the firmware to the latest version (via
Settings โ System โ Software update). - ๐ซ Disable fingerprint unlocking for critical applications (banks, payments).
- ๐ Use alternative authorization methods (for example,
2FAvia Google Authenticator).
Even if the fingerprint template is stolen, the attacker will not be able to reproduce the original fingerprint - only use it to unlock a specific device (subject to bypassing other protections).
7. Myths and truth about fingerprints in Android
There are many myths around biometric authorization. Let's look at the most common:
-
โ Myth: "The police can take my fingerprint from the phone and use it against me."
โ Truth: Technically, this is only possible if the chip is physically hacked (for example, in a laboratory), but in practice law enforcement agencies prefer other methods (for example, forced unlocking through the court).
-
โ Myth: "If I add a fingerprint on one phone, it will work on another."
โ True: The template is tied to the hardware key of a specific device and is not transferred.
-
โ Myth: "Fingerprints are stored in the Google cloud."
โ Truth: Google never receives biometric data. They are stored only on the device.
-
โ Myth: "Resetting to factory settings completely erases fingerprints."
โ True: On modern devices - yes, but on old ones (before 2017) the files could remain (albeit in encrypted form).
Another common misconception: "A fingerprint is more secure than a PIN"Actually:
- ๐ข PIN code (if it is complex) is better protected, since it cannot be picked up or copied physically.
- ๐ Fingerprint is more convenient, but is vulnerable to forced unlocking (for example, if you are forced to finger).
Therefore, security experts (for example, Bruce Schneier) recommend:
Use a fingerprint to unlock the screen, but for critical operations (payments, access to passwords) require entering a PIN code or password.
FAQ: Frequently asked questions about fingerprints in Android
Is it possible to restore a fingerprint after resetting the phone?
No, if the device is running on Android 8.0+. Templates are deleted along with encryption keys. On older phones (up to. 2017) files could remain in memory, but without the decryption key they are useless. To ensure that data is deleted, before resetting, manually clear your fingerprints in Settings โ Security โ Biometrics.
Can applications (for example, banking) access my fingerprint?
No. Applications only receive confirmation of successful authentication (a binary answer "yes/no"), but not the template itself. This is controlled at the level Android Biometric API. The exception is if the application has root access and exploits a vulnerability in the firmware (extremely unlikely on modern devices). data-i="274">root access
Which is more secure: fingerprint or facial recognition?
Fingerprint significantly). saferthan 2D facial recognition (as on most Android smartphones Reasons:
- ๐ค 2D cameras can be fooled by a photograph or a mask.
- ๐ A fingerprint requires the physical presence of a finger and hardware verification.
An exception is 3D facial scanners (as on iPhone or Google Pixel 4), which are comparable in security to fingerprints.
Is it possible to copy a fingerprint from one phone to another?
No, since the template is tied to the unique hardware key of the device. Even if you copy files from /data/system/biometrics/, they will be useless on another phone. The exception is attacks like BrutePrint, but they require physical access and specialized equipment.
What to do if the fingerprint scanner stops working?
Try the following steps:
- Delete and add fingerprint again.
- Clear the scanner cache:
Settings โ Applications โ Show system โ Biometric service โ Storage โ Clear cache. - Update the firmware (there may be a problem with the driver scanner).
- If all else fails, contact a service center - the scanner module itself may be damaged.