[MOD][UNOFFICIAL] WakeBlock for the V20!

Search This thread

Zacharee1

Recognized Developer / Retired Forum Moderator
To start off, credit goes to @GioBozza, @CappyT, @pioccd, @TotemFallico, @SimoIanni. They made this mod. All I did was port it to the V20.
ORIGINAL THREAD (go drop a "Thanks"): https://xdaforums.com/nexus-6p/development/wakeblock-blocking-drain-late-t3526313

Next, some caveats:
  • Neither I nor the users mentioned above take any responsibility for anything that goes wrong with you installing this.
  • I have personally tested this on the H918 on the 10k firmware. I see no reason for it not to work on other variants, BUT MAKE BACKUPS!!!
  • This mod is unofficial, and will remain so, meaning I may not be able to update it for every release, whether that be a new Android version for the V20, or a new mod version.
  • This is for STOCK ONLY.
  • This mod requires ROOT.
  • Again, MAKE BACKUPS!!!!!!!!!

Instructions (READ THROUGH THEM FIRST):
  1. Backup `/system/framework/services.jar` and `/system/framework/oat/arm64/services.odex` (The latter is only relevant for ODEXed ROMs).
  2. Download and install the app from the linked thread.
  3. Download the `services.jar` file attached or linked in this post.
  4. Copy it to your device somewhere safe (such as `/sdcard/`).
  5. Use either the command line or a root file explorer to copy the downloaded JAR to `/system/framework/`, overwriting the current one. (YOU MADE A BACKUP, RIGHT?)
  6. Make sure its permissions are set to 0644 (rw-r--r--).
  7. Use either the command line or a root file explorer to delete the `services.odex` file that you made a backup of I'm sure C_C.
  8. Reboot.

(If you have TWRP 3.1.1-1, you'll have to keep the backups on your device somewhere, since it doesn't support MTP right now!)

If all went well, your phone will boot successfully and you'll have some pretty fine control over your wakelocks. If not, restore your backups using the TWRP file manager and try again.
If you have any questions about the installation process, ask here. Otherwise, ask on the linked thread.
 

Attachments

  • services.jar
    3.5 MB · Views: 396
Last edited:

Aaren11

Senior Member
Dec 12, 2015
185
84
Excellent work! Been hoping this would get unoffiical support.

Edit: Damn, doesn't seem to boot on NotSoStock for the H918. I wonder if Tilde changed something in services.jar
 
Last edited:

stangdriver44

Inactive Recognized Themer
Nov 16, 2006
3,015
9,401
Cali
@Zacharee1 nice find.

What are you using to compare before and after results of the mod?

Using the link you posted and github I've added the the mod to my rom all seems well but not sure which app will measure this best?

Also is there an app or something you are using to control which wakelock you want to block?

I tried the playstore version, but says device not supported...

Either way it doesn't seem to have any negative effects so far so I guess I'll just wait for a few days to see if there are any noticeable improvements...

Thanks for your work and contributions to this community!

Hopefully you'll still be using this device by time I finally go public with oZoP! Hopefully soon, but can't really say how much longer. Still many, many hours
 
Last edited:

Zacharee1

Recognized Developer / Retired Forum Moderator
@Zacharee1 nice find.

What are you using to compare before and after results of the mod?

Using the link you posted and github I've added the the mod to my rom all seems well but not sure which app will measure this best?

Also is there an app or something you are using to control which wakelock you want to block?

I tried the playstore version, but says device not supported...

Either way it doesn't seem to have any negative effects so far so I guess I'll just wait for a few days to see if there are any noticeable improvements...

Thanks for your work and contributions to this community!

Hopefully you'll still be using this device by time I finally go public with oZoP! Hopefully soon, but can't really say how much longer. Still many, many hours

I'm using Wakelock Detector Free to see which wakelocks are still happening. Some of them can't be blocked without causing systwm_server to continually crash, so you have to be careful.

The core kid is unsupported on this phone, not the app. If you swipe to the wakelocks tab, you should see a bunch.

I'm going to be on this phone for at least 2 years, so no worries there.
 

SimoIanni

Senior Member
Jun 16, 2016
58
37
Leghorn
OnePlus 6T
d
@Zacharee1 nice find.

What are you using to compare before and after results of the mod?

Using the link you posted and github I've added the the mod to my rom all seems well but not sure which app will measure this best?

Also is there an app or something you are using to control which wakelock you want to block?

I tried the playstore version, but says device not supported...

Either way it doesn't seem to have any negative effects so far so I guess I'll just wait for a few days to see if there are any noticeable improvements...

Thanks for your work and contributions to this community!

Hopefully you'll still be using this device by time I finally go public with oZoP! Hopefully soon, but can't really say how much longer. Still many, many hours

Hi, the playstore app says "Unsupported" because it checks for official build of WakeBlock, now I am on DU wich is Unofficially supported and my home screen looks like this
aunEFmC.jpg

