How to display the lock button on the screen Xiaomi: all ways for MIUI

Are you tired of constantly reaching for a physical power button on Xiaomi to lock the screen? or want to speed up the locking process with a single touch? The lock button on the home screen is a handy solution that many users have come up with. MIUI In this article, we will discuss all working methods for adding a virtual lock button, including hidden shell functions, third-party applications and even ADB-Teams for Advanced Users.

It’s important to understand that Xiaomi regularly updates the MIUI interface, and the location of some options may change. We tested all methods on the latest firmware versions (up to MIUI 14 inclusive) and indicated which methods work on Android 10-14. If you have an older model (for example, Redmi Note 5 or Mi 8), some features may not be available – for such cases we have prepared alternative solutions.

1. Standard method: Screen lock widget in MIUI

The easiest method is to use the built-in screen lock widget, which is available in the latest versions of MIUI. It does not require superuser rights or third-party apps, but it must be activated in the settings first.

To add a widget:

  • πŸ“± Long pressing in the free place of the main screen β†’ select Widgets.
  • πŸ” Scroll through the list to Tools (or Utilities in some versions).
  • πŸ”’ Find the screen lock widget (in English – Screen Lock) and drag it to the desktop.
  • βš™οΈ When you first use it, you may need to confirm the permission to block (click Allow).

If the widget is not listed, it means that your version of MIUI does not support it, so move on to the following methods. Also note that on some models (for example, POCO F3 or Redmi K40), the widget may be called Quick Lock.

⚠️ Note: The lock widget does not work on locked devices with corporate policies (for example, if the phone was issued by the employer.

πŸ“Š What kind of smartphone you Xiaomi?
Redmi Note Series Series Series
POCO F/Pro/X Series
Mi 11/12/13 series
Other Xiaomi/Redmi/POCO

2. Quick lock through the notification panel

If the widget is not available, you can use the notification bar to instantly lock, which works on all Xiaomi devices without exception, but requires one additional action in the settings.

Instructions:

  1. Open Settings β†’ Notification panel and status bar.
  2. Select Notification Panel Management (or Quick Settings).
  3. Find the Lock Tile (locked icon) and drag it to the active area.
  4. Now, when swiping down, just press this tile to block the screen.

The advantage of this method is speed: locking occurs in one touch, without having to unlock the phone to access the widget. However, the notification panel is not always convenient to open with one hand on large smartphones (for example, Xiaomi 13 Ultra or POCO F5 Pro).

Check the version of MIUI (Settings β†’ About the phone)

Update the firmware to the latest version

Make sure there are no corporate restrictions

Backup of important data (in case of resetting)-->

3.Use of gestures to lock the screen

MIUI supports lock gestures that can be customized instead of a virtual button, a technique that is suitable for users who prefer intuitive movements over searching for widgets.

How to set up:

  • πŸ‘† Go to Settings. β†’ Additional settings β†’ Gestures (or Settings) β†’ Screen. β†’ Gestures in new versions).
  • πŸ”„ Choose Double Touch to Lock or Swipe down with two fingers (not available on all models).
  • βœ… Turn on the switch and test the gesture on the main screen.

Some devices (e.g. Redmi Note 10 Pro) have a swipe gesture on the fingerprint sensor to lock, which is convenient if the sensor is located on the back, but gestures can be triggered accidentally, for example, when reading or scrolling through the tape on social networks.

Xiaomi modelSupported blocking gesturesNotes
Redmi Note 12, POCO X5Double touch, swipe sensor.Gestures only work on the main screen
Xiaomi 13/13 ProSwipe down two fingersRequires MIUI 14 or newer
POCO F4 GTOnly double-touch.The gesture is turned off when connecting the gamepad
Redmi 10A, Mi 10T LiteNo built-in gestures.Use a widget or third-party apps

4. Third-party applications to add a lock button

If the built-in methods don't work, you can install specialized tools from Google Play, and we tested a few apps and selected the most reliable ones:

Top.-3 lock-button:

  • πŸ›‘οΈ Lock Screen Widget is a minimalist widget with a button appearance setting.
  • ⚑ Quick Lock β€” adds tile to the notification bar and a widget to the desktop. ROOT.
  • πŸ”§ Tasker is for advanced users, allowing you to create a lock button with additional actions (for example, turning off Wi-Fi when blocking).

