How to set a password to open the application on Xiaomi: all ways

Protecting your personal data on a Xiaomi smartphone is an important aspect of digital security, especially if you often transfer your device to others or fear unauthorized access. Unlike iOS, where app blocking is built into the system, MIUI offers limited native tools, but allows you to circumvent this limitation in several ways.

It’s important to understand that not all Xiaomi, Redmi, and POCO models support locking apps out of the box. For example, on budget devices (such as the Redmi 10A or POCO M4 Pro), this feature may not be on the security menu. However, even on such smartphones there are workarounds, which we’ll talk about too. And if you use flagship models (Xiaomi 14 Ultra, Xiaomi 13T Pro), then advanced options are available, including biometric authorization.

Before you start setting up, make sure your device has an up-to-date MIUI (at least MIUI 12). In older firmware (MIUI 11 and earlier), the settings interface may be different and some features may not be available. Also check if the smartphone has regional restrictions (for example, the global version of MIUI for Europe may have a reduced functionality compared to the Chinese one).

πŸ“Š What kind of smartphone you Xiaomi?
Xiaomi (flagship)
Redmi (budget)
POCO (game)
Another brand

1. Standard method: Locking through "Security" in MIUI

The easiest way is to use the built-in App Lock feature, which is available on most Xiaomi devices with MIUI 12 and later, which allows you to protect individual applications with a password, fingerprint or facial recognition.

To activate App Lock, follow the following steps:

  • πŸ“± Open the Settings app (cog icon).
  • πŸ”’ Go to Security (or Passwords & Security in the global version).
  • πŸ” Select the application lock (App lock).
  • πŸ”‘ If the function is disabled, click Enable and set the primary password (it will be used to unlock all protected applications).
  • πŸ“Œ Select the apps you want to block by moving the slider to the right.

After activation, each time you open a blocked application, the system will request a password, fingerprint or facial scan (if these methods are configured in the Biometrics and Password section). Please note: if you use facial recognition, then in poor lighting conditions or if you change your appearance (for example, glasses, beard), the system may request a backup password.

β˜‘οΈ Preparation for blocking applications

Done: 0 / 4

⚠️ Note: If you forget the primary password from App Lock, you can only reset it through a full reset (Hard Reset).This will delete all data on the device! 1Password).

2. Alternative method: Hidden MIUI settings

On some Xiaomi devices (especially those with Chinese firmware), the app lock feature is hidden in advanced settings, which works even on models where App Lock is not in the Security menu. To access hidden options, you will need to activate the developer mode and use it. ADB-commands or special combinations.

Here's the step-by-step instruction:

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

Settings β†’ Additional β†’ For Developers

USB debugging

ADB

adb shell pm grant com.miui.securitycenter com.android.permission.WRITE_SECURE_SETTINGS

This command unlocks access to hidden security settings.

App Lock

Security

If you are not familiar with ADB, you can try an alternative method using USSD codes:

  • πŸ“ž Open the phone application.
  • πŸ”’ Enter the combination: ##4636##.
  • πŸ”§ In the menu that opens, select Testing. β†’ Security.
  • πŸ”’ Check for the App Lock option (if not, it is not suitable for your model).
What to do if ADB is not working?
If, after the execution, ADB-No command function appears, check: 1. MIUI (Some firmware requires root access. 2. Firmware region (Chinese versions) MIUI have more hidden features). 3. Updates are available in the Settings section β†’ Updating the system.

3. Use of third-party applications

If the built-in methods don’t work or work well, you can use third-party applications to block them, and they offer advanced features, such as setting different passwords for each application, blocking by time or geolocation, and hiding notifications from blocked programs.

Top.-3 Proven applications for Xiaomi:

AnnexFeaturesConsReference
AppLock (by DoMobile Lab)Fingerprint support, Wi-Fi/geolocation lock, notification hidingAdvertising in the free version, high battery consumptionGoogle Play
Norton App LockIntegration with Norton antivirus, protection against screenshotsRegistration, limited functionality without subscriptionGoogle Play
Smart AppLockMinimalist interface, low power consumption, blocking incoming callsNo Russian language, rare bugs with biometricsGoogle Play

Before installing a third-party App Lock, consider:

  • πŸ”‹ These applications work in the background and can increase battery consumption by 5-15%.
  • πŸ›‘οΈ Some programs require permission to access special access (for example, to block system applications).
  • πŸ”„ After updating MIUI Third-party blockers may stop working – check compatibility.

πŸ’‘

