[Q] Remap volume-up button to power button - Nexus 5 Q&A, Help & Troubleshooting

Hello all,
Recently the power button on my Nexus 5 has been acting really weird. Sometimes it works flawlessly, others it requires pressing it really hard to work. In order to prevent it to stop working indefinetely, I am looking for a way to remap my volume-up button so it can work as a power button. I don't need it to turn my phone on or to work in the recovery mode (from what I read, it seems to be impossible), only when Android is running.
I've already tried some workarounds:
1) Volume Unlock Power Button Fix app: I tried it, but it just allowed me to turn on my phone with volume but not turning off. Also, it drains a LOT of power.
2) Buttonremapper app: It would theoretically do exactly what I wanted, but did not work at all.
3) Editing generic.kl: I tried switching volume-up and power buttons codes in generic.kl, but also did not work. Maybe I need to modify another file?
3) Xposed Framework + Additions: The installation of Xposed went Ok, but after installing Additions module I got stucked in bootloop. I am running Android 5.1 stock, maybe this module is not yet compatible.
So, can anyone help me? Do I need to install a custom ROM?
PS: I live outside US, so no warranty for me. Otherwise I would just use it
Thanks in advance for any help!
Cheers,
Humberto

Hi folks,
Just a heads up for anyone who might be facing the same issue. I decided to change from stock to Cataclysm ROM due to some specific features (listed below). After the installation, here's what I did to work around this problem:
1) Enabled "Volume wake" and "Sleep button on status bar" in "Cataclysm Settings / Miscellaneous".
2) Enabled "Swipe to sleep" and resized NavBar to 115% in "Cataclysm Settings / Navigation bar options". -> This way I can swipe in NavBar at any time (except lockscreen) to turn off screen. I raised it a little to facilitate the swipe gesture.
3) Changed Lockscreen Dialer shortcut to ""Turn off Screen" app shortcut (just search for it in the play store) in "Cataclysm Settings / Lockscreen options" -> This allows me to just swipe right and turn off the screen when my security settings are disabled (which accounts for most of the time). I found it way faster than pressing sleep button in status bar, especially when I'm driving and I can't look at the screen. Plus, I don't really use the dialer function of my phone so often since the invention of Whatsapp ;P
I realize this is not the perfect solution, but I don't see a better way to deal with this power button malfunction problem (except from a hardware fix).
Hope this helps!
Cheers,
Humberto
PS: I am really enjoying Cataclysm. It's a very nice ROM, completely stable and with a lot of other interesting features aside from the ones mentioned above. I strongly encourage anyone to give it a try!

I'm facing the exact same problem but I really need to eliminate the power button or I will need a power button fix soon.
The solutions you found hthiengo are good if not needing to turn off (or worst: running out of battery, something that happens me sometimes). I'm in the situation that next time I hit power button I will need to replace the button, or throw the nexus away
I did installed the xposed additions for lollipop but it is not working, and the Cataclysm trick is not enough in this case

Ok, after some research I've found a temporary solution:
For the power button you can remap modifying the file gpio-keys.kl under system/usr/keylaout (i wonder why anyone could figure out thise before, no that difficult). I would like to map power button leeaving it useless but I've found it impossible to remap the power button (probably because the key number is not 116). I would have liked to see xposed additions to help me map the keys but is not functional at least for me.
If the phone runs out of battery I've found that if I plug the power cable by pressing both volume buttons at the same time, eventually it starts up with the bootloader so I can plug the pc cable and it will reboot sucessfully.
So despite the phone know is pretty disfunctional (not the best phone for a hurry without battery), I can still use it for some weeks before I plan buying a new one or something (or I find a place for reparing). Its a shame I could not find a better solution for example, ADT when powered off so I could just reboot it by using ADT reboot command while powered off.
And It would be really amazing if the volume up button could also power it on from the powered off state.
In my case the power button is broken, but sometimes it gets stuck and puts the phone in a reboot loop: To avoid pressing the power button accidentally I've made a hole in the protective case so its pretty difficult to access it.
That's all for now. If anyone can make it better I will be glad to hear him/her

Related

Hardware Buttons In Standby (A Serious Issue?)

