How to lock Xiaomi smartphone if the power button does not work: the complete guide

A broken power button on Xiaomi is a problem that many users face after a year or two of active use. The button can stick, stop responding to presses or completely fall off after a fall. But what if you urgently need to lock the screen and the mechanical button does not work? In this article, we will examine all possible ways, from built-in MIUI functions to technical solutions using ADB.

It's important to understand that locking the screen without the power button depends on the firmware version, the smartphone model and the current state of the system. For example, on the Xiaomi Redmi Note 10 Pro with MIUI 14, gestures are available that are not available on older versions like MIUI 11. We will look at universal methods, and also point out nuances for specific devices.

If your smartphone is discharged or completely turned off, some of the ways will not be available β€” in this case, you will need hardware repair or connection to charge, followed by the use of alternative locking methods, but in 90% of cases the problem is solved software.

1. Use of a screen lock gesture (for MIUI 12 and later)

Starting with MIUI 12, Xiaomi added a hidden dual tap lock feature, similar to the famous gesture on the Nexus and Pixel, but by default it is disabled. Here's how to activate it:

  1. Open Settings β†’ Special Features β†’ Gestures and Movements β†’ Double-touch to lock.
  2. Turn on the "Double touch to lock" switch.
  3. Test the feature: Twice tap the empty space on the home screen or in any app (except the keyboard).

If the item is not on the menu, then your firmware does not support the function, in which case try alternative methods from the following sections.

πŸ’‘

On some models (e.g. POCO F3), the gesture only works on stock firmware, and once custom ROMs like the Pixel Experience are installed, the function may be lost.

  • βœ… It works on: Redmi Note 11/12, POCO X4 Pro, Xiaomi 12/13 s MIUI 12+
  • ❌ Does not work on: devices with MIUI 11 and older, and on Black Shark
  • πŸ”„ Alternative: Swipe down the screen gesture (should be included in Settings) β†’ Lock screen β†’ Additional settings)

2. Block through the notification panel (the fastest way)

The most obvious, but often ignored, way is to use the lock button in the notification bar, which is available on all Xiaomi smartphones regardless of the firmware version:

  1. Swipe your finger down from the top of the screen to open the notification bar.
  2. Find the "Block" icon (usually in the lower right corner next to the brightness).
  3. Click on it – the screen will immediately lock.

If no button:

  • πŸ”§ Go to Settings. β†’ Notification panel β†’ Edit the Quick Settings Panel.
  • πŸ”„ Find the β€œBlock” icon and drag it to the active area.
  • πŸ“± On some models (e.g. Redmi) 9A) button hidden – try swiping the panel to the left to display additional icons.
πŸ“Š What kind of lock you use more often?
Power button
Double-tapa gesture
Notification panel
Voice assistant
Other

An important nuance: if the smartphone is connected to charging, the lock button in the notification panel may disappear. This is due to the settings "Unlock when connecting charging" in Settings β†’ Lock screen β†’ Additional.

3. Voice command via Google Assistant

If your Xiaomi has Google Assistant installed (or Alice from Yandex), you can block the screen with a voice, which works even if the power button is completely broken:

  1. Activate voice assistant: For Google Assistant: say "OK, Google" or hold the Home button (if you have one). For Alice, say "Alice" or click on the Yandex widget.

Tell the team:

  • πŸ—£οΈ "Block the screen (for Google Assistant).
  • πŸ—£οΈ "Lock the phone" or "Switch off the display" (for Alice).

If the assistant answers that he cannot execute the command:

  • πŸ”§ Check the permissions: Settings β†’ Annexes β†’ Google (or Yandex) β†’ Permits β†’ Special access β†’ Gesture management.
  • πŸ”„ Reinstall the assistant app.
  • πŸ“± In some models (for example, POCO M4 Pro) voice lock disabled by default due to security policy.
Why does the voice assistant not block the screen?
On smartphones with MIUI 13+ and Android 12+, Google has restricted access to locking functions for security reasons. If your Xiaomi is upgraded to the latest version, this method may not work. Alternatively, use Tasker or Automate to create an automatic task.

4. Blocking through ADB (for advanced users)

If the software methods don’t help, you can lock the screen via Android Debug Bridge (ADB).This requires pre-configuration, but works on 100% of Xiaomi devices (if USB debugging is enabled).

Preparation:

  1. Turn on Developer Mode: Go to Settings β†’ About Phone β†’ MIUI Version. Click on MIUI Version 7 times until the notification β€œYou are a developer!” appears.

Activate the debugging via USB:

  • Go to Settings. β†’ Additionally. β†’ For developers.
  • Turn on the USB debugging switch.
  • Connect your smartphone to your PC and confirm your trust in your computer.

Commands for lockdown:

adb shell input keyevent 26 # Simulating the power button


adb shell dumpsys power set-screen-state 0 # Forced screen shutdown

If the commands don't work:

  • ⚠️ Make sure that MIUI Optimization is disabled in the developer settings (can block) ADB-team).
  • πŸ”§ Try the alternative command: adb shell input keyevent KEYCODE_POWER.
  • πŸ“± On some models (e.g. Xiaomi) 11T) Requires unlocking of the loader.

Developer mode enabled |Debugging by USB|Installed ADB drivers on PC|Smartphone connected via original cable |Allowed trust in PC-->

5. Automatic locking by timer

