How to remove the lock from the Xiaomi phone, if you forgot the graphic password

When a Xiaomi, Redmi or POCO smartphone screen suddenly stops responding to touch, and the system requires a forgotten pattern lock to be entered, it can disembark any user. In a panic, many people start randomly going through the combinations, unaware that every wrong move brings the device closer to completely blocking or deleting data. A graphic password is the first frontier in protecting your personal information, but when memory fails, it becomes an insurmountable barrier between you and your contacts.

Fortunately, modern Android operating systems and the MIUI shell provide several scenarios for access recovery, although they carry certain risks. The effectiveness of the method depends on whether you signed in to Mi Account, whether you have debugging enabled by USB and which version of Android is installed on the device. In this article, we will discuss in detail all the current ways of circumventing protection, from regular Google functions to more complex technical manipulations.

Before you start taking action, you need to be clear about the consequences. Most effective methods to unblock without knowing the code involve completely resetting user data. Photos, correspondence and installed applications can be irretrievably lost if you did not sync with the cloud beforehand. So be patient and follow the instructions carefully to minimize losses.

The standard ways to unlock through Google and Mi Account

The most civilized and secure way to restore access is for devices running Android versions up to and including 5.0, as well as for some models with specific services activated. If your phone is connected to the Internet (Wi-Fi or mobile network), the system can offer an alternative sign-in. After five failed attempts to enter a pattern lock, the screen usually appears a button "Forgot the password?" or "Forgot the key?" By clicking on it, you can log in through the Google account that was the main one on the device.

Xiaomi smartphone owners often rely on the manufacturer’s ecosystem. If Mi Account and Find Device have been activated in the security settings, unlocking is possible via a web interface. You will need access to another device (computer or tablet) to log into your personal account on the official website. This method allows not only to erase data, but in some cases, change the screen lock password remotely, which is a unique feature of MIUI firmware.

⚠️ Note: Remote unlocking via Mi Account only works if the smartphone was previously linked to the account and has an active connection to the Internet.

It is worth noting that with the release of new versions of Android (starting with 6.0 and above), the ability to reset passwords through a Google account was eliminated in order to improve security. FRP). So if you have a modern smartphone, this method may not work and you’ll have to resort to more radical measures like Hard Reset.

📊 Have you ever had a screen lock?
Yeah, I forgot my password.
No, I'm using a print.
No, I'm using Face ID.
Until there was a problem.

Resetting with Recovery Mode (Hard Reset)

The most versatile and time-tested method is to perform a hard reset via the Recovery Mode Recovery menu.This mode is built into the device's memory at a low level and is available even when the operating system is not booted or locked. To enter this menu on most Xiaomi models, you need to turn off the smartphone completely, and then pinch the button combination: usually Volume Up + Power. You need to hold them until the Mi logo or menu in English / Chinese appears.

Navigation in the Recovery menu is done with volume buttons (up/down), and the choice of item is confirmed by the power button. You need to find the Wipe Data or Clear Data section. Inside it, the Wipe All Data option is selected. The system will warn you that all data will be deleted. Once confirmed, the process of formatting the user partition memory will begin, which can take from a few seconds to a couple of minutes.

☑️ Algorithm of actions in Recovery

Done: 0 / 4

It's important to understand the difference between a regular reset and a full formatting. Some menus offer a Wipe Reset option that's less aggressive, but Wipe All Data is most often required to remove the screen lock. Once the procedure is complete, the phone will reboot as a new one. However, you'll be greeted by the initial setup screen, where you'll need to enter a password from a Google account that was synced to the device before locking, a the the the theft protection measure known as FRP.

Find My Device from Google

If you have difficulty physically accessing buttons or prefer software, you can use Google’s official device search service, which only works if you meet three critical conditions: a locked phone has internet access, a geolocation is active, and a Google account is logged in. Go from your computer or other smartphone to android.com/find and log in under the same account as the locked device.

The service interface will offer three main actions: Call, Lock, and Clear. We are interested in the Erase Device, which initiates a remote command to reset completely to factory settings, and unlike local reset via Recovery, this is initiated via an Internet channel, which sometimes allows you to bypass some software freezes.

Once the command is successfully executed, the phone will restart and the screen lock will be removed along with all the data. SIM-Also, consider that the command can be executed with a delay if the network signal is unstable, in such cases, the service will show the status of "Pending Cleanup", and the action will take place as soon as the phone appears on the network.

💡

If the phone is lost and turned off, the Clean function will run automatically as soon as the device is turned on and connected to the network, even if you have already closed the browser.

Unlocking through ADB (for advanced users)

The ADB (Android Debug Bridge) debugging method is one of the most powerful tools in the technician’s arsenal, but it requires prior preparation. The main nuance is that the USB debugging function must be pre-installed on the Developer Menu on a locked phone. If this option was activated before locking, your chances of returning data access (without reset) are greatly increased.

To implement this method, you will need a computer with drivers installed ADB and USB-When you connect your phone to your PC, open the command line (terminal) and type a special command to delete files that store access keys. Depending on the version of Android, commands may vary. For older versions, the deletion command gesture.key is relevant:

adb shell rm /data/system/gesture.key

