FORUMS
Remove All Ads from XDA

[MOD][Xposed] Knock Code (while screen on)

1,080 posts
Thanks Meter: 5,548
 
Post Reply Email Thread
Requires Xposed Framework!

This module allows you to add a knock code unlock method to your device's lock screen.
You will need to set the stock Android 3*3 grid pattern in settings, after that, set a knock code pattern in the app.

The default knock is:
1 2
3 4

If for any reason your code fails to load, use that.

If you made a mistake while entering the code, tap and hold to reset what you entered.

From a security point of view, this isn't the most secure way of locking your device. Due to the way Xposed works, the file where the code is stored is world-readable, meaning you don't even need root to read it. This means any app can read the code. A good way to reduce the exploit surface is to disable USB debugging, that way, chances of a local exploit are reduced.
The password is encrypted, but it's more of a way to make reading it harder, anyone slightly determined to get your code can.

* The module relies on the fact that a pattern is set, if any type of passcode is set, that type is shown. If Xposed is disabled through recovery or any other way, then the device falls back to this pattern method.

FAQ:
* Why can't I use this with the screen off?
That requires a custom kernel, it's very possible to do if your device already supports double tap to wake, but I won't dive into that.
* Will you ever support 4.1 and below?
No, manufacturers had their own lock screens before 4.2, so adding support for those would be hard without an actual device. So this'll stay 4.2+ permanently.
Video:
https://www.youtube.com/watch?v=hzUZOeD6n2Y

Screenshot:


Compatibility:
4.2+ only.
Tested devices:
  • Sony Xperia 4.4
  • Samsung TouchWiz 4.4 (pre-S5, not sure if it'll work on the S5)
  • HTC Sense 6.

Download:
http://repo.xposed.info/module/com.mohammadag.knockcode

Source code:
https://github.com/MohammadAG/Xposed-Knock-Code

Support development:
If you found this mod useful, consider donating with PayPal.
The Following 120 Users Say Thank You to MohammadAG For This Useful Post: [ View ] Gift MohammadAG Ad-Free
 
 
31st May 2014, 03:33 PM |#2  
flexxoo's Avatar
Senior Member
Flag California
Thanks Meter: 115
 
More
is not working I put a code and when I want to unlock phone it said that is incorrect!!


Sent from my SM-N900T using XDA Free mobile app
The Following User Says Thank You to flexxoo For This Useful Post: [ View ] Gift flexxoo Ad-Free
31st May 2014, 03:48 PM |#3  
Member
Thanks Meter: 2
 
More
It would be perfect if worked while the screen off .

But thank u maohammedAg any way

Sent from my GT-I9500 using Tapatalk
The Following User Says Thank You to APK3rb For This Useful Post: [ View ] Gift APK3rb Ad-Free
31st May 2014, 04:16 PM |#4  
Senior Member
Thanks Meter: 472
 
More
Not working on s3 i9300 4.3 mk6 stock touchwiz rom with agni kernel. Last entry in xposed log is loading module. No fail messages or anything.
The Following User Says Thank You to shivadow For This Useful Post: [ View ] Gift shivadow Ad-Free
31st May 2014, 04:31 PM |#5  
OP Inactive Recognized Developer
Flag Jerusalem
Thanks Meter: 5,548
 
Donate to Me
More
Quote:
Originally Posted by flexxoo

is not working I put a code and when I want to unlock phone it said that is incorrect!!


Sent from my SM-N900T using XDA Free mobile app

Reboot your device after the initial code is set. I've updated the first post to show that.

The default code is:
1 2
3 4

Sent from my HTC One_M8 using Tapatalk
The Following 6 Users Say Thank You to MohammadAG For This Useful Post: [ View ] Gift MohammadAG Ad-Free
31st May 2014, 05:14 PM |#6  
ravijani's Avatar
Senior Member
Thanks Meter: 4,109
 
More
Thumbs up
worked great on samsung galaxy note 2 n7100 4.4.2 stock.
thnx for this.
The Following User Says Thank You to ravijani For This Useful Post: [ View ] Gift ravijani Ad-Free
31st May 2014, 05:20 PM |#7  
badkill's Avatar
Senior Member
Flag México
Thanks Meter: 366
 
Donate to Me
More
i love this module, work perfectly on my galaxy s4-i9505 with Android 4.4.2 stock, thanks for this module. i'm very very very happy
31st May 2014, 07:31 PM |#8  
Senior Member
Thanks Meter: 8
 
More
Nice one , like it , Can use that on screen off ? i got CharizardX kernel based on franco nexus 5
31st May 2014, 07:33 PM |#9  
Senior Member
Flag Mumbai
Thanks Meter: 95
 
More
Great mod!
Although beats the point of knock code if it can't work with screen off.

After several unsuccessful attempts.. It unlocks for a second automatically.
Also.. It reset my preferences of lines and fills once when I opened the app and changed nothing.. Closed locked. Also that time..knock code was changed to default.
Sent from my HTC One_M8 using Tapatalk
31st May 2014, 08:03 PM |#10  
vip_47's Avatar
Member
Thanks Meter: 38
 
More
Xperia z lock bootloader get?
31st May 2014, 09:52 PM |#11  
Tianhe's Avatar
Senior Member
Thanks Meter: 98
 
More
No effect on Stock Galaxy Grand Duos 4.2.2 (GT-I9082). Using Xposed 2.6 Rebooted device but it still shows pattern lock instead of Knock code lockscreen



Sent from my GT-I9082 using xda app-developers app
The Following User Says Thank You to Tianhe For This Useful Post: [ View ] Gift Tianhe 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