Android M fingerprint scanner on Android Emulator
Asked Answered
O

8

55

I want to ask how should I test my fingerprint authentication on Android Emulator?

I was trying to use

adb -e emu finger touch [finger_id]

referred from link here but it seems to be not working with my Emulator.

My Emulator is Targeting API 23, Android 6.0, x86_64.

Any help will be appreciated.

Thanks

Otto answered 11/2, 2016 at 9:53 Comment(1)
Is there a way for a person who does not want to install dev tools to test the fingerprint sensor on Android devices? I just want to test my fingerprint, but apparently Google provides no way to do this other than repeatedly locking your phone. It's extremely frustrating.Pastrami
O
123

You can do it from Emulator itself

Go to Settings -> Security--> Set a device lock methos-->Create a pattern

enter image description here

Then click on FingerPrint to register some fingerprints

enter image description here

Now You can use fingerprints from emulator settings as shown in pic below

enter image description here

Oller answered 19/7, 2017 at 4:54 Comment(3)
using android studio 3.4 , android PIXEL api Q emulator . But it always forgot fingerprint after reboot . I have to set fingerprint every time i reboots the emulatorKhoury
It should be noted that if you are trying out a module such as npmjs.com/package/react-native-biometrics isSensorAvailable() will say the sensor is unavailable until you setup fingerprints as described above.Corgi
the fingerprint addition must be done via the extended control panel; just a note.Coray
R
15

Hi you have to connect to Telnet even if you're using Mac:

telnet 127.0.0.1 5554

then enter the cmd to authenticate

auth yourtoken

your authentication token is in this file '/Users/yourname/.emulator_console_auth_token'

then you have to register the finger print before to use the command. So go in Settings -> Security -> Fingerprint -> Add fingerprint and launch the command on terminal

finger touch 1

Now your fingerprint with ID 1 is enrolled and you can use it to authenticate

Rexer answered 14/6, 2016 at 12:46 Comment(0)
V
8

Adding to above answer of "br00"

If you are using Windows then please do below steps.

1.) Check if you have telnet installed or not. Simply run "telnet" command in cmd prompt. If it say command not found. Then install telnet using below link:

https://technet.microsoft.com/en-us/library/cc771275(v=ws.10).aspx

For me its simply in Windows 7

pkgmgr /iu:"TelnetClient" in command prompt

2.) Run emulator and check its id. Emulator id usually appears in title bar of Emulator. :5554 So id is 5554

3.) Enter below command in cmd prompt

telnet 127.0.0.1 5554

4.) Add auth token in telnet window:

auth "yourtoken String"

Usually you will find auth token at below path

'/Users/yourname/.emulator_console_auth_token'.

Just open the file and copy the token and pass it in above command in telnet window

5.) then you have to register the finger print before to use the command. So go in Settings -> Security -> Fingerprint -> Add fingerprint

Now open your telnet session command window and enter following command:

finger touch 1

Now your fingerprint with ID 1 is enrolled and you can use it to authenticate

6.) Repeat step 5 if you want to add multiple finger print. But make sure you always add new finger print id. Here is 1 in step 5.

7.) Now when you want to authenticate just use below command in telnet window:

finger touch 1

That's It

Verona answered 27/7, 2017 at 10:23 Comment(0)
R
7

You can do it in the emulator itself

Go to Settings -> Security--> Set a device lock method-->Create a pattern

Then click fingerPrint.If you can add fingerprint in the emulator you can use the following command

./adb -e emu finger touch 1

Robertroberta answered 28/2, 2020 at 10:42 Comment(0)
H
3

follow these steps:

  1. Install Android SDK Tools Revision 24.3, if you have not done so.
  2. Enroll a new fingerprint in the emulator by going to Settings > Security > Fingerprint, then follow the enrollment instructions.
  3. Use an emulator to emulate fingerprint touch events with the following command. Use the same command to emulate fingerprint touch events on the lockscreen or in your app.

adb -e emu finger touch

On Windows, you may have to run telnet 127.0.0.1 followed by finger touch

Hildebrand answered 11/2, 2016 at 10:8 Comment(3)
I am using windows so used telnet 127.0.0.1 emulator-5554 finger touch , It was giving something telnet [-a][-e escape char][-f log file][-l user][-t term][host [port]], and nothing else happening..Otto
Didnot working, any other solution, this is provided on Android Developers.Otto
adb -e emu finger touch 1. It doesn't work without finger id.Sundog
S
3

Here is a YouTube video describing the fingerprint registration on emulator: How to Use the Fingerprint Sensor on the Android Studio Emulator

Sirotek answered 21/6, 2021 at 13:23 Comment(0)
T
2
  1. You have to go the emulator
  2. Then go to the settings, in the settings go to security settings and then choose a lock screen method.
  3. after you're done with that, then enroll your fingerprint when required to touch the sensor.
  4. click the three dots on the emulator that brings out more settings then navigate to fingerprint and select the fingerprint you want to enroll and click touch sensor then you're done.

The short video below explains it better. https://m.youtube.com/watch?v=XmwrOdoN0Qo&t=213s

Tambourine answered 4/1, 2023 at 1:23 Comment(0)
A
1

It works as follows:

telnet 127.0.0.1 5554 followed by finger touch 1 for instance. You can give any random number to test it out.

Agape answered 16/3, 2016 at 21:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.