I was a bit surprised to just discover, by accident, that whenever I press any of the front hardware buttons when my device is in standby then the Touch Cruise doesn't completely ignore them, it switches on the button-panel lights for a while and then they go off after the timeout. For the red hangup key it also makes a beep when the button is pressed as well as activating the button lights.
As far as I can tell this is all the device does, it doesn't switch on the screen or activate any of the functions associated with the buttons I press (as far as I can tell) but I still worry that if I accidentally get the TC in a position in my pocket (when I'm driving or just sitting down for instance) where I'm constantly activating a button then after a few hours I could either drain the battery unnecessarily by keeping the button lights permanently on and/or I could crash the device by swamping it with button-pressed messages.
Do other people see the same behaviour when their TC is in standby and is there any hack to disable this?
- Julian
Try going into Settings - System - Key Lock
and change it to the top option "Lock all buttons except power button"
Same suggestion - doesn't make a sound here
That DOES happen when he is locked and NOT in standby. Still then - the volume keys work which is not really desired but hey...
Thank you mouseymousey and SabbeRubbish. You fixed my problem, but not in the way you probably intended.
I'd just been narrow minded and assumed that, if this option was available, it would be in the Button settings app so I hadn't seen the Key Lock settings app. Thanks to you both I found this and, guess what, the top "Lock all buttons except power button" WAS set but my buttons still activated the backlight and sometimes beeped.
Confused, I changed the option to the bottom "Do not lock buttons" and it behaved as expected, i.e. any button press completely woke up the device. I then set the option back to the top "Lock all buttons except power button" and this time my problem is solved, i.e. no reaction whatsoever from pressing the front buttons.
Wierd. My TC obviously got itself into an odd state and toggling the button lock preference seems to have fixed it. I'll keep an eye on this one.
Thanks again for the invaluable advice.
- Julian
I shouldn't let misleading info lie here so here's my confession. This issue turned out to be nothing to do with my device getting confused about its key lock setting. The fact that it fixed itself when I toggled the key lock setting was a coincidence, what I did at the same time as toggling the setting was to also close down Conduits PocketPlayer which I had still minimised and running (although not playing any music) in the background.
The problem appears to be with PocketPlayer (PP) and is 100% reproducible. If PP is still running (even minimized) when the device is put into standby then I get the behaviour described in my initial post, close down PP before going into standby and everything is OK and the front buttons are totally inactive.
I have of course filed a bug with Conduits but the good news is that noone needs to worry about any generic TC/WM6 wierdness here.
- Julian

[Q] Off-Key Widget on Defy?

greetings!
Just recently i got a Motorola Defy, and to be honest the top power button seems a little wimpy.
i have downloaded two apps so far to circumvent the power key;
Tap Tap App and Fix Broken Power Button.
the following problems occur when attempting to power the phone down.
In Fix Broken Power Button the widget is completely inoperative.
in Tap Tap App the screen will flash dark, then immediately come to the lock screen.
i believe this has to do with the Defy's internal workings, and have seen other people have similar problems,
see http://forum.xda-developers.com/archive/index.php/t-1017269.html
is there hope for my phone?
thank you.

Menu button does not work with CM10 or cm based roms

Hi there,
my HTC One S (ville) fall down and the display was broken completely.
I bought myself a new a one and have build it in. While replacing the screen I screwed the Flex cable which is responsible for the hardware buttons at bottom (and the sound however).
I also got a new flex cable and replaced the old one.
1) Problem
When I restart my phone the buttons at the bottom work, until I get into lockscreen. After that they won't work anymore, I don't know why. (Only restart helps, again they work only until I got into lockscreen).
2) Workaround-Problem
So, as a workaround a decided to install CM10 to use the navigation bar (I set qemu.hw.mainkeys=0 in prop.build before I flashed the rom).
Now I have the problem with the menu button. The 3-dot menu button shows up but has obviously no function. When I click on it nothing happens - I can't access any settings menu in apps.
I tried also Virtual Button App - either there the menu function does not do anything.
Of course I rooted my phone etc...
Is there something special with the HTC ONE S and the menu button function?
Thanks very much in advance,
Maik

[Q] Alternative ways to turn screen off on L

Alright so running the leaked L build that our lord and savior @digitalhigh n ole' piratety Cap'n Throwback managed to get running on our devices but have one thing that is really bothering me. Screen. Off. My power button has for ages been messed up and weak to the click and well It's truly horrid to press and I used to always have 'hold back key to turn screen off' but well I don't anymore. Xposed is gone, my one true love...how can I replace her...how can I get over her beauty and learn to let her go and potentially even replace her?
My heart is with you Xposed!! But we must go our separate paths! - A very sad Shadow
( @Captain_Throwback lol )
Incase anyone managed to misunderstand my sad love story I'll skip to the point, is there any alternative ways to avoid pressing power button to turn screen off? For instance double tap status bar to sleep or holding back button to power off (both required Xposed 'I THINK', keyword "I THINK").
S1L3nTShaDoWz said:
Alright so running the leaked L build that our lord and savior @digitalhigh n ole' piratety Cap'n Throwback managed to get running on our devices but have one thing that is really bothering me. Screen. Off. My power button has for ages been messed up and weak to the click and well It's truly horrid to press and I used to always have 'hold back key to turn screen off' but well I don't anymore. Xposed is gone, my one true love...how can I replace her...how can I get over her beauty and learn to let her go and potentially even replace her?
My heart is with you Xposed!! But we must go our separate paths! - A very sad Shadow
( @Captain_Throwback lol )
Incase anyone managed to misunderstand my sad love story I'll skip to the point, is there any alternative ways to avoid pressing power button to turn screen off? For instance double tap status bar to sleep or holding back button to power off (both required Xposed 'I THINK', keyword "I THINK").
Click to expand...
Click to collapse
I ran 5.0 for a short time but ended up switching back to Sinless before I could check. On many devices going back to and including the T-Bolt (EDIT: I was searching for the same thing back then because of the same reason), I used an app from the play store called Screen Off and Lock and I personally use the donate version and always had it tied in with the "search" feature (either a physical button or drag up from the navbar without buttons). One (big) reason for me to switch back is not having Xposed.
bb1981 said:
I ran 5.0 for a short time but ended up switching back to Sinless before I could check. On many devices going back to and including the T-Bolt (EDIT: I was searching for the same thing back then because of the same reason), I used an app from the play store called Screen Off and Lock and I personally use the donate version and always had it tied in with the "search" feature (either a physical button or drag up from the navbar without buttons). One (big) reason for me to switch back is not having Xposed.
Click to expand...
Click to collapse
That app is good enough, as long as I don't have to press the power button xD. Thanks! I'll check out the donate version in a second as from the looks of it the free one only has the option of tapping the icon to turn screen off but oh well.
EDIT: NVM
For anyone else who sees this thread feel free to leave more options if you have any! More options the better.
No problem and I couldn't remember the difference between the versions. EDIT: There should be 2 different icons in the launcher, one being the app itself to turn the screen off (?) and one just for the configuration unless it's set up differently on the free one.

Buttons

