[HOW TO] use camera focus button to wake phone - Streak 5 Android Development

So I've been hearing how people are starting to have problems with the power button getting messed up due to it constantly being pressed to wake/sleep the phone.
In order for you to use the camera button to wake the phone you must set all these permissions and I don't know how to do that haha. BUT I did find out how to use the focus button (soft press the camera button) to wake up the phone.
I'm on Stephen's Froyo 1.3 if that matters.
*I'M NOT RESPONSIBLE FOR ANYONE WHO SOMEHOW MESSES UP AND BRICKS/BLOWS UP THEIR PHONE*
All I did was add»
key 59 FOCUS WAKE_DROPPED
«to the 8k_handset.kl, qwerty.kl, and surf_keypad.kl in system/usr/keylayout using root explorer. (must reboot for changes to take effect)
I'm not sure if they all need it or not but its working fine for me.
Oh and sorry if this has already been discovered or posted somewhere else. Just trying to help out my fellow streakers

Try No Lock App
I have no idea why, but my phone already wakes with either power, or camera button. I do have the "NO Lock" app installed, so I never see the lock screen. Maybe that has something to do with it.

if you have no lock installed, your phone will wake up with any of the buttons being pressed (power, camera and the two volumn buttons).

Related

[Q] How to unlock the dell streak without pressing the power button

Hi everyone,
As most of you, I am looking forward for the Froyo upgrade which is supposed to release this week.
While waiting for that, can I ask can you recommend me any application that can unlock the Streak without pressing the power button? At first, I like that way to unlock the phone but after that I discover that it makes the power button sunk, something like that button is eroded after pressing so many times.
Is there anyway to unlock the phone just by touching the screen like the Iphone.
I tried unlock v2.0 or some application like that but they all request press the power button.
I will be grateful if anyone can help me answering me this.
Thank you so much.
I second this request if anyone knows! Thanks all...
Carlos
I too would like a different way of turning the screen on without the power button, ideally I'd like an app that can allow me to turn the screen on with the camera button instead.....preferably only requiring the first level button rather than having to push it all the way in.....I'm still not 100% comfortable with where the power button is located at the moment as well as like the OP said, it kinda sits a little too far in (sunk) and makes it difficult to find or press sometimes.....plus I don't press the camera button all that much so I'd rather have that and that it'll be the first button you'll find along the top.
Do a search for remapping keys in this f forum. I believe someone reported success in mapping the camera key to wake from suspend. I don't think you'll be able to power on using the camera button, though.
I'm pretty sure when the screen times out it physically turns off, so you wouldn't be able to wake it up that way.
The camera button is certainly possible though, ill look into it.
-------------------------------------
Sent via the XDA Tapatalk App
I just had another thought. Tasker might do this for you. Instead of suspending, tasker can shut everything off and blank the screen with maybe a button press. Then when you touch the screen, everything is turned back on, and the screen lightens up as well. You will certainly lose more battery this way, but if the iphone is doing this, it must be the same there.
i used to use widgetlocker and it gives the option to unlock from any hardware key.
However i am using nolock and hence do no have a lock screen which is even better.
Suspend wake on a swipe or one of the soft keys would be great. The hardware button on my touch hd was getting difficult to press towards the end of an 18 months contract. My girlfriends went completely she had to remove the bit on top of the button and press in with the stylus to power on.
So anything to prevent adidonal wear on the streaks button would be a warm welcome
Sent from my Dell Streak using XDA App
Using the soft keys the wake the phone is risky.
Its very easy to.press on the soft keys when they r in the pocket.
Sent from my Dell Streak using XDA App
I came across this by accident
I installed screen suite locker to replace normal lockscreen but old lock screen kept coming up too, so I downloaded no lock to disable default lockscreen completly.
Works just how I wanted it portrait lock screen no default lockscreen, but now camera, volume & normal power button wakes up the streak
"menu unlock" from the market works perfectly. Its a black icon with pale grey horizontal lines
Sent from my Dell Streak using Tapatalk
vuxuancamtu said:
Is there anyway to unlock the phone just by touching the screen like the Iphone.
Click to expand...
Click to collapse
I have the iphone. I can't unlock the screen without touching either the home button or the power button on the top of the phone. Besides, wouldn't the phone keep turning on if touching the screen woke it up?
No because it's capacitive only your hand (ideally) would wake it up.
I'm going to try these solutions, because I do not want to cause anymore wear on the buttons.
Try the volume rockers, mine, froyo is powering up the screen. As for the lockscreen app i have simply lockscreen. It's not so fancy, but it does a simple good job. This combination, makes the Streak wake up with volume rockers, and no other key like camera or capacitive buttons. Also, incomming call screen is in portrait, even if I let the phone down on the table.
Chers,
I hate the lock screen and don't why we cannot disable it.
Anyway, I use the app calls No Lock, by Bod from Android Market. Now, I can simply use the volume up or down button to turn streak on and without the lock screen.
Instead of even the volume rockers, can we not do something with just the three capacitive buttons ?
Try "lock 2" from the market paying of fro free You can unlock with all the button and then slide with your finger.
I use it from whe I had my dream and it works very well

[Q] Camera Button is Acting Funny

I'm not sure what the cause of it is, but perhaps you guys can help me out.
I've had my Optimus V for a while now and have flashed IHO-backside to it in December.
Recently, my camera button has been acting very strange. You see, it still functions as a camera button. Holding it down (completely) will launch the right app, hold it down (loosely) focuses the camera, and pressing it down completely will take a snapshot. That's all fine and dandy.
However... When I'm not in a camera app the camera button takes on a different set of functions. For some reason, lightly touching the button triggers a Volume Up, Volume Down, and/or Voice button press. I'm not sure why this happens. It's very strange. If you even so much as to come to physical contact with the button, it will send those "button presses" above. Clicking the button still works correctly, though.
I went into the ClockworkMod recovery to double check the key presses for it. It was VERY difficult because pressing the camera button to select an option will trigger the Vol up, Vol down and Voice presses making me select the wrong options in the recovery menu. Anyway, the following gets returned when lightly tapping the camera button:
key 115, key 114, key 216. (Vol up, Vol down, and Voice)
I checked the key file located here: /system/usr/keylayout/thunder_keypad.kl and found that everything is still mapping to the right buttons.
Can someone please tell me what's going on and how to make it stop doing this?
Anyone?

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
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
After how much time is the streak going to sleep mode i tested after 10 minutes and it still works.
asianftw said:
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
Click to expand...
Click to collapse
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.
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.
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.
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.
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?
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.
_n0p_ said:
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?
Click to expand...
Click to collapse
same here only the camera button works.
_2bad4u_ said:
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.
Click to expand...
Click to collapse
deep sleep should happen within a few min I think.
So you don't need to work any longer
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.
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!
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.
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!
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 :-? .
Updated......

remapping the power button

Is this possible? I just want it to not turn on the screen. I notice in my front pocket sitting down sometimes the power button gets pressed and turns on the screen. I would prefer the home button only cause it is flatter and more flush with the device. I am able to edit the home button to either wake or not wake the phone, but the power button wakes the phone even when I erase the fields in all the system/usr/keylayout files. There must be a backup file or something somewhere telling the power button to turn the screen on. I use WidgetLocker also.
Are you sure it's not the home button turning your screen on? Pretty common occurrence...
Sent from my Xposed Beans Note 2
Its TwiX said:
Are you sure it's not the home button turning your screen on? Pretty common occurrence...
Sent from my Xposed Beans Note 2
Click to expand...
Click to collapse
No. I have disabled that and will leave it disabled until I can figure out how to disable the power button.
i would like to see this as well, the power button is too easy to press accidentally. i tried editing the keylayout files but i couldnt get it to work either.... here's my ideal setup: the home button wakes the phone, the power button does nothing unless you long press it to bring up the power options menu. or press it while the screen is on to turn off screen.
I too have this problem.
The power button is easy to press when it's on my pocket and I even have a case on it. The case makes it a little harder to press but I can still hear the click of the button when so I know when it happens.

How to get Volume buttons to wake phone in Lolipop (CM12.1)?

Edit: this is no longer an issue in CM13.0 snapshot. I went ahead and upgraded and can confirm volume rocker wake (and double tap to wake) work.
Hi All I'm on CM12.1 (MT2L03 cm-12.1-20151117-SNAPSHOT-YOG7DAO1K2-mt2) and can't seem to figure this out. I had the volume buttons waking the phone from screen off in 4.3 working great...I used that for quite a while (since I used the option to end calls with power button need volume buttons to wake screen also saves wear to power button) so the hardware supports it but not sure how to get it working on lolipop (CM12.1).
In Jellybean, I just had to add 'WAKE' after the volume keys like:
key 115 VOLUME_UP WAKE (in /system/user/keylayout to the kl files)
I tried this for CM 12.1 and it doesn't seem to work. Since it worked before I suppose it could work again if a setting is changed or something.
Also I tried adding:
ro.config.hwfeature_wakeupkey=1
to my build.prop and rebooting and that didn't work either. (Setting it to 0 disables volume key waking)
The xposed module XUtilities option: Volume rocker wake also did not work.
The xposed module GravityBox doesn't have the option or I didn't see it there.
There's this reference:
http://cyanogenmod.github.io/cm_pla...ers/CMSettings.System.html#VOLUME_WAKE_SCREEN
which refers to VOLUME_WAKE_SCREEN setting (in CM API)
In the Buttons section of CM's settings, I have the End call (Pressing the power button will end the current call) option ON. One would think this would allow the volume buttons to wake the screen if the screen goes off during a phone call so you can wake it back up without ending the call. Also with this option on, on more than one occasion I went to turn my phone on just as an incoming call came in and used the power button which ended the call...so I've gotten in the habit of using the volume up/down buttons to turn on the screen getting around that issue (also saving wear and tear on my power button).
There's an app in the play store that can do what I want called DTSO (fails after time) VPL by prasi but it stays running and uses more battery power. The hardware solution that was working in 4.3 didn't require a background app to allow this feature and also didn't require extra battery power. So this isn't ideal. I'd rather have Cyanogenmod ROM directly support it or have a way to use it with it.
I want to be able to press the volume buttons and the screen come on like it used to. How?
Thank you for any suggestions :fingers-crossed::good:

Categories

Resources