[APP] [MOD] [7.0+] WakeBlock: Blocking the drain before it is too late (Core v0)

Search This thread

DEVILOPS 007

Senior Member
May 24, 2016
3,866
1,668
Colchester
Odexing is the way Android now uses to optimize code and generate .oat or .odex machine code files from .dex smali files.
Some ROMs are deodexed: this means all applications run on .dex files and sometimes even system modules (and that's your case).

Currently the mod is tied to the .odex file, but I'm going to support the deodexed version as well.
Oh, okay thanks for explaining. Any idea when you will release a supported version and is there any way round it for me at the moment?
 

GioBozza

Senior Member
Nov 19, 2015
198
399
28
Milan
Oh, okay thanks for explaining. Any idea when you will release a supported version and is there any way round it for me at the moment?
Support for deodexed ROMs is a top priority and I will update you when it's done.

I really don't think you can do something to make it work on a deodexed ROM right now and in this days I can't support you much as I have low to none internet connection.

Despite this, @CappyT owns a 6P. I'll check if he can find a way in the meantime.
 
  • Like
Reactions: suhridkhan

keaheng

Senior Member
Feb 19, 2013
488
208
Cambodia
This currently supports Nexus 6 and 6P. I'm going to support more phones with a stable release.

sure i'm keeping my eyes on this one. I own both 6P and HTC 10. 6P has many good kernels that can block useless wakelocks for example like Franco kernel or DU rom that is native supported the wakelock blocker.
the problem is with other device that has less support need this your app the most. Currently my HTC 10 is suffering from IPA_WS, WLAN WAKE, WLAN_RX_wake and so on and there is no way to block them. That's really annoying me. Anyway thank for your time. Gluck.
 

GioBozza

Senior Member
Nov 19, 2015
198
399
28
Milan
sure i'm keeping my eyes on this one. I own both 6P and HTC 10. 6P has many good kernels that can block useless wakelocks for example like Franco kernel or DU rom that is native supported the wakelock blocker.
the problem is with other device that has less support need this your app the most. Currently my HTC 10 is suffering from IPA_WS, WLAN WAKE, WLAN_RX_wake and so on and there is no way to block them. That's really annoying me. Anyway thank for your time. Gluck.
Thank you! I'm trying to find the best way to standardize the process, as every device is a bit different and has to be done separately.
 

JonasVFC

Senior Member
Sep 20, 2009
377
69
i've just installed this on my 6p. rebooted after app installation and it said "service bound" and everything appeared fine. after an hour or so, it says "service unbound" (i've just go around the app, didn't block any wakelocks)

edit: rebooted and it says bound again
 
Last edited:

GioBozza

Senior Member
Nov 19, 2015
198
399
28
Milan
i've just installed this on my 6p. rebooted after app installation and it said "service bound" and everything appeared fine. after an hour or so, it says "service unbound" (i've just go around the app, didn't block any wakelocks)

edit: rebooted and it says bound again
This should only happen if the service has been somehow killed, as it binds on system startup. Do you have any task killer running or did you reinstall the app?
 
Last edited:
no task killer, no reinstall, stock rooted 7.1.1 and elementalx kernel

Try this:
Go to Settings > Battery > Three dot menu > Battery optimization and select Wakeblock as "Do not optimize"
Also, to ensure the app isn't killed, check your ram usage, the system may have killed the app because of low memory.
 

JonasVFC

Senior Member
Sep 20, 2009
377
69
Try this:
Go to Settings > Battery > Three dot menu > Battery optimization and select Wakeblock as "Do not optimize"
Also, to ensure the app isn't killed, check your ram usage, the system may have killed the app because of low memory.

i didn't do that and it didn't happen again. so far so good
 

JonasVFC

Senior Member
Sep 20, 2009
377
69
This is working great. I'm achieving ~0.45%/hr drain following the extreme battery guide that there is here in xda.
Do you have any plans to make the regex tab work?

Keep up the good work guys.
 
  • Like
Reactions: CappyT
This is working great. I'm achieving ~0.45%/hr drain following the extreme battery guide that there is here in xda.
Do you have any plans to make the regex tab work?

Keep up the good work guys.

We're currently testing the mod for non-odexed roms, after that the dev will focus on either regex or alarm blocking (alongside bugfixing)
Also, magisk support is undergoing, by me.
 

mymistake

Member
Sep 9, 2013
33
0
i blocked a few items however i am getting random reboots, if anyone has a list of what items to block? i did unblock most to figure out what's causing the reboots, got tired. i have completely unblocked everything for now, no reboots.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 145
    GP1Q7ND.png


    THIS THREAD IS NOT MONITORED, ANY HELP REQUEST/QUESTION/BUG SUBMISSION MUST BE POSTED INTO THE TELEGRAM GROUP OR THEY WILL BE IGNORED

    WakeBlock is an app that, through a system modification, allows users to block or limit any system wakelock, without the need of any kind of framework.

    Currently, we support all versions of Android from Nougat 7.0 to Q 10. We plan to continue the support for future Android version, while anything under Android 7.0 won't be supported. While the patch is supposedly working on ANY device, we won't know unless we try. So try this and let us know!

    Recently, we updated the coremod for better compatibility and even added Dark Mode!

    This modification can be applied Systemless-ly with Magisk, by creating the Magisk Module from inside the app.

    The app is currently in beta stage, so is missing many features we plan to implement in future releases.

    Also, beware that the current version of the app is released for free, but it may become paid/donation based in the future.

    /*
    * #include <disclaimer.h>
    *
    * Your warranty is now void.
    * I'm not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed.
    * Please read the FAQs before flashing it! YOU are choosing to make these modifications,
    * and if you point the finger at me for messing up your device, I will laugh at you.
    * Hard. Really hard.
    *
    */

    Google Play Store Link

    Patreon Link

    Telegram Group

    WANT TO INTEGRATE WAKEBLOCK IN YOUR ROM? CHECK THIS POST!

    *** BUG REPORTS WITHOUT A LOGCAT WILL BE IGNORED AND LAUGHED AT ***

    Special Thanks
    • @DEVILOPS 007 for testing and porting the initial release to various ROMs and devices
    • @SuperSandro2000 for helping testing the mod on Samsung devices
    • @TotemFallico for helping me with the support & development

    XDA:DevDB Information
    WakeBlock, App for the Huawei Nexus 6P

    Contributors
    GioBozza, TotemFallico, SimoIanni, pioccd, CappyT

    Version Information
    Status: Beta

    Created 2017-08-15
    Last Updated 2019-11-30
    36
    WANT TO INTEGRATE WAKEBLOCK IN YOUR ROM?

    We decided to release the core part of the mod to let ROM developers integrate it in their own source code.

    Here is the patch for you to simply drag on whichever version of android (should work on 7.x (maybe 6.x?)) and whichever device/ROM you want.

    The only things we ask for are (that's not a legal license, but it can make us REALLY upset if you don't do that) :
    - You shall credit @GioBozza for the mod by linking this thread in your ROM post (c'mon, don't write it in the bottom of the post, with size 1!)
    - You may include this code to any non-commercial work (you can still get donations, we're cool with those!)
    - You can not sell this code or get donations by the code of this mod alone
    - You may include the free version of the apk in your ROM (in the future we may release a paid version or an unlock app. Of course, that can not be included.)
    - You should redirect users here for support about the mod or the app itself
    - You should have fun and save your battery
    - You may need to drink some fruit juice afterwards - have that ready!


    WHOOP, WHOOP - DOWNLOAD:
    v0 Templates - platform/frameworks/base repository.
    https://github.com/GiovanniBozzano/wakeblock

    REMEMBER: the app takes no privileges at all to manage wakelocks. The ROM can even be without root!

    Take note that we will update the "core" (android framework) part of the mod, from time to time. It is versioned, so you can keep track of what happened.

    Cheers!
    22
    Just a quick update: I am currently working on the smali autopatcher and got the easier parts done.

    When this is done, you should be able to apply the core mod on every device and ROM, if they are not too different from the original source (this should not happen).
    15
    CHANGELOG
    v0.2.0 (05/01/2018)
    • WakeBlock service binds on runtime (this means that, if the core mod is already installed, you do not need to reboot after app installation/update). The service status shown in the app will automatically update on service binding.
    • Automatic uninstallation/backup restoring
    • The app can fetch the core mod version
    v0.1.8 (02/01/2018)
    • Fixed core mod classes patching
    v0.1.7 (31/12/2017)
    • Fixed SELinux permissions acquisition
    • Started implementation of the auto-binding process to avoid reboot on app update (not yet functional)
    v0.1.6 (29/12/2017)
    • Fixed repackaging phase on deodexed devices
    v0.1.5 (25/12/2017)
    • Improved patcher process
    • Updated baksmali to v2.2.2 (not yet compatible with Android 8.1)
    v0.1.4 (10/09/2017)
    • Fixed bootloop on Samsung devices
    • Auto-patcher process priority raised to avoid it being killed by the OS
    • Added Simplified Chinese localization
    v0.1.2 (07/09/2017)
    • Auto-patcher process priority rised to avoid it being killed by the OS
    • Added Simplified Chinese localization
    v0.1.1 (21/08/2017)
    • Added application automatic backup of previously detected wakelocks
    • Added support for localization
    • Removed auto-downloader (now obsolete)
    v0.1.0 (17/08/2017)
    • Initial release
    11
    *** UPDATE [AUTO-PATCHER] ***

    The latest version of the app allows you to automatically patch your system framework, whatever your device, ROM and version is.

    This feature is currently under testing and available only for odexed ROMs. If the process gives "Unsupported Framework", please report it here with device and ROM information.

    As soon as I have enough proofs that the patcher is stable, I will ask to move this topic in a general category.

    NOTES:
    • Backups are always found in /sdcard/WakeBlock/Backups/
    • The patching will take some minutes.
    • The device will reboot when the process is finished.