FORUMS
Remove All Ads from XDA

[GUIDE][Difficulty: Beginner] Take a Picture and Grab Location on Failed Unlock

833 posts
Thanks Meter: 1,866
 
Post Reply Email Thread
Hello everyone. Here's a quick and easy Tasker profile for anyone wanting to beef up the security on their phone. There are many apps that can do this for you, but if you would like to customize exactly what information gets recorded and where it gets sent to then implementing this feature in Tasker is your best bet.

Prerequisites
  1. Secure Settings plug-in
  2. Cloud Sync plug-in such as Dropsync or Foldersync (OPTIONAL)
  3. Pushbullet or Join for notifying your other devices (OPTIONAL)

Instructions

  1. Ensure that Secure Settings is set as a Device Administrator by opening the app and going to the Preferences screen. This is so the plugin has the ability to monitor unlocking attempts.
  2. Open Tasker, and create a new profile by clicking on the + sign on the bottom-right. Name your profile 'Discreet Picture' or whatever it is you like.
  3. Create a "State" context and select "Secure Settings" under the "Plugin" state category.
  4. Press the pencil icon to open up Secure Setting's options. Expand the "Conditions" arrow and choose the "Failed Login Attempts" option.
  5. Under "Maximum Failed Login Attempts" enter the number of failed login attempts that must occur before the context is fired. Also, double check that "Device Admin Enabled" is already checked. If not, go back and enable it.
  6. Click the save icon up top to exit configuring the Secure Settings context. When you're back in the Tasker screen, press your back key to exit setting up the context.
  7. Tasker will now ask you to set up a new task associated with this context. Click on "New Task" and optionally give the task a name. Before we move on, here's a picture of what the context screen should look like.
Discreet Picture Context

Now that you've set up the context, it's actually time to set up the task that fires when an incorrect lock-screen input is detected. For each instruction listed below, press "+" at the bottom to bring up the list of Actions you can choose from.
  1. Variables --> Variable Convert. Under Name type in %TIMES or select it from the list of built-in variables by pressing on the note icon. Under Function, choose "Seconds to Medium Date Time" and under Store Result In type in %date.
  2. Media --> Take Photo. Under Camera pick the Front camera. For the filename, type in %date. Deselect "Insert in Gallery" to ensure that the photo can't be seen in any gallery apps. Select "Discreet" to disable the shutter sound when Tasker takes the photo. For Resolution, you can pick whatever you want, however I would recommend selecting a high resolution to get a clear picture. Leave everything else as default.
  3. OPTIONAL: If your phone is rooted, you can toggle location services to ensure it's on by going to Secure Settings and selecting Location Mode under the System+ dropdown. You would first have to enable the System+ Module within Secure Settings before the application will allow you to select this option, however. If you are unrooted, then your only option to automate enabling location services is to use an app like AutoInput to simulate touch inputs.
  4. Location --> Get Location. For source, I would recommend "Any" to ensure Tasker can get an accurate lock on your location.
  5. OPTION A: Phone --> Send SMS. Under Number, you can choose a telephone number to send an SMS with the location to. Just put %LOC under Message and Tasker will populate the SMS Message with whatever GPS coordinates it pulled earlier.
  6. OPTION B: Plugin --> Pushbullet. Open Pushbullet settings, and select the device you want to push to. For the title, you can set something that will alert you. In the message, put %LOC under Message to populate the GPS coordinates.
  7. OPTION C: File --> Write File. Under File, type in /sdcard/DCIM/Tasker/%date.txt in order to write to a text file named with the date that the incorrect attempt was made. Under Text, type in %LOC.
  8. OPTION C (cont.): Plugin --> Dropsync/Foldersync. Make Tasker perform a manual sync of the /sdcard/DCIM/Tasker folder. I recommend you set up either app to upload the file then delete it from your phone.

That's it! Your phone should now notify you with a picture and a location whenever an incorrect unlock attempt has been made.
The Following 27 Users Say Thank You to MishaalRahman For This Useful Post: [ View ] Gift MishaalRahman Ad-Free
 
 
7th March 2016, 11:08 PM |#2  
Deonta23's Avatar
Member
Thanks Meter: 13
 
More
this is genius. should be a security feature in android
The Following User Says Thank You to Deonta23 For This Useful Post: [ View ] Gift Deonta23 Ad-Free
8th March 2016, 12:24 AM |#3  
Member
Thanks Meter: 18
 