Once the command is executed, you need to restart the device. On the new lock screen, you can enter any pattern lock or pin code — the system will let you through, since the hash checking file was deleted. However, on modern versions of Android with data encryption, this method is often powerless, since the keys are stored in a secure partition TrustZone, which is accessed via ADB without superuser rights (Root) is closed.

What if the ADB can’t see the phone?
Make sure drivers are installed ADB. Try another one. USB-cable (preferably original) Check if debugging is enabled USB If the phone is locked and you can't confirm the debugging permission on the screen, this method won't work.

Features of unlocking different versions of MIUI

The MIUI shell has its own unique features that vary from version to version. Device owners should take into account that security algorithms are constantly being improved. For example, MIUI 12 and MIUI 13 have been strengthened to protect against unauthorized access, which made many old exploits ineffective. Below is a table showing the dependence of available methods on the version of the system.

MIUI / Android versionResetting through Google AccountADB (key removal)Recovery (Hard Reset)Note
MIUI 10 (Android 7-8)Maybe.Often works.It's working.Least protection
MIUI 11 (Android 9-10)Rarely.Demands a Root.It's working.Encryption implemented
MIUI 12/13 (Android 10-11)No.It's not working.It's working.FRP protection active
MIUI 14+ (Android 12+)No.It's not working.It's working.Mi/Google account required

Special attention should be paid to the function of “Second Space” or “Guest Mode”, sometimes users forget the password from the additional profile, in which case the main profile can be logged in through a fingerprint (if it is configured), after which in the main settings you can reset the password for guest mode, which is the only case when you can do without losing the main profile data.

Also worth mentioning are custom recavators like TWRP. If your Xiaomi has previously been installed with a modified bootloader and TWRP, the password reset process becomes trivial. Through the TWRP file manager, you can simply delete gesture.key, password.key or locksettings.db files in the /data/system/ folder. This allows you to save all the data, but requires the rights of the superuser and unlocked bootloader before the problem occurs.

💡

The presence of an unlocked bootloader (Unlocked Bootloader) gives maximum freedom of action, but reduces the overall security of the device and can lead to a denial of warranty service.

What to do if FRP (Google Lock) is working

After successful Hard Reset or remote cleaning, smartphone owners often encounter an activation screen that requires you to enter a password from a Google account that was previously synced to the device, which is FRP (Factory Reset Protection), designed to make the stolen phone useless to the attacker after the reset, and if you forget the password from this account, the situation becomes complicated.

The official path is to restore access to a Google account through any other browser or device. If an account is lost, users have to search for specialized bypasses. FRP bypass methods are extremely specific to each processor model (Snapdragon, MediaTek, Exynos) and the version of the Android security patch, often by exploiting vulnerabilities in the special features menu or browser.

⚠️ Attention: Finding and Using Bypass Instructions FRP (FRP Bypass) carries risks. Download unverified APK-files from dubious sites can lead to infection of the device with viruses or complete system failure.

In some cases, especially on devices with MediaTek processors, it is possible to reset FRP through special engineering programs such as the SP Flash Tool, with appropriate authorization files that are difficult to find in the public domain. Qualcomm sometimes helps with EDL (Emergency Download Mode) mode, entry into which often requires disassembling the phone and closing test points on the board, which is the lot of service centers.

💡

When buying a used Xiaomi phone, always check to see if you have logged out of all accounts (Mi and Google) before resetting, which will save you from buying a “brick” with someone else’s binding.

Prevention and safety advice

To avoid getting caught off guard by a forgotten password, it’s important to follow digital hygiene. Regularly check if sync with the cloud. Set up alternative login methods like biometrics (fingerprint, face scanner) that work very quickly and conveniently on Xiaomi. However, remember that biometrics still need to be periodically confirmed by the main PIN-code or pattern lock (usually after rebooting or 72 hours of downtime).

Write your passwords to a secure location, whether it's a paper notebook stored at home or a trusted password manager. Don't rely solely on memory, especially if you use complex compound keys. It's also good practice to back up important data regularly to an external hard drive or to an alternative cloud storage not tied to a single account.

If you often experiment with system settings, keep a computer with an ADB toolkit installed on hand. This will allow you to quickly connect to the device in a critical situation and diagnose the problem or perform a reset without waiting for the phone’s battery to drain, which happens faster in constant lock mode.

Can I unlock my phone without losing data?
Without data loss, unlocking is only possible in rare cases: if the recovery mechanism through Google (on old Android), if USB debugging is enabled and ADB is used to delete the key file, or if you have Root rights and customized recaps are installed. In 95% of cases on modern devices, removing a forgotten password means a complete reset.
What happens if you enter the wrong password many times?
After 5 attempts, the system will block the input for 30 seconds. Then the intervals will increase (1 minute, 5 minutes, etc.) After many unsuccessful attempts, the phone may offer a data reset or completely lock before logging into the owner's account. Some models take the photo of the attacker with a front camera.
How to log in to Recovery if the volume buttons don't work?
If the buttons are physically faulty, you can't log in to Recovery in the standard way. You can try the adb reboot recovery command via your computer if debugging is enabled. Otherwise, you'll need to replace the buttons in the service center or use special testers (boxes) for software flashing.
Will the operator lock down after Hard Reset?
No. The Sim-Lock lock is stored in a secure memory area and is not affected by resetting user settings or the pattern lock. It requires a special unlock code from the operator or paid services from third-party services to remove it.