Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,777,785 Members 46,665 Now Online
XDA Developers Android and Mobile Development Forum

UNLOCK the Strek by volume UP or DOWN even Camera button!!!

Tip us?
 
_2bad4u_
Old
(Last edited by _2bad4u_; 27th March 2012 at 01:51 PM.)
#1  
_2bad4u_'s Avatar
Senior Member - OP
Thanks Meter 129
Posts: 358
Join Date: Aug 2011
Thumbs up UNLOCK the Strek by volume UP or DOWN even Camera button!!!

METHOD 1

So this day's i had a little problem with the power button not working very good, i got scared because some people told me the power button is beginning to die....

So i begin to search for a method to unlock the phone by camera button or volume up-down, i read here that some people use the sensor but i din't like it. I begin to make modf. to android.policy.jar and other tweaks but not even one worked, but i found a simple solution to make it work.

You need to use a file manager and edit 1 file from /system/usr/keylayout.
The file is surf_keypad.kl, open surf_keypad.kl with notepad and put this line WAKE_DROPPED to:

THIS IS FOR CAMERA BUTTON

key 59 FOCUS
key 212 CAMERA

example:
key 59 FOCUS WAKE_DROPPED
key 212 CAMERA WAKE_DROPPED

THIS IS FOR VOLUME BUTTONS
If you want only VOLUME_UP to unlock phone put WAKE_DROPPED to VOLUME_UP if you want VOLUME_DOWN to work put WAKE_DROPPED only there.

key 115 VOLUME_UP
key 114 VOLUME_DOWN

example:

key 115 VOLUME_UP WAKE_DROPPED
key 114 VOLUME_DOWN WAKE_DROPPED


And you need also a widget to put on the desktop to lock the phone after you modf the file you need to reboot sow it can take effect.


This is only for DSC1.0 android.policy.jar modf by me with this tutorial, the buttons volume up and down should work flawless with surf_keypad.kl modification,when using camera you need to push 2 times to wake from deep sleep.


I tested this only on DSC.1.0 this is the rom i'm running now.
p.s. sorry for my english.


METHOD 2

Widget Locker is what _nop_ is using and it's working flawless with camera button, you need also to modf the surf_keypad without need to change android.policy.jar
Attached Files
File Type: jar android.policy.jar - [Click for QR Code] (93.1 KB, 121 views)
Personal attacks and / or superiority complexes are unconstructive, off-topic and unseemly. I would ask you to try and limited them ... With bowing.
--------------------------------------------------------------------------------------------
Samsung Galaxy S3 i9300 - CM11.0 Temasek ( KANG Thread )
Kernel - Boeffla Omni Kernel
The Following 4 Users Say Thank You to _2bad4u_ For This Useful Post: [ Click to Expand ]
 
asianftw
Old
#2  
asianftw's Avatar
Senior Member
Thanks Meter 49
Posts: 103
Join Date: Nov 2010
I tied this method but by using button remapper. The problem for me is once the Streak goes in to deep sleep mode any button other than the power key won't wake it up.

CM7 being the only thing works with volume keys unlocked even the phone is sleeping.

Sent from my Dell Streak
 
_2bad4u_
Old
#3  
_2bad4u_'s Avatar
Senior Member - OP
Thanks Meter 129
Posts: 358
Join Date: Aug 2011
After how much time is the streak going to sleep mode i tested after 10 minutes and it still works.
Personal attacks and / or superiority complexes are unconstructive, off-topic and unseemly. I would ask you to try and limited them ... With bowing.
--------------------------------------------------------------------------------------------
Samsung Galaxy S3 i9300 - CM11.0 Temasek ( KANG Thread )
Kernel - Boeffla Omni Kernel
 
menting
Old
#4  
Senior Member
Thanks Meter 42
Posts: 268
Join Date: Apr 2011
Quote:
Originally Posted by asianftw View Post
I tied this method but by using button remapper. The problem for me is once the Streak goes in to deep sleep mode any button other than the power key won't wake it up.

