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

Search This thread

Maxr1998

Recognized Developer
Apr 15, 2013
2,161
3,221
24
Germany
maxr1998.de
Google Nexus 4
Nexus 7
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:

eurochild

Senior Member
Jul 11, 2007
1,002
984
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,161
3,221
24
Germany
maxr1998.de
Google Nexus 4
Nexus 7
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
460
194
Seoul
Xiaomi Mi Mix 2S
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,161
3,221
24
Germany
maxr1998.de
Google Nexus 4
Nexus 7
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,286
425
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
460
194
Seoul
Xiaomi Mi Mix 2S
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,286
425
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,286
425
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,161
3,221
24
Germany
maxr1998.de
Google Nexus 4
Nexus 7
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

Senior Member
Mar 11, 2012
54
43
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
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,161
3,221
24
Germany
maxr1998.de
Google Nexus 4
Nexus 7
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

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    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
    2
    After every reboot I have to re-type the command in terminal. Any fix?
    A tasker profile for example, an init.d or su.d script, or HKM when Mike includes it.
    I just updated HKM to support hellsCode, take a look at hellsCore thread (since HKM thread is locked).
    2
    Huh, probably [emoji14]
    Yes, dt2w uses some kind of wakelock, but I didn't change it, so it should be the same as for everybody else.

    @hellsgod, I'm interested what suspend_backoff means and what it is used for :)

    Anyway, you could try to wipe cache+dalvik, reflash ROM and kernel. ;)

    Even if you don't need it anymore, but here's a little bit about suspend_backoff: https://github.com/asksven/BetterBatteryStats-Knowledge-Base/wiki/suspend_backoff

    hells
    2
    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
    2
    really sorry but i feel very noob with this but i cant get it to work, maybe cause im doing something wrong... i have the mod activated in xposed and the pattern set and d2w enabled
    1. echo 1 > "/sys/devices/virtual/input/lge_touch/hells_code_enabled" -- where do i enter this command? terminal emulator? any procedure? please tell me the steps if any...
    2. the knock works when the screen is off right?

    1. Yes, using terminal emulator, first u have to enter su command and give it permission, then just copy and paste the command in th OP
    2. Yes