[Q] Remapping of volume down key to power button - Nexus 5 Q&A, Help & Troubleshooting

Hi
I have a Nexus 5 and recently my power button started behaving all weird. I figured out that it's probably worn out and started registering presses at random times, sometimes rebooting the phone.
My solution was to use the double tap to wake kernel, but on lollipop it seems to drain a LOT of battery.
The next thing I thought of, was remapping the buttons, so that I can switch the function and use my volume down key as a power button, and the power button as a volume down button.
Went into system/usr/keylayout/ and edited the General.kl and replaced the 114 and 116 button codes, but it didn't seem to have any effect. Then I went into the other files and managed to get the volume down and power button not to work I did a restore, and everything is back to normal, but I couldn't achieve my goal
Also tried Button Remapper, but it didn't do anything.
Does anyone know how this can be achieved on Lollipop?
Thanks

Some ROM provide a volume rocker wake function.
Or if you're talking about to turn the phone on while its completely shut off or while in bootloader, then it'll never happen.

Lethargy said:
Some ROM provide a volume rocker wake function.
Or if you're talking about to turn the phone on while its completely shut off or while in bootloader, then it'll never happen.
Click to expand...
Click to collapse
OK about the Volume rocker wake, but I would need it to also put the phone to sleep, and also I want the power button to act as volume up/down(whatever).
Don't need it when the phone is completely off, just while it's on. Basically I'm asking which values to edit in order to completely swap the power and volume down buttons.

You need cataclysm rom... See the red arrows I drew on -
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from my Android 5.0 Nexus 5

Hey thanks for the solutions suggested, but I'm looking for a mod on stock Lollipop, rooted. Tried to modify the files in system/usr/keylayout but I always end up breaking the volume buttons and they do not wake up the device...Any other solutions?

NikolaMK said:
Hey thanks for the solutions suggested, but I'm looking for a mod on stock Lollipop, rooted. Tried to modify the files in system/usr/keylayout but I always end up breaking the volume buttons and they do not wake up the device...Any other solutions?
Click to expand...
Click to collapse
have you found a solution ?

Yes, CM12
Didn't find a way to do it on stock, manually, unfortunately

Related

[Q] Did anyone try that tweek in build.prop file ? from Samsung Vibrant tweeks

Hello
Tweaking build.prop file and adding the following :
"ro.config.hw_menu_unlockscreen=true"
To enable the menu button too unlock the phone
Did anyone try that with Nexus S ? I assume it can work
The thread is located in :
http://forum.xda-developers.com/showthread.php?t=1151608
Would be great to save the power button from braking up !!
Thanks
I'm pretty sure that since the nexus s has soft keys, it would only turn on if screen is on, the sgs has a hardware menu button that allows it to work and a framework that has the mod probably
Sent from my Nexus S using XDA App
noobiekins said:
I'm pretty sure that since the nexus s has soft keys, it would only turn on if screen is on, the sgs has a hardware menu button that allows it to work and a framework that has the mod probably
Sent from my Nexus S using XDA App
Click to expand...
Click to collapse
This is from Samsung Vibrant tweaks .. Which doesn't have a "physical" menu button !! it also has soft keys , but the way it is listed as "menu button" makes this quite sensible !
..
Election Day said:
This is already implemented in the latest CyanogenMod 9 ROM, and probably other ROM's too.
Click to expand...
Click to collapse
Can you elaborate more on this ?
..
Election Day said:
What more can I say?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
Ohhhh Thanks alot mate...
So now the menu soft button unlocks the phone exactly like the "physical" power button ? and when the device is unlocked , does the menu button works normally in bringing the usual menues ?
Thanks
Would you provide me with this ROM link ?
..
If I understand correctly, this will only allows pressing menu button to "unlock" the screen when keyguard is showing, but pressing menu button when screen is off will do nothing, right?
kοng said:
If I understand correctly, this will only allows pressing menu button to "unlock" the screen when keyguard is showing, but pressing menu button when screen is off will do nothing, right?
Click to expand...
Click to collapse
if this is the case , it would be useless .. Is it Election day ?
..

[Q] HTC 8X A&T semi-"bricked" - details - help?

Boy, I've read a ton about this issue and no one seems to be able to solve this exact problem.
Got my hands on an HTC 8X which, if left to run normally, just hangs on the at&t logo screen.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
And before you say anything, no, the hard reset doesn't work, because using the initial volume down/power procedure reboots the phone...the hard reset must be done from "off," not reboot. Plus, if the battery runs out entirely, the device will just enter the reboot cycle again when recharged. Just like the issue discussed here -> http://www.brighthand.com/default.asp?newsID=19892&news=windows+phone+8+bricked+htc+8x+nokia+lumia+920+microsoft+bricking
Now, I can reliably get the device to either the "flash settings" static screen, like this, almost every time I try doing volume up keypresses from boot:
...OR I can get it to the root system info screen, like this, almost every time I do some multiple volume down keypresses interspersed with an up keypress at boot, while connected to my computer via USB [if I disconnect, the screen changes to "serial"]:
However, I can't figure out how to bring it back from the dead.
Note that I am not a ROM cook and don't even own a Y-cable, so be gentle if you're going to talk about anything along those lines. However, any advice that isn't related to the hard reset? If so, thanks. If not, at least I've documented this specific "semi-bricked" state on here.
I know you don't want any advice related to the hard-reset method, but I am curious if you tried the following:
1. Run the phone down until the batter is 100% dead. (unresponsive when you hit the power switch.
2. While plugging in the power cable, press and hold the POWER and VOLUME DOWN buttons, Release them when you see an icon on the screen.
3. Then press the following hardware buttons in this sequence: VOLUME UP > VOLUME DOWN > POWER > VOLUME DOWN.
Let me know how you make out.
compu829 said:
I know you don't want any advice related to the hard-reset method, but I am curious if you tried the following:
1. Run the phone down until the batter is 100% dead. (unresponsive when you hit the power switch.
2. While plugging in the power cable, press and hold the POWER and VOLUME DOWN buttons, Release them when you see an icon on the screen.
3. Then press the following hardware buttons in this sequence: VOLUME UP > VOLUME DOWN > POWER > VOLUME DOWN.
Let me know how you make out.
Click to expand...
Click to collapse
Yep, I absolutely did that, but thanks. Did not work. Would only reboot the phone and lock it on the at&t screen again.
Sounds like no one can help here.
Without an At&t stock ROM, it will be tough to fix this.
What did you end up doing with your phone? Any luck?
Got the same problem on my HTC 8X AT&T. Got a RMA setup with HTC. What did you do?

Z3 froze

As the title stated. I have yet to do anything to my z3.
no root or anything....
Missed my two hours lecture because of it
the notification light is on and blinking but the phone itself will not respond when pressing the power button or double tapping the screen.
had to try pressing power button with volume up to hard reboot it (i don't know but it works, got this technique from rooting my S3)
Anyone with Z3 encountered this problem yet?
my model is D6603
william90130 said:
As the title stated. I have yet to do anything to my z3.
no root or anything....
Missed my two hours lecture because of it
the notification light is on and blinking but the phone itself will not respond when pressing the power button or double tapping the screen.
had to try pressing power button with volume up to hard reboot it (i don't know but it works, got this technique from rooting my S3)
Anyone with Z3 encountered this problem yet?
my model is D6603
Click to expand...
Click to collapse
Try the following step:
1). Remove your phone case/cover if you have one
2). Open the MicroSD/NanoSim Flap
3). Get a pin and push the small emergency off button which is yellowish ; Example below
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hussain_Salam said:
Try the following step:
1). Remove your phone case/cover if you have one
2). Open the MicroSD/NanoSim Flap
3). Get a pin and push the small emergency off button which is yellowish ; Example below
Click to expand...
Click to collapse
Umm..What exactly does the button do when you press it?
I didn't have to pressed the yellow button to fix it but simply by pressing volume up and power button.
Was asking if anyone has the same experience cuz im worried about mine being defective, only had it for 2 months i think
It happened for me just one time, i had it for 3 weeks. Anyway that button simply does forces the phone shut down, it also works if you are stuck in the bootloader
Syzew said:
It happened for me just one time, i had it for 3 weeks. Anyway that button simply does forces the phone shut down, it also works if you are stuck in the bootloader
Click to expand...
Click to collapse
You had it for three weeks??
Could you be more specific?
THX
I had the Sony Xperia Z3 for three weeks, there was a ram overuse and it froze, i put that button and it turned off.
Syzew said:
I had the Sony Xperia Z3 for three weeks, there was a ram overuse and it froze, i put that button and it turned off.
Click to expand...
Click to collapse
It happened to me once since Sp. '14 and reset button solved the issue...
It simply forces a shutdown, It won't affect your data, i believe it will vibrate 3 times once it shuts off or something like that

Samsung Galaxy S7 Edge app to re-map power button to volume up or volume down?

Hello,
I have a small problem. My phone power button is damaged therfore pressing it is hard (works but poorly).
I need now to re-mail the power button so i can turn off screen when i need.
Can you recommend app that can do that.
I did get app named as volume powr but it seems buggy and app named buttons re-mapper seems to be also buggy.
Use Nova Launcher. It is the best Launcher out there (even better than the stock ones) and you can turn off screen by a gesture of your choice (e.g. double tap on homescreen).
Cocliosttro said:
Hello,
I have a small problem. My phone power button is damaged therfore pressing it is hard (works but poorly).
I need now to re-mail the power button so i can turn off screen when i need.
Can you recommend app that can do that.
I did get app named as volume powr but it seems buggy and app named buttons re-mapper seems to be also buggy.
Click to expand...
Click to collapse
Some ROMs allow eg double tap on the status bar to switch off. BatMan/SuperMan do that.
Button Mapper does exactly what you need - like you I had some issues with it, related to its occasionally not working. This was due to it being dozed by the OS (need to stop it being optimised) and by Greenify (again, exclude it). There is a Button Mapper thread in Apps & Games here in XDA, check it out. You'll get a lot of support there, the dev visits regularly.
What is your Android version and number?
In system info (in phone) shows Android 7.0
Cocliosttro said:
In system info (in phone) shows Android 7.0
Click to expand...
Click to collapse
And check please ( Build Number)
Check this Mod
For me i like it sooo much.... I downloaded from 4pda
Make clock in status bar in the middle and have also power off when you press on the right side( long press open menu for: shutdown or restart or safe mode)
But make sure your Android version and build Number the same!!
Just download and install the file and make restart
PS: any promises I'm not responsible about it
And this is the link for the mod
http://www14.zippyshare.com/v/9mhmLnvA/file.html
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Is this for nougat 7.0 for any build number? Thanks
fahric74 said:
Is this for nougat 7.0 for any build number? Thanks
Click to expand...
Click to collapse
It's for Android 7
And should be the same build Number!
If not same build Number you will face very big problem

Themes / Apps / Mods [Magisk] [Module] Play/Pause Assistant Button Remap + Customize Instructions

Working on a Stock A12 Motorola ROM with Magisk 25. Installed through local storage magisk module section.
No need to install Button Mapper, Tasker, or any other asstant remapper unless you want some extended functionality or to verify what your button is being interpreted as.
So, this is basically Suyooo's Module but I included more information depending on what you want the button to function as.
The zip file contains a module that is set to replace the assistant button with a play/pause button.
If you look at the android KeyEvents list, you can find all sorts of functions you could replace the button with.
To edit the functionality, open a text editor like Notepad++ and go to:
Code:
\system\usr\keylayout\gpio-keys.kl
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
For the Moto G100, the 217 key is assigned to the ASSIST command, but has been changed by me to the MEDIA_PLAY_PAUSE command.
If you are copying from the Android KeyEvents list from earlier, make sure to remove the "KEYCODE_" portion from the command.
Once you are done, just drag onto your device and install via the Magisk Module section.
How could I set it to turn the flashlight on and off? or else to turn do not disturb mode on or off? (sorry for my bad english, I still don't know it well)
If I look at the contents of gpio-keys.kl, I see six key lines.
Apparently key 127 is what is now mapped as the horrible assistent key.
If that is the only one I want to remap, what are the other five lines doing?
Where on my phone are key 102, 528 and 766? I only see four keys (volume up, volume down, power, assistant).
gewe said:
If I look at the contents of gpio-keys.kl, I see six key lines.
Apparently key 127 is what is now mapped as the horrible assistent key.
If that is the only one I want to remap, what are the other five lines doing?
Where on my phone are key 102, 528 and 766? I only see four keys (volume up, volume down, power, assistant).
Click to expand...
Click to collapse
Vol +- are the volume keys, focus and camera are usually buttons that are on wired/wireless headsets, along with play/pause. The phone really only has 4 physical buttons, but allows for these inputs so I made sure to map them manually. If you want to remove the other button codes you can it should still work.

Categories

Resources