FORUMS
Remove All Ads from XDA

[MOD] [KERNEL MODULE] [July 26] Sweep2sleep

17,638 posts
Thanks Meter: 85,898
 
By flar2, Recognized Developer on 30th March 2014, 06:14 PM
Post Reply Email Thread
Sweep2sleep

This is a kernel module for sweep2sleep. The new motion gestures are nice, but there is no way to put the phone to sleep with gestures. To make it worse, the power button placement is awkward. It bothered me so much, I've built this module. It is based on @show-p1984's sweep2wake2.


Swipe your finger from right to left over the navbar and your phone will go to sleep.

I will update this soon, with some improvements and also to work with GPE ROMs.







Download:

Sweep2sleep module for Sense 4.4.4 stock kernel (thanks @lyapota)
http://forum.xda-developers.com/atta...8&d=1413289508

Sweep2sleep module for Sense 4.4.3 stock kernel (2.22 base)
Sweep2sleep module

Older version:
s2w_mod





Installation:
Flash zip in recovery


Un-installation:
While in recovery, do:
Code:
adb shell rm /system/lib/modules/s2w_mod.ko /system/etc/init.d/40s2w

Requirements:
In order to load automatically at boot, you need init.d support and busybox. If you have a custom ROM it should work.

For stock users, you'll need to insert the module manually:
Code:
su
insmod /system/lib/modules/s2w_mod.ko



Source:
Module was compiled against Nexus 5 kernel source with m8_defconfig. Some symbol CRC checks had to be hexedited in the compiled module.
s2w_mod.c
The Following 71 Users Say Thank You to flar2 For This Useful Post: [ View ]
 
 
30th March 2014, 06:21 PM |#2  
LlabTooFeR's Avatar
Recognized Contributor
Thanks Meter: 12,874
 
Donate to Me
More
Thanks for mod
The Following User Says Thank You to LlabTooFeR For This Useful Post: [ View ] Gift LlabTooFeR Ad-Free
30th March 2014, 06:23 PM |#3  
Recognized Themer
Flag Dublin
Thanks Meter: 13,235
 
Donate to Me
More
Out of interest, has it changed since the previous version? Will keyboard swipe still turn screen off?
30th March 2014, 06:23 PM |#4  
Stephen's Avatar
Senior Moderator / Where is my ban hammer?
Flag Northern Ireland
Thanks Meter: 16,509
 
More
Nice mod! Downloading now. Will test shortly
30th March 2014, 06:34 PM |#5  
Quote:
Originally Posted by Basil3

Out of interest, has it changed since the previous version? Will keyboard swipe still turn screen off?

I changed it, now it's only active directly over the navbar. Before it was almost the whole bottom third of the screen.
The Following 2 Users Say Thank You to flar2 For This Useful Post: [ View ]
30th March 2014, 06:36 PM |#6  
Recognized Themer
Flag Dublin
Thanks Meter: 13,235
 
Donate to Me
More
Quote:
Originally Posted by flar2

I changed it, now it's only active directly over the navbar. Before it was almost the whole bottom third of the screen.

Great. Thanks for this, awesome mod!
The Following User Says Thank You to Basil3 For This Useful Post: [ View ] Gift Basil3 Ad-Free
30th March 2014, 07:48 PM |#7  
GuyAdams's Avatar
Senior Member
Flag Nottinghamshire
Thanks Meter: 2,269
 
Donate to Me
More
Nice work flar, thank you.

Did you have any luck with RW protection?
30th March 2014, 08:27 PM |#8  
HolyAngel's Avatar
Recognized Developer / Recognized Contributor
Flag Springfield
Thanks Meter: 13,175
 
Donate to Me
More
Hell yes, glad to see you here flar

Sent from my HTC One_M8 using XDA Premium 4 mobile app
30th March 2014, 10:40 PM |#9  
mwilky's Avatar
Recognized Developer
Flag Manchester
Thanks Meter: 15,191
 
More
Great work as always mate!

Looking forward to getting this loaded up tomorrow when I get my m8!

Sent from my HTC One using XDA Premium 4 mobile app
30th March 2014, 11:38 PM |#10  
Senior Member
Flag East Kilbride
Thanks Meter: 623
 
More
My issue with swipe to sleep on the m7 was that the home button minimised the app you had open. And I didn't always want to do that. This has basically increased my love for this handset 10x over. No need to touch that damn stupidly placed power button... AT ALL.

Thanks!!

Sent from my HTC One_M8 using XDA Premium 4 mobile app
31st March 2014, 04:35 AM |#11  
Ah man that's awesome it works still on the nav bar! Was just wondering if there would be a good option for shuttin off the screen. Get mine tomorrow! This should work on sprint m8 right? OneXL kernel still working great btw haha



~S-Off LTEvo; Always Solid Viper4G Latest;
cpu0/1: 1.5ghz ¦ 384mhz
The Following User Says Thank You to MassStash For This Useful Post: [ View ] Gift MassStash 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