CM7 being the only thing works with volume keys unlocked even the phone is sleeping.

Sent from my Dell Streak
I used button remapper before too, and when the phone is in deep sleep, the camera button took a few presses to get it working. A drawback of button remapper was that it was a complete remap of the camera button, not like the CM7 implementation where vol- and vol+ only were mapped to wake up the phone when screen was off.
 
_2bad4u_
Old
#5  
_2bad4u_'s Avatar
Senior Member - OP
Thanks Meter 129
Posts: 358
Join Date: Aug 2011
I will leave the phone untouch for 1 hour to see what is going on, i hope is going to still work even if in deep sleep.
Personal attacks and / or superiority complexes are unconstructive, off-topic and unseemly. I would ask you to try and limited them ... With bowing.
--------------------------------------------------------------------------------------------
Samsung Galaxy S3 i9300 - CM11.0 Temasek ( KANG Thread )
Kernel - Boeffla Omni Kernel
 
_n0p_
Old
#6  
_n0p_'s Avatar
Senior Member
Thanks Meter 1824
Posts: 2,557
Join Date: Apr 2009
Location: Kiev
Short test gives that camera button cannot wake device at once from deep sleep
But hack, menting posted link to, works fine.
I wonder can it help to solve "cannot resume playing" with button on headset.
 
_2bad4u_
Old
#7  
_2bad4u_'s Avatar
Senior Member - OP
Thanks Meter 129
Posts: 358
Join Date: Aug 2011
ok i waited 40 minutes and press volume down and it works, but i dont know why if you guys tell me that you tested this method and is not working, then it must be the modf to the android.policy.jar that is making it work. i have to test even more, need your help to guys to make test's to see what way is the best way to save the power button.
Personal attacks and / or superiority complexes are unconstructive, off-topic and unseemly. I would ask you to try and limited them ... With bowing.
--------------------------------------------------------------------------------------------
Samsung Galaxy S3 i9300 - CM11.0 Temasek ( KANG Thread )
Kernel - Boeffla Omni Kernel
 
_n0p_
Old
#8  
_n0p_'s Avatar
Senior Member
Thanks Meter 1824
Posts: 2,557
Join Date: Apr 2009
Location: Kiev
With unchanged policy i can use only FOCUS key to wake the device. And it requires pressing it many times when device sleeps.
That's my experience.
Maybe that's because keyguard filters other presses?
 
_2bad4u_
Old
#9  
_2bad4u_'s Avatar
Senior Member - OP
Thanks Meter 129
Posts: 358
Join Date: Aug 2011
It could be that is filtering other presses and then going to the wake press, i've beem waiting for 1 hour and 10 minutes you thinc i should wait longer to get deep sleep?

But there is a strange thing i don't seem to get, i only made the modf to the volume down but it seams that all the buttons work when i press, that is weird.
Personal attacks and / or superiority complexes are unconstructive, off-topic and unseemly. I would ask you to try and limited them ... With bowing.
--------------------------------------------------------------------------------------------
Samsung Galaxy S3 i9300 - CM11.0 Temasek ( KANG Thread )
Kernel - Boeffla Omni Kernel
 
Dude_Virus
Old
#10  
Senior Member
Thanks Meter 78
Posts: 714
Join Date: Mar 2007
Quote:
Originally Posted by _n0p_ View Post
With unchanged policy i can use only FOCUS key to wake the device. And it requires pressing it many times when device sleeps.
That's my experience.
Maybe that's because keyguard filters other presses?
same here only the camera button works.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Add Bits and Pieces of Honami to Your Current ROM

In the last few months, we’ve talked about quite a few Sony Honami-related projects. … more

Always Enter the Correct Password with HideNoPasswords

If you’ve ever entered apassword on your mobile device, you’ve surely … more

Revert to Stock Recovery Effortless with Simple Recovery Switcher

Android updates released as OTA packages are very easy to apply,but they … more

Convert PNGs into RLEs Easily on Any OS with PNG2RLE

Unlike other operating systems, Android uses its own graphical image formats. Most of … more