Remap power button - Android Q&A, Help & Troubleshooting

I just managed to remap my broken power button to my volume up button, so I am able to lock/unlock the screen. The problem is that it's still not possible to turn on the phone with the volumen button (shutdown/run out of battery). I changed the gpio-keys.kl and Generic.kl file for remapping. Anyone has a solution to replace the power button.

Zwingling said:
I just managed to remap my broken power button to my volume up button, so I am able to lock/unlock the screen. The problem is that it's still not possible to turn on the phone with the volumen button (shutdown/run out of battery). I changed the gpio-keys.kl and Generic.kl file for remapping. Anyone has a solution to replace the power button.
Click to expand...
Click to collapse
I really suppose it's not possible without changing the hardware or at least modifying the Bootloader.

LS.xD said:
I really suppose it's not possible without changing the hardware or at least modifying the Bootloader.
Click to expand...
Click to collapse
Another possible way is to invoke the charging screen. For example some Samsung devices use /system/bin/playlpm to display the splashscreen. SO if you change this script to:
Code:
[PHP][CODE]#!/system/bin/sh
/system/bin/reboot
[/PHP][/CODE]
It would actually reboot.

Related

[Q] Disable Power ON with Home Button?

Hi all,
the new Xperia Mini goes ON when i press the Home Button. (and with the Power Button too)...
Is there a way to disable Power ON with the Home Button?
Thanks!
Not that I know of. I actually like pressing the home button to turn on phone. Its more natural for me bc iv been using iphone for long time. To each his own I guess
Why is it you have a problem? just wonderin
Sent from my SK17i using XDA App
Too bad...
Using a Leather Case, and the Close "Button" is direct over the Home Button.
So everytime the Case is "Pressed" the Phone turns on.
ahhh i see. at least is minimal drain on the battery for lock screen to be on 10-20 sec.
but then again the battery life for xperia isn't all that great so i see your concern. guess back to playing the waiting game
Yes, but i like the Phone really!
Just wrote an eMail to SonyEricsson...
Brudertac try changing your leather case, solved.
Brudertac said:
Is there a way to disable Power ON with the Home Button?
Click to expand...
Click to collapse
Try this (you need to be rooted):
1. using root explorer or similar, go to folder /system/usr/keylayout, make sure the filesystem is mounted as R/W
2. edit file pm8058_keypad.kl
3. change the following line:
Code:
key 102 HOME WAKE_DROPPED
into this:
Code:
key 102 HOME
4. save the file, reboot and done

[Q] Remapping Hardware Keys?

My lock/power button is not working, is there any way i could make the camera button my new lock button? Oh and my phone isn't loading into a ROM so i need to do it via fastboot/adb. I know there's a file somewhere i can pull, but i have no idea where it is...
MrTheGeekGuy said:
My lock/power button is not working, is there any way i could make the camera button my new lock button? Oh and my phone isn't loading into a ROM so i need to do it via fastboot/adb. I know there's a file somewhere i can pull, but i have no idea where it is...
Click to expand...
Click to collapse
If your sig info is accurate (using viperROM) all you need to do is go into tweaks and set "wake phone with menu button"

Power button not mapped on RHOD500

Hello, I have just installed the latest NAND rom package (updated on 15-03-13) on my Telus RHOD500 and I'm having troubles with the power button (the button on top of the phone).
It's not mapped to anything once booted to Android. I mean I can access the recovery by pressing the Power button in miniPooploader so I know the key is not broken.
In android, quick pressing does not shut down the screen, long-pressing does no bring up the power menu and to wake the device up I have to use the End key.
A few times between boots when I would quick-press the power key it'll pop up the shutdown menu but now it's not doing anything.
I've installed Android Tuner, ES task manager and SetCPU on second reboot so these are the 2 application I installed that could come into problem before I noticed the problem. Uninstalling them doesn't do any good.
Also, where could I change the physical keyboard keymap? I got the underscore symbol mapped to letter "B" where it should be "P". It's not the only one of course but I don't find this too irritating so it's just a side-question like that.
Anyway thanks in advance!
psyko_chewbacca said:
Hello, I have just installed the latest NAND rom package (updated on 15-03-13) on my Telus RHOD500 and I'm having troubles with the power button (the button on top of the phone).
It's not mapped to anything once booted to Android. I mean I can access the recovery by pressing the Power button in miniPooploader so I know the key is not broken.
In android, quick pressing does not shut down the screen, long-pressing does no bring up the power menu and to wake the device up I have to use the End key.
A few times between boots when I would quick-press the power key it'll pop up the shutdown menu but now it's not doing anything.
I've installed Android Tuner, ES task manager and SetCPU on second reboot so these are the 2 application I installed that could come into problem before I noticed the problem. Uninstalling them doesn't do any good.
Also, where could I change the physical keyboard keymap? I got the underscore symbol mapped to letter "B" where it should be "P". It's not the only one of course but I don't find this too irritating so it's just a side-question like that.
Anyway thanks in advance!
Click to expand...
Click to collapse
You have to open the boot.img and edit the keyboard maps inside the ramdisk there to make them stick.
Look around post 47-50 for some ideas on what to edit.
http://forum.xda-developers.com/showthread.php?t=1965459
Good luck.
wizardknight said:
You have to open the boot.img and edit the keyboard maps inside the ramdisk there to make them stick.
Look around post 47-50 for some ideas on what to edit.
http://forum.xda-developers.com/showthread.php?t=1965459
Good luck.
Click to expand...
Click to collapse
Alright thank you. That will be good for the keyboard issue. Could it also fix the power button issue? Is the mapping of the keyboard is related to the mapping of other buttons?
So where can I find the boot.img file? Thanks!

[Guide] Replace MENU with Recent Apps on CM12.1

This guide is for the Note 3 Neo and should work on all variants.
If you're looking at this thread then you should have noticed that the Menu key on @FireLord 's CM12.1 is mapped to MENU and you can't change it from Buttons in Settings since it only has Power Button, Recents Button, Volume Button and Home button and no Menu Button.
Of course, there are a bunch of Xposed Modules such as MenuBegone available to do the same but if you'd rather not install anything or if you just like to mess with your phone then this is the guide to follow
So here's what you to do make your Menu key function as a Recent's key.
Download any Root Brower (I'd suggest the one included in Rom Toolbox)
Navigate to /system/usr/keylayout/Generic.kl
Open the File Generic.kl as a text file
Look for key 139 MENU in the list
Replace MENU with APP_SWITCH
Save and Reboot
Now your Menu key will function as a Recents Key and you'll also be able to change what tapping it and long-pressing it does through Buttons In Settings.
Thanks for the info.
but do you know how to enable vibration on them?
damadikaz said:
Thanks for the info.
but do you know how to enable vibration on them?
Click to expand...
Click to collapse
Oh I'm sorry, I'm afraid i don't know about that. All the vibrations are on and it seems only the Soft keys aren't vibrating. I'll fill you in if i do find something out though.
ICUDeadNaw said:
Oh I'm sorry, I'm afraid i don't know about that. All the vibrations are on and it seems only the Soft keys aren't vibrating. I'll fill you in if i do find something out though.
Click to expand...
Click to collapse
I've found temporary solution tbh, but it kinda weird. the softkey also vibrate when the screen is off.
http://forum.xda-developers.com/showthread.php?t=2152355
still searching for another solution tho.

[SM-G935] How do I remap my power button?

I want to remap the power button so it toggles NFC when I long press it (only when the screen is on). So far every app I've found is unable to do anything with the power button. I'm using a rooted Lineage OS 18.1.
task_manager said:
I want to remap the power button so it toggles NFC when I long press it (only when the screen is on). So far every app I've found is unable to do anything with the power button. I'm using a rooted Lineage OS 18.1.
Click to expand...
Click to collapse
Try this
Button Mapper: Remap your keys - Apps on Google Play
Remap hardware buttons to launch any app, shortcut or action
play.google.com
Keno_I said:
Try this
Button Mapper: Remap your keys - Apps on Google Play
Remap hardware buttons to launch any app, shortcut or action
play.google.com
Click to expand...
Click to collapse
Thanks, but that app doesn't work either. It says it can't modify the power button on the splash screen.
Would you want any other buttons, power button turns off the display so im not sure about NFC activating?
Keno_I said:
Would you want any other buttons, power button turns off the display so im not sure about NFC activating?
Click to expand...
Click to collapse
Lol, I know it sounds silly, but hear me out.
When you hold the power button the phone shows you a menu with the Power menu and, most importantly, card payment. As I don't want to keep NFC on all the time to avoid battery drain, I had an idea to turn on NFC every time I opened my Google Pay card payment menu (power button hold).
Ahh then you try finding an Xposed module?
You’ll find more chances of success in that way

Categories

Resources