[GUIDE] Eliminate Screen Wake Lag

socross

Member
Sep 18, 2008
13
0
0
Made a quick Tasker Profile which seems to be working just like the Mod. Only things needed are Tasker and Secure Settings.

Below is the description and I have attached the xml as well. If anyone sees an issue I will try and correct it then re-upload.

Code:
Profile: Screen Off Wake Lag (5)
State: Display State [ Is:eek:ff ]
Enter: Wake Lag Mod (17)
A1: Secure Settings [ Configuration:CPU Awake Only
Manual - On Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds):0 ] 

Exit: Wake Lag Off (23)
A1: Secure Settings [ Configuration:CPU Awake Only
Manual - Off Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds):0 ]
Only thing new is a loop and a wait. I noticed even though the wake lock should continue until turned off it stops on its own after 15-20 minutes so the new code just makes it wait 15 minutes then reset the wake lock. So far I haven't had any deep sleep in over 2 hours so seems to be working better now.

Code:
 Profile: Screen Off Wake Lag (5)
State: Display State [ Is:eek:ff ]
Enter: Wake Lag Mod (17)
Abort Existing Task
A1: Secure Settings [ Configuration:CPU Awake Only
Manual - On Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds):5 Continue Task After Error:eek:n ] 
A2: [X] Notify Sound [ Title:Test Text: Icon:null Number:0 Sound File:/storage/sdcard1/Notifications/mirai_nikki_tone.mp3 Priority:3 ] 
A3: Wait [ MS:0 Seconds:0 Minutes:15 Hours:0 Days:0 ] 
A4: Goto [ Type:Action Number Number:1 Label: ] 

Exit: Wake Lag Off (23)
A1: Secure Settings [ Configuration:CPU Awake Only
Manual - Off Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds):5 ]
Thanks for this! While I've used tasker before, I found your post a little hard to follow. What I did was set up a profile like this:

Display state off: wake lag mod (task)

Wake lag mod task: Configuration: CPU Awake only manual on

That's it. So far it's working, but I feel like I'm missing something since your post was more involved. I didn't understand "package" after manual-on, or where to find most of those settings for the actions you outlined. Is there a problem with the way I did it? Thanks again!
 

qwerty017

Senior Member
Jan 31, 2007
124
13
0
The package is Secure Settings which is what I used to make the Wake Lock. The only other things my version does is re-run the Wake Lag task once every 15 minutes as I found that the Wake Lock would stop after about that long and then I would have lag again. Mine also has an exit task to stop the Wake Lock on Screen On as that is what the original Wake Lag Mod was said to do.
 
Last edited:

socross

Member
Sep 18, 2008
13
0
0
The package is Secure Settings which is what I used to make the Wake Lock. The only other things my version does is re-run the Wake Lag task once every 15 minutes as I found that the Wake Lock would stop after about that long and then I would have lag again. Mine also has an exit task to stop the Wake Lock on Screen On as that is what the original Wake Lag Mod was said to do.
Ah, gotcha. Thanks for the info, this has been an annoying "feature" of the GNII so I'm glad I found your post!
 

jsadler09

Senior Member
Jan 1, 2012
145
13
0
Hey Guys!.. Many are Experts and know how to edit the android.policy.jar file.And many doesnt know how to edit the .jar file to include the code #No wake lag fix.

I asked guys on this forum to help me edit the jar file. But i didnt feel right to keep asking them all the time to edit a jar file.So instead i learnt it, If you already knew how to edit then you can skip this post.

Well,Few Steps to Follow. (Please Note I dont take any Credit for any of the codes/procedures)

1. To get the android.policy.jar file Its Located in " /system/framework/android.policy.jar".

2. Now Extract it using an Archive Software (Winrar).

3. Download the Smali.zip. (Attached)

4.Go to this Link Simple and easy guide to use Smali.zip (you can also download the zip there) http://www.wrapcode.com/android/baksmali-smali-dex-files/

5. Place the classes.dex file in the root directory of smali folder and follow the Steps from the link above.

6. To Edit use Notepad++ , File to be edited is KeyguardViewMediator.smali

Here as mentioned by Mikeyxda We'll be making all our changes in the KeyguardViewMediator.smali file. Follow the Page 1 Code. And After everything is edited Follow the Steps from the Link Above to Re-Compile.

Open android.policy.jar using Winrar or 7zip
Rename modded-classes.dex to classes.dex, and Drag & drop to android.policy.jar with normal compression
Finally, push back android.policy.jar into the system your device or push manually using root explorer/ES File Explorer.


I have just gathered all information for a newbie to perform the editing.I didn't create any file/code.Credit goes to respective owners/creators

Any Corrections are Welcome!

Hope This Helps!. Good Luck!
Thanks for this. I was originally getting an error stating "java is not recognized as an internal or external command" when trying to run the batch file. I had to copy all of the files/folders into C:\Program Files (x86)\Java\jre7\bin and run them there to get it to work. Once I figured that out it was easy.

Like a dumbass I renamed android.policy.jar through Root Explorer and was then going to copy over the modified version, but renaming that file hosed the phone and I couldn't get the screen to come back on in the OS. Fortunately I was able to boot in into TWRP and rename the file and get everything working.

No more wakelag for me! Thanks again to you and mikeyxda for putting together this info.
 

mooro99

Member
Mar 22, 2009
13
1
0
new leak 4.3

Hello !
Can anyone tell me if andoid.policy.jar changed a lot on 4.3 new leak for n7100? Is this method still available?
And if not do you think it's possible to integrate script in an xposed module?
 

Scarface1991

Senior Member
Jul 30, 2011
2,602
1,642
0
It drained my battery from 65% to 23% over night, so I'm giving up with zero wake lag.. Does anyone know if Note 3 has the same problem with waking up?

It's the Exynos processors that have this kind of problem. Qualcomm based Smartphones don't have this problem as far as I know

Sent from my GT-I9300 using Tapatalk
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone