How can I disable android from rebooting when the power button is pressed for few seconds? Is this done in software?
Context: my power button is broken. I tried to remap it by changing the relevant file (
/system/usr/keylayout/Generic.kl), I uncommented lines that dealt with POWER and changed VOLUME_UP key to power. Right now, pressing the power button doesn't lead to anything, and volume up button would actually power off the screen. But the old problem seems to happen once in a while.
I suspect if this feature was implemented in hardware because, after all the phone has to be turned on when the OS is not running. Still, is someone aware if a key in
Generic.kl corresponds to the reboot feature?