Access to important correspondence, gallery or banking application is one of the most stressful situations for Xiaomi smartphone owner. Modern shells MIUI and HyperOS offer powerful encryption tools, but sometimes this protection becomes a barrier for the owner of the device. Unlike simply unlocking the screen, accessing internal folders or specific programs through Second Space or Application Protection requires a more nuanced approach.
There are several proven ways to get around this hurdle, ranging from standard account recovery procedures to advanced debugging techniques. The choice of a particular method depends on whether a Mi Account was tied, whether USB debugging is enabled, and which version of the operating system is installed on your gadget. In this article, we will detail the algorithms for actions for different scenarios so that you can regain control of your data without losing important information.
It is worth noting that trying to guess the combination can lead to a temporary lock of the security function, so it is better not to experiment with entering the wrong keys repeatedly. Below are the working methods that are relevant for most models of Redmi, POCO and Xiaomi in 2026-2026.
Use the “Forgot Password” function through Mi Account
The most legal and secure way to restore access to secure applications is to use the built-in reset function, which works provided that the device is signed in to Mi Account. Xiaomi security automatically links the application graphic keys to the user's cloud profile, which allows you to initiate the recovery procedure remotely or through the lock interface. If you previously activated synchronization and data protection, this method will become your main tool.
To start the process, you need to enter the wrong pattern lock several times in a row on the application lock screen. After the fifth attempt, the system will give a message that access is temporarily restricted, and will suggest the option “Forgot your password” or “Forgot your pattern lock.” By clicking on this button, you will be redirected to the authorization page, where you will need to enter the username and password for your Mi ID. This is critical, because without knowing the account credentials, this method will not work.
Once you have successfully logged in, the system will suggest creating a new combination or disabling protection for the selected programs completely, which ensures that even if you steal your phone, an attacker will not be able to access your data without the owner’s credentials, but if you don’t remember the password from your account, you will have to first go through the recovery process through your email or phone number, which can take time.
⚠️ Note: If two-factor authentication is enabled on the device, make sure you have access to the linked phone number to receive the phone. SMS-Without this code, you can't log in to your account.
It is important to understand that account reset only works for applications that have been protected by standard MIUI tools. Third-party locker programs downloaded from Google Play may have their own recovery mechanisms not associated with Xiaomi services.
💡
If you have changed the phone number or email associated with Mi Account, update this data in the security settings in advance so that you do not lose the ability to restore access.
Resetting settings via Safe Mode
Safe Mode booting is effective in cases where the lock is caused by a third-party locker app or system failure, but does not work for the standard protection of MIUI applications. Safe Mode loads the operating system with third-party services disabled, allowing you to access settings and remove problematic software. This approach is often overlooked, although it can save the situation without losing personal data.
To enter this mode, you need to press the power button and in the menu that appears, hold your finger on the “Switch off” icon for a long time (or “Reboot” depending on the OS version). A request to enter Safe Mode will appear on the screen. After confirmation, the device will restart, and the corresponding inscription will appear in the corner of the screen. In this state, the graphic keys of third-party blockers are usually not activated, allowing you to freely enter the settings menu.
- 📱 Press the power button before the turn off menu appears.
- 🔄 Press and hold the “Switch Off” icon on the screen.
- ✅ Confirm the transition to safe mode in the pop-up window.
- 🗑️ Find the application that blocks access in the settings and delete it.
When you're in Safe Mode, you should go to Settings → Applications → All Apps. You should find a suspicious application that installs a pattern lock and clear it or delete it completely. Once you reboot it in normal mode, the lock should disappear. If the problem was a system bug, then in Safe Mode you often just change or remove the password through the standard security menu, since conflicting processes are not running.
☑️ Pre-reset check
Delete protection files via file manager (Root Requires)
For advanced users whose devices have superuser (Root) rights, there is a technical way to unblock by removing system files that store the hash of the pattern lock.This method is radical and requires installing a specialized file manager such as Root Explorer or MT Manager. The essence of the method is to manually clean the database where Android records security information.
Files responsible for graphic keys and pin codes are usually located in the system directory /data/system/. Specific files can be called gesture.key, password.key or have names associated with a specific locker application (for example, applock.db). By deleting these files and restarting the device, you will find that the system has “forgot” the previously installed password, since the physical storage of this information was destroyed.
However, it should be noted that on modern versions of Android and HyperOS, the /data partition is often encrypted, and access to it is possible only after the first unlock of the screen with the main password. If your device is completely locked and does not even let you into the system, this method will not work without unlocking the bootloader and resetting the encryption.
| File type | Location. | Description | Risk of removal |
|---|---|---|---|
| gesture.key | /data/system/ | Stores the hash of the graphical screen key | Medium (screen key reset) |
| applock.db | /data/data/com.miui.securitycenter/ | MIUI Application Protection Database | High (failure of the security center) |
| locksettings.db | /data/system/ | General lock settings | High (loss of security settings) |
| backup_key | /data/misc/ | Reserve recovery key | Low (usually not critical) |
⚠️ Note: Deleting system files without creating a full backup can lead to unstable system operation or cyclic restloop.
What if the phone is restarted after deleting files?
Use of debugging by USB and ADB
If the device was pre-enabled function Debugging by USB (USB Debugging) in the menu for developers, you can remove the lock using your computer and Android Debug Bridge tools (ADB). This method allows you to send commands directly to the operating system without the GUI locking, and it is especially useful when the touchscreen is partially broken or the interface is blocked.
To implement this method, you need to connect your smartphone to your PC through a high-quality USB-You can start the command line with administrator permissions, you first need to check the connection with the adb device command. If the device is determined, you can delete the key files or reset the security settings through shell commands. 11/12 Google has tightened security policies and many commands now require on-screen confirmation, making the method less effective on fully locked phones.
adb shell rm /data/system/gesture.key
adb shell rm /data/system/password.key
adb shell rm /data/system/locksettings.dbExecuting these commands deletes files that store key information. Then you need to restart the device. It is important to note that on devices with enabled data encryption, these commands may not work without first authorizing the ADB connection on the smartphone screen itself. If you have not previously authorized the computer, the system will request permission on the lock screen, which you can not give.
Reset via Mi Cloud (Remote Management)
Mi Cloud provides Xiaomi smartphone owners with remote device management. If the locked phone has the Internet enabled and the Find Device feature is activated, you can reset the lock or clear the data via the web interface. This is one of the few ways that works even when the interface is completely blocked, but it requires knowledge of the password from the account.
Go to the official i.mi.com website from any other device (computer or tablet) and log in to your Mi Account. From the menu, select Find the device. The map will show your smartphone location. The action list will include the option to Unlock (not available on all models due to Android security limitations) or Clear the device.
The Wipe Data option will completely delete all data, including photos, contacts and installed apps, returning the phone to factory status. This is an extreme measure, but it is guaranteed to remove any graphical password, since with the data, the security settings files are deleted. If the Unlock feature is available for your model, it will remove the lock screen without deleting data, but this option depends on the MIUI version and regional firmware.
- 🌐 Go to i.mi.com from another device.
- 🔑 Sign in to your Mi Account (the same one on your phone).
- 📍 Select a locked device from the list.
- 🧹 Click on “Clean the device” or “Unlock».
💡
Remote cleaning through Mi Cloud is the only guaranteed way to access if both the application password and the account password are forgotten (provided you access the email to restore the account).
Full reset to factory settings (Hard Reset)
When all other methods are exhausted, the last option is a complete reset of the device to the factory settings (Hard Reset), which removes absolutely all user data, settings and applications, returning the smartphone to the “out of the box” state. The graphical password will be deleted along with all files, which is painful, but often the only way out.
To perform the reset, you need to go to the Recovery menu. Turn off the smartphone completely. Then press the power button and the volume button at the same time (on some POCO or Redmi models, the combination may differ, sometimes you need to clamp only the power, and the menu is called tap on the screen or volume button). Hold the buttons until the Mi logo or Recovery menu appears.
In the Recovery menu, the navigation is done with volume buttons (up/down), and the choice is confirmed by the power button. Select the language (English), then go to Wipe Data → Wipe All Data. The system will warn you to delete all files. Confirm action. Once you complete the process, select Reboot → Reboot to System. The phone will reboot, and the initial setup will begin.
⚠️ Note: After the reset, the device will request a password from a Google account or Mi Account that was previously synced (protection) FRP). If you don’t remember this information, your phone may remain locked forever.