If the power button is broken but the smartphone is still working, set up automatic locking after a certain interval of inactivity. This will not replace manual locking, but will reduce the risk of accidental pressing:

  1. Go to Settings β†’ Lock screen β†’ Autolock.
  2. Choose the minimum time of 15 seconds or 30 seconds.
  3. Activate the β€œBlock when you press the power button” option (yes, it works even if the button is broken – the system emulates the press).

Xiaomi with MIUI 14+ has a hidden function called "Pack Lock" that works on the proximity sensor. To turn it on, run the command in ADB:

adb shell settings put secure pocket_mode 1
Xiaomi modelMinimum Auto-Block TimeSupport for pocket sensor
Redmi Note 10/1115 seconds.Yes (ADB requires)
POCO X3/X430 secondsNo.
Xiaomi 12/135 secondsYes (includes in settings)
Redmi 9/9A1 minuteNo.

πŸ’‘

Autolocking does not replace manual locking, but it reduces the risk of battery drain and accidental pressing. For maximum safety, combine it with a double tap gesture.

6. Screen lock applications (decision side)

If the built-in methods don't work, install a third-party app. The best options for Xiaomi are:

  • πŸ”’ Gravity Screen – locks the screen when placed in a pocket or on a table (using a proximity sensor and an accelerometer).
  • πŸ–οΈ Tap, Tap – Double-touch lock (similar to built-in function, but with advanced settings).
  • πŸ€– MacroDroid – creates automatic rules (for example, locking when connecting to Bluetooth headphones).

How to set up Gravity Screen:

  1. Install the app from Google Play.
  2. Open it and grant permissions for special access (to work with the lock screen).
  3. Enable the options: "Blocking when stowed in a pocket" (using the proximity sensor). "Blocking when placed on a table" (accelerometer sensor).

⚠️ Note: Apps like Gravity Screen require constant back-up, which can increase battery consumption by 5 to 10 percent. MIUI Application may close – add it to exceptions in Settings β†’ Battery β†’ Optimizing the battery.

7 Hardware Solutions: What to Do When Nothing Helps

If the software methods don’t work, the problem may be:

  • πŸ”‹ Battery discharge (smartphone does not respond to commands).
  • πŸ› οΈ Damaged power button plume (requires repair).
  • πŸ”„ Firmware failure (reset or flashing is needed).

Interim decisions:

  • πŸ”Œ Connect your smartphone to charging – sometimes it allows you to β€œwake up” the system and use software methods.
  • πŸ”„ Reboot the device through ADB: adb reboot
  • πŸ“± If the screen responds to touch, try calling Safe Mode (hold the β€œStop” button in the power menu) – it turns off third-party apps that can block gestures.

Permanent decisions:

  • πŸ› οΈ Replacement of the power button – costs 500-1500 β‚½ service-centre.
  • πŸ”§ Flashing – if the problem is in the software (for example, after a failed update).
  • πŸ“² Using a smartphone without a power button – if you have set up alternative locking methods, you can use the device further (but the risk of accidentally unlocking remains).

⚠️ Attention: On Xiaomi with AMOLED-If the power button breaks, try to lock the screen at least once every 10-15 minutes.

FAQ: Frequent questions about locking Xiaomi without a power button

Can I block Xiaomi via SMS or call?
No, Xiaomi doesn't support SMS or incoming call blocking, but you can use apps like Tasker to create an automatic task, like blocking a missed call from a certain number, which requires: Install Tasker and Secure Settings plugin. Create a profile with a missed call trigger. Add a screen lock action via Secure Settings. The downside is that you need to grant permission for special access, which may not be secure.
Why did the MIUI update stop working?
In the new versions MIUI 13/14 Xiaomi has removed or limited some gestures due to the security policy of Android 12/13. To return the function: Try resetting your gesture settings in Settings β†’ System system β†’ Resetting settings β†’ Reset your gesture settings. Install Xiaomi.eu, which brings back many of the remote features. ADB, To force the gesture: adb shell settings put secure double_tap_to_lock 1
How to unlock Xiaomi if the screen is locked and the power button is not working?
If your smartphone is locked (for example, after an automatic lock) and the power button does not respond, try it: πŸ”Œ Connect charging – sometimes the screen turns on automatically. πŸ“ž Call your smartphone from another phone – an incoming call can wake up the screen. πŸ”„ If debugging is on USB, Connect to your PC and execute: Adb shell input keyevent 26 πŸ› οΈ In extreme cases, disassemble the smartphone and disconnect / connect the battery (requires skills).If nothing helps, you will need to repair the power button or the plume.
Does this work on POCO and Black Shark?
Yes, but with reservations: POCO (X3, X4, F3 Support all methods except voice-blocking through Alice (no pre-installed assistant). Black Shark (4, 5) - double-tape gesture disabled by default, and ADB-The commands may require unlocking the bootloader. Black Shark also has a unique "Game Space" feature that can block lock gestures. Turn it off in Settings. β†’ Playing space.
Can I set the lock by fingerprint on the screen turned off?
No, the fingerprint scanner on Xiaomi only works when the screen is on. However, you can use a workaround: Set up a double tap gesture to lock (as in the first section). Once you lock the screen, the screen will be turned off, but when you press the power button (even a broken one) or connect the charging, you can immediately unlock the phone with a fingerprint. On some models (for example, Xiaomi Mi 11), the function "Unlock when lifting" works - the screen is activated when you take the smartphone in your hand, then you can immediately use the fingerprint.