FORUMS
Remove All Ads from XDA

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

198 posts
Thanks Meter: 389
 
By GioBozza, Senior Member on 26th December 2016, 04:08 PM
Post Reply Email Thread
WakeBlock

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 Pie 9.0. 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!

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 2018-12-20
Attached Thumbnails
Click image for larger version

Name:	http-%2F%2Fi.imgur.com%2FaursbqS.png
Views:	17800
Size:	32.7 KB
ID:	4242593  
The Following 139 Users Say Thank You to GioBozza For This Useful Post: [ View ] Gift GioBozza Ad-Free
 
 
26th December 2016, 04:08 PM |#2  
GioBozza's Avatar
OP Senior Member
Flag Milan
Thanks Meter: 389
 
Donate to Me
More
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
The Following 13 Users Say Thank You to GioBozza For This Useful Post: [ View ] Gift GioBozza Ad-Free
26th December 2016, 04:08 PM |#3  
GioBozza's Avatar
OP Senior Member
Flag Milan
Thanks Meter: 389
 
Donate to Me
More
FAQ
Here you can find the most common questions and their respective answer. Simple as that. READ THEM.

Q - How do i use wakeblock?

A - Once you have installed the app, just open it and click on "Install Core Mod", the app will create the Core Mod needed for your device (this might take a while, from 5 to 30 minutes) and then will reboot the phone to flash it. When the phone has rebooted, open the app: If the message says "Service Bound" you're all set!

Q - How can i block wakelocks?

A - From within the app, just switch to the "Wakelock" tab. Here every wakelock recorded since the first boot with the core mod installed, so give it at least 2/3 days of normal use before blocking anything. Click on the wakelock you want to block, press the "Block" button and then set for how long is the wakelock gonna be blocked!

Q - Which wakelock should i block? For how long?

A - We suggest to check out this guide on XDA to fully understand what it means to block a wakelocks and how it affects your system.

Q - I'm lazy af and i don't want to read all of that, can't you give me a short list?

A - Ok, but we don't take any responsibilities if the phone bricks or your ROM explodes. You are totally free to change the blocking time value to make it as you please but, again, we don't take any responsibilities. You can find the list here. Remember: if you don't find one of the wakelocks, just check in later. If you still don't find it, don't worry at all! Side note: the search button is not case-sensitive.

Q - Can i block the [wakelock name] wakelock?

A - If it is part of the list linked above, you're good to go! If not, we can't assure a thing, but if you find any safe-to-block wakelock let us know!

Q - When is the new version/fix/graphic coming?

A - Do not ask for an ETA. We do this for free, without any ads in the app nor donation packages, we don't even put a price on our app. We all have jobs, university and a private life to manage, we don't have superpowers, so managing all of this takes time. Our free time is pretty short, but we usually put at least half of it on the developing of the app. Be patient and do not harass the team nor the telegram group.

Q - Your app killed [insert any feature here] in my phone!

A - Everything is done by user input, the app by itself (even with the core mod installed) doesn't do anything but reading which wakelock the system is calling. Unless you blocked something we didn't suggest you do to this problem and our app are totally unrelated.

Q - Your app is killing my battery life! WTF!

A - By itself, the app doesn't do anything even with the core mod installed. Keep WakeBlock whitelisted in every hybernation app (like Greenify) but the basic Android Optimization. If the battery drain has increased, double check what you blocked, that might be the reason!

Q - I just updated and it doesn't see the Core Mod!

A - It's a known bug. Check if the app kept all permission (Both root privileges and Storage permission) and simply reboot your phone. It will magically start to see it again! SIDE NOTE: you don't need to reinstall the Core Mod every time you update the app!

Q - How can i uninstall the app?

A - First of all, we are sad that you want to leave us. If you didn't install the Core Mod, or it failed in any way, you just need to delete the app and everything is gone! If you did install successfully the Core Mod, check the WakeBlock backup folder (/sdcard/WakeBlock/Backups). You will find a bunch of different folders with different dates and times. Pick the most recent one and look inside. Here, you will have one of two cases:

CASE 1: FILES = services.odex & and services.vdex | ODEXED ROM
In this case, boot into your custom recovery of choice (TWRP for example, you can't do it from a root explorer) and mount your /system partition. Now check both /system/framework/oat/arm and /system/framework/oat/arm64 for a service.odex and a service.vdex. Here, COPY (and DO NOT MOVE) the files from the backup and paste them to replace the files in your system (one of the two folders above). Now delete the app and you're now WakeBlock-free!

CASE 2: FILE = services.jar | DEODEXED ROM
In this case, boot into your custom recovery of choice (TWRP for example, you can't do it from a root explorer) and mount your /system partition. Here, COPY (and DO NOT MOVE) the file from the backup and paste it to replace the file in your system (in this case /system/framework). Now delete the app and you're now WakeBlock-free!

Q - YOUR APP DOESN'T WORK, WHY?

A - It works. We tested it (and we keep testing it) many times before committing an update! Double check permissons and give it a reboot, usually fixes most of the "doesn't work" problems.

Q - I found a bug! How can i report it?

A - First of all, check on the Telegram Group if anyone else had your problem, both by first searching and then asking directly. If no one can help you on the spot, send a ticket on the @wakeBlockSupportBot. It will ask for a logcat, so make sure you make one while you encounter the problem. DO NOT CONTACT ANYONE OF THE TEAM UNLESS EXPLICITLY ASKED TO.

Q - How do i take a logcat?

A - First of all, make sure that you have the needed Platform Tools. Due to the fact that the app reboots, it's better if you take it with a pc rathern than with an app. Plug the phone into your PC, you start the cmd.exe as administrator (or, if you use Linux, you need to open the terminal with root privileges) and run the command "adb shell", now the console will show the internal console of the phone. From there, run "su", a prompt will appear to your phone to ask for root permission. Approve it, then run "cd /sdcard/Download". Afterwards, run "logcat >> log.txt" (Nothing will appear on screen because it's redirecting every output to the log file). Now start the patch. When it gives the error (or after it reboots), close the app, click "Ctrl + C" to stop the logcat. Then, from the phone, send us the log.txt (you will find it in your Download folder).

Q - Wow! You guys are awesome!

A - Thank you!

TO-DO LIST
- Alarms. Yeah.
- Fixing problems related to some Samsung devices and Pixel devices
- Import/Export system for the blocked Wakelock
- Inserting the FAQ and the suggested wakelock-to-block list into the actual app
- Adding the feature to change the block time without unblocking the wakelock
- Various fixes and improvements
The Following 3 Users Say Thank You to GioBozza For This Useful Post: [ View ] Gift GioBozza Ad-Free
26th December 2016, 04:10 PM |#4  
GioBozza's Avatar
OP Senior Member
Flag Milan
Thanks Meter: 389
 
Donate to Me
More
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!
The Following 36 Users Say Thank You to GioBozza For This Useful Post: [ View ] Gift GioBozza Ad-Free
26th December 2016, 05:46 PM |#5  
Senior Member
Flag Riverside
Thanks Meter: 235
 
More
Thank you. Seems promising
26th December 2016, 09:21 PM |#6  
Senior Member
Flag Colchester
Thanks Meter: 1,641
 
Donate to Me
More
Nothing shows up in the wake lock section for me
26th December 2016, 09:50 PM |#7  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by DEVILOPS 007

Nothing shows up in the wake lock section for me

Uhm, service is BOUND or UNBOUND?
26th December 2016, 09:53 PM |#8  
Senior Member
Flag Colchester
Thanks Meter: 1,641
 
Donate to Me
More
Quote:
Originally Posted by pioccd

Uhm, service is BOUND or UNBOUND?

It says service is unbound and I flashed the zip and then installed the apk.
26th December 2016, 09:58 PM |#9  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by DEVILOPS 007

It says service is unbound and I flashed the zip and then installed the apk.

Please try to flash another time and reinstall the app.
26th December 2016, 10:00 PM |#10  
Senior Member
Flag Anywhere there is the best LTE coverage
Thanks Meter: 228
 
More
Quote:
Originally Posted by DEVILOPS 007

It says service is unbound and I flashed the zip and then installed the apk.

After installing the apk, reboot the phone. It should say now "service bound"
26th December 2016, 10:01 PM |#11  
Senior Member
Flag Colchester
Thanks Meter: 1,641
 
Donate to Me
More
Quote:
Originally Posted by pioccd

Please try to flash another time and reinstall the app.

I tried flashing again and installing the app but it still says unbound. Do I need to edit anything like build or host files?
Post Reply Subscribe to Thread

Tags
battery, doze, sleep, wakelocks

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes