Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,730,673 Members 41,442 Now Online
XDA Developers Android and Mobile Development Forum

[MOD] [KERNEL MODULE] [March 30] Sweep2sleep

Tip us?
 
flar2
Old
(Last edited by flar2; 9th April 2014 at 04:38 AM.)
#1  
flar2's Avatar
Recognized Developer - OP
Thanks Meter 24464
Posts: 4,938
Join Date: Jun 2012
Location: Ottawa

 
DONATE TO ME
Default [MOD] [KERNEL MODULE] [March 30] Sweep2sleep

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:
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 61 Users Say Thank You to flar2 For This Useful Post: [ Click to Expand ]
 
LlabTooFeR
Old
#2  
LlabTooFeR's Avatar
Recognized Contributor
Thanks Meter 9948
Posts: 1,810
Join Date: May 2007

 
DONATE TO ME
Thanks for mod
If you like my ROMs and want buy me some beer
Just click this button

The Following User Says Thank You to LlabTooFeR For This Useful Post: [ Click to Expand ]
 
Basil3
Old
#3  
Recognized Themer
Thanks Meter 7304
Posts: 4,536
Join Date: Apr 2008
Location: Dublin

 
DONATE TO ME
Out of interest, has it changed since the previous version? Will keyboard swipe still turn screen off?
 
Ghost
Old
#4  
Ghost's Avatar
Forum Moderator / Recognized Themer / Recognized Developer
Thanks Meter 3650
Posts: 5,532
Join Date: Jul 2010
Location: XDA ASSIST MODERATOR
Nice mod! Downloading now. Will test shortly
 
flar2
Old
#5  
flar2's Avatar
Recognized Developer - OP
Thanks Meter 24464
Posts: 4,938
Join Date: Jun 2012
Location: Ottawa

 
DONATE TO ME
Quote:
Originally Posted by Basil3 View Post
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: [ Click to Expand ]
 
Basil3
Old
#6  
Recognized Themer
Thanks Meter 7304
Posts: 4,536
Join Date: Apr 2008
Location: Dublin

 
DONATE TO ME
Quote:
Originally Posted by flar2 View Post
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: [ Click to Expand ]
 
GuyAdams
Old
#7  
GuyAdams's Avatar
Senior Member
Thanks Meter 2228
Posts: 2,099
Join Date: Jun 2007
Location: Nottinghamshire

 
DONATE TO ME
Nice work flar, thank you.

Did you have any luck with RW protection?
Device: HTC One (M8)
ROM: Renovate Revision (who knows) by mwilky
Kernel: Stock
Recovery: TWRP 2.7.0.2

 
HolyAngel
Old
#8  
HolyAngel's Avatar
Senior Member
Thanks Meter 1505
Posts: 1,272
Join Date: Sep 2008
Location: Springfield

 
DONATE TO ME
Hell yes, glad to see you here flar

Sent from my HTC One_M8 using XDA Premium 4 mobile app


HTC M8 - SkyDragon Google Play Edition
HTC M8 - SkyDragon Sense 6 Edition
--
HTC One - SkyDragon Google Play Edition
HTC One - SkyDragon Sense Edition
--
Current: HTC M8 - Unlocked - S-OFF
Old: HTC - Wizard/Hermes/Kaiser/Raphael/Rhodium/One(M7)
 
mwilky
Old
#9  
mwilky's Avatar
Recognized Developer
Thanks Meter 6592
Posts: 4,680
Join Date: Feb 2011
Location: Manchester

 
DONATE TO ME
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
RENOVATE on the HTC One
Donations are much appreciated if you like my work
 
kickassdave
Old
#10  
Senior Member
Thanks Meter 218
Posts: 1,145
Join Date: Oct 2010
Location: East Kilbride
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes