HomeTaskerDisable apps with a fingertip

Disable apps with a fingertip

Disable apps as you log in to your Android phone

A lot of people feel uneasy when someone is using their phone to “check something”. Even though my Xiaomi Mi 9 (review) isn’t filled with filth and compromising search history, letting someone “play with it” triggers “I so want to look over your shoulder and monitor everything you do with my phone!” mode. On the other hand, neither of us wants to show the distrust, and don’t have the time to lock/disable/remove compromising apps before handing the phone out. What if you could increase your privacy with a fingertip? I’ll show you how to disable apps with a fingerprint.

How to disable apps with a fingerprint

This isn’t the new idea. My Xiaomi Mi 9 already comes with a “second space” option to load a user profile based on the PIN keyed in. But if you don’t have that option on your mobile phone, you can secure the phone with Tasker.

Previously, I had to use a plugin to achieve this. The plugin wouldn’t work for every phone and there was no option to recognise individual fingerprints. Now, you can detect which finger had been used to unlock the phone and create custom profiles based on that and do a couple of more Tasker tricks.

You will need the following:

  • Tasker
  • AutoTools Root Add-on
  • root

Let’s modify my old tutorial and make it compatible with the new LogCat option. You can download the tutorial file, but it’s likely you have to search the LogCat entries again as fingerprint entries are dependant on the ROM and the phone that you are using. In case you wonder, I’m using the tips from this post to name and organise my profiles.

Search for fid = in your entries, as this will store the ID associated with your fingerprint. Create a profile for each fingerprint.

Enable/Disable Apps

To enable and disable apps I need root. AutoTools Root Add-on comes with an option to disable/enable apps. Disabled apps will be force-stopped, removed from the app drawer and any folders on your home screen. These apps won’t fetch notifications, but data will be still accessible via similar apps. I can limit the exposure by disabling file manager apps and the Google Play Store to prevent someone from installing new apps.

If I disable “Google Photos” app, I won’t be able to use the app, but my pictures will be visible in other “gallery-type” apps. I will be able to browse the pictures with a file explorer too.Example

Unfortunately, there is no way to restore the shortcuts placed on the home screen. I will need to drag each icon manually when the app is enabled again. I’m using Nova Launcher, which comes with a handy backup/restore option just for that. Sadly, not integrated with Tasker and restore has to be done manually.

TASKER PROFILE: DA Disable Apps
Profile: DA Disable Apps
    Restore: no
    Event: Logcat Entry [ Output Variables:* 
    Component:[GF_HAL][FingerprintCore] 
    Filter:fid = XXXXXXX Grep Filter (Check Help):Off ]
Enter: DA Disable Apps 
    A1: Flash [ Text:Disable Long:On ] 
    A2: AutoTools Root Add-on Settings [ Configuration:Apps: com.android.chrome
Toggle: Disable Timeout (Seconds):60 ] 
TASKER PROFILE: DA Enable Apps
Profile: DA Enable Apps 
    Restore: no
    Event: Logcat Entry [ Output Variables:* 
    Component:[GF_HAL][FingerprintCore] 
    Filter:fid = XXXXX Grep Filter (Check Help):Off ]
Enter: DA Enable Apps 
    A1: Flash [ Text:Enable Long:On ] 
    A2: AutoTools Root Add-on Settings [ Configuration:Apps: com.android.chrome
Toggle: Enable Timeout (Seconds):60 ] 

Capture other fingerprints

What if I wanted to enrol a fingerprint that belongs to someone else. I’d imagine asking them to scan the finger while I try to capture the fid with LogCat is far from ideal.

If the fingerprint is already enrolled, I can use this helper task. It will capture fid of each fingerprint enrolled (test on your own first, as you may need to change the LogCat trigger so it would work on your phone) and store it in an array.

I can pass the prepped mobile phone to my “victim” to unlock it. As soon as this happens – a new fid will be added to %Enrolled() array.

TASKER PROFILE: DA Capture FID
Profile: DA Capture FID
    Restore: no
    Event: Logcat Entry [ Output Variables:* 
    Component:[GF_HAL][FingerprintCore] 
    Filter:fid = Grep Filter (Check Help):Off ]
Enter: DA Capture FID 
    A1: Variable Search Replace [ Variable:%lc_text Search:(?<=fid =).* 
        Ignore Case:Off Multi-Line:On One Match Only:Off 
        Store Matches In Array:%fid Replace Matches:Off Replace With: ] 
    A2: Array Push [ Variable Array:%DAEnrolled 
        Position:1 Value:%fid1 Fill Spaces:On ] 
    A3: Array Process [ Variable Array:%DAEnrolled Type:Remove Duplicates ]

