• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[KERNEL] CTS Kernel [Tap2Wake]

Search This thread

MohammadAG

Inactive Recognized Developer
Sep 7, 2009
1,080
5,504
28
Jerusalem
mohammadag.xceleo.org
Requires unlocked bootloader.

Requires Sony's .681 KitKat ROM or ones based on it.

Minimal features will be added to this kernel. I'm not interested in OC or other tweaks I won't use.

Features:

You may use @Androguide.fr's excellent Pimp my Z1 app to configure sound options.

Download:
http://mohammadag.xceleo.org/public/Android/XperiaZ1/CTSKernel/latest

Installation:
Either flash the zip in a recovery, or fastboot flash boot boot.img

Sources:
https://github.com/MohammadAG/android_kernel_sony_msm8974

Thanks to:
  • Faux123 for his sound control module
  • Androguide.fr for Pimp my Z1
  • DooMLoRD for his ramdisk, I couldn't get the stock one working for some reason.

Found this useful?
Consider a donation: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4V3SGRLQDTM6

XDA:DevDB Information
CTS Kernel, a Kernel for the Sony Xperia Z1

Contributors
MohammadAG
Kernel Special Features: Double tap to wake

Version Information
Status: Stable
Current Stable Version: 1.2
Stable Release Date: 2014-04-02

Created 2014-03-30
Last Updated 2014-04-02
 

noob_user_

Senior Member
Oct 25, 2012
99
29
26
Kanyakumari
buggy

touchscreen unresponsive while charging......:rolleyes:

plugging the phone when screen off and trying to double tap to unlock produces the issue,,,
 
Last edited:

MohammadAG

Inactive Recognized Developer
Sep 7, 2009
1,080
5,504
28
Jerusalem
mohammadag.xceleo.org
1.1 out:
  • Raised delay to 700, 400 was a bit too low
  • Double tap to wake responds to one finger, previously, one tap with two fingers would wake up the screen
  • After boot, tapping the screen would lock the device, fixed
  • Timeout is correctly reset when screen is turned off

This should fix all issues with double tap to wake
 

MohammadAG

Inactive Recognized Developer
Sep 7, 2009
1,080
5,504
28
Jerusalem
mohammadag.xceleo.org
touchscreen unresponsive while charging......:rolleyes:

plugging the phone when screen off and trying to double tap to unlock produces the issue,,,

Charging isn't changed, if you have issues with the touchscreen while charging, I'd say it's a ground issue or a hardware one.
And in any case, I test the kernel with the charger plugged in.

Does this support using external recovery on FOTAKernel partition?

Sent from my Nexus 7 using Tapatalk

No idea what that is, got any links?
If advanced stock kernel supports it, this does.
 

Michealtbh

Senior Member
Nov 16, 2010
2,764
834
Belfast
Google Pixel 4
  • Like
Reactions: MohammadAG

MohammadAG

Inactive Recognized Developer
Sep 7, 2009
1,080
5,504
28
Jerusalem
mohammadag.xceleo.org
Awesome, thanks for the dt2wake port, all my previous attempts were unsuccessful :good:

I tried to port the Nexus 5 one a few months ago, and that didn't work either. I had to do it with custom code in the touch up event :)

I'm trying to add it into Pimp my Z1, I've already opened an issue for you on Github that's either your mistake or my Gradle understanding, or lack thereof.

So, this is exactly the same way Sony would have coded Tap2wake if they included it?

- The touch sensor runs in LPM doze mode, so it doesn't guzzle battery.
- It's double tap to unlock

Checks out :p
 

C_Karhu

Senior Member
Jan 28, 2012
349
81
How can I make it work even when screen has been disabled for a while? For me it only works a few seconds after screen of.
Great work!

Sent from my C6903 using XDA Premium 4 mobile app
 

Androguide.fr

Senior Member
Jul 21, 2012
2,056
7,229
Lyon, France
androguide.fr
I tried to port the Nexus 5 one a few months ago, and that didn't work either. I had to do it with custom code in the touch up event :)

I'm trying to add it into Pimp my Z1, I've already opened an issue for you on Github that's either your mistake or my Gradle understanding, or lack thereof.
Thanks man, I've just finished cherry-picking your tap 2 wake commits in my kernel, I'll add dt2wake control to Pimp My Z1 in a few minutes.
 
  • Like
Reactions: TheQwertiest

blakwhite

Senior Member
Nov 30, 2010
171
52
Appreciate the effort Mohammad, it works well so far.

