[MOD] Wake on Volume Keys via android.policy.jar

stvmac11

Senior Member
Jan 3, 2011
118
17
0
Delay

Nice MOD, OP!

Any chance of having a version that allows for wake after holding the volume key for X seconds?

In case of accidental key presses in a pocket?
 
Last edited:

maledyris

Senior Member
Mar 25, 2011
170
58
0
Burnaby
Glad to help, thanks for the mod. I find it easier to unlock the phone now, by pushing the volume key with my thumb and swiping with my finger. Pushing the back button with the finger and sliding seemed to herky jerky to me.
Okay, I've reposted the file in the OP with the correction. I wanted to use the file you had attached, but unfortunately that's a 16-bit executable meaning it doesn't work for 64-bit systems. In the interest of keeping everyone using the same files and keeping the least amount of test cases I went and found a 32-bit version. Now that I know about this XP issue, next time I do a script I'll use "set /p" instead :rolleyes:
 

maledyris

Senior Member
Mar 25, 2011
170
58
0
Burnaby
Nice MOD, OP!

Any chance of having a version that allows for wake after holding the volume key for X seconds?

In case of accidental key presses in a pocket?
Hmm, I actually don't anticipate having that problem because I find the buttons on my Atrix are firm enough and small enough that I don't think they'd ever click in my pocket. I sometimes use a case and I find it's especially difficult then. If I do notice that this is an issue, then I might look into that.
 

maledyris

Senior Member
Mar 25, 2011
170
58
0
Burnaby
Why not just make *.apk leave pc step out..

Sent from my MB860 using Tapatalk
Nah, an .apk would not be practical in this situation. This is much easier for me to maintain. I cannot compile Dalvik byte code on the phone itself. That means that if I add in another mod I'd be packaging dozens of precompiled android.policy.jars for every possible choice the user could make, multiplied by the number of different ROMS... That's a lot of .jars!
 

maledyris

Senior Member
Mar 25, 2011
170
58
0
Burnaby
Very nice, I've been hunting for an app to do this.

Can anyone confirm if being deodex'd is required for sure?
I've been doing a little reading up on it, and since I recently went to the France sbf, I was able to compare what the original files looked like. You wouldn't need to be completely deodexed but you would need to remove the odex file for android.policy.jar that sits in /system/framework/ on a stock system, and then you would also have to clean up the dalvik cache for files related to that file... really, with all that trouble you might as well just deodex the whole thing ;)

Sent from my MB860 using XDA Premium App
 

maledyris

Senior Member
Mar 25, 2011
170
58
0
Burnaby
Since I've gotten some private messages on this I thought I should let everyone know that I've diff'ed the files for gingerblur 4 and 4.5 and there is no difference between android.policy.jar on those two roms. That means this mod is usable on both systems without any change :)

Sent from my MB860 using XDA Premium App
 

maledyris

Senior Member
Mar 25, 2011
170
58
0
Burnaby
i get a "permission denied" after "Compiling classes.dex..."
Hey, sorry, was kind of busy and didn't notice this message. Anyway, keep an eye on your phone's screen when the script is running. Super User was probably asking for access. When you don't press accept or cancel after 5-10 seconds, it just cancels automatically.
 

n1ckr0th

Senior Member
Jun 16, 2010
218
87
0
Atlanta
Will this work for Gingerblur 4.5 as well?
Since I've gotten some private messages on this I thought I should let everyone know that I've diff'ed the files for gingerblur 4 and 4.5 and there is no difference between android.policy.jar on those two roms. That means this mod is usable on both systems without any change :)

Sent from my MB860 using XDA Premium App
reading is essential ;)