What to do if you forget the password to block applications on Xiaomi

When you try to run a favorite app or hidden folder, and Xiaomi, Redmi or POCO requires you to enter a pattern lock or a digital code that you just don't remember, it happens quite often.This is a security mechanism that many users install for banking applications, gallery or instant messengers, but forget the combination after months of not using or updating the system. Unlike the screen unlock password, this code is stored separately and often tied to a Mi Account or a local security profile.

The challenge is that current versions of the MIUI shell and the new HyperOS have enhanced security protocols that don't allow you to get around the protection. However, there are several proven ways to restore access. If you've linked your Mi Account to the application protection feature, the recovery process will take literally a couple of minutes through a standard reset procedure, and if you haven't, you'll have to use more radical but effective methods to clean up security data.

In this article, we will discuss all the current methods of solving the problem, from a regular reset via an account to using special commands via a computer. It is important to understand that in some cases, removing protection will require removing the data of the Security application itself, which can lead to a reset of the blocker settings, but will not affect your personal photos or contacts.

Standard reset via tied Mi-account

The easiest and safest way to do this is to use a cloud account, and if you logged into your Xiaomi profile when you first set up your app lock and allowed security to synchronize, it will take a minimum of time to restore access, and the system will offer this option after several failed attempts to enter the code.

First, you need to enter the password incorrectly several times or draw the wrong pattern lock. Usually, after the 5th attempt, the screen will show the words "Forgot the password?" or "Forgot the pattern lock." By clicking on this link, the system will redirect you to the authorization page. Here you will need to enter the username and password from your Mi Account. After successful authorization, you will be asked to create a new combination.

  • πŸ”‘ Enter a new password twice to confirm security changes.
  • πŸ“± Make sure your device is connected to the internet or your account will not be checked.
  • πŸ”„ The old password will be completely deleted and replaced with a new one immediately after confirmation.
πŸ“Š How You Usually Protect Your Apps?
pattern lock
Digital. PIN-code
Fingerprint.
Face ID
Not defending.

Note that this method only works if Application Protection was activated with authorization, and if you only used a local password without a cloud link, the system may not show a recovery link, so go to the next section of the instructions.

Use of the control question

Another regular mechanism that users often ignore when they first set up is the check question, and when you set up an application lock, MIUI often asks you a secret question and answer, which is a kind of insurance policy in case you forget the primary access code.

To use this method, you also need to make a few mistakes when entering your password. When an error window appears, look for the "Ask for a Check Question" button or link. After clicking, the system will ask you to enter the answer you asked earlier.

⚠️ Warning: If you don't remember the answer to the control question or have never set it, this method will be useless. Don't try to guess the answer indefinitely, as the system can temporarily block the recovery for several hours.

Successfully entering the correct answer will immediately jump to the new password creation screen, one of the few ways that doesn’t require an internet connection or email access if all the data has been stored locally in a secure area of the device’s memory.

Reset via data cleanup of the Security app

If standard methods don't work, you'll have to resort to a more radical but effective way: Application locking is part of the Security system component, and cleaning up the application's data resets all security settings, including passwords, graphic keys, and hidden space settings, returning them to factory settings.

To do this, you need to go to the application management menu. Since the settings menu itself can be password protected (if you have system application lock enabled), you need to act quickly or through Safe Mode if the password is on all menus. Go to Settings β†’ Applications β†’ All applications. Find the Security app (green shield icon) in the list.

β˜‘οΈ Resetting protection algorithm

Done: 0 / 4

In the menu that opens, click Clear (or Memory) and then select Clear All Data or Reset. The system will warn you that this action will delete the settings. Confirm the action. Then, when you try to enable the application lock, the system will behave as if you are doing this for the first time and ask you to set a new password.

  • πŸ—‘οΈ This method does not delete your personal files, photos, contacts or installed apps.
  • βš™οΈ Only the settings of the antivirus, cleaner and application blocker are reset.
  • πŸ“‰ Hidden space settings will also be reset, files from there may become unavailable without an additional backup.

Working with Hidden Space (Second Space)

A separate category of problems is related to the Second Space, which is a fully-fledged, isolated profile on Xiaomi's system that has its own password, different from the main profile password, and if you forget the code from the second space, the logic of the actions changes a little.

Often users confuse passwords: try to enter code from the main screen in the second space or vice versa. Make sure you are in the correct profile. If you are logging into the second space, try using the Forgot Password feature, which can be accessed via the profile switch if sync with Mi Cloud is configured.

In cases where access to the second space is permanently lost, the only option is to delete it. To do this, go to the main profile, open Settings β†’ Second Space and select the deletion option. This action will completely destroy all data in the second profile, but return control of the device.

Action.Impact on the main profileImpact on Hidden SpaceWe need access to..
Resetting password through Mi AccountNo.Change of passwordInternet and account
Cleaning up the data "Security"No.Complete resetting of settingsPhone settings menu
Removal of the second spaceNo.Complete deletion of dataMain profile
Full reset (Hard Reset)Deletion of all dataDeletion of all dataRecovery menu
What happens to files in the second space when deleted?
When you delete the second space, all the apps, photos, contacts and documents that were inside this isolated profile will be permanently deleted. The system does not automatically transfer them to the main profile. Before deleting it is recommended to manually copy important files if you can log into the profile through a fingerprint, even if you have forgotten the digital password.

Using ADB for Advanced Users

For those who are not afraid of the command line and have USB debugging enabled, there is a method of resetting via a computer, which allows you to delete the file that stores the password hash without completely cleaning the data of the Security application, which sometimes helps to save the hidden space settings.

You'll need a computer with ADB drivers installed and a USB cable. Connect your smartphone, enable debugging and type a command to obtain shell rights. Then you'll need to find and delete the gatekeeper.pattern.key file or a similar file in the /data/system/ directory, but newer versions of Android may have different paths. The safer way through ADB is to force the packet cleanup:

adb shell pm clear com.miui.securitycenter

This command is similar to manually clearing data through a menu, but it is performed remotely. It is effective if the phone interface is locked or unstable. Once the command is executed and the device is restarted, the application lock will be disabled.

⚠️ Attention: Use ADB requires pre-debugging of USB. If this feature was disabled before the password was lost, this method will not work.

The most important thing is to reset (Hard Reset)

If none of the above methods worked, or if the password from both the application lock and the Mi Account login is forgotten, the last option is a complete reset of the device to factory settings, which is guaranteed to remove any software lock, but will lead to the loss of all user data.

Turn off the phone completely to perform the reset. Then press the Volume Up + Power button combination (on some models Volume Down + Power) until the Mi logo or Recovery menu appears. From the menu, select the language (English), then Wipe Data β†’ Wipe All Data. Confirm the action and wait for the process to be completed.

πŸ’‘

Before performing a full reset, make sure you remember data from your Google account and Mi Account. After the reset, the phone will require it to confirm ownership of the device (FRP protection).

Once you reboot, the phone will be like a new one, you can set up the app lock again, make sure you write down a new password or save it in the password manager to avoid a repeat of the situation, which is an extreme measure that should be resorted to only in desperate situations.

Prevention and safety advice

To prevent the β€œforgotten password” issue from catching you off guard in the future, it’s recommended to stick to a few digital hygiene rules: Today’s Xiaomi smartphones offer flexible settings that balance security and convenience.

First of all, always link security features to your account. Cloud key synchronization is the most reliable way to recover. Also use biometrics: a fingerprint or face unlock often works even when the digital code is forgotten, allowing you to at least log in to the application and change the password in the settings.

  • πŸ“ Write complex passwords to a secure location or use password managers.
  • πŸ” Don’t use too simple combinations (1234, 0000) that are easy to pick up, but don’t make them too difficult to remember.
  • πŸ”„ Regularly check the relevance of the attached phone number and email in the Mi Account.

πŸ’‘

Timely binding of the Mi Account and setting up the control issue at the first installation of application protection saves hours of time and nerves in the event of loss of access.

Keep in mind that the security of your data is in your hands. Regular system updates and careful privacy settings will help avoid many problems. If you use important applications, consider using built-in protections (FaceID within the application) that do not depend on the Xiaomi system blocker.

Can I unlock applications without losing data?
Yes, in most cases, if you remember the password from the Mi Account or the answer to the check question, the data will be saved. The Security app's data cleanup method also doesn't delete personal files, but resets the lock settings themselves.
What happens if I enter the wrong password too many times?
The system will temporarily block the ability to enter a password for 30 seconds, then for 1 minute, 5 minutes, etc. This is brute force protection, and after a long lock, you may need to wait or log in through your account.
Will the application lock password reset after the MIUI update?
Usually not, security settings are saved when you update, but in rare cases, when you upgrade to a major version of Android (for example, from Android 13 to 14), conflicts may occur that require re-authorization.
Where are files from hidden space stored?
Files are in a hidden partition of memory with altered access paths, which is not visible to normal file managers without root rights, and when you delete the second space, this partition is formatted.
Will resetting to factory settings help if I forget my Mi Account password?
Reset will remove the password lock apps, but when turned on, the phone will ask for the password from the Mi Account and Google account (FRP protection).If you do not remember them, unlocking the phone will be extremely difficult without contacting the service with a check for purchase.