Wiki: Bypass Pattern from lockscreen with Camera

1,144 views
Skip to first unread message

TW

unread,
May 16, 2012, 12:44:22 PM5/16/12
to tas...@googlegroups.com
I just added a new Project to the Wiki, this topic is for discussion or problems.

Prerequisites

WidgetLocker lockscreen or CyanogenMod 7
Secure Settings plugin

What is it

This is a set of Tasks and a Profile which will allow you to launch the camera app from your lockscreen with 1 click.
Your lockscreen will be unlocked (tested only WidgetLocker), your Pattern temporarily disabled and the camera app launched.
If you close the camera app or move it to the background, you display will be locked again and the pattern enabled so your phone is safe :)

How can this be usefull

I often want to take a quick picture but also like to keep my phone as secure as possible.
This allows just that without compromising security.

http://tasker.wikidot.com/bypass-pattern-from-lockscreen-with-camera

millenium_neil82

unread,
May 17, 2012, 5:34:49 AM5/17/12
to tas...@googlegroups.com
Hi TW,

Thank you very much for this project. I have tried it on my phone, but I get the pattern lock after choosing the Camera-Start from the lock screen. After the pattern unlock, can see there's a pop saying "Warning Action Widget Locker isn't available on this phone". 

Do I need to purchase the Widget Locker app? 

Thank you again for your quick response to my earlier query. 

TW

unread,
May 17, 2012, 5:40:39 AM5/17/12
to tas...@googlegroups.com
you don't need WidgetLocker if you can launch it from another lockscreen..
to get rid of that popup, remove step 9 from Task Camera - Start

also, it's possible you need to manually set %DISPLAY_STATE variable to Locked as step 1 checks for this

millenium_neil82

unread,
May 17, 2012, 9:32:42 AM5/17/12
to Tasker
Hi TW,

Thank you for your prompt reply! I tried removing Step 9 and it
certainly got rid of the pop up! And manually setting %DISPLAY-STATE
to Locked in the variables tab turned the vertical line next to steps
2-7 from red to green. I assume that's a good thing!

Now, when I slide to the Camera-Start in the lock screen, the screen
waits for a split second, then the display goes off. After another a
second or so, the screen comes back on, but it takes me to the pattern
lock screen. After the pattern lock, it takes me straight to the
camera app. After I close the camera app, the screen force closes, and
upon re-opening of the screen, I'm taken back to the lockscreen.

So, I feel like I'm almost there! The second half is definitely
working - when the app is closed, it automatically locks the phone. I
now need to be able to bypass the pattern lock...

Do you thing it's to do with Camera - Start task, or Display - Unlock
task?

I really appreciate your help in this.

On May 17, 7:40 pm, TW <thew...@gmail.com> wrote:
> you don't need WidgetLocker if you can launch it from another lockscreen..
> to get rid of that popup, remove step 9 from Task Camera - Start
>
> also, it's possible you need to manually set %DISPLAY_STATE variable to
> Locked as step 1 checks for this
>
>
>
>
>
>
>
> On Thursday, May 17, 2012 11:34:49 AM UTC+2, millenium_neil82 wrote:
>
> > Hi TW,
>
> > Thank you very much for this project. I have tried it on my phone, but I
> > get the pattern lock after choosing the Camera-Start from the lock screen.
> > After the pattern unlock, can see there's a pop saying "Warning Action
> > Widget Locker isn't available on this phone".
>
> > Do I need to purchase the Widget Locker app?
>
> > Thank you again for your quick response to my earlier query.
>
> > On Thursday, May 17, 2012 2:44:22 AM UTC+10, TW wrote:
>
> >> I just added a new Project to the Wiki, this topic is for discussion or
> >> problems.
>
> >> *Prerequisites*
> >> *
> >> *WidgetLocker lockscreen or CyanogenMod 7
> >> Secure Settings plugin
>
> >> *What is it*
>
> >> This is a set of Tasks and a Profile which will allow you to launch the
> >> camera app from your lockscreen with 1 click.
> >> Your lockscreen will be unlocked (tested only WidgetLocker), your Pattern
> >> temporarily disabled and the camera app launched.
> >> If you close the camera app or move it to the background, you display
> >> will be locked again and the pattern enabled so your phone is safe :)
>
> >> *How can this be usefull*

TW

unread,
May 17, 2012, 10:45:46 AM5/17/12
to tas...@googlegroups.com
You also need to install the Helper for Secure Settings (needs root), this will take care of the Pattern
Will modify the Wiki info later..

millenium_neil82

unread,
May 17, 2012, 11:51:17 AM5/17/12
to Tasker
I have the latest Secure Settings Helper installed. I'm not sure what
it is that I'm not doing right, but it must be something that I need
to tweek. Could it be something in Task: Camera - Start, or Task:
Display - Unlock?

TW

unread,
May 17, 2012, 12:31:22 PM5/17/12
to tas...@googlegroups.com
Am at a housewarming party right now, will check later today.. ;-)

