Remap power button

Search This thread

Zwingling

Member
May 5, 2014
5
0
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.
 

LS.xD

Senior Member
Nov 7, 2013
3,151
1,049
Luebeck
OnePlus 3
Xiaomi 11T Pro
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.


I really suppose it's not possible without changing the hardware or at least modifying the Bootloader.
 

Zwingling

Member
May 5, 2014
5
0
I really suppose it's not possible without changing the hardware or at least modifying the Bootloader.

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.