How to change the lock on Xiaomi: the complete guide

Changing security codes on a smartphone is not just a routine procedure, but a necessary measure to ensure the safety of your personal data. Owners of Xiaomi, Redmi and POCO devices often face the need to change the standard four-digit pin code to a more complex password or implement biometric protection. Modern Android operating systems and MIUI / HyperOS shells provide flexible tools for access control.

The procedure for changing locks can be required in different situations: you forgot the current code, purchased a used device or simply decided to increase security. It is important to understand that the methods of changing depend on whether you have access to the settings menu or the screen is completely locked. In this article, we will discuss all the current ways to control access to the system.

Before you make changes, you should know that deleting your old password without entering your current password is only possible through a full reset, which will lead to data loss. So if you have access to your desktop, go through the standard menu. If access is lost, more radical measures will be required.

Standard password change through settings

The easiest and safest way to change the lock type or the code itself is to use the system menu, which doesn't require you to connect to your computer and saves all your files. First, unlock your smartphone and find the Settings app.

In the settings menu, you need to find the partition that's responsible for protection. Depending on the version of the MIUI or HyperOS firmware, the path may vary slightly, but the logic remains the same. Usually this is the password and security section or the lock screen.

  • πŸ”’ Click on Device Protection or Screen Lock.
  • πŸ”’ Select the current type of lock and enter the old password to confirm identity.
  • πŸ†• Click Change Password or select a new type (Pin Code, pattern lock, Password).

Once you have entered the new code, the system will ask you to confirm it by re-entering it. Be careful when typing characters, especially if you choose a complex alphanumeric password. A single-character error can block access to the device.

β˜‘οΈ Checklist before changing password

Done: 0 / 4

If you plan to use a pattern lock, try not to choose simple shapes such as the letters "G" or "Z." Attackers often check these popular patterns first when trying to hack.

Setup of biometric protection

Entering a password can be tedious every time, so modern Xiaomi smartphones offer biometrics, which can be a fingerprint scanner located on the screen or on the side of the face, or a system of unlocking the face.

To set up, go to the Passwords and Security menu and select Add a fingerprint. The system will ask you to apply your finger to the sensor several times from different angles, which is necessary to create an accurate digital cast.

⚠️ Note: Biometric data is stored in a secure partition of the memory of the processor and is not transmitted to Xiaomi servers. However, if the screen is heavily contaminated or there is a protective film of poor quality, the scanner may not work properly.

Unlocking the face works faster, but is considered less secure than a fingerprint, as a two-dimensional face image is easier to fake (for example, a photo) than copying a papillary pattern.

Why is Face ID worse on Xiaomi than iPhone?
Apple's technology is being used 3D-Scanning (dot projector), whereas most Xiaomi smartphones (except flagship series) use a conventional front-facing camera for analysis 2D-It's faster, but less reliable in poor lighting.

Using a Mi Account to Restore

Xiaomi ecosystem is tied to the Mi Account. If you have linked the device to your account and enabled the Find Device function, you have the opportunity to reset the screen lock password remotely or through special procedures, if the system allows it in your version of the software.

However, it is worth considering that in the latest versions of Android and MIUI, direct screen unlocking via the cloud web interface is often not available for security reasons. The main purpose of the account here is to prevent theft. If you forget your password and reset your phone, without the username and password from Mi Account, you will not be able to use it.

To check your account status, go to Settings β†’ Mi Account. Make sure your email is displayed and your status is active. This is critical to restoring access in the event of a full lock.

πŸ’‘

Always write down your Mi Account login and password in a safe place (notebook or password manager) without which your phone becomes a brick after a reset.

Resetting a forgotten password through Hard Reset

If you have forgotten your password, pattern lock or pin and can’t get into the settings menu, the only official way is to get your phone back to factory status by removing all user data, photos, contacts and apps.

To do the reset, you need to go into Recovery mode. Turn off your smartphone completely. Then press both the power button and the volume button at the same time. Hold them until the Mi logo or the recovery menu appears.

In the Recovery menu, the volume buttons (up/down) control the choice, and the power button confirms the choice. You need to select Wipe Data, then Wipe All Data and confirm the action by selecting Confirm.

Action.The resultData security
Change in settingsNew passwordComplete.
Reset via Mi CloudUnlocking (rarely)Partial
Hard Reset (Recovery)Clean systemComplete removal
Recovery Mode (Fastboot)Flip-flashingComplete removal

Once the cleaning process is complete, the phone will restart, and the initial setup will take a few minutes, and it's important that if the phone has been turned on with theft protection, the system will require you to enter a password from Mi Account or a Google account that was synced earlier.

πŸ“Š What type of lock you are using?
pattern lock
4-digit PIN
A complex password
Just a fingerprint.

Unlocking via Fastboot and PC

For advanced users, there is a method of unlocking or flashing through Fastboot mode, which allows you to interact with the phone at a low level through a computer. USB and installed drivers ADB/Fastboot PC-only.

To enter Fastboot mode, turn off your phone and press the power button along with the volume down button, and the screen will show an image of a rabbit repairing an android and the words FASTBOOT. Connect the device to your computer.

You can send commands through the Windows command line. However, you can’t simply reset your password through fastboot oem unlock on global versions without an unlocked bootloader. The bootloader unlock procedure requires you to apply to Xiaomi and wait 7 days (168 hours).

fastboot devices


fastboot oem unlock

Unlocking the bootloader automatically performs a Wipe Data reset for security purposes, so if you decide to go this way to install custom firmware or recoveries (such as TWRP) to bypass the password, the data will still be lost.

⚠️ Note: Using Fastboot commands without understanding their purpose can cause software to break (soft brick.

Ad Blocker Problems and System Errors

Sometimes users are faced with a situation where the lock screen behaves incorrectly, does not accept the correct password or constantly gives out an error, often caused by system process conflicts or malware disguised as system applications.

Try rebooting the device to Safe Mode, press the turn off button, and when the Turn off icon appears on the screen, press and hold it, and the system will suggest that you go to Safe Mode, in which third-party applications do not start.

If the password is safe, it means that one of the apps you installed is causing the problem. Remember what you installed before the problem occurred, and remove suspicious programs. Often, the culprits are "optimizers", "cleaners" or applications to block calls.

πŸ’‘

If the password is not accepted, but the fingerprint works – urgently back up the data and change the password through the settings while there is access.

If the phone’s internal battery is dead or has crashed and the date has β€œflew” into the past (for example, in 2015), security certificates may stop working, which will cause errors when entering a password or operating accounts.

Frequently Asked Questions (FAQ)

Can I unlock Xiaomi without losing data if I forget my password?
Officially, no. Modern versions of Android encrypt user data with a key that is tied to the lock password. Without the right password, you can't decrypt the data. There are paid services that save data, but they only work on very old versions of Android (up to 6.0) or on devices with vulnerabilities in the bootloader.
What to do if your phone requires a password from your Mi Account after a reset?
This is anti-theft protection. You need to remember the username and password of the account that was linked to the device. If you don't remember the data, try to re-enable your computer through id.mi.com, and without that, you can't legally unlock your phone.
How many times can you make a mistake when entering a password?
Usually after 5 wrong attempts, the phone locks for 30 seconds. With each successive series of errors, the lock time increases (5 minutes, 15 minutes, 1 hour). After many attempts, the device can offer a reset via a Google or Mi Account, or lock permanently before connecting to the Wi-Fi from which you previously logged in.
Does changing your password affect your fingerprint?
After the device is rebooted, you always need to log in first with a password./PIN-It's only after you've successfully entered the code that the biometric sensors are activated. This is the standard security measure for Android.
Where to find out. PUK-code if it's blocked SIM-map?
Lockdown SIM-cards (request) PUK) It is not connected to the locking of the phone screen. PUK-The code is on a plastic card that came with the SIM card, or in your mobile operator's personal account, and you can enter it in the dial menu or in a special window when you lock the SIM.