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.
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:
- Open Settings β Notification panel and status bar.
- Select Notification Panel Management (or Quick Settings).
- Find the Lock Tile (locked icon) and drag it to the active area.
- 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 model | Supported blocking gestures | Notes |
|---|---|---|
| Redmi Note 12, POCO X5 | Double touch, swipe sensor. | Gestures only work on the main screen |
| Xiaomi 13/13 Pro | Swipe down two fingers | Requires MIUI 14 or newer |
| POCO F4 GT | Only double-touch. | The gesture is turned off when connecting the gamepad |
| Redmi 10A, Mi 10T Lite | No 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?
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:
- Enable USB Debugging in Settings β About Phone β MIUI version (click 7 times, then go back to Additional Settings β For Developers).
- Connect your phone to your PC and execute the command: adb shell settings put global power_menu_lockscreen true
- 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 cause | Decision |
|---|---|---|
| No widget added | Limitations of corporate policy | Turn off device management in Settings β Accounts β Delete work account |
| The button in the notification panel disappears | Resetting tiles settings | Reboot your phone and add the tile again. |
| ADB-command is not applied | There is no debugging on USB | Check the connection and repeat the command with administrator rights on the PC |
| Gestures don't work. | Conflict with protective glass | Recalibrate 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.