I have a Galaxy S5 with a fingerprint reader. I'd like to be able to unlock my phone with a PIN or pattern unlock, but I also want to protect myself from shoulder-surfing.

Is there a way to require both a fingerprint and a PIN/pattern to unlock the phone? If the fingerprint fails to read correctly, then a much stronger password would be required to unlock.

This would let me scan my fingerprint and put in my PIN/pattern without worrying that someone might see my PIN and unlock my phone later. It also protects me more from governments that can require me to unlock my phone with my fingerprint, since a PIN would also be needed.

Is there an lockscreen app, XPosed module, or other method that can enable this two-factor-like authentication?

I have a rooted Galaxy S5 running Android 5.0.

  • How can I lock my phone with a swipe lockscreen along with a fingerprint/PIN? was left unanswered as well, so this one doesn't seem easy. Only use pattern lock instead of swipe screen and pattern lock has the opposite problem. What I could think of would be using the SIM PIN additionally (I know, not really fitting but close) – provided that could be configured to be "always required".
    – Izzy
    Mar 14, 2016 at 22:30
  • Galaxy S5 has that functionality by default. My fingerprint doesn't work sometimes so I just click "Alternative Password" and enter my pin. Not using stock ROM? Mar 21, 2016 at 6:41
  • 1
    @AaronGillion I want my phone to require my valid fingerprint, and then after it accepts my fingerprint, require a PIN as well. That way, you must both scan a valid fingerprint and type in a valid PIN before it lets you unlock. And if my fingerprint is unable to validate, a simple PIN won't unlock the phone; it would use a very long backup password instead.
    – Stephen S
    Aug 16, 2016 at 0:23
  • Using Xposed immediately stops any protection you think you have put on the device. You need to be rooted to used Xposed and therefore it's unlikely your phone will be encrypted. If it's not encrypted then all your data is accessible. If it is encrypted, it's likely Xposed can be removed via recovery and you are left unprotected/your fingerprint could be forced. Xposed and security are not compatible. Apr 30, 2017 at 15:44
  • @Kryten2k35 You can have Xposed along with an encrypted device; that's how mine is set up. And even if Xposed can be removed via recovery, a reboot always requires the long password (a fingerprint doesn't work initially). Xposed and security can easily go hand-in-hand. However, like root, it all depends on the skill and abilities of the hands that hold it.
    – Stephen S
    May 1, 2017 at 15:36

3 Answers 3


One solution is to use Tasker. Set up your phone to use a fingerprint as the standard unlock mechanism, with a strong password as the backup unlock (required if the fingerprint fails, or every time the phone reboots).

Next, create a Task named Screen Unlocked (or similar). In the Task, make it run the Display->Lock action. Set the Code to whatever pin you want. Check the Remember Till Off and Full Screen options, and make sure Allow Cancel is unchecked.

Next, create a Profile in Tasker for the Event of Display Off. When that profile is triggered, have it run the new Task you created. Add a second trigger to the same Profile to prevent this lock from happening if a call is in progress (using Invert). Otherwise, putting the phone to your head will turn off the display and cause the PIN lock (even though android knows it isn't actually locked and doesn't require tour fingerprint),and removing it from your head will show the PIN and block the call end and other buttons.

Finally, add a second Profile for the event Display Unlocked, and have it run the same Task. That way, if you do manually lock the phone while in a call with the power button (tripping the standard android fingerprint lock), it will properly show the PIN request on the screen again, without interfering with the end call buttons. Don't worry, having the lock show for display off and display unlocked will not, in fact, require you to type the pin twice.

With this setup, you unlock your phone with a fingerprint. When that is accepted, Tasker will prompt you for a PIN as well.

The reason you run this task on Screen Off instead of Screen Unlocked is that the Screen Unlocked creates a delay between unlocking the phone and showing the PIN request. By running the task on Screen Off, the PIN request is shown the instant you unlock with your fingerprint.

Note that this setup requires the PIN even if you use your backup password (if your fingerprint can't be read). However, I'm willing to live with that, since I rarely need to enter the master password anyway, and typing in a PIN afterwords is fine.

Protect Tasker

Since the PIN is stored in plaintext in Tasker, you should probably setup a PIN to open Tasker. Tasker has this built-in to its preferences, so you can require a PIN to view and modify any Tasker profiles and settings. Otherwise, if you leave your phone unlocked, anyone could find your PIN by viewing the Tasker config. In any case, don't use the same PIN for your screen unlock as you do for any other service like ATM cards or voicemail.

  • I tested this, and although it works as described, I found that I am able to revoke the "draw over other apps" permission by following the notification in the status bar, which completely deactivates the Tasker pin prompt.
    – jdgregson
    Aug 12, 2019 at 20:34

Yes you can, you can install "APPLock" from the playstore (download the one with a "silver-coloured safe" icon). Then you can use PIN, Fingerprint and Pattern to unlock your phone or app


I use NOTE4 N910C. After upgrade to 6.0.1 such feature is avaliable by default. As I can see on http://www.sammobile.com, MM 6.0.1 is available for S5 so simply update Your phone via Odin

  • I have marshmallow 6.0 on my S5 now, and the functionality still isn't what I need. Sure, a reboot requires the long password, but I still can't require a fingerprint and a PIN simultaneously to unlock the phone during normal operation.
    – Stephen S
    Jul 10, 2016 at 20:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .