[APP][XPOSED][1.0] hellsCode - A KnockCode mod for hellsCore kernel

Maxr1998

Recognized Developer
Apr 15, 2013
2,147
3,208
113
22
Augsburg
maxr1998.de
Code:
/** Disclaimer
 * The usual stuff, I am not responsible for any damages from this mod,
 * either to you phone, your job, your house, your kitten, blah blah…
 */
Introduction, How it works, etc.
This is a KnockCode feature addition for hellsCore kernel on our beloved Nexus 4.

I created this mod by modifying Stratoks's dt2wake in hellsCore kernel that you can input a pattern on the screen, which is separated in a grid of 4 rectangles (For further explanation search for LG KNOCKcode on Google). I record that pattern in Touchscreen driver, and then write it into a sysfs file.
In the second step, the hellsCode config Xposed module reads the code from that file, and compares it to the code saved in its preferences. If the code was correct, it finishes the Keyguard to unlock your device.
If the code is wrong, the screen still goes on, but this time shows the Keyguard. That means you can also use it as QuadrupleTap2Wake ;)

At the moment, this mod heavily relies on Xposed, but I hope that I can integrate this mod directly into some custom roms, I will write a guide for rom creators later.
Since B80, my mod is merged into the official hellsCore kernel.

Sources:
Look below.
Installation instructions
* You need Xposed for this to work properly
* Install hellsCore kernel from here (since B80)
* Install hellsCodeConfig.apk, activate in Xposed installer, reboot.
* Set up your code in hellsCode Config app.
* You need to have doubletap2wake enabled in your favorite Kernel manager, and also enable the mod with
echo 1 > "/sys/devices/virtual/input/lge_touch/hells_code_enabled"

To disable temporarily, do echo 0 > "/sys/devices/virtual/input/lge_touch/hells_code_enabled", to remove permanently uninstall the hellsCode Config app.
Thanks To/Credits
Code:
* hellsgod for creating the best kernel in the world
* Stratosk for providing me the base with his dt2wake mod
XDA:DevDB Information
hellsCode, Device Specific App for the Google Nexus 4

Contributors
Maxr1998, hellsgod
Source Code: https://github.com/hellsgod/hells-Core-N4/commit/10eb65957bbcf65004d432a02fe7345a149c36db


Version Information
Status: Stable
Current Stable Version: 1.1
Stable Release Date: 2015-06-27

Created 2015-06-15
Last Updated 2016-08-24
 
Last edited:

Maxr1998

Recognized Developer
Apr 15, 2013
2,147
3,208
113
22
Augsburg
maxr1998.de
FAQ
Why isn't there a version for CM?
-- There actually is one, just take a look at the official hellsCore kernel, which includes the mod since B80.

The device sometimes unlocks when woken up with the power button, why does this happen?
-- That was a bug, fixed with config 1.1
 
Last edited:

eurochild

Senior Member
Jul 11, 2007
963
963
133
Athens
Good job man, will try this asap!

is it echo 1 > "/sys/devices/virtual/input/lge_touch/hells_code_enabled"

or

echo 1 > /sys/devices/virtual/input/lge_touch/hells_code_enabled ???
 
Last edited:
  • Like
Reactions: Maxr1998

Maxr1998

Recognized Developer
Apr 15, 2013
2,147
3,208
113
22
Augsburg
maxr1998.de
Good job man, will try this asap!

is it echo 1 > "/sys/devices/virtual/input/lge_touch/hells_code_enabled"

or

echo 1 > /sys/devices/virtual/input/lge_touch/hells_code_enabled ???
Whatever. With "" it has nicer formatting, and is most times better when you have spaces in folder names.

Sent using my nexus⁴ running Euphoria 1.1 with Xposed and hells-Core B78
 

ddaggebi

Senior Member
Jan 12, 2014
446
189
73
Seoul
Feedback
Really thanks! I really like knock code. This mod works great, but with three problems :
1. Lock screen is shown for a milisec, then unlocks. Not really a big problem.
2. After unlocking, status bar is sometimes pulled down.
3. Power button is useless now. Every time I use power button, it bypasses lockscreen. Every time.
I hope this mod advances with updates! Thanks!
 

Maxr1998

Recognized Developer
Apr 15, 2013
2,147
3,208
113
22
Augsburg
maxr1998.de
Feedback
Really thanks! I really like knock code. This mod works great, but with three problems :
1. Lock screen is shown for a milisec, then unlocks. Not really a big problem.
2. After unlocking, status bar is sometimes pulled down.
3. Power button is useless now. Every time I use power button, it bypasses lockscreen. Every time.
I hope this mod advances with updates! Thanks!
1. I still have to research which hooks suit better.

