Automation is supposed to be about simplifying everyday tasks to give you more precious time doing the things you love. At XDA, we’ve shown you how you can use Tasker to secure your device, improve productivity, or make driving safer, all a part of our series called ‘Tasker Week.’
But the fun doesn’t end there. If you’ve been itching for some seriously awesome Tasker tasks (and are tired of the boring stuff like telling you how to reboot your phone or shake your phone to wake the display), then our new Tasker Pro series is for you.
We will be posting a series of highly advanced Tasker profiles that will show you just how powerful Tasker can be if you are willing to think outside of the box. Although we’ve done most of the hard work for you and you’re certainly free to import my profiles and use them as-is, I highly recommend you give learning how to use Tasker a shot if you want to be able to customize these tasks yourself. Over on our Tasker Tips & Tricks forums or on Reddit’s /r/Tasker subreddit, you can share and work with others on how to implement an idea you might have (as I have done many times).
This is Week 6 of Tasker pro. Last week, we showed you how you can use Tasker to never miss work by creating a calendar-based alarm clock. This week, we will show you how to unlock your Windows PC (including your desktop) using your fingerprint read from an Android phone!
Tasker Pro #6: Windows Fingerprint Unlock
Let’s say you’re downstairs sitting in front of your couch and wanting to start that movie you’ve been itching to watch that you’ve stored on your Plex Server. Except, crap, you forgot to turn Plex on. No problem, you’ll just have to go and turn it on manually, but who wants to leave a comfy couch to do that? Or what about those users who have Wake-On-Lan set ups that, while they do serve their purpose by wakening a computer from its slumber, still require you to sit down and manually log in? Who wants to do that? For the lazy among us, here’s a neat Tasker script that will allow you to unlock your Windows PC using just your fingerprint. Hell, you could even modify this script to just unlock your PC without requiring your fingerprint, if that’s what you want.
Now I realize that the more security minded among us are probably chafing at this very idea. Surely this can’t be very secure, can it? I’ve put thought into possible security holes here, and when it comes down to it the only way your Windows password could be compromised is if:
- Your home WiFi network is compromised (in which case you have many other things to worry about).
- Your phone is physically compromised and the attacker has access to the phone (in which case you have many other things to worry about).
So yes, this method does indeed send your password as plain text over your home network. However, it would require some pretty extraordinary circumstances for your Windows password to be compromised by this setup. And to prevent users from accidentally sharing their Windows password whenever they share their Tasker setups, I’ve made it so your actual Windows password is stored in an encrypted state in a Tasker variable. Thus only way someone can extract your Windows password again is if they physically have complete access to your phone.
In any case, let’s get on with the Tasker script, shall we? Below is the AutoTools dialog that will appear whenever you launch the task. After you successfully scan one of your stored fingerprints, Unified Remote will trigger the necessary actions to unlock your PC. It’s actually quite simple – all Unified Remote does is pull up the password box and paste the password in.
Requirements
Instructions
The first two things you will need to do is to set up a fingerprint on your device if you haven’t already (AutoTools uses the native fingerprint authentication APIs on Android) and install the Unified Remote Server application on your Windows PC. Then, open up the Unified Remote app on your phone, find your computer’s name/IP address, and save the server (it will show under Saved Servers in the Servers Menu). Once you’re done with that, we will need to make a quick 3-action task to encrypt your Windows password within Tasker so you don’t accidentally ever share it.
Make a new task, and give it some arbitrary name. We won’t be keeping this task, we will just be running it once and then deleting the task right afterwards. All this task will do is set up your encrypted password and store it in a global variable.
- Variables –> Variable Set. Name: %pass to YOURWINDOWSPCPASSWORD. This is your password, you should know what it is. If you’re using a pin, put that in.
- Plugins –> AutoTools –> AutoTools Text. Text: %pass. Go to Encryption, set it to Encrypt the pass, and for the encryption password make it some arbitrary phrase. You will need to remember this phrase or set it to a global variable, because when you decrypt the password when in the main task you will need this password.
- Variables –> Variable Set. Name: %EncryptedPass to %attextresult(). This will store the encrypted password in a global variable.
Run this task once after you’ve set it up, then delete it. You won’t need this Task again, unless you wipe Tasker’s data/re-install the app in which case your global variables are wiped. You can easily just create this task and run it again to make a new encrypted password if that happens. In any case, we will next dive into the main task itself.
Create a task and name it something like Fingerprint Unlock.
- Plugins –> AutoTools –> AutoTools Dialog. Select Fingerprint Dialog. Title: PC Fingerprint Unlock. Number of Tries: 1. Failed Message: Error: Fingerprint not recognized. Everything else you can customize to your liking.
- Plugins –> AutoTools –> AutoTools Text. Text: %EncryptedPass. Variable Name: %pass. Go to encryption and select to Decrypt. For the password, use the encryption password you made earlier.
- Net –> Browse URL. URL: ur://intent/remote:Core.Keyboard/action:press/extra:space/destination:YOURPCNAMEHERE
- Task –> Wait 1 second.
- Net –> Browse URL. URL: http://urintent/remote:Core.Keyboard/action:text/extra:%pass/destination:YOURPCNAMEHERE
- Task –> Wait 1 second.
- Net –> Browse URL. URL: ur://intent/remote:Core.Keyboard/action:press/extra:enter/destination:YOURPCNAMEHERE
Basically, all this task is doing is decrypting your stored password (action 2), then it presses the spacebar so the Windows 8/10* lockscreen is dismissed, finally in action 7 it pastes the password in. There are 1 second wait actions in between each Unified Remote step to give time for the Windows animations to clear and the text box to be ready. Now, you might have noticed that Unified Remote has a Tasker plugin, so you might be wondering why we don’t just use that. Unfortunately the Unified Remote Tasker integration (which I believe is a paid feature) does not allow you to pass Tasker variables, so we wouldn’t be able to send the password. At least, it wasn’t working for me.
*Windows 7 users, you will need to change this to make it press CTRL+ALT+DEL which you can do by capturing the URI within Unified Remote by opening the app and going to the Keyboard Remote and then clicking on the phone icon at the bottom right. Click on “Create URI String” and follow the instructions until you are presented with a URI string you can place here.
And voila! If you are able to follow along this, then congratulations, you’re pretty much a master of Tasker! Confused on a step and just want to import the script and get on with your life? I can’t blame you, this one took myself a lot of thinking to get it down right. However, please remember that you will need to set up the encrypted password as mentioned above, as that is a task that you create then immediately delete.
If you want to import this Tasker script, you can download it from Android File Host. In order to import the task, you need to first disable Beginner Mode in Tasker by going to the menu –> preferences. Under the UI tab, uncheck ‘Beginner Mode.’ Then back in the main Tasker menu, click on the ‘Tasks’ tab. Then long-press on the ‘Tasks’ tab and press ‘Import.’ Navigate to where you downloaded my .prf.xml file and select it to import it. Once you import it, you’re free to play around with it as you see fit. You can launch this task by creating a launcher shortcut, you can create a Zooper widget, or optionally, if you want to export this task as an app, you can install Tasker App Factory.
Next week for Tasker Pro I will show you how to change your volume rocker behavior to only control media volume rather than ringer volume!
What would you like to see me make with Tasker? Let us know below and we might feature your idea in a future article!
0 comments:
Post a Comment