FORUMS

XDA Office Space: Frankenstein’s Perfect IM Client?

The portal’s decentralized XDA office lies in a Hangouts chatroom, where … more

Which IM Client on Android is best?

With so many different messengers to choose from, it can be tough to find the best one for you and … more

Android Factory Reset Security Flaw and More – XDA TV

Nvidia is releasing a 500Gb SHIELD TV Pro! That and much more news is … more

Android M Code Name: Macadamia Nut Cookie

While the official name for the latest iteration of Android has yet to be revealed, the code … more
Post Reply Subscribe to Thread Email Thread

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

30th March 2014, 06:14 PM |#1  
flar2's Avatar
OP Recognized Developer
Flag Ottawa
Thanks Meter: 37,865
 
Donate to Me
More
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
Last edited by flar2; 16th October 2014 at 05:14 PM.
The Following 71 Users Say Thank You to flar2 For This Useful Post: [ View ]
 
 
30th March 2014, 06:23 PM |#3  
Recognized Themer
Flag Dublin
Thanks Meter: 10,092
 
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
Forum Moderator / Retired Recognized Developer
Thanks Meter: 5,324
 
More
Nice mod! Downloading now. Will test shortly
30th March 2014, 06:34 PM |#5  
flar2's Avatar
OP Recognized Developer
Flag Ottawa
Thanks Meter: 37,865
 
Donate to Me
More
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: 10,092
 
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 ]
30th March 2014, 07:48 PM |#7  
GuyAdams's Avatar
Senior Member
Flag Nottinghamshire
Thanks Meter: 2,266
 
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 Contributor
Flag Springfield
Thanks Meter: 7,520
 
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: 7,086
 
Donate to Me
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: 367
 
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
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes