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

Search This thread

_2bad4u_

Senior Member
Aug 25, 2011
362
128
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
 

Attachments

  • android.policy.jar
    93.1 KB · Views: 142
Last edited:

asianftw

Senior Member
Nov 28, 2010
103
50
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_

Senior Member
Aug 25, 2011
362
128
After how much time is the streak going to sleep mode i tested after 10 minutes and it still works.
 

menting

Senior Member
Apr 15, 2011
307
55
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_

Senior Member
Aug 25, 2011
362
128
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.
 

_n0p_

Senior Member
Apr 9, 2009
2,560
1,833
47
Kyiv
n0p.8bit.fm
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_

Senior Member
Aug 25, 2011
362
128
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.
 

_n0p_

Senior Member
Apr 9, 2009
2,560
1,833
47
Kyiv
n0p.8bit.fm
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_

Senior Member
Aug 25, 2011
362
128
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.
 

menting

Senior Member
Apr 15, 2011
307
55
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.

deep sleep should happen within a few min I think.
So you don't need to work any longer
 

_2bad4u_

Senior Member
Aug 25, 2011
362
128
ok after 1 hour and a half still working :) the best test will be in the morning,

but now if you guys test with out policy.jar it means that policy activates the volume and the keyguard is working?

but is's also strange cuz until made modf to the keyguard the policy din't work, something is not right here, i made other modf to other files but i change them back.
 
Last edited:

ciayko

Member
Sep 20, 2007
29
1
thanks guy, you bring to me & my Streak new life.
The power button is almost died, it was a suffering every time I tried to wake on the phone.
Now is the camera button that is doing the same dirty job and works like a charm!

Thank you for life!
 

_2bad4u_

Senior Member
Aug 25, 2011
362
128
Ok so the volume down it's working great, i have no problems and not once i had to press 2 times to wake the phone, now i'm testing with out android.policy.jar to see if is working.
 
  • Like
Reactions: BUTCHER0123

BUTCHER0123

Senior Member
Dec 20, 2009
118
1
Bucharest
It works!

Applied the changes on my Streak having the GingerStreak ROM2.4.4 and it works.
I don't know how many took the example seriously ,because I did ,and changed both camera and focus key to the mentioned values.When the phone goes in deep sleep you need to press a bit harder,not to hard.I saw that the button has two stops,you press gently it stops and it doesn't work ,when the phone goes in sleep mode ,but it works if you press it just after the screen goes out ,you press a bit harder it goes further and then it works.I suppose that this is the state when the phone exits from the deep sleep.
For me this change is very useful because I don't know how many times I pressed the camera button to unlock,simply because it was easier to reach than the power.Thanks again,mate, you deserve a keg of whatever drink,(plum brandy from north-palinca),you like! :cool:
 

_2bad4u_

Senior Member
Aug 25, 2011
362
128
It seems that surf_keypad.kl works flawless with volume down & up if you make modification to android.policy.jar. If i remove android.policy.jar it doesn't always respond but it still works, i've tested only for volume down & up, camera button i thinc is dying on me (make's a strange sound).

I've tested only with android.policy.jar modf but it seems that it doesn't work, i don't know why :-? .
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    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
    1
    Ok so the volume down it's working great, i have no problems and not once i had to press 2 times to wake the phone, now i'm testing with out android.policy.jar to see if is working.