I want to completely disable the three on-screen buttons (Back, Home, Recents) and any other hardware button. I am aware that I cannot do this from the application since that would be a major security flaw. How would I do this to a device assuming that I have the device on hand? Gain root access and then how would this go?

Ps: What I am trying to do is to have the app run on my tablet on a kiosk and I do not want the users to pressing any buttons.


Full!screen has a (paid-for) feature where you can automatically hide system bars in certain apps and unhide them in other apps, but there is a free version without the automation.

Alternatively, you can hide them completely over ADB (source) with:

adb shell
pm disable com.android.systemui

Or (if you're writing your own app) you can use this code (source):

private void hideNavigationBar(){
        try {
            Process process = Runtime.getRuntime().exec("su");
            DataOutputStream os = new DataOutputStream(process.getOutputStream());
            os.writeBytes("pm disable com.android.systemui\n");
        } catch (InterruptedException e) {
        } catch (IOException e) {

Kiosk Browser Lockdown also has a feature where you can disable all system dialogs (volume, long-press power etc.)

| improve this answer | |

Using the Xposed Framework and Xposed Additions you can remap any button to any action, and in your case the 'No action'.

Combining this to disable all your hardware buttons with this answer, and you would achieve what you want.

Open the app and follow these steps:

  1. Click on Buttons
  2. Click Add new Key
  3. Press the key you want to disable
  4. Press OK
  5. Click the key in the list and for every condition assign the Disabled action
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.