If yours looks like this too you can proceed blocking wakelocks. Please refeer to this thread to see which wakelocks to block(remember that the WakeBlock app asks for the block time in milliseconds so you need to add 3 zeros to the guide's times)
 

Zacharee1

Recognized Developer / Retired Forum Moderator
d

Hi, the playstore app says "Unsupported" because it checks for official build of WakeBlock, now I am on DU wich is Unofficially supported and my home screen looks like this
aunEFmC.jpg

If yours looks like this too you can proceed blocking wakelocks. Please refeer to this thread to see which wakelocks to block(remember that the WakeBlock app asks for the block time in milliseconds so you need to add 3 zeros to the guide's times)

He changed some classpaths, so the service didn't bind. It's all working now.
 

stangdriver44

Inactive Recognized Themer
Nov 16, 2006
3,015
9,401
Cali
d

Hi, the playstore app says "Unsupported" because it checks for official build of WakeBlock, now I am on DU wich is Unofficially supported and my home screen looks like this
aunEFmC.jpg

If yours looks like this too you can proceed blocking wakelocks. Please refeer to this thread to see which wakelocks to block(remember that the WakeBlock app asks for the block time in milliseconds so you need to add 3 zeros to the guide's times)

OP is correct... It was am error on myside and have since fixed and been blocking away those dang wakelocks!

Haven't really ever used anything that gve me control like this to pick and choose which ones! Very nice, now the problem is figuring out which ones to block! Haha

I have started lite with mainly just gms.core and will go from there.

Thank you for your work and thanks OP for bringing this here!
 

Attachments

  • Screenshot_2017-07-28-07-29-21.jpg
    Screenshot_2017-07-28-07-29-21.jpg
    246.6 KB · Views: 1,304

Zacharee1

Recognized Developer / Retired Forum Moderator
Quick update:
Don't use WakeBlock to block WifiOffDelayIfNotUsed. Your phone will reboot when connected to WiFi, disconnected from power, and put to sleep. This wakelock has been causing me some headaches, so here's an experimental JAR that just disables the wakelock altogether. Test it using the same instructions as in the OP (it does boot; I tested that far), and report any weird behavior. I won't be able to fix anything that happens because of this, but it'll be good for others to have that information.

If this goes well, I think I'll try packaging this into an AROMA installer. I've always wanted to try making one of those.
 

Attachments

  • wifi-service.jar
    658.8 KB · Views: 41
Last edited:

SpamAndEggs

Member
Jan 17, 2017
29
1
Just tried this on stock H910 and it couldn't get past the ATT logo. I replaced the .jar file and changed the permissions to 0644. Did I need to delete the .odex file in the .jar?
 

Burkules

Member
Jul 29, 2017
21
2
Looks very interesting - out of curiosity has anyone had the dreaded "anx_wlock" kernel wakelock/battery drain on the V20 and managed to fix it with this?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    To start off, credit goes to @GioBozza, @CappyT, @pioccd, @TotemFallico, @SimoIanni. They made this mod. All I did was port it to the V20.
    ORIGINAL THREAD (go drop a "Thanks"): https://xdaforums.com/nexus-6p/development/wakeblock-blocking-drain-late-t3526313

    Next, some caveats:
    • Neither I nor the users mentioned above take any responsibility for anything that goes wrong with you installing this.
    • I have personally tested this on the H918 on the 10k firmware. I see no reason for it not to work on other variants, BUT MAKE BACKUPS!!!
    • This mod is unofficial, and will remain so, meaning I may not be able to update it for every release, whether that be a new Android version for the V20, or a new mod version.
    • This is for STOCK ONLY.
    • This mod requires ROOT.
    • Again, MAKE BACKUPS!!!!!!!!!

    Instructions (READ THROUGH THEM FIRST):
    1. Backup `/system/framework/services.jar` and `/system/framework/oat/arm64/services.odex` (The latter is only relevant for ODEXed ROMs).
    2. Download and install the app from the linked thread.
    3. Download the `services.jar` file attached or linked in this post.
    4. Copy it to your device somewhere safe (such as `/sdcard/`).
    5. Use either the command line or a root file explorer to copy the downloaded JAR to `/system/framework/`, overwriting the current one. (YOU MADE A BACKUP, RIGHT?)
    6. Make sure its permissions are set to 0644 (rw-r--r--).
    7. Use either the command line or a root file explorer to delete the `services.odex` file that you made a backup of I'm sure C_C.
    8. Reboot.

    (If you have TWRP 3.1.1-1, you'll have to keep the backups on your device somewhere, since it doesn't support MTP right now!)

    If all went well, your phone will boot successfully and you'll have some pretty fine control over your wakelocks. If not, restore your backups using the TWRP file manager and try again.
    If you have any questions about the installation process, ask here. Otherwise, ask on the linked thread.
    2
    Will this work for lg stock Oreo builds?
    No. WakeBlock has an auto patcher built in now. Just use that.
    1
    Nothing is blocked by default
    Oh so this is modified service.jar for wakeblock.apk. to work on v20 correct?

    Ok i setup my list. Excluded for now locationmanagerservice as i need this and RILJ which is the one i think that caused boot loop for me.

    Sent from my LG-H918 using Tapatalk

    ---------- Post added at 02:58 PM ---------- Previous post was at 02:52 PM ----------

    Ok guys be careful with this list. Just got another boot loop lol....not sure which wake lock is causing it now. I guess log would be useful. Not sure where to get it from.

    We gonna have to go one by one then on V20. If somone has general list on v20 that's working for them please post.
    @Zacharee1 do you have any wakelocks setup on your h918 ? I need to start with something lol