If I root my device, can I change button's standings? It's very irritating that every time I press power button, at the same time I press volume down and phone takes screen capture!?!
Or is there something wrong with my fingers
It's not just you...
If you root and install xposed framework there are xposed modules that let you pretty much configure anything you want.
http://www.addictivetips.com/android/xposed-additions/
That module specifically handles remapping hardware buttons which is what you are trying to accomplish.
Personally I prefer just adding screenshot to the power down menu but since Alcatel skinned it none of the modules to add "Advanced Power Menu" appear to work.
tommihut said:
If I root my device, can I change button's standings? It's very irritating that every time I press power button, at the same time I press volume down and phone takes screen capture!?!
Or is there something wrong with my fingers
Click to expand...
Click to collapse
It's a design flaw. The way they've positioned the power button opposite the volume buttons makes this kind of mistake inevitable. They probably should have known better in that plenty of other devices have their buttons positioned in ways that avoid the likelihood of this happening.
ROMs (for other devices) and xPosed modules could give you increased options for the behavior of the volume up and down buttons, but I don't know that you can avoid this particular problem altogether. At best, you can probably trade one problem for another. You'll probably just adapt to it after awhile and learn to hold the device in a way that prevents this from happening. Hopefully, TCL will change the button locations on the next iteration of the phone.
maigre said:
It's a design flaw. The way they've positioned the power button opposite the volume buttons makes this kind of mistake inevitable. They probably should have known better in that plenty of other devices have their buttons positioned in ways that avoid the likelihood of this happening.
ROMs (for other devices) and xPosed modules could give you increased options for the behavior of the volume up and down buttons, but I don't know that you can avoid this particular problem altogether. At best, you can probably trade one problem for another. You'll probably just adapt to it after awhile and learn to hold the device in a way that prevents this from happening. Hopefully, TCL will change the button locations on the next iteration of the phone.
Click to expand...
Click to collapse
If I didn't need the screenshot at all I'd just disable the power/vol up combo entirely in the rom. If I did I'd install a screenshot app and pin the screenshot icon to the notification pulldown using app "Hangar".
https://play.google.com/store/apps/details?id=ca.mimic.apphangar&hl=en
Ok, thanks. Maybe I just root my phone and install xposed framework.
I'm just waiting for my first update. My phone firmware is still 5.0.2-010 01
I don't know why I haven't got even my first update, it should be 5.0.2-010 03
I live in Finland. Phone is 6045Y
tommihut said:
Ok, thanks. Maybe I just root my phone and install xposed framework.
I'm just waiting for my first update. My phone firmware is still 5.0.2-010 01
I don't know why I haven't got even my first update, it should be 5.0.2-010 03
I live in Finland. Phone is 6045Y
Click to expand...
Click to collapse
The system image thread has the newer versions of your firmware (twrp backup images) and you could do your own updating if you wished.....
famewolf said:
If you root and install xposed framework there are xposed modules that let you pretty much configure anything you want.
That module specifically handles remapping hardware buttons which is what you are trying to accomplish.
Personally I prefer just adding screenshot to the power down menu but since Alcatel skinned it none of the modules to add "Advanced Power Menu" appear to work.
Click to expand...
Click to collapse
Talking about the buttons, i'm very iritated by something with this phone: long press on Vol+ (and vice versa) doesn't skip to the next song in music players ... (like on most phones I had in the past) do you think it's possible to map this behavior by using your method , or is there any chance that Alcatel implement this on futur firmwares ? I don't think it's something complicated for them, ... thanks
yeep3 said:
Talking about the buttons, i'm very iritated by something with this phone: long press on Vol+ (and vice versa) doesn't skip to the next song in music players ... (like on most phones I had in the past) do you think it's possible to map this behavior by using your method , or is there any chance that Alcatel implement this on futur firmwares ? I don't think it's something complicated for them, ... thanks
Click to expand...
Click to collapse
Why don't you make a backup and try it for yourself then report back to let us know? I found that module with a few minutes of googl'ing. I don't use it myself so how would I know?
Have you noticed that in some apps that are on full screen nav bars disapear? For example i use lgcamera and when i want to get out from app i cannot do it in different way than going to gallery to have those buttons. In some apps i dont have that "option" so i need to pull down panel and enter to settings. This is really anoying. Or maybe i have kosher model
Mauelith said:
Have you noticed that in some apps that are on full screen nav bars disapear? For example i use lgcamera and when i want to get out from app i cannot do it in different way than going to gallery to have those buttons. In some apps i dont have that "option" so i need to pull down panel and enter to settings. This is really anoying. Or maybe i have kosher model
Click to expand...
Click to collapse
Typically "full screen apps" have an option in settings to enable/disable that feature. In lenovo and moto camera if you tap the bottom where the back arrow should be it shows up and then you can exit.
famewolf said:
Typically "full screen apps" have an option in settings to enable/disable that feature. In lenovo and moto camera if you tap the bottom where the back arrow should be it shows up and then you can exit.
Click to expand...
Click to collapse
Well, i do not see that kind of option in app. Alcatels camera have back button, but not in lgcamera and few other apps unfortunatelly. So it seems that i have very strange version of android, or maybe those are the bugs that will dissapear after upgrade, if finally it will be released for my country. I believe that CM will be faster

Categories

Resources