2. Really? That's strange, and has nothing to do with the mod..

3. That's a bug, read OP ;)
Btw, if you touch screen once, and then press power button, it doesn't unlock. Will fix later today IF I have the time.
I unfortunately ignored school a bit the last few days, and have to catch up :/ ;)

Sent using my nexus⁴ running Euphoria 1.1 with Xposed and hells-Core B78
 

hardwareadictos

Senior Member
Jun 15, 2013
1,279
423
0
Feedback
Really thanks! I really like knock code. This mod works great, but with three problems :
1. Lock screen is shown for a milisec, then unlocks. Not really a big problem.
2. After unlocking, status bar is sometimes pulled down.
3. Power button is useless now. Every time I use power button, it bypasses lockscreen. Every time.
I hope this mod advances with updates! Thanks!
For me is working quite fine, only problem i face is that the mod is not respecting unlocking sequence configured on hellscode config, if you tap on anywere 4 times phone unlocks.

Enviado desde mi Nexus 4 mediante Tapatalk
 

ddaggebi

Senior Member
Jan 12, 2014
446
189
73
Seoul
Thanks for the quick reply. I will love this if the power button bug is fixed!
About the statusbar, I think it is related with my rom's feature(quick pulldown). Do you use stock rom?

---------- Post added at 02:33 PM ---------- Previous post was at 02:32 PM ----------

For me is working quite fine, only problem i face is that the mod is not respecting unlocking sequence configured on hellscode config, if you tap on anywere 4 times phone unlocks.

Enviado desde mi Nexus 4 mediante Tapatalk
Can you tell me what rom you use? Stock?
 

hardwareadictos

Senior Member
Jun 15, 2013
1,279
423
0
Thanks for the quick reply. I will love this if the power button bug is fixed!
About the statusbar, I think it is related with my rom's feature(quick pulldown). Do you use stock rom?

---------- Post added at 02:33 PM ---------- Previous post was at 02:32 PM ----------



Can you tell me what rom you use? Stock?
Euphoria-OS 13 June build

Enviado desde mi Nexus 4 mediante Tapatalk
 

hardwareadictos

Senior Member
Jun 15, 2013
1,279
423
0
Thanks for the quick reply. I will love this if the power button bug is fixed!
About the statusbar, I think it is related with my rom's feature(quick pulldown). Do you use stock rom?

---------- Post added at 02:33 PM ---------- Previous post was at 02:32 PM ----------



Can you tell me what rom you use? Stock?
Sorry i quoted the wrong post, Euphoria-OS 13 June build

Enviado desde mi Nexus 4 mediante Tapatalk
 

Maxr1998

Recognized Developer
Apr 15, 2013
2,147
3,208
113
22
Augsburg
maxr1998.de
For me is working quite fine, only problem i face is that the mod is not respecting unlocking sequence configured on hellscode config, if you tap on anywere 4 times phone unlocks.

Enviado desde mi Nexus 4 mediante Tapatalk
Sure it unlocks? Or does only screen toggle on?

Thanks for the quick reply. I will love this if the power button bug is fixed!
About the statusbar, I think it is related with my rom's feature(quick pulldown). Do you use stock rom?
Euphoria-OS 13 June build
I use Euphoria as well.
 

saleemz

Member
Mar 11, 2012
49
41
38
Palestine
For me is working quite fine, only problem i face is that the mod is not respecting unlocking sequence configured on hellscode config, if you tap on anywere 4 times phone unlocks.

Enviado desde mi Nexus 4 mediante Tapatalk
Euphoria-OS 13 June build

Enviado desde mi Nexus 4 mediante Tapatalk
work fine here, if i tap a wrong sequence the screen turn on but it doesn't unlock the screen
 
  • Like
Reactions: Maxr1998

Ciao600

Senior Member
Oct 15, 2012
320
45
0
Nice work. I was waiting for this for a long time. I'll try the mod as soon as power button bug will be fixed.
Is there any chance you fix the micro lag that makes lockscreen shows for a millisecond?
Thanks
 

Maxr1998

Recognized Developer
Apr 15, 2013
2,147
3,208
113
22
Augsburg
maxr1998.de
Nice work. I was waiting for this for a long time. I'll try the mod as soon as power button bug will be fixed.
Is there any chance you fix the micro lag that makes lockscreen shows for a millisecond?
Thanks
Possibly.
But I don't have too much time this week. Maybe tomorrow or friday, but not today.

Sent using my nexus⁴ running Euphoria 1.1 with Xposed and hells-Core B78
 
  • Like
Reactions: t3nniiz and Ciao600