[APP] [MOD] WakeBlock: Blocking the drain before it is too late

GioBozza

Senior Member
Nov 19, 2015
198
398
0
24
Milan
Taking this for a test-drive...

If this works... Amplify has competition that doesn't require xposed
@wrongway213

---------- Post added at 01:59 PM ---------- Previous post was at 01:54 PM ----------


What framework file is that services.odex for...

It seems you need stock 7.0 for this to work...
services.odex has many functions, from power to package management.

I developed this on a stock based ROM, but it should work on any odexed ROM (just check if /system/framework/oat/arm/services.odex exists) if it does not alter that system module, provided that it is on the same version of the mod.

I'm currently planning to support deodexed ROMs with some version checks in the auto-installer.
 
Last edited:

rignfool

Senior Member
Dec 8, 2010
5,004
2,726
253
The Poconos
services.odex has many functions, from power to package management.

I developed this on a stock based ROM, but it should work on any odexed ROM (just check if /system/framework/oat/arm/services.odex exists) if it does not alter that system module, provided that it is on the same version of the mod.

I'm currently planning to support deodexed ROMs with some version checks in the auto-installer.
I am very interested in this... I wanna see if it spits the same errors as the Dirty Unicorns wakelock blocker...

However... Being on Pure Nexus... I can't go swapping an odex file... And there's a good chance I do that even have one...

And I don't... deodexed...

Would have loved to try it... If you get it working deodexed... Tag me... I'll make it run on magisk...
 

GioBozza

Senior Member
Nov 19, 2015
198
398
0
24
Milan
I am very interested in this... I wanna see if it spits the same errors as the Dirty Unicorns wakelock blocker...

However... Being on Pure Nexus... I can't go swapping an odex file... And there's a good chance I do that even have one...

And I don't... deodexed...

Would have loved to try it... If you get it working deodexed... Tag me... I'll make it run on magisk...
Sure thing! Making it work on different ROMs is a top priority and it just requires some testing to get past Android integrity checks in different versions and devices (this may take a bit longer than I expect :rolleyes: ).
 

Free4ever2

Senior Member
Jun 7, 2013
88
41
38
This looks like a great alternative to Xposed+Amplify. Hopefully support for deodexed roms is coming soon.

After upgrading to Nougat, I noticed idle battery drain was higher than usual. After examining battery stats using the powerful Battery Historian, I found the culprit was Google Play services, that loves creating userspace wakelocks, with the biggest offenders being NlpWakeLock & NlpWakeLockCollector (Location). Amplify made it easy to reduce these wakelocks in MM, but without Xposed on Nougat, its out of the equation. I've tried:

1) Using Lineage OS's builtin Privacy Guard to deny location to Play Services (crashes every time)
2) Flashed the FixGSExtended script that's supposed to reduce Play Services background activity
3) Turned off location history, Google Now, Google Assistant, wifi scanning and bluetooth instant tethering
4) Tried both battery saving and device only for Location

None the above made a significant difference to reducing location wakelocks according to Battery Historian. The only way to effectively reduce those wakelocks was turning of Location entirely, which is a pain to enable every time for Maps or search. An alternative to Amplify is sorely needed for Nougat and I'm hoping that WakeBlock can fill this role.
 
Last edited:

adm1jtg

Senior Member
Jul 26, 2010
2,739
867
138
Georgia
This looks like a great alternative to Xposed+Amplify. Hopefully support for deodexed roms is coming soon.

After upgrading to Nougat, I noticed idle battery drain was higher than usual. After examining battery stats using the powerful Battery Historian, I found the culprit was Google Play services, that loves creating userspace wakelocks, with the biggest offenders being NlpWakeLock & NlpWakeLockCollector (Location). Amplify made it easy to reduce these wakelocks in MM, but without Xposed on Nougat, its out of the equation. I've tried:

1) Using Lineage OS's builtin Privacy Guard to deny location to Play Services (crashes every time)
2) Flashed the FixGSExtended script that's supposed to reduce Play Services background activity
3) Turned off location history, Google Now, Google Assistant, wifi scanning and bluetooth instant tethering
4) Tried both battery saving and device only for Location

None the above made a significant difference to reducing location wakelocks according to Battery Historian. The only way to effectively reduce those wakelocks was turning of Location entirely, which is a pain to enable every time for Maps or search. An alternative to Amplify is sorely needed for Nougat and I'm hoping that WakeBlock can fill this role.
Very similar issues to yours but in my case I also use a smartwatch and the bluetooth bug on top of what you found is just unbearable. I would get a drain in deep sleep on N of 4x more then on mm sometimes 5 or 6x more. So far the only answer I have found is to go back to mm, i dont even use amplify or any of the other battery helpers to get the 4-5x better battery drain.