More
I'm missing where the photo is attached to the sms. Does that only work with option c?
8th March 2016, 05:52 AM |#4  
MishaalRahman's Avatar
OP Editor in Chief
Thanks Meter: 1,866
 
More
Quote:
Originally Posted by kkbarrier

I'm missing where the photo is attached to the sms. Does that only work with option c?

Good point! I based it off of my own set-up, which uses Option C, but unfortunately you can't automatically compose and then send an MMS without the screen being temporarily unlocked then locked, as Tasker only allows you to compose an MMS but not immediately send it. You would have to quickly unlock the screen in the background, then use AutoInput to paste the message and send it to the right number. But temporarily unlocking it when it's in a thief's possession would be risky, no?
8th March 2016, 05:53 AM |#5  
Senior Member
Flag Male'
Thanks Meter: 780
 
More
This is useless. (especially peoples like me steal a smart phone) there will be no internet connection and if the there is an internet connection thief will not try to guess the password or pattern he will flash twrp and remove the /data/system/gesture.key and he will get access easily hahahahha lol
The Following User Says Thank You to DarkFrenzy For This Useful Post: [ View ] Gift DarkFrenzy Ad-Free
8th March 2016, 06:39 AM |#6  
Paramvir Singh's Avatar
Senior Member
Thanks Meter: 20
 
More
lol
Quote:
Originally Posted by DarkFrenzy

This is useless. (especially peoples like me steal a smart phone) there will be no internet connection and if the there is an internet connection thief will not try to guess the password or pattern he will flash twrp and remove the /data/system/gesture.key and he will get access easily hahahahha lol

My phone's twrp will be locked!!
8th March 2016, 06:43 AM |#7  
Senior Member
Flag Male'
Thanks Meter: 780
 
More
Quote:
Originally Posted by Paramvir Singh

My phone's twrp will be locked!!

Can flash any other recovery or unlock it hahahha

Sent from my ASUS_T00F using XDA Free mobile app
8th March 2016, 06:53 AM |#8  
Paramvir Singh's Avatar
Senior Member
Thanks Meter: 20
 
More
hmm
Quote:
Originally Posted by DarkFrenzy

Can flash any other recovery or unlock it hahahha

Sent from my ASUS_T00F using XDA Free mobile app

right bro just joking...
8th March 2016, 07:36 AM |#9  
Senior Member
Thanks Meter: 83
 
Donate to Me
More
Quote:
Originally Posted by DarkFrenzy

This is useless. (especially peoples like me steal a smart phone) there will be no internet connection and if the there is an internet connection thief will not try to guess the password or pattern he will flash twrp and remove the /data/system/gesture.key and he will get access easily hahahahha lol

I can't say i fully agree. Ofcourse one can get their phone stolen by someone that knows their way around a phone BUT, seeing as 90%+ of phone users worldwide have no clue what "TWRP" or "Custom Recovery" is, i think this feature will work great for many users.
One can ofcourse be unlucky and get their phone stolen, but mostly phones are lost / forgot somewhere.

Thanks for this @MishaalRahman, great feature!

- Renolz
The Following 2 Users Say Thank You to renolz For This Useful Post: [ View ] Gift renolz Ad-Free
8th March 2016, 08:06 AM |#10  
Senior Member
Thanks Meter: 107
 
More
Quote:
Originally Posted by renolz

I can't say i fully agree. Ofcourse one can get their phone stolen by someone that knows their way around a phone BUT, seeing as 90%+ of phone users worldwide have no clue what "TWRP" or "Custom Recovery" is, i think this feature will work great for many users.
One can ofcourse be unlucky and get their phone stolen, but mostly phones are lost / forgot somewhere.

Thanks for this @MishaalRahman, great feature!

- Renolz

I doubt most people in the 90%+ can even follow half this tutorial; before we get to TWRP. Unless this gets an easier way to do this, I don't see it helping that many users outside XDA
8th March 2016, 08:08 AM |#11  
Senior Member
Thanks Meter: 83
 
Donate to Me
More
Quote:
Originally Posted by Aeonia

I doubt most people in the 90%+ can even follow half this tutorial; before we get to TWRP. Unless this gets an easier way to do this, I don't see it helping that many users outside XDA

Agreed!

- Renolz
The Following User Says Thank You to renolz For This Useful Post: [ View ] Gift renolz Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes