How to unlock Xiaomi if you do not remember the password: save data

When you pick up your Xiaomi, Redmi or POCO smartphone and it requires a password you canโ€™t remember, it causes panic. Most standard access recovery instructions offer a full Hard Reset, which inevitably leads to the removal of all photos, contacts and documents. However, there are less radical ways to return access to the system that allow you to bypass the lock screen without affecting user files.

In this article, we will take a closer look at the working methods of bypassing locks that are relevant to modern versions of the MIUI and HyperOS shell. You will learn how to use cloud services, special utilities for PC and hidden debugging functions to save your data. It is important to understand that the success of the operation depends on the version of Android, the type of lock installed and the pre-preparation of the device.

Before we take action, we need to take a hard look at the risks, and trying to hack your own device is always a balance between regaining access and potentially losing information, and we'll look at the methods from the most secure, using official accounts, to the more sophisticated technical solutions that require a computer connection.

Using Mi Cloud to Remotely Unlock

The most reliable and secure way to restore access to the device without data loss is using the Mi Cloud service. If the Internet was turned on on on the locked smartphone and you signed in to Mi Account, you have a high chance of successfully unlocking the screen. This method works through remote control of the device from any other gadget.

You'll need access to a computer or other smartphone to start with, go to the official Xiaomi cloud storage site and log in with the same account that was used on the locked device, and the system will automatically identify the attached gadgets, and you'll have to select the right device from the list for further manipulation.

In the device management menu, find Find Device or Find Device. In this section, the Unlock tool is available, which allows you to remotely remove the screen lock. Once you press the appropriate button, the system will send a command to the smartphone, and the pattern lock or pin code will be disabled, while all files will remain in place.

โš ๏ธ Warning: Remote unlocking via Mi Cloud will only work if the locked phone has internet (Wi-Fi or mobile data) activated. If the device, the command will not be executed until the network is available.

It is worth noting that this method does not work if Lost Mode is enabled, as it is specifically designed to lock the device completely in the event of a theft, and the feature may not be available if too long has passed since the last sync and the status of the device has not been updated in the cloud.

๐Ÿ“Š Do you use Mi Cloud for backup?
Yeah, all the time.
Only a photo.
Rarely.
I don't use it.

Forgot your password through your Google account

On devices with older versions of the Android operating system (typically up to and including version 9), the ability to reset a password through a Google account was retained, a security mechanism that allowed the owner to confirm their rights by entering a username and password from the mailbox associated with the device.

To use this method, you need to enter the wrong pattern lock or pin five times in a row, and after the fifth attempt, the โ€œForgot Passwordโ€ or โ€œForgot the pattern lockโ€ button should appear on the lock screen, clicking on this option will trigger the authorization window in the Google account.

If your Gmail account is correct, the system will suggest you install a new way to lock the screen or turn it off completely.This method is standard and does not require third-party software, but unfortunately, on modern versions of MIUI with Android 10 and above, it has been abolished in order to improve security.

Why did Google remove this feature?
Google has abandoned the system-level password reset method to prevent social engineering and account theft, and now prioritizes biometrics and more sophisticated security algorithms that make it difficult to get around the lock even to the owner without additional tools.

If the button doesnโ€™t appear on your device after five failed attempts, it means that the feature is disabled by the manufacturer in your firmware version, in which case relying on standard Android tools is useless, and you will have to look for alternative solutions.

Unlocking through ADB and debugging via USB

The ADB (Android Debug Bridge) method is one of the most powerful tools in the arsenal of advanced users, allowing you to control your device from a computer at a deep level, but it is critical that you include USB debugging in the developer menu beforehand.

If debugging is enabled, connect the smartphone to the computer through high-quality USB-You'll need a set of drivers and a platform installed. ADB Open the command line or terminal in the folder with ADB and type in the command to check the connection: adb devices. If the device is determined and received device status, you can proceed to delete the lock files.

adb shell rm /data/system/gesture.key


adb shell rm /data/system/keyguard/locksettings.db




adb shell rm /data/system/keyguard/locksettings.db-wal




adb shell rm /data/system/keyguard/locksettings.db-shm

Executing these commands will delete files that store pattern lock and pin hashes. Once rebooted, the device may ask you to enter the password again, but any character set will work, or the lock will disappear completely. This method is effective, but requires accuracy in entering commands.

โ˜‘๏ธ Preparation for work with ADB

Done: 0 / 4

โš ๏ธ Note: If the smartphone was not pre-enabled debugging USB, method ADB If you don't, the computer won't have access to the file system to delete the keys, and you'll see the status of unauthorized or an empty list of devices.

Find My Device from Google

Googleโ€™s Find My Device is an alternative to the Mi cloud, which also allows you to manage a locked device remotely if you log in to a Google account and geolocate it, and is similar to Mi Cloud, but has its own features.

Go to android.com/find and log in. Select your device from the list. In the action menu, you'll see the options "Clear Device," "Block" and "Call." The "Clear" option will result in a complete reset, which we don't need, but the "Block" feature allows you to set a new password, overriding the old one.

Once you have a new password installed through the web interface, you can try to enter it on the phone lock screen. On some models and firmware versions, this action replaces the old forgotten code. However, be prepared for the fact that on newer versions of MIUI, this feature is often limited only to installing a message on the screen or an audible signal.

MethodConditions requiredData retentionProbability of success
Mi CloudInternet, Mi AccountYes.Tall.
Google AccountAndroid 9 and belowYes.Low (on new)
ADB CommandsUSB debugging enabledYes.Medium
Hard ResetAccess to RecoveryNo.100%

Specialized software for unlocking

There are a number of third-party programs designed to restore access to Android devices. Tools like Dr.Fone, Tenorshare 4uKey or iMyFone LockWiper offer an automated process to unlock, claiming to be able to bypass the lock screen without losing data on certain models.

The way these programs work is to exploit vulnerabilities or use bootloaders, so you plug your phone into your PC, run the program, and follow the instructions on the screen, and it usually takes a few minutes and doesn't require a lot of technical knowledge from the user.

However, it is important to understand that most of these programs are paid, and their effectiveness depends heavily on the specific model of the smartphone and the version of Android. On devices with data encryption (which is the standard for Android 6.0 and higher), deleting the password often still leads to data encryption, making it unreadable without a key.

๐Ÿ’ก

Always check the compatibility of the unlock program with your specific Xiaomi model on the official developer website before purchasing a license.

Using unverified software carries security risks. You trust a third-party program to access your device, so you should download such utilities only from official developers' sites, avoiding dubious builds from torrents.

Total reset as a last resort

If none of the sparing methods worked and data access failed, the only guaranteed way to bring the phone back to life is Hard Reset, a procedure that will completely clean the deviceโ€™s internal memory, returning it to a factory state as it was when it was purchased.

To perform the reset, turn off the smartphone completely. Then press the button combination to enter Recovery mode. For most Xiaomi models, this is the Volume Up + Power button. Hold them until the Mi logo appears, then release the power button while continuing to keep the volume.

From the Recovery menu (which can be in Chinese or English), select Wipe Data, then Wipe All Data, and confirm the action. Once the process is complete, select Reboot. The phone will run for a long time, and you will have to reset the original setting.

โš ๏ธ Warning: Once you reset your settings, the phone will require you to enter a password from a Google account or Mi Account that was previously synced (FRP). If you do not remember passwords from accounts, it will be extremely difficult to unlock the phone even after resetting.

To avoid future data loss, set up automatic synchronization of important contacts, photos and documents to cloud storage, and backups are the only reliable insurance against such situations.

๐Ÿ’ก

Hard Reset is a 100% way to get your phone back, but it is guaranteed to delete all user data, so it is a last resort.

Frequently Asked Questions (FAQ)

Can I unlock Xiaomi without the internet?
Unlocking a device without internet is almost impossible unless ADB is pre-enabled. Mi Cloud and Find My Device require a connection to transmit an unlock command. Without a network, the phone will not be able to verify your access rights on the server.
Will Mi Cloud erase my photos when unlocked?
No, the Mi Cloud (Unlock) unlock feature is only designed to remove the screen lock. It does not delete personal files, contacts or apps. However, the Erase feature will delete all data, so be careful when choosing the action in the menu.
What to do if the phone asks for a code after restarting?
If, after applying the ADB file reset or reboot methods, the phone requests the password again, this means that the lock data may have been stored in memory or the method did not work correctly, in which case it often helps to repeat the procedure or completely reset the settings.
Is it safe to use third-party software to unlock?
There is always some risk in using third-party software, and although popular software like Dr.Fone has a good reputation, you transfer control of the device to a third party, use such methods only if official methods are not available, and download the software exclusively from official resources.