If you use a third-party applock, add it to the battery settings exception list (Settings β†’ Battery β†’ Battery Optimization) to prevent the system from automatically closing the blocker.

4. Blocking through the "Second Space" (Dual Apps)

The MIUI Second Space feature allows you to create an isolated user profile with a separate set of applications and data, which is not exactly a lockdown, but an effective way to hide sensitive programs, for example, you can install WhatsApp or Telegram in a second space and protect it with a password.

How to set up:

  1. Go to Settings β†’ Special Opportunities β†’ Second Space.
  2. Click Create a Second Space and follow the instructions.
  3. Set a password to enter the second space (it may differ from the main password of the device).
  4. In the second space, install the apps you want through Google Play or MIUI App Store.
  5. Return to the main space – now access to blocked applications will be possible only after entering the password.

Advantages of this method:

  • πŸ” 100% Protection: Apps are physically isolated in another profile.
  • πŸ“± There are no conflicts with system updates (unlike third-party blockers).
  • πŸ”„ You can quickly switch between spaces through the notification panel.

⚠️ Note: If you delete the second space through Settings, all the data inside it (photos, messages, files) will be permanently erased!

5. Blocking system applications (extended method)

By default, MIUI does not allow you to block system applications (e.g. Settings, Phone, Messages) through the standard App Lock. However, this can be circumvented with root rights or special modules for Magisk. This method is only suitable for advanced users!

Instructions for devices with unlocked loader:

  1. Install Magisk Manager and get root access.
  2. Download the AppLock Systemizer module from the Magisk repository.
  3. Install the module via Magisk and restart the device.
  4. Now in the settings of App Lock will appear system applications.

If you don’t have a root license, you can try to circumvent the restrictions through ADB:

adb shell pm grant com.miui.securitycenter android.permission.MANAGE_APP_OPS_MODES


adb shell appops set com.miui.securitycenter SYSTEM_ALERT_WINDOW allow

These commands will give the Security app extended rights, but do not work on all versions of MIUI.

πŸ’‘

Using root rights or ADBs can compromise the system's security and stability, and only use these methods if you understand the risks!

6. Additional security measures

Password to apps is just the first step, and to protect your data on Xiaomi as much as possible, we recommend:

  • πŸ” Set the password on SIM-map (in the settings of the Mobile network) β†’ Settings SIM-map).
  • πŸ“± Activate device encryption (Settings) β†’ Additionally. β†’ Encryption and accounts).
  • πŸ”„ Turn on automatic screen lock after 15-30 seconds of inactivity.
  • πŸ›‘οΈ Use it. VPN to protect traffic (e.g. ProtonVPN or Windscribe).

Also, look out for hidden MIUI features that enhance security:

  • Settings β†’ Privacy β†’ Hidden albums – to protect photos and videos.
  • Settings β†’ Special features β†’ Screen locking – prevents accidental pressing.
  • Settings β†’ Google β†’ Security – checking the device for malware.

On devices with MIUI 14 and later, the β€œPrivate Mode” feature has been introduced, which allows you to hide selected applications from the menu and search. It is activated in the Settings β†’ Privacy β†’ Private Mode section.

FAQ: Frequent questions

Can I use different passwords for different applications?
The standard MIUI App Lock uses a single password for all blocked applications, but third-party blockers (such as AppLock or Smart AppLock) allow you to set individual passwords or even combinations (such as password + fingerprint).
What to do if I forget the password from App Lock?
If you forget your password, the only official way to reset is to reset your device completely. + Volume up before the Mi logo appears. In the Recovery menu, select Wipe Data β†’ Factory Reset. ⚠️ If you have synced with Mi Account enabled, some of the data (contacts, notes) can be restored after you log in to your account.
Does the app locking work in guest mode?
Yes, if you activate App Lock, you will not be able to access the blocked apps in Guest Mode, but the guest mode itself has a separate password, and if you don't set it, anyone can switch back to the main profile and access the apps.
Can I block access to notifications?
MIUI doesn’t have a built-in notification lock feature, but it can be done through third-party apps (e.g. AppLock has the option to Hide Notifications). You can also turn off notifications for a specific application manually: Press the notification and select Settings. Turn off the Show Notifications switch.
Do all Xiaomi models support app blocking?
No, on budget models (e.g. Redmi 9A, POCO C31), App Lock may not be available. In this case, use: Third-Party Blockers (see Section 3). Second space (Section 4) Hidden Albums for Media. Before buying a smartphone, check for a feature on Xiaomi's website in the model specifications section.