Wearable Apps w/ Andreas Göransson – XDA:DevCon 2014

XDA:DevCon 2014 in Manchester, UK featured quite a few interesting topics as … more

Browse Your Files with Ease using MK Explorer

Google has made quite an effort in perfecting the powerful and multi-faceted OS that we know as … more

How to Fix the Nexus Available Storage Bug – XDA TV

Is your Nexus device only showing half of the available storage as it should? Many … more

Don’t Forget About Birthdays with Birthday Reminder

A person’s birthday is, without a doubt,one of the most important days in his … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP _2bad4u_

24th March 2012, 09:34 PM   |  #1  
_2bad4u_'s Avatar
OP Senior Member
Thanks Meter: 129
 
358 posts
Join Date:Joined: Aug 2011
More
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, 124 views)
Last edited by _2bad4u_; 27th March 2012 at 02:51 PM.
The Following 4 Users Say Thank You to _2bad4u_ For This Useful Post: [ View ]
24th March 2012, 09:40 PM   |  #2  
asianftw's Avatar
Senior Member
Thanks Meter: 49
 
103 posts
Join Date:Joined: 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
24th March 2012, 09:44 PM   |  #3  
_2bad4u_'s Avatar
OP Senior Member
Thanks Meter: 129
 
358 posts
Join Date:Joined: Aug 2011
More
After how much time is the streak going to sleep mode i tested after 10 minutes and it still works.
24th March 2012, 09:51 PM   |  #4  
Senior Member
Thanks Meter: 43
 
273 posts
Join Date:Joined: Apr 2011
Quote:
Originally Posted by asianftw

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.
24th March 2012, 09:55 PM   |  #5  
_2bad4u_'s Avatar
OP Senior Member
Thanks Meter: 129
 
358 posts
Join Date:Joined: Aug 2011
More
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.
24th March 2012, 10:08 PM   |  #6  
_n0p_'s Avatar
Senior Member
Flag Kiev
Thanks Meter: 1,827
 
2,557 posts
Join Date:Joined: Apr 2009
More
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.
24th March 2012, 10:44 PM   |  #7  
_2bad4u_'s Avatar
OP Senior Member
Thanks Meter: 129
 
358 posts
Join Date:Joined: Aug 2011
More
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.
24th March 2012, 11:19 PM   |  #8  
_n0p_'s Avatar
Senior Member
Flag Kiev
Thanks Meter: 1,827
 
2,557 posts
Join Date:Joined: Apr 2009
More
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?
24th March 2012, 11:57 PM   |  #9  
_2bad4u_'s Avatar
OP Senior Member
Thanks Meter: 129
 
358 posts
Join Date:Joined: Aug 2011
More
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.
25th March 2012, 12:10 AM   |  #10  
Senior Member
Thanks Meter: 78
 
714 posts
Join Date:Joined: Mar 2007
Quote:
Originally Posted by _n0p_

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.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes