[MOD] No Wake On Charge v0.3.1 [TW/S5]

Status
Not open for further replies.
Search This thread

moneytoo

Recognized Developer
Feb 20, 2007
1,425
1,304
brouken.com
No Wake On Charge keeps screen off when usb/charger cable is plugged in or unplugged. This module works fully only on Samsung Galaxy S5 as it uses non standard (AOSP) way of waking up the display.
I tried to use various other Xposed modules but none removed the plug in wake.

It works like this:
  • Screen wake on plug in - changes android.os.PowerManager#newWakeLock(ACQUIRE_CAUSES_WAKEUP | SCREEN_BRIGHT_WAKE_LOCK, "charger plug") to PARTIAL_WAKE_LOCK only (based on fix by @tdunham http://xdaforums.com/showthread.php?t=2799050). Again, this is S5 only fix.
  • Screen wake on unplug - sets config_unplugTurnsOnScreen to false (this is well known and used solution)
  • Beep on plug in - disables com.android.systemui.power.PowerUI#playSound(1)
There are few more hooks in versions 0.2 and higher (supports wireless charging as well).

This (old) module is designed for Samsung Galaxy S5 running stock Android 4.4.2. If you need compatibility with newer version of Android, use this module: http://xdaforums.com/xposed/modules/mod-xposed-tweaks-cm-t3279109 which works with Android 5.0 (and newer once released).
 

Attachments

  • NoWakeOnChargeS5.v0.3.1.apk
    12.9 KB · Views: 2,822
Last edited:

954wrecker

Senior Member
Jul 9, 2012
3,199
1,558
OnePlus 8
OnePlus 9
Great job! Finally my T-Mobile note 3 running X-note doesn't wake up when I plug the charger. Only module that works on touchwiz and I've tried them all.
 

artisticcheese

Senior Member
Aug 26, 2003
781
18
www.unixsucks.com
No Wake On Charge keeps screen off when usb/charger cable is plugged in or unplugged. This module works fully only on Samsung Galaxy S5 as it uses non standard (AOSP) way of waking up the display.
I tried to use various other Xposed modules but none removed the plug in wake.

It works like this:
  • Screen wake on plug in - changes android.os.PowerManager#newWakeLock(ACQUIRE_CAUSES_WAKEUP | SCREEN_BRIGHT_WAKE_LOCK, "charger plug") to PARTIAL_WAKE_LOCK only (based on fix by @tdunham http://xdaforums.com/showthread.php?t=2799050). Again, this is S5 only fix.
  • Screen wake on unplug - sets config_unplugTurnsOnScreen to false (this is well known and used solution)
  • Beep on plug in - disables com.android.systemui.power.PowerUI#playSound(1)
No Wake On Charge is also available from Xposed Module Repository.

Does it actually work? I just installed and still wakes up. I use wireless charging though not USB one.
 

2WhiteWolves

Senior Member
Dec 21, 2013
1,143
519
Thought I would give it a shot ? on TW custom stock Super S4 rom on galaxy S4 SPH-L720, didn't work. Don't have GravityBox.
 

arcadia2uk

Senior Member
Jun 19, 2010
492
151
Boston, MA
I didn't expect this to work on the HTC One (M8), as it seems to be a Samsung tweak. However I found a non-Xposed app SnooZy Charger that does the job fairly well. So, if the plugin doesn't work for you, this is a viable alternative.
 

moneytoo

Recognized Developer
Feb 20, 2007
1,425
1,304
brouken.com
@moneytoo:
For my device it seems to be enough to set the unplugTurnsOnScreen. The handleLoadPackage part even throws a cant find class exception. Can you please provide an option to set boolean only?
There are already multiple modules dealing with this config option alone (at least GravityBox, Wanam Xposed, ScreenTweaks, Xposed Additions, Wireless Charging Xposed...) so I don't think it's worth providing anything more. This module is intended solely for S5 (maybe for few more TouchWiz devices).
 

defim

Senior Member
Feb 18, 2012
2,744
1,489
Motorola Defy
Nexus 7 (2013)
Thx, GravityBox has no such option (i thought first, i translated not correctly), Xposed Additions & Wanam Xposed a lot to much options, Wireless Charging does not work (im charging with usb), ScreenTweaks is for Sony Xperia :cowboy:
So it would be nice if you could do it, but i'm also able to do it my self if it's okay for you
 
  • Like
Reactions: Wi1son

moneytoo

Recognized Developer
Feb 20, 2007
1,425
1,304
brouken.com
Thx, GravityBox has no such option (i thought first, i translated not correctly), Xposed Additions & Wanam Xposed a lot to much options, Wireless Charging does not work (im charging with usb), ScreenTweaks is for Sony Xperia :cowboy:
So it would be nice if you could do it, but i'm also able to do it my self if it's okay for you

I'm not into adding any additional functionality as it works perfectly as I need and once you start adding options to disable plug/unplug wakes only, you will also enable/disable sounds. Then someone will want to change the sounds. Then someone will want to blink LED instead... :) Feel free to do anything you want to. ;)
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    No Wake On Charge keeps screen off when usb/charger cable is plugged in or unplugged. This module works fully only on Samsung Galaxy S5 as it uses non standard (AOSP) way of waking up the display.
    I tried to use various other Xposed modules but none removed the plug in wake.

    It works like this:
    • Screen wake on plug in - changes android.os.PowerManager#newWakeLock(ACQUIRE_CAUSES_WAKEUP | SCREEN_BRIGHT_WAKE_LOCK, "charger plug") to PARTIAL_WAKE_LOCK only (based on fix by @tdunham http://xdaforums.com/showthread.php?t=2799050). Again, this is S5 only fix.
    • Screen wake on unplug - sets config_unplugTurnsOnScreen to false (this is well known and used solution)
    • Beep on plug in - disables com.android.systemui.power.PowerUI#playSound(1)
    There are few more hooks in versions 0.2 and higher (supports wireless charging as well).

    This (old) module is designed for Samsung Galaxy S5 running stock Android 4.4.2. If you need compatibility with newer version of Android, use this module: http://xdaforums.com/xposed/modules/mod-xposed-tweaks-cm-t3279109 which works with Android 5.0 (and newer once released).
    3
    Thx, GravityBox has no such option (i thought first, i translated not correctly), Xposed Additions & Wanam Xposed a lot to much options, Wireless Charging does not work (im charging with usb), ScreenTweaks is for Sony Xperia :cowboy:
    So it would be nice if you could do it, but i'm also able to do it my self if it's okay for you

    I'm not into adding any additional functionality as it works perfectly as I need and once you start adding options to disable plug/unplug wakes only, you will also enable/disable sounds. Then someone will want to change the sounds. Then someone will want to blink LED instead... :) Feel free to do anything you want to. ;)
    2
    @moneytoo

    Is there anything I can provide to help get this working for the 4.4.4 based TouchWiz ROMs for the S5?
    1
    @moneytoo I can confirm that this mod also works on the T-Mobile variant of the LG G3

    Thanks!!
    1
    APK in this thread is designed and works fully only on Android 4.4.2.

    I updated compatibility of this tweak with Android 5.0 (on stock Galaxy S5) and it's available in my other Xposed module: http://xdaforums.com/xposed/modules/mod-xposed-tweaks-cm-t3279109