A situation where the smartphone owner forgets the pattern lock, PIN-A code or digital password is one of the most common problems in the mobile world, and it's particularly frustrating to realize that the standard procedure for restoring access through a factory reset permanently destroys all your photos, contacts and correspondence. Owners of Xiaomi, Redmi and POCO They often face the dilemma of either losing access to their phone or losing their data. MIUI HyperOS and offer several loopholes and workarounds.
Before you get into action, you need to calm down and analyze what kind of security tools have been activated on your device before. Most methods of bypassing lock only work if the Mi Account was tied in advance, and the Internet connection on the locked screen is functioning or can be activated. We will look at both Google’s regular tools and the specific methods for the Xiaomi ecosystem that allow you to save information on the internal drive.
It’s important to understand that with each new version of Android and security update, manufacturers are tightening the screws, making hacking methods less effective. However, in 2026 there are still a number of working algorithms that allow you to regain control of the gadget. Below we will discuss each of them in detail, assess the risks and provide step-by-step instructions for different lock scenarios.
Use the “Find Device” function from Google
The most legal and safe way to unlock is to use Google’s built-in service, which works seamlessly if the device is logged in to a Google account, geolocated and has an active Internet connection (Wi-Fi or mobile network), the essence of the method is to remotely change the password of the screen lock via the web interface.
You will need to access another device (computer or smartphone) with Internet access to the official android.com/find page and log in to the same account that was used on the locked phone. If the system sees your device online, you can select a lock option that allows you to set a new temporary password.
- 📱 Make sure that the Internet is on the blocked Xiaomi (sometimes it is enough to insert) SIM-Card with a tariff where there is traffic).
- 🌐 Log in to your Google account from another device via your browser.
- 🔒 Select the “Block” option and set a new 4-digit or 6-digit code.
- 🔄 Enter a new code on the Xiaomi lock screen instead of the forgotten pattern lock.
It is worth noting that this method does not work on all versions of Android equally stable. In some cases, the option to change the password may not be available if high security mode is enabled. However, it is worth trying first, since this is the only way that is guaranteed not to require root rights or complex software.
⚠️ Note: If you see a message “Device Offline”, try connecting to a known Wi-Fi network via the emergency call menu (if possible) or just wait until the phone goes online on its own.
💡
Before attempting to unlock, make sure the battery is at least 30-40% charged so that the phone doesn’t turn off at a critical point in the procedure.
Unlocking with Mi Account and Find Device
Xiaomi’s ecosystem has its own Google-like service that is often even more effective at unlocking. Mi Cloud allows you to control your device remotely if you have signed in to your Mi Account and enabled Find a Device, a standard tool built into MIUI firmware.
The process is similar to Google's, but it has its own peculiarities: you need to go to i.mi.com from any browser. After logging in to your Mi Account, select the "Find Device" section. The list will show all the gadgets associated with your account.
The interface will suggest several actions: play the sound, lock or clear the device. We are interested in locking. By clicking on the corresponding button, the system will ask you to enter a new lock password. Once the actions are confirmed, if the phone is online, the old password will be replaced with a new one.
- 🔑 Go to i.mi.com and log in to your Mi Account.
- 📱 Select a locked device from the list of available.
- 🛑 Press the Lock button and set a new 6-digit code.
- ✅ Enter a new code on your phone screen to unlock.
The main advantage of this method before resetting is that the data stays in place. However, if the Find Device feature was disabled in the phone settings in advance, this method, unfortunately, will not work. Also remember that after successful unlocking, the system may require you to confirm your account ownership by entering a password from the Mi Account.
Smart Lock Method and Trusted Devices
The Smart Lock feature built into Android allows you to bypass screen locking in certain safe situations. If you set this feature up in advance, your phone can unlock automatically when certain conditions are met, such as when you are in a “safe place” or near a “trusted device.”
Check if you have Safe Place mode activated. If you are at home and your address has been added to Smart Lock settings as a safe zone, the phone can unlock without entering a password simply by geolocation.
The algorithm is simple: turn on Bluetooth on your phone (if it's off, try through the Quick Access menu, pulling the notification curtain if the Android version allows it) and plug in the trusted device. Once the connection is established, the screen can unlock, allowing you to log in to settings and turn off your password.
| Smart Lock type | Activation condition | Probability of success | Required setup |
|---|---|---|---|
| Safe place. | Staying within radius GPS-marker | Tall. | Pre-added address |
| Trusted device | Connection via Bluetooth | Medium | A coupler |
| Physical contact | Phone in hand/pocket | Low (depending on model) | Active gyroscope |
| Voice matching | OK Google team. | Low (rarely working on a blocked one) | Customized Voice Match |
This method is often overlooked as irrelevant, but in a critical situation it can be a lifeline, and if none of the conditions are met and trusted devices are not connected, then we will have to move on to more complex technical solutions.
Why does Smart Lock stop working?
Using ADB to delete password files
For advanced users who have previously included USB Debugging in the developer menu, there is a powerful tool called Android Debug Bridge (ADB), which allows you to delete system files that store password hashes through the computer command line. This is one of the few ways that you can actually reset your password without losing data, but it requires pre-preparation.
You will need a PC with drivers installed ADB and USB-Connect your phone to your computer. If debugging is allowed and your computer is authorized, you can send commands, and the main task is to delete gesture.key (for a pattern lock) or password.key (for a digital password), and locksettings.db.
adb shell rm /data/system/gesture.key
adb shell rm /data/system/password.key
adb shell rm /data/system/locksettings.db
adb shell rm /data/system/locksettings.db-wal
adb shell rm /data/system/locksettings.db-shmOnce these commands are executed, you need to restart the device. On the new lock screen, you can enter any password or swipe in any direction - the system will let you through, since the check file has been deleted. Immediately after logging in, you are recommended to set a new password.
⚠️ Note: On modern versions of Android (11, 12, 13, 14 and newer) access to the folder /data/system/ root-free is often closed even when debugging is enabled, and works mostly on older firmware or devices with superuser rights.
Specific codes and engineering menu Xiaomi
There is a myth that there are universal password reset codes that are entered through the emergency call screen. In reality, codes like ##7780## or ##34971539#* on modern Xiaomi devices either don't work without a password or require confirmation through a menu that is not available when blocked.
Some users report success using combinations that open the test menu. If you get there, you can sometimes find a network reset or Bluetooth option, which can indirectly help you use the Smart Lock method. But there is no direct command to "reset the screen password" on the engineering menu.
A more efficient method of using the Xiaomi ADB/Fastboot Tools utility on a PC is third-party software that automates the process of removing system lock files. The program itself defines the model and version of Android, offering affordable unlock options.
- 💻 Download and install Xiaomi ADB/Fastboot Tools on the computer.
- 🔌 Connect the phone with the debugging enabled USB.
- 🗑️ In the Clear or System section, find the option to delete lock files.
- 🔄 Reboot and check access.
Make sure you only download tools from official sources or trusted developer forums (such as 4PDA or XDA Developers) to avoid infecting your computer or phone with malware.
☑️ Pre-use checks ADB
What to do if nothing helps
Unfortunately, if none of the above methods worked (no account, no debugging enabled, no Smart Lock), the situation becomes critical. Android’s current data encryption system is built in such a way that the screen password is the key to decrypting the user partition. Without this key, data cannot be physically read, let alone saved.
In this case, the only way out is a full reset. Yes, it will delete all data, but it will give you back control of the device. To do this, press the Volume Up + Power buttons before the Mi logo appears. Then select the language, go to the Wipe Data menu and confirm the action.
Once reset, the phone will request confirmation of a Google or Mi Account that was previously synced (FRP protection). Enter data from your account and the phone will be as new. In the future, be sure to set up regular backups to Mi Cloud or Google Drive so that in such situations, you do not lose important information.
⚠️ Warning: Once reset to factory settings, the phone can be locked for 15 minutes, 1 hour, or even 24 hours, requiring you to enter a Mi Account password.This is anti-theft protection, and it is almost impossible to get around it without the original account.
💡
If the data was not synced to the cloud and the password is forgotten without the possibility of recovery through accounts, a complete reset is the only technically possible solution.