How to Disable Hardware Buttons on Android

Typically Android devices have three hardware buttons (volume buttons (also called as Volume Rocker) and a power button).

If you want to disable those hardware buttons for some reason, then you can do it on both the rooted and non-rooted Android devices.

But before you going through the steps, I want to give some suggestions:

Don’t disable power button. Yes, don’t do it because it is risky. Disabling volume buttons are not risky. But the power button is. So, unless you have a good reason to disable power button, don’t do it.

If you have decided to disable power button, check out and implement the steps in this article on your device to wake up your device without power button.

Well, that’s all the suggestions I have. Let’s see the steps to do this task.

Disable Hardware Buttons on Android

Rooted and Non-Rooted Android Devices


Install and open “Button remapper (no root)” app.

Tap the Switch and then “Continue” button. Now enable the Accessibility services for the app.

We need to create action separately to disable each hardware button.

Tap “+” icon and then “Short and long press” option.

Short and long press option

Select Volume up from Key drop-down list and Do nothing from Action drop-down list.

Selected Volume Up and Do nothing

Tap + and Short and long press option again.

Select Volume down from Key drop-down list and Do nothing from Action drop-down list.

Both the volume buttons are disabled now.

Here is an important thing to note: the free version of this app allows you to create two actions only. If you need to create more, then you need to get premium version.

I don’t recommend disabling power button. And, note that disabling power button using this app doesn’t work on most of the devices.

I tried it and it didn’t work on my device. If you are willing to give a try on your device, then here are the steps you need to follow:

Tap + and Short and long press option.

Select Other from Key drop-down list and then choose Power option.

Now choose Do nothing from Action drop-down list. Tap OK.

Selected Power button and Do nothing

Hopefully, your device’s power button is disabled now.

If you want to enable hardware buttons, then just delete the action (Long press the action and then tap Delete option).

Rooted Android Devices Only

If you wonder about your device’s root status, then I suggest you to check out this article.

Also, I suggest you to install this app which helps to reboot your device. You will need it while enabling power button.


Install and open ES File Explorer app.

Tap Hamburger icon and select Local.

Tap Device.

Now go to the following location: system > usr > keylayout

Here is an important thing to note: If you have a MediaTek device, you need to edit the mtk-kpd.kl file. If you have a non-MediaTek device, then you need to edit Generic.kl file. If you wonder your device is MediaTek or not, then check out this guide.

Make sure to take a backup of the file before making any changes.

In this instance, I’m using MediaTek device. Tap mtk-kpd.kl file, choose Text and then ES Note Editor.

Now hit the Overflow menu (three vertical dots) at the top.

Tap Edit.

Find the following lines of code:



Key 116 POWER

mtk-kpd.kl file containing hardware buttons code

Now put the pound sign (#) before all the above code (see below screenshot):

#Key 115 VOLUME_UP


#Key 116 POWER

Putting pound sign before hardware buttons code

Tap Back key and tap “Yes” on the confirmation message.

Restart your mobile to apply the changes you have made.

That’s it. All the hardware buttons on your Android device are now disabled.


If editing the above-mentioned files doesn’t disable buttons, then go ahead and edit the other files in the “keylayout” folder which have the above-mentioned lines of code.

Make sure to take a backup of the file before making any changes.

If you want to enable all the hardware keys back, then just remove # from all the code above, save the file and reboot your device.

If you have disabled the power button, then you can’t restart your device using power off menu. So just use the restart app (that I’ve mentioned earlier to install) to do this reboot work.

Final Thoughts​

In the case of volume buttons, we disabled its functionality. But, not the volume functionality from the entire device. The thing is that you can still use other app to control your device volume.

Also see:​

How to Enable and Disable Capacitive Buttons on Android

How to Enable Soft Keys (On-Screen Buttons) on Android

Scroll to Top