[MOD] Volume Wake
I got so used to using the volume rocker to wake my DHD and show the lockscreen instead of the power button that i decided to try and add the same functionality to the OneX. The only caveat with this is that sometimes the volume slider shows up when it wakes, but i can live with that
Hopefully, in time, the ROM devs will add this in by default or as an option. Until then it'll require these manual mods...
Don't try the following if you're unsure what you're doing as you could potentially break the ROM if not done correctly. I recommend backing up first in Clockwork Recovery in case things go wrong.
I accept no responsibility for any issues encountered making these changes!
baksmali/smali from here
- Update android.policy.jar
1. Do the following to get the android.policy.jar from your phone and disassemble it
adb pull /system/framework/android.policy.jar .
baksmali -x android.policy.jar -o classout
2. Open the following file in a text editor
3. Find the method "isWakeKeyWhenKeyguardShowing(IZ)Z"
4. At the bottom of the method, there's a switch statement. Remove the following 2 lines from it:
0x18 -> :sswitch_5
0x19 -> :sswitch_5
5. Save the file and close it.
6. Run the following commmand to re-assemble classes.dex
7. Drag the classes.dex into the android.policy.jar file to update the file in there.
8. Push the updated android.policy.jar back to the phone
adb push android.policy.jar /sdcard/
cp /sdcard/android.policy.jar /system/framework/
chmod 644 /system/framework/android.policy.jar
- Update Generic.kl
1. Pull the file from your phone
adb pull /system/usr/keylayout/Generic.kl
2. Open it in a text editor and change the lines
key 114 VOLUME_DOWN
key 115 VOLUME_UP
key 114 VOLUME_DOWN WAKE_DROPPED
key 115 VOLUME_UP WAKE_DROPPED
3. Push the file back to your phone
adb push Generic.kl /sdcard/
cp /sdcard/Generic.kl /system/usr/keylayout/
chmod 644 /system/usr/keylayout/Generic.kl
(of course, you could also make those changes to the file directly using a root file explorer app and text editor.)
Reboot the phone.
The first time it boots after changing android.policy.jar, there'll be an 'Android is upgrading' dialog. This is normal and it won't happen on subsequent reboots.