[KERNEL][Aug 23] KhunTien V2 [DT2W + S2W/Wake Gestures + Pocket Detection][CM/AOSP]

aabenroi

Senior Member
Dec 6, 2011
353
210
43
Pontianak
Features:
- CM features: Live Display, Vibration Intensity, Leds, etc
- Compiled with stock gcc compiler, Optimized for speed (O2 flags)
- CRC32 Disabled by default
- PowerSuspend (credits: faux123 & yank555-lu)
- KCAL (credits: savoca)
- Sound Control (credits: flar2 & guts94)
- dt2w+s2w+wake_gestures (credits: showp1984 & flar2)

About DT2W & S2W
- It's on by default (double tap & swipe up), you can manage & turn it off using Kernel Adiutor Mod - > Wake Controls

About Wake Gestures (Optional)
- You need Kernel Adiutor MOD
- You must change SELinux to Permissive using Kernel Adiutor MOD -> Misc Controls or you can simply use SuperSU
- Turn on wanted gestures from Kernel Adiutor MOD -> Wake Controls
- Choose gesture actions using Wake Gestures

About Pocket Mode
- There is 'Wake Control' apps installed along with the V2 and later kernel, it used for pocket detection. If you don't like it, you can simply remove /sysyem/priv-app/WakeControl
- Alternative method #1: You can set pocket mode from Wake Gesture App
- Alternative method #2: You can turn on proximity wake if you're using Xposed -> GravityBox

Uninstall
- There is 'Wake Control' apps installed along with the V2 and later kernel, it used for pocket detection.
- you can simply remove /sysyem/priv-app/WakeControl

Source:
https://github.com/symkuangyaw/android_kernel_xiaomi_kenzo/tree/tweak

Download:
https://www.androidfilehost.com/?w=files&flid=85116
(latest file is one that on root dir, files inside folders is old files for archive)

F.A.Q:
a: dude how did you do this?
q: our device touchpanel "do" support gestures, but Xiaomi disabled it. I just enabled it :D
a: does is drain your battery?
q: No, it doesn't, it just use very little close to none power.
a: does it wake the system?
q: no... system deep sleep normally
q: if it's native why I see software part?
a: To make it easier for me and for you
I'm bridging the gesture to flar2's wake gestures implementation so it will be easy to control with popular apps.

I'm a noobs, I;m new to android dev... I just know some C/C++.
so don't expect I can add tons of features like other devs :p
 
Last edited:

sumitvib

Senior Member
Jul 6, 2012
181
38
0
My english is bad, so I will just go to the point

Features:
- CRC32 Disabled by default (You can re-enable it)
- Optimized with O3 flags
- PowerSuspend (credits: faux123)
- Dt2w (credits: flar2, showp1984)

source code : soon (still figure out how to use github thing :silly:)
based on : https://github.com/CyanogenMod/android_kernel_xiaomi_msm8956

download

I'm a noobs, I;m new to android dev... I just know some C/C++.
so don't expect I can add tons of features like other devs :p
Good work....you are trying to learn is a great thing...Good luck:good:
 

tomylin890

Member
Aug 12, 2013
10
2
0
Awesome work!!!!!

Wow!!! Man , you are genius!!!!
DT2W is working great for me!!!!
The speed is fast , and very accurate.!!!!
Thank for your work , expect you upload the source code to github for more dev!!!!
Sorry for my poor English....

Screenshot:
[/IMG]
 

Try it or die

Senior Member
May 17, 2013
829
556
0
Wow!!! Man , you are genius!!!!
DT2W is working great for me!!!!
The speed is fast , and very accurate.!!!!
Thank for your work , expect you upload the source code to github for more dev!!!!
Sorry for my poor English....

Screenshot:
[/IMG]
Can u look in Aida64 at "screen" (don't now how the name is in English, it's directly under CPU) and make a screenshot?
 
Last edited:

abid52

Senior Member
Jan 26, 2016
266
35
0
Bootloop on rr official
N after bootloop wen i gone to recovery
Screen starts blinking [emoji24] [emoji24]
I worried something wrong happened,
After sometimes i get settled
What actually happened
Is something harmful it is to device
Or my display drivers got damaged???

Sent from my Redmi Note 3 using XDA-Developers mobile app
 

Windslash31

Senior Member
Mar 20, 2014
217
91
28
need clarification. your implementation of double tap to wake is using flar's implementation yes? that means it uses external driver, that will messed with battery life isnt it?

---------- Post added 26-07-2016 at 12:00 AM ---------- Previous post was 25-07-2016 at 11:46 PM ----------

Can't find the name of the touchscreen there, but I checked it in Aida64, I have tianma, so atmel is working and tianma not?
terminal. type su (enter) getevent -l(enter, its a lowercase L not an Uppercase i)
 

Try it or die

Senior Member
May 17, 2013
829
556
0
need clarification. your implementation of double tap to wake is using flar's implementation yes? that means it uses external driver, that will messed with battery life isnt it?

---------- Post added 26-07-2016 at 12:00 AM ---------- Previous post was 25-07-2016 at 11:46 PM ----------



terminal. type su (enter) getevent -l(enter, its a lowercase L not an Uppercase i)
Alright.
https://app.box.com/s/6wsnktvuwpr9tfm7zm110o9py57sj9nc
 

Attachments

Last edited:

aabenroi

Senior Member
Dec 6, 2011
353
210
43
Pontianak
need clarification. your implementation of double tap to wake is using flar's implementation yes? that means it uses external driver, that will messed with battery life isnt it?
yep and nope...

from my code dig, the focaltech does support "wake gesture", it's just not enabled by xiaomi.

In short ...
I just enabled it, but I can't find simple way to detect 'double-tap' to wake the power directly (it can be done, but I'm too lazy at the moment :p).
So, to make it easy for me... I just modified the driver to send the signal to showp's dt2w to kick the power

battery life shouldn't affected much since it's just sending signal when it detect a touch.
 
  • Like
Reactions: BlackDragonz

abid52

Senior Member
Jan 26, 2016
266
35
0
Bootloop on rr official
N after bootloop wen i gone to recovery
Screen starts blinking [emoji24] [emoji24]
I worried something wrong happened,
After sometimes i get settled
What actually happened
Is something harmful it is to device
Or my display drivers got damaged???

Sent from my Redmi Note 3 using XDA-Developers mobile app
Someone clarify me?! Pls... [emoji52]

Sent from my Redmi Note 3 using XDA-Developers mobile app