5,603,591 Members 36,040 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Volume Rocker Screen Wake UP

Tip us?
 
fireman_vt
Old
#1  
Junior Member - OP
Thanks Meter 1
Posts: 6
Join Date: Jun 2009
Default [Q] Volume Rocker Screen Wake UP

Hello, Sorry for my bad English.
What is wrong: I want to wake up the phone to key for sound +/-.

Copy /system/framework/
I have baksmali.jar and smali.jar.
#Decompile android.policy.jar
java -Xmx1024m -jar baksmali.jar -c :core.jar:core-junit.jar:bouncycastle.jar:ext.jar:framework.jar:f ramework2.jar:android.policy.jar:services.jar:apac he-xml.jar:com.lge.core.jar -x android.policy.odex

Change KeyguardViewMediator.smali
0x18 -> :sswitch_5
0x19 -> :sswitch_5

java -Xmx1024m -jar smali.jar out -o classes.dex

Add classes.dex to android.policy.jar.

Copy original file to /sdcard/mod/android.policy.jar

Copy new android.policy.jar to /system/framework/

And:
adb shell
su
dexopt-wrapper /system/framework/android.policy.jar /system/framework/patched_android.policy.odex /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/com.lge.core.jar

cp -f /sdcard/mod/android.policy.jar /system/framework
chmod 777 /system/framework/android.policy.odex
chmod 777 /system/framework/android.policy.jar
chmod 777 /system/framework/patched_android.policy.odex
busybox dd if=/system/framework/android.policy.odex of=/system/framework/patched_android.policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
cp /system/framework/patched_android.policy.odex /system/framework/android.policy.odex
chmod 644 /system/framework/android.policy.odex
chown root.root /system/framework/android.policy.odex
rm /system/framework/patched_android.policy.odex
reboot

Everything is OK, byt Volume Key not Wake UP My Phone.

Stock Rom 4.1.2, Stock Kernel 3.1.10.
 
black@pirate
Old
#2  
black@pirate's Avatar
Senior Member
Thanks Meter 198
Posts: 337
Join Date: Aug 2013
You have to change in generic.kl also. Put WAKE beside volume down and volume up.

Sent from my LG-P880 using XDA Premium 4 mobile app
MY WORK
LiquidSmooth KitKat on 4xHD? >>> http://forum.xda-developers.com/show....php?t=2631676
XenonHD KitKat on 4xHD? >>> http://forum.xda-developers.com/show....php?t=2639397
 
fireman_vt
Old
#3  
Junior Member - OP
Thanks Meter 1
Posts: 6
Join Date: Jun 2009
Hello,
Did
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
key 116 POWER WAKE

in Generic.kl
but no effect.
 
fireman_vt
Old
#4  
Junior Member - OP
Thanks Meter 1
Posts: 6
Join Date: Jun 2009
Hello,
Problem solved,
Delete 0x18 and 0x19 lines(no change to sswitch_5) and save.

Work Fine.
The Following User Says Thank You to fireman_vt For This Useful Post: [ Click to Expand ]
 
themis123
Old
#5  
Member
Thanks Meter 15
Posts: 50
Join Date: Sep 2008
Quote:
Originally Posted by fireman_vt View Post
Hello,
Problem solved,
Delete 0x18 and 0x19 lines(no change to sswitch_5) and save.

Work Fine.
Sorry, but I don't understand how to do this.
Is it possible for someone to make a script for this?
 
balloon27
Old
(Last edited by balloon27; 22nd January 2014 at 12:13 AM.)
#6  
balloon27's Avatar
Senior Member
Thanks Meter 71
Posts: 194
Join Date: May 2013
Location: Groningen
Quote:
Originally Posted by themis123 View Post
Is it possible for someone to make a script for this?
black@pirate already made a flashable zip for this! Here's his post.

EDIT: This only works on the current CM11 Nightlies though! Thanks for mentioning, black@pirate!
 
fireman_vt
Old
#7  
Junior Member - OP
Thanks Meter 1
Posts: 6
Join Date: Jun 2009
Sorry, but no make a script for.
Also I can offer phone lock with double click.
First I found application for Phone Lock.
I use Nova Launcher.
In settings "Gestures and Buttons" set "Double tap".
Choose Phone lock application and ready.
Phone lock with Double tap screen.
 
black@pirate
Old
#8  
black@pirate's Avatar
Senior Member
Thanks Meter 198
Posts: 337
Join Date: Aug 2013
Quote:
Originally Posted by balloon27 View Post
black@pirate already made a flashable zip for this! Here's his post.
Don't use this on other ROMs except CM11 nightlies. It will cause bootloop.

Sent from my LG-P880 using XDA Premium 4 mobile app
MY WORK
LiquidSmooth KitKat on 4xHD? >>> http://forum.xda-developers.com/show....php?t=2631676
XenonHD KitKat on 4xHD? >>> http://forum.xda-developers.com/show....php?t=2639397
The Following 2 Users Say Thank You to black@pirate For This Useful Post: [ Click to Expand ]
 
balloon27
Old
#9  
balloon27's Avatar
Senior Member
Thanks Meter 71
Posts: 194
Join Date: May 2013
Location: Groningen
Quote:
Originally Posted by black@pirate View Post
Don't use this on other ROMs except CM11 nightlies. It will cause bootloop.
My bad.. I'll edit my post to save some phones!
 
fireman_vt
Old
#10  
Junior Member - OP
Thanks Meter 1
Posts: 6
Join Date: Jun 2009
Ok,
I will describe everything in detail in My first post.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

When Using GitHub, Don’t Skimp on Commit History

GitHub has become the epicenter of most open source development work that is posted … more

Verizon Droid DNA to Receive 4.4.2 KitKat + Sense 5.5 OTA This Thursday

The HTC Droid DNAis Verizon’s close cousin to the JapaneseHTC … more

Lucid Browser is Small, Lightweight, and Open Source

If there is one application category that certainly isn’t lacking in Android,and … more