How to unlock Xiaomi phone if you forget your graphical password

The situation when the screen of the smartphone turns into an inaccessible fortress due to a forgotten pattern lock causes panic in any owner of the gadget. This issue is especially acute for users of the Xiaomi ecosystem, where the security policy of MIUI and HyperOS in recent versions has become as strict as possible, requiring account confirmation even after a standard reset. The main pain of owners is not just to access the device, but to save precious photos, correspondence and working documents that will disappear with the classic Hard Reset.

Fortunately, there are proven methods of bypassing locks that allow you to return control of the phone without completely erasing memory. The effectiveness of each method depends on the version of the operating system, the device model and pre-configured security settings. In this article, we will discuss all the current scenarios, from using cloud services to engineering menus, so you can choose the most suitable option for your case.

Checking the possibility of unlocking through Mi Account

The most reliable and official way to return access to the device without losing data is to use the Find Device feature built into the Xiaomi ecosystem. If you have logged in to Mi Account and the Internet (Wi-Fi or mobile data) on your locked smartphone, you can remotely unlock the screen. This method only works if the screen lock itself was set through the Mi Account security settings or synchronized with it.

To start the procedure, you will need a computer or other smartphone with Internet access. Go to the official website of the Xiaomi cloud service and log in with the same identifier used on the locked gadget. In the device management interface, select the desired model from the list and find the unlock option. The system can request confirmation via SMS or through the authenticator application.

However, it is worth considering an important nuance: in modern versions of MIUI 13, 14 and 15, privacy policies have been tightened. Now remote unlock often requires entering a password from the account directly on the device itself, which makes this method useless if the phone is completely locked and you can not enter a password.

Google Find My Device Service

An alternative that is often overlooked is Googleโ€™s service: If your Xiaomi has a Google account activated and geolocation enabled, you have a chance to unlock the device through the searcherโ€™s web interface. PIN-code that replaced the old pattern lock, but in Android 9 and later Google changed the security policy.

Now, Find My Device's Lock Device feature is most commonly used to set a new password to an already locked screen or to display a message with the owner's contacts. In rare cases, especially on devices with older Google Play Services installed, the system can command to change the lock method. To check, go to the service's website, select your device and try using the lock function by setting a new digital code.

โš ๏ธ Note: On devices with Android 10 and above, and in shells MIUI In recent versions, direct screen unlocking via Google Find My Device without data reset is not officially supported.

It is important to understand that the success of this method depends on how long the device has been online. If the phone has been offline for more than 24 hours, the command from the server may not execute until the next connection, and also make sure that the device does not have an โ€œEmergency Calls Onlyโ€ restriction, which completely blocks access to system functions.

๐Ÿ“Š Have you ever used remote management services for Android?
Yeah, successfully unlocked.
I tried, but it didn't work out.
No, I'm afraid of a lockdown.
I donโ€™t know about these services.

Unlocking through Safe Mode (Safe Mode)

One of the most effective ways to get around a pattern lock is to load your smartphone into Safe Mode, which is where the operating system disables all third-party applications, including screen blockers, if they were installed from third-party sources, or allows you to access security settings if the system bug allows it, a technique that is especially relevant if the lock has been installed recently.

The process of entering safe mode on Xiaomi may vary depending on the model, but the most common algorithm used is: press the power button, wait for the turn off menu to appear, and then press and hold your finger on the "Switch off" or "Switch off" item on the screen. The system will ask for confirmation of the transition to safe mode - agree. After rebooting, the corresponding inscription will appear in the corner of the screen.

If you managed to log in without asking for a password, immediately go to Settings โ†’ Passwords and Security โ†’ Device Protection. Here you can delete the current pattern lock or fingerprint. After that, just restart the phone as normal โ€“ the lock will be removed. This method does not work on all versions of MIUI, since Xiaomi actively closes similar vulnerabilities in security updates.

  • ๐Ÿ“ฑ Press the power button before the menu appears on the screen.
  • ๐Ÿ–๏ธ Press and hold your finger on the โ€œSwitch offโ€ iconยป.
  • โœ… Confirm the transition to safe mode in the pop-up window.
  • ๐Ÿ”“ Remove the password in the security settings before rebooting.

It is worth noting that if the pattern lock is system-based (set through standard MIUI security settings), logging into Safe Mode will also require it to be entered, which, unfortunately, will not help, and you will have to look for more complex ways to solve the problem.

USB and ADB debugging method (for advanced users)

The most technically complex but potentially powerful method is the use of debugging by USB (USB Debugging and Android Debug Bridge Toolkit (ADB). This method makes sense only in one case: if before the lock you managed to turn on debugging on the USB And they gave the computer permission to access the data, and if those settings weren't activated in advance, the method wouldn't work.

To implement you will need a PC with installed drivers ADB and connected through quality USB-Connect the device to the computer, open the command line or the terminal in the folder with ADB And you can type a command to delete files that store access keys. On Android, gesture.key or password.key files located in the system directory are usually the ones that answer for the graphic password.

adb shell rm /data/system/gesture.key


adb shell rm /data/system/password.key




adb reboot

Once the commands are executed, you need to restart the device. If it's successful, the system will not find the key file and let you go to the desktop without asking for a password. However, on modern devices with data encryption, the /data partition may not be available for writing without root rights, even with debugging enabled, in which case the command will return the access error.

โš ๏ธ Attention: Do not use commands ADB To delete system files if you are not sure of their purpose, an error in the path or file name can lead to a cyclic restart (bootloop) or complete system failure.

There is also the option of using ADB to enter a text password if you remember it but forgot the graphic pattern, or to emulate clicks, but this requires a deep knowledge of Android command line syntax.

โ˜‘๏ธ Readiness to use ADB

Done: 0 / 1

Comparison of Xiaomi Unlocking Methods

To organize the information and help you choose the best strategy, we have prepared a method comparison table that takes into account such parameters as the need for the Internet, the risk of data loss and the complexity of execution. Please note that no method provides 100% guarantee on all models of Redmi, Poco and Xiaomi.

MethodWe need the Internet.Risk of data lossDifficultyEfficiency (MIUI 12-15)
Mi Account (Cloud)Yes (on the phone and PC)No.Low.Medium (depending on version)
Google Find My DeviceYes (on the phone and PC)No (in theory)Low.Low (more often requires resetting)
Safe ModeNo.No.MediumLow/Mediocre
ADB CommandNo (PC needed)No.Tall.Low (needs debugging)
Hard ResetNo.100% lossLow.High (guaranteed)

And you can see from the table that the data-free methods have a limited scope, and if none of the gentle methods have worked, the only remaining option is to completely reset your settings. Before you do that, you need to weigh the pros and cons again, and make sure you don't have backups in the cloud.

Why is Xiaomi so protective of the device?
Xiaomi has implemented strict security measures to protect user data and prevent device theft. Activation of the Mi Lock and binding to an account make the stolen phone useless for an attacker, since it can not be reflashed or unlocked without the ownerโ€™s data.

What to do if nothing works: Hard Reset

If all attempts to get around the lock without losing data fail, you'll have to resort to a radical method called Hard Reset, which will bring the phone back to factory status by removing all the photos, contacts, apps and, of course, the forgotten pattern lock.

To enter Recovery mode on Xiaomi, turn off the phone completely. Then press the power and volume buttons simultaneously (on some models you need to hold only power, and then select recovery mode). After waiting for the Mi logo to appear, release the power button, but continue to keep the volume until the menu appears. The navigation in the menu is done by volume buttons, and the choice is by the power button.

From the Recovery menu, select a language (usually English), then go to Wipe Data โ†’ Wipe All Data. Confirm. Once the process is complete, select Reboot โ†’ Reboot to System. The first download can take up to 10 minutes. Be prepared for the fact that when you turn on the phone will require you to enter a password from a Google account or Mi Account that was synced earlier โ€“ this is FRP (Factory Reset Protection) protection.

  • ๐Ÿ”Œ Turn off the smartphone completely.
  • ๐Ÿ”˜ Hold the Power. + Volume Up before the logo appears.
  • ๐Ÿ‡ฌ๐Ÿ‡ง Select English from the Recovery menu.
  • ๐Ÿ—‘๏ธ Press Wipe Data. โ†’ Wipe All Data and confirm it.

Itโ€™s important to know: After a reset on newer models, Xiaomi may need to connect to Wi-Fi and wait 15 minutes to 24 hours before being able to enter an account if a security timer is triggered.

๐Ÿ’ก

Before performing Hard Reset, try extracting SIM-Card and memory card: sometimes this helps to avoid network lock or loss of media files if they are stored on an external medium.

Preventing blocking in the future

To never face this situation again, you need to set up alternative methods of access beforehand. Biometrics (fingerprint or facial recognition) not only speeds up unlocking, but also serves as a reliable reserve. However, remember that after rebooting the device, the biometrics do not work before entering the primary password, so you still need to remember it.

Configure Smart Lock in Googleโ€™s security settings, which allows you to keep your phone unlocked in trusted places (such as at home), when connected to certain Bluetooth devices (smart watches, cars), or when you physically contact your body, which greatly reduces the risk of forgetting your password, since under normal conditions the phone will open automatically.

Check your backup regularly. Make sure your contacts are synced to your Google account, and photos are uploaded to Google Photos or the Mi Cloud. In the event of a forced reset, you can recover most of your important information in minutes by simply logging in to your account on a new or cleaned device.

๐Ÿ’ก

Regular data synchronization and Smart Lock setup are the best insurance against loss of access to your smartphone and important information.

Frequently Asked Questions (FAQ)

Can I unlock Xiaomi without the internet?
Without the Internet, unlocking through Mi Account or Google Find My Device is impossible, because you need to communicate with the server to verify your account. Local methods such as Safe Mode or ADB may theoretically work without a network, but their effectiveness on new versions of MIUI is extremely low. If the Internet is disabled, the phone will not be able to confirm your rights to access data.
Will Hard Reset erase data on the memory card?
The standard Recovery reset procedure does not usually affect the external content. SD-If you have not selected the option of cleaning internal storage with the card (Clean all with lock).However, in order to avoid accidental loss of files, it is strongly recommended to remove the memory card from the device before resetting.
What is FRP and how to get around it?
FRP (Factory Reset Protection) is a security mechanism that requires you to enter a password from a Google account or Mi Account after resetting your settings. It is almost impossible to circumvent FRP in legal ways without knowing passwords on modern versions of Android. The only legal way is to restore access to your account through the password recovery procedure on a Google or Xiaomi site.
Will the phone flashing help?
Fastboot flashing with the Mi Flash Tool will also result in complete deletion of data, and if Mi Unlock is enabled on the phone, flashing will not remove the account lock, and in some cases, may lock the device even more (Mi Account Lock), which is not a method of unlocking without losing data.
Can I remove my password through the service center?
Xiaomiโ€™s official service centers can unlock the device only when you present a purchase check and boxes with a box of products. IMEI-The service is paid and usually also involves a complete data reset for security.