Unlock Monitor

I can monitor what fingerprints had been used to unlock my mobile. I can take advantage of this knowledge and get a notification if someone unlocked the phone without my knowledge.

Next time I use my finger to unlock the phone, it will show me if another authorised person unlocked it since my last unlock. To achieve it, I created a simple counter that counts the number of times the phone is unlocked with a specific fingerprint.

The value is reset each time I unlock the phone, and if the unlock count isSet it will display a notification that someone had unlocked my phone before me.

Please note, I bear no responsibility for any relationships destroyed thanks to this trick. 😁😁😁

TASKER PROFILE: DA Watched FID
Profile: DA Watched FID
    Restore: no
    Event: Logcat Entry [ Output Variables:* 
    Component:[GF_HAL][FingerprintCore] 
    Filter:fid = XXXXXXXXX Grep Filter (Check Help):Off ]
Enter: DA FID Count
    A1: Flash [ Text:Right pointer Long:On ] 
    
    A2: If [ %DAUnlocks !Set ]
        A3: Variable Search Replace [ Variable:%lc_text Search:(?<=fid =).* 
            Ignore Case:Off Multi-Line:On One Match Only:Off 
            Store Matches In Array:%fid Replace Matches:Off Replace With: ] 
        A4: Variable Set [ Name:%DAStranger To:%fid1 
            Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
        A5: Variable Set [ Name:%DAUnlocks To:1 
            Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
        A6: Stop [ With Error:Off Task: ] 
    A7: End If 
    A8: Variable Search Replace [ Variable:%lc_text Search:(?<=fid =).* 
        Ignore Case:Off Multi-Line:On One Match Only:Off 
        Store Matches In Array:%fid Replace Matches:Off Replace With: ] 
    A9: Variable Set [ Name:%DAStranger To:%fid1 
        Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    A10: Variable Add [ Name:%DAUnlocks Value:1 Wrap Around:0 ] 
TASKER PROFILE: DA Unlock Monitor
Profile: DA Unlock Monitor
    Restore: no
    Event: Logcat Entry [ Output Variables:* 
    Component:[GF_HAL][FingerprintCore] 
    Filter:fid = XXXXXXX Grep Filter (Check Help):Off ]
Enter: DA Unlock & Monitor
    A1: Flash [ Text:Left thumb Long:On ] 
    A2: Notify [ Title:Phone Security Text:Your phone had been unlocked 
            by a stranger (%DAStranger) %DAUnlocks times since you checked your phone. 
        Icon:mw_hardware_security Number:0 Permanent:Off 
        Priority:4 Repeat Alert:Off LED Colour:Orange LED Rate:2 
        Sound File: Vibration Pattern: Category:Security ] 
        If [ %DAUnlocks Set ]
    A3: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ] 
    A4: Variable Clear [ Name:%DAUnlocks Pattern Matching:Off 
        Local Variables Only:Off Clear All Variables:Off ] 

Conclusion

Whether you are going to use this Tasker project for good or evil, you know how to disable apps with a fingerprint. I hope you can use this knowledge to increase phone security and prevent others from "accidentally" stumbling on your social apps. I will continue to use this profile to manage push notifications from work-related applications. I don't like to be bothered when I'm home. If you have any questions about this project, leave it in this Reddit thread.

Project Download

Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

New to Tasker?

Tasker Quick Start – Getting started with Tasker

0
From newb to not so newbie in 10 min

Best Tasker Projects

How to use Raspberry PI as WOL (wake on lan) server

0
While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

How to wake on LAN computers and put it to sleep with Power Menu,...

0
How to Wake on LAN properly via Android, Alexa, Google Assistant and Web

7 awesome Bluetooth keyboard shortcuts for Android

0
7 unique Android shortcuts that you can add to any Bluetooth keyboard.

Smart overnight charging with Tasker

0
Still keeping your phone plugged in overnight? Try smarter overnight charging with this profile

One thing that Join app can’t do and how to fix it with Tasker

0
It's not possible to share the clipboard automatically between join accounts registered to 2 different emails. But you can fix this with tasker.

Essential Guides

Tasker: Seconds into DD:HH:MM:SS (dynamic)

0
It's time to.... ok it's a pun, but I will show you how to master time and convert seconds to DD:HH:MM:SS dynamically

4 ways to organise Tasker projects

0
Keep your Tasker tidy!

A better way to store Tasker credentials

0
The more clever way of managing credentials

Annoyed with dozens of AutoApps populating your app drawer? Here is a fix!

0
Clear your app drawer from the clutter in seconds

Putting AutoTools pie chart to a good use – SSID logger

0
Who wants a piece of the pie (chart)?