Check reviews before installing: some apps may contain ads or request unnecessary permissions. For example, Lock Screen Widget requires access to Android Control (to lock the screen), but should not request access to contacts or SMS.

⚠️ Note: Screen locking applications may conflict with the β€œApp Protection” function in the MIUI. If the button does not work after installation, disable the protection for this application in Settings β†’ Annexes β†’ Permits β†’ Auto-start.

How to check the security of the application before installation?
1. Open the app page in Google Play. 2. Scroll to the "Resolutions" block - there should only be "Manage Android" (to block). 3. Check the date of the last update: if the app hasn't been updated for more than a year, it may not be compatible with new versions of MIUI. 4. Read negative reviews - often there are problems with advertising or bugs.

5. Advanced method: Adding a button via ADB

For users willing to work with ADB, there is a way to add a lock button to the power menu (which opens with a long press on the power button), which does not require ROOT, but requires basic command-line knowledge.

Instructions:

  1. Enable USB Debugging in Settings β†’ About Phone β†’ MIUI version (click 7 times, then go back to Additional Settings β†’ For Developers).
  2. Connect your phone to your PC and execute the command: adb shell settings put global power_menu_lockscreen true
  3. Now, with a long press on the power button, the β€œBlock” option will appear in the menu.

This method works on all Android 10+ devices, but has a limitation: the button appears only in the power menu, not on the home screen, but does not require the installation of third-party applications and does not affect performance.

πŸ’‘

If the team ADB Try to run adb shell settings delete global. power_menu_lockscreen, Then repeat the main command. This will reset the possible configuration conflicts.

6.Alternative solutions: voice commands and smart devices

If you need maximum automation, consider voice locking or integration with Xiaomi smart devices:

  • 🎀 Google Voice Assistant: Say, "OK, Google, lock the screen." You need to turn on voice control in the Google Assistant settings.
  • πŸ”Œ Xiaomi Smart Button (e.g. Mi Smart Button): Link it to the lock screen via the Mi Home app.
  • ⌚ Smart watch or bracelet (such as Mi Band 7): In some firmware, you can set up double-pressing of the bracelet screen to lock your phone.

These methods are useful if you use voice commands or wearables frequently, but they depend on the stability of Bluetooth connections and may not work when the signal is weak.

7. Problem Solving: Why the Lock Button Doesn't Work

If none of the methods worked, check the following points:

Problem.Possible causeDecision
No widget addedLimitations of corporate policyTurn off device management in Settings β†’ Accounts β†’ Delete work account
The button in the notification panel disappearsResetting tiles settingsReboot your phone and add the tile again.
ADB-command is not appliedThere is no debugging on USBCheck the connection and repeat the command with administrator rights on the PC
Gestures don't work.Conflict with protective glassRecalibrate the sensor to Settings β†’ Screen β†’ Calibration

On devices with unlocked bootloader and custom firmware (such as Pixel Experience or LineageOS), standard MIUI methods do not work, in which case use applications like QuickLock or customize gestures in custom firmware settings.

πŸ’‘

The most universal method is a lock tile in the notification bar, which works on all versions of MIUI and does not require additional applications or permissions.

Frequently asked questions

Can I add a lock button to the lock screen?
No, for security reasons, MIUI does not allow you to add active elements to the lock screen, the button can only be located on the home screen, in the notification bar or in the power menu.
Why did the lock button disappear after the MIUI update?
Updates often reset widgets and tiles. After the update, add the widget or tile again to the notification bar. If the method has stopped working at all, check if it has been removed from the firmware (relevant to MIUI 14 on some models).
Is it safe to use ADB to add a button?
Adb shell settings put global power_menu_lockscreen True only adds an option to the power menu and does not affect system files. ADB-commands from unreliable sources – they can disrupt the phone.
Can I assign a screen lock to the volume button?
No ROOT-I can't do that. I can't do that. MIUI This will require the installation of custom firmware or Xposed module (for example, Button Mapper).
Does the lock button work on devices with an always-on display (AOD)?
Yes, but with nuances: if you use a widget, it will be visible on the screen. AOD, But locking still requires unlocking the phone (like swiping up), and the tile in the notification panel and gestures work regardless of the size of the device. AOD.