[MOD] Sweep2Sleep (Marshmallow)

Search This thread

flar2

Recognized Developer
Jun 11, 2012
18,494
87,218
263
Southwestern Ontario
elementalx.org
Sweep2Sleep kernel module


This module allows you to sweep across the navigation bar at the bottom of the screen to put the phone to sleep.

This works with the stock kernel and requires SuperSU


The versions for 2.7 and 3.35 bases work with EX Kernel Manager. The settings are located at /sys/sweep2sleep/sweep2sleep


Download:

3.35 base (Marshmallow)
https://www.androidfilehost.com/?fid=24369303960689725

2.7 base
https://www.androidfilehost.com/?fid=24052804347765936

1.32 and 1.40 bases
https://www.androidfilehost.com/?fid=23991606952593922




Installation:
Flash in recovery


Options:

Sweep left, sweep right or sweep either left or right to put the phone to sleep.
Do it the easy way with EX Kernel Manager or edit /system/su.d/40s2s to change sweep settings


Manual usage:
insmod /system/lib/modules/s2s_mod.ko



Source:
https://github.com/flar2/m9-sweep2sleep

XDA:DevDB Information
Sweep2Sleep for HTC One m9, Kernel for the HTC One (M9)

Contributors
flar2
Source Code: https://github.com/flar2/m9-sweep2sleep

Kernel Special Features:

Version Information
Status: Testing

Created 2015-04-29
Last Updated 2016-01-20
 

flar2

Recognized Developer
Jun 11, 2012
18,494
87,218
263
Southwestern Ontario
elementalx.org
Doesn't work on my att model tried fixing permissions to match other modules .. checked to make sure module was there and script was in init.d.. anything else o could try flar?

There are a couple things.

The module probably only loads with the kernel named 3.10.49-ga24f2d5. I didn't check to see if we need to match the kernel name or modversions. Either way, if there is an error on insmod, the solution is to hexedit the module, or recompile it against the specific source of the running kernel.

To test this, in terminal, type the following:
Code:
su
insmod /system/lib/modules/s2s_mod.ko

If there is an error, look at dmesg to see what the problem is.


The "stock" stock kernel does not have init.d support, so it will not load automatically. If you've verified above that the module loads, you can search around the forums for init.d solutions. Or if you have SuperSu, you can move the script from /etc/init.d/40s2s to /system/su.d/40s2s
 

brittoking

Senior Member
Apr 12, 2008
1,079
485
0
Thanks for the confirmation. This tells me that if kernels are released where this doesn't work, the modversions CRC values will have to be hexedited to match the symbols in the kernel.

Confirmed working brilliantly on insert coin using LeeDroids kernel. Thank you immensely
 

avs333

Senior Member
Apr 12, 2005
239
312
0
Sweep2Sleep kernel module
Cleverly written, excellently done!

Works just as nice indeed (compiled from your sources -- and a special thank for sharing them)!

Yet you had to strip the release version you supply with the zip, hadn't you?
It'd be 20 times smaller :)
 

andybones

Recognized Contributor / Inactive Recognized Devel
May 18, 2010
14,502
14,676
263
New 2.7 base working great on VZW Android 5.1 - 2.6.605.10 base with stock kernel, no init.d support, but simply created the su.d folder and added the module in there and works as should, thank you kindly.
 
Last edited:
  • Like
Reactions: flar2

Top Liked Posts

  • There are no posts matching your filters.
  • 17
    Sweep2Sleep kernel module


    This module allows you to sweep across the navigation bar at the bottom of the screen to put the phone to sleep.

    This works with the stock kernel and requires SuperSU


    The versions for 2.7 and 3.35 bases work with EX Kernel Manager. The settings are located at /sys/sweep2sleep/sweep2sleep


    Download:

    3.35 base (Marshmallow)
    https://www.androidfilehost.com/?fid=24369303960689725

    2.7 base
    https://www.androidfilehost.com/?fid=24052804347765936

    1.32 and 1.40 bases
    https://www.androidfilehost.com/?fid=23991606952593922




    Installation:
    Flash in recovery


    Options:

    Sweep left, sweep right or sweep either left or right to put the phone to sleep.
    Do it the easy way with EX Kernel Manager or edit /system/su.d/40s2s to change sweep settings


    Manual usage:
    insmod /system/lib/modules/s2s_mod.ko



    Source:
    https://github.com/flar2/m9-sweep2sleep

    XDA:DevDB Information
    Sweep2Sleep for HTC One m9, Kernel for the HTC One (M9)

    Contributors
    flar2
    Source Code: https://github.com/flar2/m9-sweep2sleep

    Kernel Special Features:

    Version Information
    Status: Testing

    Created 2015-04-29
    Last Updated 2016-01-20
    14
    Update for Marshmallow.

    Serious hacking was needed for this to work, but at least it was a fun challenge.
    4
    Thanks @flar2 much appreciated mate?

    Edit: confirmed as working with my kernel
    3
    Doesn't work on my att model tried fixing permissions to match other modules .. checked to make sure module was there and script was in init.d.. anything else o could try flar?

    There are a couple things.

    The module probably only loads with the kernel named 3.10.49-ga24f2d5. I didn't check to see if we need to match the kernel name or modversions. Either way, if there is an error on insmod, the solution is to hexedit the module, or recompile it against the specific source of the running kernel.

    To test this, in terminal, type the following:
    Code:
    su
    insmod /system/lib/modules/s2s_mod.ko

    If there is an error, look at dmesg to see what the problem is.


    The "stock" stock kernel does not have init.d support, so it will not load automatically. If you've verified above that the module loads, you can search around the forums for init.d solutions. Or if you have SuperSu, you can move the script from /etc/init.d/40s2s to /system/su.d/40s2s
    2
    Check OP for a new module that works with the 2.7 base

    The new module is compatible with EX Kernel Manager
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone