FORUMS
Remove All Ads from XDA

How to disable the keyguard with Tasker

7 posts
Thanks Meter: 2
 
By LeBobbo, Junior Member on 30th October 2018, 12:49 AM
Post Reply Email Thread
28th November 2019, 11:36 PM |#11  
Member
Thanks Meter: 18
 
More
This is a very elegant solution. I've been using SecureTask for years, but for some reason now the broadcast for disable keyguard isn't being sent (no idea why). Is it supposed to remove the lockscreen completely, or just disable the keyguard? Currently it will remove the passcode fine, but I still have to slide up to unlock.
28th November 2019, 11:55 PM |#12  
OP Junior Member
Thanks Meter: 2
 
More
You can use "wm dismiss-keyguard". This is the tasker task that I am using for unlocking my phone:

<TaskerData sr="" dvi="1" tv="5.9.rc">
<Task sr="task88">
<cdate>1540809008349</cdate>
<edate>1574980936233</edate>
<id>88</id>
<nme>ScreenLockOff</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">locksettings clear --old ??????</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act1" ve="7">
<code>664</code>
<Str sr="arg0" ve="3">kgm</Str>
<Str sr="arg1" ve="3">CONTEXT</Str>
<Str sr="arg2" ve="3">getSystemService
{KeyguardManager} (String)</Str>
<Str sr="arg3" ve="3">keyguard</Str>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act2" ve="7">
<code>664</code>
<Str sr="arg0" ve="3">%locked</Str>
<Str sr="arg1" ve="3">kgm</Str>
<Str sr="arg2" ve="3">isKeyguardLocked
{boolean} ()</Str>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act3" ve="7">
<code>37</code>
<label>Check if the screen is locked</label>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%locked</lhs>
<op>0</op>
<rhs>true</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act4" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">wm dismiss-keyguard</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act5" ve="7">
<code>38</code>
</Action>
</Task>
</TaskerData>
29th November 2019, 04:07 PM |#13  
Member
Thanks Meter: 18
 
More
Quote:
Originally Posted by LeBobbo

You can use "wm dismiss-keyguard". This is the tasker task that I am using for unlocking my phone:

<TaskerData sr="" dvi="1" tv="5.9.rc">
<Task sr="task88">
<cdate>1540809008349</cdate>
<edate>1574980936233</edate>
<id>88</id>
<nme>ScreenLockOff</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">locksettings clear --old ??????</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act1" ve="7">
<code>664</code>
<Str sr="arg0" ve="3">kgm</Str>
<Str sr="arg1" ve="3">CONTEXT</Str>
<Str sr="arg2" ve="3">getSystemService
{KeyguardManager} (String)</Str>
<Str sr="arg3" ve="3">keyguard</Str>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act2" ve="7">
<code>664</code>
<Str sr="arg0" ve="3">%locked</Str>
<Str sr="arg1" ve="3">kgm</Str>
<Str sr="arg2" ve="3">isKeyguardLocked
{boolean} ()</Str>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Str sr="arg8" ve="3"/>
<Str sr="arg9" ve="3"/>
</Action>
<Action sr="act3" ve="7">
<code>37</code>
<label>Check if the screen is locked</label>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%locked</lhs>
<op>0</op>
<rhs>true</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act4" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">wm dismiss-keyguard</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act5" ve="7">
<code>38</code>
</Action>
</Task>
</TaskerData>

So just run that when the display turns on?

Also how on earth do I import that without it overwriting everything else I've ever done? XD
29th November 2019, 10:42 PM |#14  
OP Junior Member
Thanks Meter: 2
 
More
You need to run this when you want to unlock your phone (disable the pattern lock and dismiss the keyguard).

Copy/paste the xml data to a text file. The file name should be whatever_you_like.tsk.xml. You need to replace the ???? in the file with your pattern code. You can then import this file into tasker. You should consult the user manual of Tasker for this.
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