When you pick up your Xiaomi Redmi and realize you canโt remember the security code, it causes panic in every user, and the lock screen becomes an insurmountable barrier, leaving behind all your contacts, photos and important documents, most often because of rush or long use of a simple pattern that suddenly flies out of your head.
It's important to be emotional, because reckless actions can lead to complete data loss. Modern security systems MIUI and Android are designed so that protection against theft is the first priority, so you can not simply bypass the code. However, there are several proven methods of restoring access to the device, which we will discuss in detail below.
Before we take action, we need to evaluate the importance of stored information, because if there are no critical files on the phone, the unlocking process will be much faster and easier, otherwise we will have to find a compromise between access to the system and data security.
Trying to unlock through Mi Account
The most gentle way to save all data is only available if you previously linked the device to your Xiaomi account. After five incorrect attempts to enter the pattern lock, the "Forgot password" or "Forgot the pattern lock" button should appear on the screen.
This method only works if there is an active Internet connection on the locked smartphone. If the network is disabled, the phone will not be able to contact the authorization server to check the entered data. In some versions of MIUI firmware, this feature may be disabled for security purposes or require pre-activation in the settings.
If you forget your password and your account, you can recover it from any other device via id.mi.com, but it takes time to recover, but it's the only legal way to log in without losing data through this method.
โ ๏ธ Note: Unlocking via Mi Account does not work if the โFind Deviceโ option has been forced off in the security settings or if the phone has never previously connected to Wi-Fi or mobile network.
๐ก
Always keep a backup phone number tied to your Mi Account on hand for quick access recovery. SMS-code.
Resets with Recovery Menu (Hard Reset)
The most common and guaranteed method, which helps 99% of the time, is to completely reset the system to factory settings, and you need to go to the Recovery Engineering Menu. On the phone that is turned off, press the volume button and the power button at the same time, hold them until the Mi or Redmi logo appears, and then release the power button, while keeping the volume.
In the menu, you can navigate with volume buttons (up/down), and the choice is confirmed by the power button. You need to find Wipe Data or Clear Data. Newer versions of MIUI may require confirmation of action by entering a special code that will appear on the screen, such as "yes" or numbers, this is done to protect against accidental reset in your pocket.
Once confirmed, the system will delete all user data, including photos, apps and settings, returning the phone to the "out of the box" state. The pattern lock will be deleted along with all other data. Once the process is complete, select Reboot to restart.
โ๏ธ Preparation for Hard Reset
Itโs worth noting that once reset, the phone will request the Google account that was synced to the device before locking, a standard FRP (Factory Reset Protection) protection procedure that cannot be circumvented without this data.
Use of Googleโs Find Device service
If the Internet was turned on on on the blocked Redmi and geolocation was activated, you can try remote unlocking through Google services. To do this, go from your computer or another smartphone to the site android.com/find and log in to the same Google account that is used on the blocked device.
The service will locate the device and offer several actions: play the sound, lock the device or clean it. Selecting the "Erase Device" option will initiate a remote reset similar to Hard Reset, which will delete the pattern lock, but also erase all data from internal memory.
The advantage of this method is that you don't have to physically press the buttons on the phone, which is convenient if the volume buttons are faulty, but if the phone is turned off or in flight mode, the command will only be executed after the next connection to the network.
| Method | Data retention | We need the Internet. | Difficulty |
|---|---|---|---|
| Mi Account. | Yes. | Yes. | Low. |
| Recovery Menu | No. | No. | Medium |
| Google Find Device | No. | Yes. | Low. |
| ADB (Debugging) | Yeah (possibly) | No. | Tall. |
Unlocking through USB debugging (ADB)
This method is suitable only for advanced users and requires preliminary preparation. USB" (USB Debugging) in the developer menu and allowed access to the computer, you can try to delete the file with the key through the command line.
To do this, connect your phone to your PC, open the command line in the ADB tool folder, and enter a command to delete the system key file. Usually it is a gesture.key or locksettings.db file located in the /data/system/ directory. Once the file is deleted and rebooted, the phone may unlock or suggest that you install a new code.
adb shell rm /data/system/gesture.key
adb shell rm /data/system/locksettings.dbOn modern versions of Android and MIUI, access to this root-free folder is often closed, even when debugging is enabled, so it doesn't work on all models and firmware versions, and if the phone requests permission to debug when you connect and the screen is locked, the method won't work.
Where to find ADB tools?
Features of unlocking Redmi with an account binding
After you successfully reset your settings with any of the methods, you'll encounter an activation screen. The security system will require you to enter a password from a Google account that was synced to the phone before the reset, which is an FRP (Factory Reset Protection) mechanism designed to protect the device from theft.
If you don't remember the password from your Google account, you have to restore it through the "Forgot Password" procedure on Google. Without this step, the phone will remain a useless piece of plastic. Entering the data of another account will not help, the system will be blocked until the correct data is entered.
In some cases, if the phone was bought from hand and the previous owner did not untie the device, it will not be possible to unlock it legally, you will need to contact the previous owner or service center with a purchase check for proof of ownership.
โ ๏ธ Attention: Attempts to circumvent FRP using third-party software can lead to the locking of the device or disruption of basic functions of the phone.
Prevention and backup
To prevent a forgotten key from being taken by surprise, it is important to back up data regularly. The Xiaomi ecosystem has a built-in tool called "Mi Cloud" that allows you to save contacts, messages, notes and system settings to the cloud.
It is also recommended to configure sync with Google Photos for images and videos, which will ensure the safety of your memories even in the event of complete loss of access to the device, and regularly checking the health of accounts is a useful habit.
Use biometrics like a fingerprint or a face scanner as an additional or primary method of unlocking them, which are much harder to forget than a graphical pattern, but remember that after you reboot your device, you still need to enter digital or graphical code.
๐ก
Regular sync with Mi Cloud and Google is the only way to ensure that you donโt lose data when you reset your settings.