Modern smartphones Xiaomi, Redmi and POCO store a huge array of confidential information, from banking applications to personal photos. That is why protecting the device from unauthorized access is the first place.
However, users often face the need to change the password: they forgot the old combination, suspected that the code could be seen by an outsider, or simply decided to strengthen the protection of the gadget. The process of replacing unlock on devices with a MIUI or HyperOS shell has its own nuances, which are important to consider so as not to lose access to data. In this article, we will discuss all the current methods of changing and resetting the key.
If you remember the current code and you just want to change it, it takes less than a minute, but if you lose access to the system, you'll need more complex manipulations, which I'll also talk about later, and it's important to understand the difference between simply changing your settings and crashing, because the consequences are very different.
Standard procedure for changing the key in the settings
The easiest and most secure way to change the access code is available to every user who has a login. It doesn't require third-party programs or a computer. You need to go to the main menu and select the Settings icon. Next, scroll to the bottom and find the Passwords and Security section.
In the menu that opens, the system will suggest you to select the type of protection. If you already have a pattern lock installed, you will see the option to Change your password or Delete your password. When you click on this button, the system will require you to enter the current combination of points to confirm your rights. Only after successful authorization will the window to select a new method of protection open.
So here you can not only change the pattern, but you can also change the type of lock, like going from a pattern lock to a digital key. PIN-A code or alphanumeric password that is considered more secure from an information security perspective, and this menu also configures smart face unlock or fingerprint if your Xiaomi is equipped with the appropriate sensors.
💡
Use complex, non-obvious shapes for a pattern lock. Avoid simple geometric shapes like the letter "L" or "Z", as fingerprints on the screen can give your code to an outsider.
Once you have selected a new pattern, the system will ask you to confirm it by re-entering it, and be careful that if you make a mistake in confirming it, you will have to start the process again, and after you successfully change the settings, the old key will stop working, and the screen will be unlocked in a new way.
What to do if you forget your pattern lock
The situation of a user forgetting the installed code is one of the most stressful. Unlike older versions of Android, modern MIUI shells do not allow you to simply reset your password after several failed attempts of entering without losing data unless security measures have been taken in advance.
The first thing to do when blocking is not to panic and not try to guess the combination endlessly. After 5-10 wrong inputs, the system can temporarily block the ability to enter or, in the worst case, require unlocking through the Mi Account. If the button “Forgot password” or “Forgot the pattern lock” appears on the screen, you are most lucky.
Clicking on this button will require you to enter your Mi Account login and password. This is anti-theft protection: only the account holder can unblock it. If you remember the account data, enter it and follow the instructions on the screen. Once you have successfully logged in, the phone will suggest you install a new unlock method or unlock the device immediately.
⚠️ Note: If the account recovery button does not appear or you do not have access to the Internet on a locked device, this method will not work.
Using Mi Cloud to Remotely Unlock
Xiaomi’s cloud storage service provides powerful tools to manage your device remotely. Find your device not only allows you to track your smartphone’s location, but also perform cleaning or unlock commands. This only works if your phone has internet enabled and your device search is activated in Mi Acca settings.
To use this method, you will need a computer or another smartphone. Go to the official i.mi.com website and log in under the same account that was used on the locked phone. In the service interface, select your device from the list of connected gadgets.
In the control menu, find the "Block" or "Unlock" button (the name may vary depending on the version of the interface). If you choose the lock function, you can set a temporary password that will replace the forgotten pattern lock. By entering this new code on the phone screen, you will gain access to the system.
The alternative is the "Erase Data" command, which performs a complete reset to factory settings, which is guaranteed to unlock the screen, but delete all photos, contacts and applications, and use this method only as a last resort when other methods have been exhausted.
Why can't Mi Cloud see the device?
Reset via Recovery (Hard Reset) menu
If the software methods don’t work, the only proven way is to completely reset through the Recovery Engineering Menu, which is universal for all Redmi, POCO and Xiaomi models, but it permanently removes all user information from internal memory.
To enter recovery mode, you need to turn off your smartphone completely. Then press the volume button and the power button at the same time. Hold them until the Mi logo or Recovery menu appears. If you press the volume button, you will enter Fastboot mode, which we don't need right now, in which case just press the power for 10 seconds to restart and try again.
In the Recovery menu, you can navigate with volume buttons (up/down), and the choice is confirmed by the power button. Some new versions support touchscreen control. You need to find Wipe Data or Clear Data.
☑️ Checklist before resetting via Recovery
Once you've selected a cleanup, the system can request confirmation by asking you to type in the word yes or select Confirm. The formatting process will take a few minutes. Upon completion, the phone will reboot and you'll see the screen of the initial setup, as when you first turn on the new device.
| Resetting method | Data retention | Access to the system is required. | Difficulty |
|---|---|---|---|
| Through Settings. | Yes. | Yeah (requires old password) | Low. |
| Mi Cloud (remotely) | No (when fully cleaned) | No (we need the internet) | Medium |
| Recovery Mode | No (complete removal) | No. | Tall. |
| Service centre | Depends on the situation. | No. | Needs a visit. |
Unlocking through computer and ADB
For advanced users, there is a method of resetting passwords through USB debugging and console commands ADB (Android Debug Bridge), this method is possible only if the locked phone has been pre-enabled the function “Debugging by USB” in the menu for developers.
If debugging is activated, connect your smartphone to your computer via the original cable. ADB drivers must be installed on your PC. Open the command line or terminal in the ADB tool folder and enter a command to check the connection:
adb devicesIf the device appears in the list, you can try to delete the file that stores the lock keys.
adb shell rm /data/system/gesture.keyOr, depending on the version of Android:
adb shell rm /data/system/keyguard/Once you've done the command, reboot the device. In theory, the protection should disappear and you can set a new password. However, on modern versions of MIUI with updated security patches, this method often doesn't work, since the key file can be protected by encryption.
⚠️ Warning: Do not use the dubious Xiaomi hacking software found on the Internet. Most of them contain viruses or require payment without providing a real solution.
Reset protection: Activation Lock
It is important to understand the theft protection mechanism implemented in Xiaomi devices. After performing Hard Reset (full reset) through Recovery, the first time you boot the phone will require you to enter the password from the Mi Account that was associated with the device before the reset.
This is done so that the thief who stole the phone can't just dump it and sell it, and if you don't remember the password from the Mi Account, retrieving access to the phone will be a huge challenge, requiring you to call official support with your purchase checks.
💡
Activation Lock (Mi Cloud Lock) is the main security barrier, and without the password from the owner’s account, it is almost impossible to unlock a dropped phone using legal methods.
So before you sell the device or give it away for repair, be sure to log out of the Mi Account and make a full reset through the settings to untie the device from your profile.
Preventing access problems
To prevent the situation with the forgotten key from taking you by surprise, it is recommended to set up backup methods of access in advance. PIN-It's also useful to link a Google account, although it's not easy to use it. MIUI Priority given to Mi Account.
Back up your data regularly, use Mi Cloud or Google Photos to sync your photos, and keep your contacts in Google Contacts, so even a complete reset of your device won’t be a disaster, as you can quickly recover all the important information.
Write complex passwords in a safe place. Human memory is imperfect, and a combination that seemed simple yesterday may be forgotten today. Using password managers or a paper notebook stored in a safe place is a reasonable habit.