0

I want to get fingerprint byte data using android 7 api . For that I am following this tutorial : Fingerprint API Tutorial

In this tutorial I have goth directions to authenticate the user using fingerprint using fingerprint api .

public void startListening(FingerprintManager.CryptoObject cryptoObject) {
        if (!isFingerprintAuthAvailable()) {
            return;
        }
        mCancellationSignal = new CancellationSignal();
        mSelfCancelled = false;
        mFingerprintManager
                .authenticate(cryptoObject, mCancellationSignal, 0 /* flags */, this, null);
        mIcon.setImageResource(R.drawable.ic_fp_40px);
    }


    public void stopListening() {
        if (mCancellationSignal != null) {
            mSelfCancelled = true;
            mCancellationSignal.cancel();
            mCancellationSignal = null;
        }
    }

But I do not need to authenticate the fingerprint data of user using android api . I only need fingerprint byte data captured from android api . How can I get that ?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Christopher Marlowe
  • 2,098
  • 6
  • 38
  • 68

1 Answers1

4

Current (and likely future) Android API's wll only allow authenticatation of fingerprints and no access to the raw fingerprint data itself. This is because of the way Android deals with fingerprint data; it is analysed exclusively in the Trusted Execution Environment (TEE). The TEE holds the only encryption key to the fingerprint data and it never leaves the TEE, so even if you can get your hands on the fingerprint data it will be encrypted.

It is also important to note that the TEE is hardware backed, either using dedicated hardware or via virtualisation on the main CPU, so even rooting your phone will not allow you to get to the data.

You can read more about the TEE here

If you really need access to raw fingerprint data, I suggest using an external scanner with an accompanying SDK such as this one. I have used this for projects before and the SDK is very good and well documented.

aliaksei
  • 714
  • 1
  • 9
  • 23