Edit: I spoke too soon. It doesn't work sometimes, especially after some time following the lock. But it's there and obviously will work after some revisions.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 38
    Requires unlocked bootloader.

    Requires Sony's .681 KitKat ROM or ones based on it.

    Minimal features will be added to this kernel. I'm not interested in OC or other tweaks I won't use.

    Features:

    You may use @Androguide.fr's excellent Pimp my Z1 app to configure sound options.

    Download:
    http://mohammadag.xceleo.org/public/Android/XperiaZ1/CTSKernel/latest

    Installation:
    Either flash the zip in a recovery, or fastboot flash boot boot.img

    Sources:
    https://github.com/MohammadAG/android_kernel_sony_msm8974

    Thanks to:
    • Faux123 for his sound control module
    • Androguide.fr for Pimp my Z1
    • DooMLoRD for his ramdisk, I couldn't get the stock one working for some reason.

    Found this useful?
    Consider a donation: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4V3SGRLQDTM6

    XDA:DevDB Information
    CTS Kernel, a Kernel for the Sony Xperia Z1

    Contributors
    MohammadAG
    Kernel Special Features: Double tap to wake

    Version Information
    Status: Stable
    Current Stable Version: 1.2
    Stable Release Date: 2014-04-02

    Created 2014-03-30
    Last Updated 2014-04-02
    15
    1.2 out:
    • Double tap will only register if within range of first tap
    • Switched to a different time keeping mechanism for tap to wake
    • Prevent touchscreen irq suspend, this fixes tap to wake freaking out in deep sleep

    @DooMLoRD @Androguide.fr commits are up :)
    8
    I'm actually not sure how to fix this, is it the same on other devices with tap to wake (unofficial ones, Nexus 5 etc)?
    The driver needs to pick up the interrupts, and if it's in deep sleep, the touches are delayed, so the timeout can't be calculated.

    I experimented a lot to get d2w working. I actually use a Z1C, CyanogenMod kernel source and picked the appropiate commits from your github.

    I faced the same issue like you and everyone else did - a wakelock...

    As i could not figure it out, I asked alin.p for help, as he managed to implement the feature flawless into a very old phone (Samsung Galaxy Mini S5570).

    Here is his response
    You should get rid of this commit first:
    https://github.com/MohammadAG/androi...ce834df0151cb7

    Then use enable_irq_wake on the irq client of your touchscreen driver. Usually there is an enable_irq() function call inside the [touchscreen_driver]_probe() function. You just change that to enable_irq_wake() to make sure your driver lets the phone enter in deep sleep while still having to ability to wake it when it is touched.

    After this, the hard part comes in. Keeping the touchscreen driver on all the time is bad. It register touches all the time, and this causes accidental wakes, cpu frequency spikes, battery drain.. The solution for this is to use the proximity sensor to turn off the touchscreen when it is in the pocket or face-down. You need find out what is the file that contains the code for your proximity sensor, and modify the suspend and resume functions to keep the sensor on when the screen is off and to turn off the touchscreen when the sensor is covered.

    So the idea behind this is to control the touchscreen driver with the proximity sensor.

    Screen off & Proximity doesn't detect anything = Touchscreen on
    Screen off & Proximity does detect something = Touchscreen off
    Screen on = Touchscreen on

    If we could manage to implement this, that would reduce our battery drain drastically.

    I want to thank alin.p again for pointing me towards the right direction.

    I did a quick test build, but failed miserably... :) I also won't have access to a building maschine in the next 2 weeks, so I can't test this any further.


    Maybe someone else could jump in and make a few tests :)
    6
    1.1 out:
    • Raised delay to 700, 400 was a bit too low
    • Double tap to wake responds to one finger, previously, one tap with two fingers would wake up the screen
    • After boot, tapping the screen would lock the device, fixed
    • Timeout is correctly reset when screen is turned off

    This should fix all issues with double tap to wake
    6
    Ok give me a few more days since my video unlimited subscription is about to expire :D And I'll unlock my bootloader and have a go at it. I'll have a look at the touch driver first then contact him. I attempted this once hence mohammadAG fixed my issue and created this kernel. I tried contacting flar and showp to no avail so maybe this time I'll get a support from a dev with knowledge on this stuff so perhaps I could successfully port it now.

    Whoops, sorry for the broken link, this should be working.
    I encourage you to contact alin.p, he is not a bad guy at all and might give you some guidance :)