TW

unread,
May 17, 2012, 3:32:01 PM5/17/12
to tas...@googlegroups.com
Hmmm.. I'm not sure what could be causing this..
The Display - Lock Task seems to work fine.
The fact that when unlocking it turns screen off and on is a good thing..
Perhaps you could try to change the number of ms in the Wait action from 50 to 250 in Camera - Start and Display - Unlock.
I played around with that before..

millenium_neil82

unread,
May 18, 2012, 4:10:42 AM5/18/12
to Tasker
Hi TW,

I bit the bullet and bought the Widget Locker app, and the Tasker
Project is working great with it! Thank you so much for your
contribution, and for your help!

TW

unread,
May 18, 2012, 11:17:01 AM5/18/12
to tas...@googlegroups.com
glad it works for you now!

I only tested it with WidgetLocker as I purchased it a while ago to put my Zoom widgets on it :)
Might check later why it doesn't work with the CM lockscreen.

millenium_neil82

unread,
May 19, 2012, 2:41:55 AM5/19/12
to Tasker
Hi TW,

I hope you had a great night out! I hope you are not nursing a sore
head!

I decided to come back to the stock lockscreen since I think
WidgetLocker was making my phone a bit sluggish, and it was also a bit
fickle. It worked most of the time, but sometimes it didn't work as it
should.

So, I tried to understand what your plugin is doing and how each
actions work so that maybe I could make modifications needed for CM
lockscreen. My apologies in advance for sounding such a noob, I am
obviously new to this, and am trying to learn how to set up Tasker.

When I test-run the Camera - Start task within Tasker app by hitting
the 'play' button, it does exactly what I want to do: it opens the
camera app, and upon closing it, it will shut down the screen, and
takes me to the lock screen. So, I assume profile 'Camera' and
'Display - Lock' task are working. The flash 'Unlock' appears in the
process, so the Action 5 of 'Display - Unlock' task is working too.

So, the problem is automatically unlocking/disabling the pattern lock
when the lock is already on. It could be either: (1) Actions 1-4 in
'Display - Unlock' is not working as it should; or (2) All actions in
'Display - Unlock' task are working, but if the phone is in the state
of being pattern locked or in lockscreen, something in the system
overrides or blocks/disables those Actions. Oh, I have tired changing
the Wait value from 50 to 250 as you suggested, then something really
big, like 800. But it didn't work.

Do you think there's something else that I need to set around Secure
Settings - Pattern Lock? For example, creating a profile for when
CAMFROMWIDGET is on, Secure Settings disabling Keyguard?

Speaking of %CAMFROMWIDGET, I am guessing that this is what is telling
Tasker whether or not camera app in the lockscreen is turned on or
not. But how exactly does Tasker know this? There isn't any variable
set to 'teach' Tasker that '%CAMFROMWIDGET ~ 1' means launching camera
app through Task Cut?

Can you please have a look at the 6th message in this thread by Corey
Z, who I believe is the author of Secure Settings plugin.
http://groups.google.com/group/tasker/browse_thread/thread/ddd96648b91238d7/d079f9b2c03a93cf?show_docid=d079f9b2c03a93cf#

Is it relevant at all?

Also, I found this on Secure Settings website:
http://securesettings.intangibleobject.com/guides/betterkeyguardreplacement

I don't quite get what these instructions are for, or how they are
done. Is this process what I should be doing?

Thank for reading this long message, and thank you again for helping
me out with this!

TW

unread,
May 20, 2012, 5:38:59 AM5/20/12
to tas...@googlegroups.com
sorry for the delay.. had some stuff to do yesterday..

I'm testing today with my girlfriends Desire with CM7 on it, first tests show that when launching "Camera - Start" from a custom shortcut on the CM7 lockscreen the pattern is disabled and the cam app started..
the lockscreen however has to be manually slided open..
the issue then is that Tasker didn't detect the camera app opening so it won't automatically run the exit Task as the profile isn't active..
will test some more today

I know Android doesn't really like when you play around with the pattern and it requires special circumstances to work fine (like screen on etc..) 
I had a lot of issues initially but the Tasks and Profiles I have now work great everytime (with WidgetLocker lockscreen).
I will check for the CM lockscreen.

Corey is indeed the author of the Secure Settings plugin and the info in the thread is kinda similar to what we're doing here.

The %CAMFROMWIDGET is set to 1 in the "Camera - Start" Task, this indicates we started it from the lockscreen (or something other that the normal app shortcut).
There is a Profile in the Project which has an app Context, this checks if the camera app is launched and has an Exit task.
This Exit Task will force lock the screen (pattern on, lockscreen on and turn display off) but since we only want this to happen when Camera is launched from the lockscreen AND the display was locked we check this for the %CAMFROMWIDGET.
We don't want our display to force lock everytime we close the camera :)

I will have a play with everything today and post back..

millenium_neil82

