3

My Nexus S has a broken power button that some days works fine, some days doesn't work at all, but most days just acts up and will randomly turn my phone on, even when it's sitting on the table.

I'm running a CyanogenMod 10.1 nightly on it. Through ButtonRemapper, I've mapped the soft search button to act as a power button, and enabled the volume buttons to turn the phone on. Thus, I have no need to use the power button anymore, and it is just annoying.

Is there a way I can disable (without hardware modifications) the power button? ButtonRemapper doesn't have in its options the ability to change it, and I've had no luck trying to modify the keymap files.

Any help is appreciated!

2 Answers 2

2

Xposed Additions Method

For this, you will require root:

  1. Install the latest version of BusyBox. If you are having trouble with that installer, you can use an alternate BusyBox installer like BusyBox Installer.

  2. Install the latest version of Xposed Installer.

  3. Install the Xposed Additions module (Play Store)

  4. Activate the module via Xposed Installer > Modules > [tick the box next to Xposed Additions].

  5. Install the framework via Xposed Installer > Framework > Install/Update.

  6. Reboot. A soft reboot is sufficient, but if it doesn't work, try a full reboot.

  7. Xposed Additions > Buttons > Add New Button > (press the hardware button(s) you want to reconfigure, then tap OK].

  8. Now, under Xposed Additions > Buttons, the buttons you have added will be there. Tap on the Power entry in the list. From here, you can configure the button to have no action on both screen on, screen off, and lock screen (if necessary). You can change each Click and Long Press action to do nothing.

Note: This will only prevent the power button's action while Android is running. This will not affect your button configuration while your device is (a) powered off, (b) in bootloader/download mode, or (c) recovery mode.

IMPORTANT: Make sure you have an alternate power button configured, or you may have no way to turn your screen on without a reboot! If this happens, reboot the phone, then add an alternate button to power on your device.

1
  • 1
    Thanks! This worked great. Note that you have to add (disabled) actions for all the possible options to actually disable the power button. This confused me briefly. May 28, 2015 at 14:56
0

There is no way to disable the power button thru software

Because power button signals is hardwired to the phone's internals. Hardware modding is the only option for this happen

I suggest getting that button repaired. Its not really expensive (250Php equivalent to 6$ USD), and can be done quite fast. Not sure about official service centers though

2
  • 3
    It is hard wired to the phone's internals, but the software still decides what to do when it receives that signal. I.e. when in clockwork mod, pressing the power selects an option, not shutting the screen down as when booted into android. I just want a way for android to ignore presses from the power button, if that makes sense.
    – penguinrob
    Mar 13, 2013 at 20:32
  • 1
    All buttons are 'hard-wired' - that's how the phone knows whether the button is pressed or not. But it's just a button.
    – user5506
    Jun 15, 2013 at 11:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .