How to unlock the screen of Xiaomi phone, if you forgot the password without losing data

When you pick up your Xiaomi to answer an important call, and the device requires a password that you can’t remember, it’s a common problem that users who have changed their locking method or have not used the pin code for a long time face. The main challenge is that modern Android security systems are sharpened to protect data, so standard methods of bypassing often lead to a complete reset.

However, there are several proven ways to unlock a device by saving photos, contacts and correspondence. Unlike total memory cleaning, these methods require certain presets or use specific tools. Below we will discuss in detail the algorithms that will help to return access to Redmi or POCO without catastrophic consequences.

Before we take action, we need to calm down and take a sober look at the situation. Recovery menu resets are the easiest, but also the most painful option, as it deletes all user files. Our goal is to avoid this step by using the more subtle unlocking tools provided by the ecosystem developers.

It's important to understand that the success of the operation depends on whether certain synchronization functions were activated beforehand. If you neglected to set up the Mi Cloud service or did not turn on USB debugging, the choice of methods is narrowed, however, even in such cases, there is a chance to restore access using a Google account or specialized software.

Using Mi Account to Remotely Unblock

The most reliable and official way to restore access is to use the Mi Cloud service. If your device has signed in to your Xiaomi account and enabled the Find Device function, you can remove the screen lock remotely, which works without losing data, since it only changes the security settings, not erases the contents of the memory.

To do this, you'll need a computer or other smartphone with Internet access. Go to the official cloud service website and log in using the same Mi Account as the locked phone. The site interface allows you to control the device even when it's locked.

⚠️ Note: Remote unlock only works if the locked phone is connected to a mobile network or Wi-Fi. If the device is in aeronautical mode or without a SIM card, the command from the server will not be executed.

Once logged in, select your device from the list of available gadgets. From the control menu, find the option to Lock or Unlock. The system will prompt you to enter a new password that will replace the forgotten pin or pattern lock. Once confirmed, just press the lock button on the phone (if it reacts) or just wait for sync.

πŸ’‘

If Find Device has been disabled, this method will not work, so it’s worth checking if Smart Lock is enabled in Google’s security settings, which allows you to unlock your phone in certain locations or when you connect to trusted devices.

If you do this successfully, you'll have full control of your smartphone, and all the apps, photo gallery and settings will remain in place, a perfect scenario that emphasizes the importance of pre-associating the device to your manufacturer's account.

Unblocking method through Google Account

Owners of devices with Android version below 5.0 (and on some shells) MIUI And above, they can use the built-in recovery function through Google. If you enter the wrong password or pattern lock five times in a row, a lock message with a timer will appear on the screen, at which point often (but not always) a button appears "Forgot the pattern lock?" or "Forgotten" PIN-code?".

Clicking on this button will prompt you to enter the username and password from Google Account, which was the main one on the device, which is a standard security measure that allows you to prove that the device is owned by the owner, and after successful authorization, the system will suggest you to specify a new way to lock or disable it completely.

  • πŸ”‘ Enter the wrong code 5 times in a row to call the recovery menu.
  • πŸ“² Click on the β€œForgot your password” link in the bottom corner of the screen.
  • 🌐 Enter the Google account details tied to your smartphone.
  • πŸ†• Create a new one. PIN-unlock-code.

It’s worth noting that on current MIUI and Android versions, this feature is often hidden or removed entirely for security reasons. However, on older Redmi Note or Xiaomi Mi models, it can still be active in previous generations.

Why did Google remove this feature?
Google is gradually abandoning the ability to reset passwords through an operating system-level account, considering it a vulnerability, and now prioritizes biometrics and hardware security keys, making life harder for hackers but making it harder for forgetful users to regain access.

Unlocking through ADB (pre-setting required)

This method is the most technically challenging, but also the most effective for advanced users who have enabled USB Debugging beforehand. If you have this feature activated in the Developer Menu and your computer has previously logged in to your phone, you can delete the file that stores the lock keys via the command line.

First, connect your smartphone to your PC through USB-Make sure the drivers are installed on the computer. ADB Open the command line (cmd) or terminal in the tool folder of the platform. Enter the command to check the connection with the device: adb devices. If the list appears device status, then the connection is established.

adb shell rm /data/system/gesture.key
adb shell rm /data/system/password.key

Executing these commands deletes files responsible for storing the pattern lock and PIN-Then you have to restart the device. MIUI You may need to enter any code or key after rebooting – the screen must unlock.

⚠️ Note: On devices with data encryption (which is enabled by default on Android 6.0 and higher), deleting these files may not work without root rights. In this case, the system will simply request the password again after rebooting, since the encryption keys are tied to the password.

If you have root rights, the list of files to delete is expanded. You can also try to delete the locksettings.db file, but this requires caution. ADB is good because it does not require Internet and works at the system level, bypassing the locking interface.

β˜‘οΈ Testing method readiness ADB

Done: 0 / 4

Comparison of Access Restoration Methods

To make it easier for you to choose the right option, we have systematized all the methods described in the table. Each method has its own requirements and risks, so carefully study the possibilities of your particular case.

MethodConditions requiredRisk of data lossDifficulty
Mi CloudMi Account, Internet on the phoneNo.Low.
Google AccountAndroid < 5.0 or older MIUINo.Low.
ADB TeamsUSB debugging enabled, Root (preferably)No.Tall.
Smart LockPre-configured trusted locations/devicesNo.Low.

As you can see from the table, Mi Cloud remains the leader in terms of data usability and security. Methods using ADB require technical training, but give more control. Google Account should be considered only as a backup option for older devices.

πŸ’‘

The main conclusion: the presence of Mi Account enabled and active synchronization is the only guarantee of secure access recovery without data loss on modern Xiaomi smartphones.

Third-party software and service centers

There are many programs on the Internet that promise to unlock Xiaomi in one click, including both useful utilities and outright viruses, and programs like Android Multi Tools or ADB AppControl can really help if they use the same ADB commands mentioned above, but through a user-friendly interface.

However, be very careful with programs that require root rights to work if you don’t have them. Trying to get superuser rights on a locked device often results in a cyclical restart (bootloop) or a complete lockdown of the bootloader, in which case data recovery will become almost impossible even for professionals.

  • πŸ›‘οΈ Use only proven software from official developers' websites.
  • 🚫 Avoid programs that require payment before showing results.
  • πŸ’» Service centers have equipment (boxes) that allow you to reset a password at memory level, but this is a paid service.

If the data on the phone is critical and none of the software methods worked, the only safe option is to go to an authorized service center, and engineers can try to read the data directly from the memory chip, although this too becomes a difficult task on modern models with encryption.

πŸ“Š Have you ever had a phone lock?
Yeah, I forgot my password.
No, I'm using a print.
Yes, I blocked my Google account.
No, but I'm afraid of it.

What to do if nothing helps

If neither Mi Account, Google, or ADB work, we have to face the reality that the data is too secure, and the only way to do that is to reset the phone completely through Recovery Mode, and that will bring it back to factory status by removing all the photos, contacts, and apps.

To enter recovery mode, press both Volume Up and Power (on some models Volume Down and Power). From the menu, select Wipe Data -> Wipe All Data. Once confirmed, the phone will clear and restart.

⚠️ Warning: After the reset, the phone will ask for a password from a Google account or Mi Account that was previously installed on it (protection) FRP). If you do not remember these passwords, unlocking the device will be extremely difficult without contacting the service with a check about the purchase.

To avoid this situation in the future, set up automatic synchronization of important data. Contacts should be saved in Google Contacts, and photos should be saved in Google Photos or Mi Cloud. Regular backup is the only insurance against loss of information in case of any failure.

Frequently Asked Questions (FAQ)

Can I unlock Xiaomi without the internet?
The official methods (Mi Cloud) are not, because the command has to come from the server. The ADB method works without the Internet, but requires pre-configuring debugging. Recovery resets also work offline, but results in data loss.
Will my phone reset if I enter the wrong password many times?
Modern versions of MIUI don't reset the phone automatically after many attempts; they only increase the lock time (timer), but if the "Erase Data After 10 Attempts" feature is enabled in the security settings, the device can clear.
Will a call to a locked phone help?
On older versions of Android, there was a bug that allowed you to access the settings via the call menu, and on current MIUI firmware, this method does not work, since the call interface is isolated from the security settings system.
How do I know if Mi Cloud sync is enabled?
You can only check this by logging into Mi's i.mi.com account from another device, and if your phone is displayed on the list of devices and you see its geolocation or model, then the sync has been active.