unread,
May 20, 2012, 11:51:47 AM5/20/12
to Tasker
Hi TW,

Thank you for your reply! Thank you for your explanation! I now
understand what the profile does! It sounds like the test you did on
your girlfriend's phone did exact opposite of mine - it launched the
camera app, but it won't exit properly, is that right? Anyway, I look
forward to hearing from you again when you've done more tests!
> >http://groups.google.com/group/tasker/browse_thread/thread/ddd96648b9...
>
> > Is it relevant at all?
>
> > Also, I found this on Secure Settings website:
> >http://securesettings.intangibleobject.com/guides/betterkeyguardrepla...

TW

unread,
May 26, 2012, 5:44:36 AM5/26/12
to tas...@googlegroups.com
been kinda busy :(
I couldn't get a desired result with the CM lockscreen, the main issue seems to be that the App Context in Tasker doesn't trigger anymore when I mess with the CM lockscreen.
it might be a bug in Tasker or CM, I will try to debug this some more to narrow it down..
hope to have some time for this soon..

in the meanwhile I would suggest you try to find your way with WidgetLocker as this works fine, since you bought it already :)
Will get back to you later regarding the CM one..

millenium_neil82

unread,
May 27, 2012, 8:50:33 AM5/27/12
to Tasker
Thank you very much for your persistence, and also for the update! I
look forward to hearing from you whenever you have time for this.

Thanks again!

Dean Rowntree

unread,
Jun 14, 2012, 10:22:57 AM6/14/12
to tas...@googlegroups.com
Hi there, I've been trying to get this to work too using Widgetlocker. It's an ingenious use of Tasker!

I could never use Tasker and/or Secure Settings to disable the pattern, presumably because I'm not rooted. However, I switched to a PIN and now I can get it to work pretty well, (the Android keyguard sometimes gets re-enabled but I haven't figured out why yet).

At the moment when I press my Task cut to Camera Zoom FX (I intend to replicate this project for other apps on my WL screen) I have to enter in my PIN and the app then starts. Camera Zoom FX is a bit slower to start too, so I will have to mess about with waits.

However, when I press back or home buttons, the screen doesn't lock, it just stays on the home screen...any ideas?

Dean Rowntree

unread,
Jun 14, 2012, 4:31:03 PM6/14/12
to tas...@googlegroups.com
OK after playing around for a bit it does seem to work as advertised! I had something dodgy in the profile context but seems to work ok now.

Wietse van Buitenen

unread,
Jul 24, 2012, 4:05:56 PM7/24/12
to tas...@googlegroups.com
I'm still using it in 1.3 and I still seem to have Task Cut..
didn't have much time to look into this as I've been working on some other Projects in Tasker and Camera from Lockscreen works fine for me..
hope to have some more time for it following week..

On Tuesday, July 24, 2012 6:17:42 PM UTC+2, Kan wrote:
is this workable in 1.3.* ? 

was attempting to get it working and couldn't spot it to import so i opened it up and noticed it has a version number hard coded into the script, tried to just change to 1.3 and saved it but that still didn't let me see it to import it. 

also might want to edit the wiki change the task cut from widget to shortcut.

Kan

unread,
Jul 24, 2012, 4:15:37 PM7/24/12
to tas...@googlegroups.com
Thanks, ill keep toying around, im new to importing things ive only ever made my own simple scripts manually for basic tasks, this it he first thing im attempting to install off the wiki, its weird it wont even show up when i point to the directory with it to import, so i tried a simpler script an audio headphone one and it showed up even tho its in the same directory.

this is what i was referring to in your first two lines

<class cl="TaskerData" sr="">
<tv>1.2.2b3</tv>

"1.2.2b3" mainly i changed it to 1.3 and 1.3u1 just to try but im probably missing something simpler, no rush im just toying around here.

Kan

unread,
Jul 30, 2012, 11:45:56 AM7/30/12
to tas...@googlegroups.com
Tried downgrading to the version mentioned in the xml 1.2.2b3 and i still cant see it anywhere to import it, yet i can see other things ive downloaded to import.

Ive got the secure app installed and widget locker, but i don think that would make a difference on being able to import..

now just curious if anyone else can _not_ import this into their tasker on the latest version?

paulw

unread,
Oct 22, 2012, 5:10:39 PM10/22/12
to tas...@googlegroups.com
Any progress on getting this to work with the CM lockscreen? I'm running CM9 and had the same problems mentioned above.

Kan, it took me awhile to figure out how to import it, since i wasn't familiar with "projects". You have to hold down the tab at the top—e.g., the one with the house icon— which will bring up a menu for Projects. Click Import. Then you should be able to import it.

Sérgio Stella

unread,
Apr 8, 2013, 3:00:38 PM4/8/13
to tas...@googlegroups.com
Hi.
I'm triyng, but doesn't work.
Always need to type lock code.

Could you help me, please?
Reply all
Reply to author
Forward
0 new messages