How to disable the lock button on Xiaomi Android smartphones: all ways

Why users want to disable the physical lock button on Xiaomi

The power button on Xiaomi, Redmi and POCO has several functions: locking the screen, calling the reboot menu, activating the voice assistant. However, over time, it may start to stick, fail badly or fail altogether. Another common reason is the desire to switch to gesture control to reduce physical wear and tear.

You can’t turn off the hardware button completely (this is against Android’s security policy), but there are workarounds: you can reassign its functions to software alternatives, turn off the short press response, or even block it through an engineering menu. In this article, 5 working methods for different versions of MIUI (including MIUI 14/15 and HyperOS), as well as instructions for cases when the button is broken or the phone does not respond to presses.

⚠️ Important: some methods require superuser rights (root) or unlock the bootloader, this can lead to loss of warranty and risk of "bricking" the device.

Method 1: Reassign the lock function to gestures

The safest method is to use the built-in MIUI gestures to lock the screen.This doesn't disable the physical button, but minimizes its use.Suitable for all Xiaomi models on MIUI 12 and later, including the Redmi Note 12 Pro+, POCO F5 and Xiaomi 13T.

How to set up:

  1. Open Settings β†’ Screen β†’ Additional screen settings.
  2. Select Double-touch Lock and activate the switch.
  3. (Optional) Turn on the Wake Up to unlock the phone without a button.

Now, to lock the screen, you just need to touch the empty area on the desktop twice. To unlock, pick up the phone or press the screen (if configured).

Double-touch only works on the desktop (not in apps)

The feature may conflict with some shells (e.g. Nova Launcher)

On older models (until 2019) may require an update MIUI-->

Method 2: Disabling short pressing through button settings

MIUI has a hidden option to disable the reaction to a short press of the power button, which does not block it completely (a long press for the reboot menu will remain active), but prevents accidental locking of the screen.

Instructions:

  1. Go to Settings β†’ Special Options β†’ Physical buttons.
  2. Select the Power Button.
  3. Turn off the option Short press blocks the screen.
  4. Save the changes and restart the phone.

After that, a short press on the power button will not lock the screen, but a long press (to call the reboot menu) will remain working.This method does not require root rights and is suitable for most models, including the Redmi 10 and the POCO X3 Pro.

What if the "Physical buttons" item is not in the settings?
Some of the firmware (e.g., global versions) MIUI For Europe, this section may not be available. In this case, try: 1. Install regional firmware for China (via Mi Flash Tool). 2. Use ADB-command to disable (see Method 4). 3. Update MIUI Up to the latest version (in new builds, the option may appear).

Method 3: Using applications to reassign buttons

If the built-in settings don’t work, you can use third-party utilities, for example, the Button Mapper app (available on Google Play) allows you to reassign actions for hardware buttons, including the power button.

Step-by-step:

  1. Install Button Mapper from Google Play.
  2. Grant the application the rights Special features (in the phone settings).
  3. Select the Power button in the list of available buttons.
  4. Set up a new action (such as Do Nothing or Open an app).
  5. Save the settings and restart the application.

⚠️ Attention: MIUI 14/15 The HyperOS Button Mapper can run unstable due to system limitations, so try the alternative, Power Button to Volume Button (requires root).

AnnexNeeds root?Support for MIUIFeatures
Button MapperNo.Partial (up to MIUI 13)Simple interface, but limited features on new firmware
Power Button to Volume ButtonYes.Complete (including HyperOS)Allows you to reassign the power button to volume control
Tasker + Secure SettingsYes.Complete.Complicated setup but maximum flexibility

Method 4: Disable the button via ADB (without root)

If you don’t want root rights but are willing to use a computer, you can turn off the power button response via ADB (Android Debug Bridge), a method that works on most Xiaomi models but requires connecting the phone to a PC.

Instructions:

  1. Enable USB Debugging in the Developer Settings β†’ About Phone β†’ MIUI Version (click 7 times) β†’ Return to Additional Settings β†’ For Developers.
  2. Connect the phone to your computer and confirm the debugging permission.
  3. Open the command line (Windows) or terminal (macOS/Linux) and type:
adb shell settings put global power_button_behavior 0
  1. Reboot the phone.

This command turns off the standard behavior of the power button. To get it back, use:

adb shell settings put global power_button_behavior 1

⚠️ Note: on some models (e.g. Xiaomi) 12T This method may not work due to additional limitations. MIUI. In this case, try an alternative team:

adb shell settings put secure sysui_power_dialog 0

Reassignment to gestures

Disabling short pressing in settings

Use of third-party applications

ADB-team

Another option-->

Method 5: Completely disable the button through the engineering menu (for advanced)

Xiaomi smartphones have a hidden engineering menu (#4636##), but deep button settings will require access to Qualcomm Diag Mode or MTK Engineer Mode (depending on the processor).

For Qualcomm Snapdragon processors (most of Xiaomi’s flagships):

  1. Install the QTI EngineerMode app.
  2. Go to the Hardware Testing section β†’ Keys.
  3. Find the Power Key and set the Disabled value.
  4. Save the settings and restart the phone.

For MediaTek processors (many Redmi and POCO models):

  1. Enter the number ##36446337##.
  2. Go to Hardware β†’ Keys β†’ Power Key.
  3. Turn off the Enable Power Key option.

Attention! Incorrect actions in the engineering menu can lead to loss of functionality of other buttons or sensors.

πŸ’‘

If the engineering menu doesn’t open, try entering codes through Google’s Phone app (install it from the Play Market) rather than the standard MIUI dialer.

What to do if the button is broken and the phone does not respond

If the physical power button is completely out of order and you don’t have time to configure alternative locking methods, there are a few temporary solutions:

  • πŸ”Œ Use a charger: connect your phone to charge – on many Xiaomi models, the screen automatically turns on when you connect the cable.
  • πŸ“± Activate the voice assistant: Say β€œOK, Google” or β€œHey, Xiao” AI" (if configured) to unlock the phone with voice.
  • ⚑ Connect. OTG-keyboard: USB-OTG Adapter connect the keyboard – the Power button on it can work as an alternative.
  • πŸ”„ Hard Reset: Press the Volume Up + Power for 10-15 seconds to force the device to restart (works even when the power button is broken on some models).

If neither method works, there are two options:

  1. Take the phone to the service center Xiaomi to replace the button (the cost of repair – from 800 to 2500 rubles depending on the model).
  2. Disassemble your phone and clean/replace the button (requires skills and tools, such as solder and hair dryer for Redmi Note 11 and later).

πŸ’‘

In the models with AMOLED-screen (e.g. Xiaomi 13 Ultra or POCO F4 GT) You can use the "Always on Display" function" (AOD), It's a temporary solution, but it allows you to interact with your phone without unlocking it.

FAQ: Frequent questions about disabling the lock button on Xiaomi

Can I completely remove the power button programmatically?
No, you can't completely disable the power button without physical intervention (defeating the board), but you can reassign the function or turn off the response to presses through the engineering menu/ADB.
Will your fingerprint or Face Unlock work if you turn off the power button?
Yes, biometric unlocking works independently of the power button, and you can still unlock your phone in these ways, even if the button is disabled or broken.
How to return the standard behavior of the button after experiments?
If you've used ADB, Adb shell settings put global settings power_button_behavior 1 For Button Mapper, reset your settings in the app. If you've changed the engineering menu, return the settings to their original state or reset your phone to factory settings.
Why does the alarm clock not work after the power button is turned off?
The alarm clock may not work if the phone is completely dead or goes into deep sleep. To avoid this, turn on Settings β†’ Battery β†’ Battery Optimization β†’ Alarm clock and reminders and turn off optimization for the Clock app. Also make sure that Settings β†’ Apps β†’ AutoRun β†’ Clock has autorunning enabled.
Can I turn off the power button on Xiaomi with Magisk?
Yes, you can use Magisk to further customize button behavior. For example, the Power Button Toggle module allows you to completely disable your click response. Note what you will need: Unlocked bootloader. Installed Magisk (version 26.0+). Data backup (risk of crashes). After installing the module, restart your phone and check the settings in the Magisk menu.