FORUMS

Xiaomi Mi Note Pro With SD-810 Goes On Sale In China

The Xiaomi Mi Note Pro, announced on 15th Jan 2015, is Xiaomi’s attempt at … more

Project Fi Invites Are Rolling Out

Google is now sending out the first wave of invites to its new wireless service, Project Fi. … more

Vinsic 20,000mAh Ultra Slim Power Bank Giveaway

We have covered a lot of Android Accessories here on XDA TV. Mostly because we realize … more

T-Mobile Steps Up The War Against Verizon

T-Mobile has today launched a new attack on Verizon under the tagline of “Never Settle … 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: 36,652
 
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: 9,932
 
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,262
 
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: 36,652
 
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: 9,932
 
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,265
 
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,412
 
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,064
 
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: 364
 
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