How to unlock the screen on Xiaomi if you forget your password or pattern lock

Forgot the password from Xiaomi or the child accidentally blocked the phone with a pattern lock? The situation is familiar to many – according to statistics, one in five users at least once faced with the problem of unlocking the screen. Fortunately, on Redmi, POCO and other Xiaomi devices, there are several official and unofficial ways to unblock without losing data or with minimal consequences.

In this article, we will analyze all current methods - from simple input of backup PIN-It's important: the effectiveness of the method depends on the phone model, version. MIUI and whether features like Find Device or O were previously includedEM Unlock. for example, on Xiaomi 13 Pro with MIUI 14 Some old vulnerabilities have already been closed, and workarounds are still working on Redmi Note 8 (2019.

We warn you that not all methods are safe. Incorrect actions can lead to complete loss of data (photos, contacts, messages) or even β€œbricking” of the device if it is a firmware through EDL. So read carefully each section and choose the method that suits your situation.

1 Unlocking through backup PIN- code (the easiest way)

If you’ve ever set up a pattern lock on Xiaomi, the system might suggest creating a backup PIN- code, which works on all devices with MIUI 10 and later, including the POCO X3, Redmi 10 and flagship models like the Xiaomi 12T.

To take advantage of the backup PIN:

  • πŸ”’ Enter the wrong pattern lock 5 times in a row (some models only have 3 times).
  • ⏳ Wait 30 seconds and the message will appear "Forgot your password?" or "Backup PIN".
  • πŸ“± Click on this label and enter the 4- or 6-digit backup code you specified when setting up the lock.
  • πŸ”“ If the code is correct, the phone will unlock and you can set a new password.

⚠️ Warning: If you don't remember the backup PIN or have never installed it, this won't work. Don't try to pick up the code at random - after 10 failed attempts, the phone may lock up for 24 hours or require Mi Account data to be entered.

Some firmware (e.g. MIUI Global for the European market) suggest that Google Account data be entered instead of a backup PIN, but Xiaomi has been gradually abandoning this feature in favor of its own Mi Account since 2022.

πŸ“Š What kind of screen locking you use?
pattern lock
PIN-code
Password.
Fingerprint.
Facial recognition

2 Unlocking through Mi Account (official method)

If your Xiaomi has a Mi Account attached (which is automatically created when you first turn on), you can unlock your phone through a website, which works even if you forget the password from the screen, but remember the data from the Mi Account.

Instructions:

  1. 🌐 Go to account.xiaomi.com from a computer or other phone.
  2. πŸ”‘ Sign in with the same account that is linked to the locked device.
  3. πŸ“ From the menu, select "Find Device" β†’ find your phone in the list.
  4. πŸ”“ Press "Unlock." The system will send a command to reset the lock.
  5. πŸ“± Connect your phone to the Internet (via Wi-Fi or mobile network) and wait 1-5 minutes. The screen should unlock automatically.

If this method does not work, check:

  • πŸ”„ The phone has enabled Find Device (Settings β†’ Mi Account β†’ Find Device).
  • πŸ“Ά The device is connected to the internet (even if the screen is locked, Wi-Fi or mobile data may be working).
  • πŸ”„ The Mi Account was not deleted or changed after the lock was set up.

⚠️ Warning: On phones with MIUI China, Find Device can be disabled by default, and this method does not work if the device has been reset to factory settings, in which case proof of ownership through Xiaomi Service Center will be required.

πŸ’‘

If you have two-factor authentication enabled in Mi Account, prepare backup codes or email/SMS access for confirmation in advance.

3. Reset the pattern lock via Safe Mode (Security Mode)

On some Xiaomi models (mainly up to MIUI 12), you can bypass the screen lock via Safe Mode.

  • πŸ“± You have a pattern lock (not PIN or password set).
  • πŸ”§ The OEM Unlock feature in the developer settings is disabled on the phone.
  • πŸ“… Firmware older than 2021 (new versions have closed the vulnerability).

How to start Safe Mode:

  1. πŸ”„ Turn off the phone with a long press of the power button.
  2. πŸ” Hold the Power and Volume button down at the same time until the MI logo appears.
  3. πŸ“± Release the buttons when you see the words "Safe Mode" in the lower left corner of the screen.

In safe mode:

  1. πŸ”“ Try entering any graphical key, sometimes the system misses it because security services are disabled.
  2. πŸ”§ If you don't, go to Settings β†’ Apps β†’ All apps.
  3. πŸ—‘οΈ Find the Screen Lock app (or Screen Lock) and click Stop or Delete Data.
  4. πŸ”„ Reboot the phone - the lock should reset.

⚠️ Warning: On phones with MIUI 13/14 and new models (Xiaomi 13, Redmi Note 12), this method does not work β€” Xiaomi closed the vulnerability in 2022 year. Also, after leaving Safe Mode, some features (for example, fingerprint) may need to be reconfigured.

4. Unlock via Fastboot (for advanced users)

If previous methods didn’t work, you can try removing the password file via Fastboot, which requires an unlocked bootloader (Bootloader Unlocked) and only works on phones that previously enabled OEM Unlock in the developer’s settings.

What you need:

  • πŸ–₯️ Computer with drivers installed ADB/Fastboot (You can download it on the Android website).
  • πŸ”Œ USB-cable (preferably original).
  • πŸ“± Phone with a charge of at least 50%.

Step-by-step:

  1. πŸ”„ Turn off your phone and press Power + Volume down to log into Fastboot Mode.
  2. πŸ–₯️ Connect the phone to your computer and open the command prompt (Win + R β†’ enter cmd).
  3. πŸ“Œ Enter the command to check the connection: fastboot devices Must appear serial number of the device.
  4. πŸ”§ Enter the command to delete the file with the password: fastboot erase userdata or (for new models): fastboot erase locksettings
  5. πŸ”„ Reboot your phone: fastboot reboot

Once rebooted, the screen lock will be reset, but all user data (photos, apps, settings) will be deleted – a method that is virtually equivalent to factory resetting, but retaining firmware.

⚠️ Warning: On Bootloader Locked phones, fastboot erase commands won't work -- the system will ask for proof of ownership via Mi Account. If you haven't unlocked the bootloader beforehand, it's useless.

β˜‘οΈ Preparing for Unlocking via Fastboot

Done: 0 / 5

5. Reset to factory settings (Hard Reset)

If no other methods have worked, a full reset via Recovery Mode will delete all data on the phone, including photos, messages and installed apps, but is guaranteed to remove the lock screen.

How to make a Hard Reset:

  1. πŸ”„ Turn off the phone.
  2. πŸ” Press Power + Volume up for 10-15 seconds until the MI logo and Recovery menu appear.
  3. 🌐 Select a language (usually English or Chinese) from the menu.
  4. πŸ—‘οΈ Find "Wipe Data" or "Clear All Data" (could be called "Reset").
  5. πŸ”˜ Confirm the reset (usually by the Power button or by selecting "Yes").
  6. πŸ”„ Wait for the process to be completed and restarted.

Once reset, the phone will turn on as new and you will need to go through the initial setup. If you previously had a Mi Account tied, the system can request account details to confirm ownership (Factory Reset Protection feature).

Xiaomi modelDoes it support resetting through Recovery?Is Mi Account Required After Resetting?Notes
Redmi Note 10/11βœ… Yes.βœ… Yes, if he was tied up)Chinese firmware may require additional confirmation
Xiaomi 12/13βœ… Yes.βœ… Yes.FRP function is enabled by default
POCO X3/X4βœ… Yes.❌ No (on global firmware)Exception – if Find Device is enabled
Redmi 9A/9Cβœ… Yes.❌ No.Budget models often do not have a strict binding to the account.

⚠️ Warning: Phones from MIUI China (Chinese version of firmware) may need to enter a Chinese phone number tied to the device after reset. If you bought the phone informally (for example, on AliExpress without unlocking), it will be extremely difficult to restore access.

6. Alternative methods (for specific cases)

If the standard methods don't work, you can try the less obvious ones, they're suitable for rare situations and they require additional conditions.

Method 1: Unlock via ADB (if USB debugging is enabled)

If you enabled USB Debugging in the developer settings before blocking, you can try to delete the password file via ADB:

adb shell


su




rm /data/system/gesture.key




rm /data/system/password.key




rm /data/system/locksettings.db




rm /data/system/locksettings.db-wal




rm /data/system/locksettings.db-shm




reboot

After restarting, the lock should disappear, but this method only works if:

  • πŸ”§ Debugging on USB was enabled prior to locking.
  • πŸ”“ The phone has root rights (most Xiaomi don’t have them by default).
What if the ADB can’t see the device?
If the adb device command does not show your phone, check: - Are ADB drivers installed for your model. - Is the original USB- cable used (not all cables support data transfer). - Is File Transfer Mode (MTP) enabled in the phone settings (if the screen is unlocked). - Does the antivirus or firewall block access on the PC.

Method 2: Bypassing an emergency call (obsolete method)

On very old firmware (MIUI 8 and below) there was a bug that allows you to bypass the lock through the emergency call screen:

  1. πŸ“ž On the lock screen, press Emergency Call.
  2. πŸ”’ Enter ##4636##, which opened the testing menu.
  3. πŸ”§ This menu allowed you to access settings and disable locking.

Now, this method doesn't work -- Xiaomi closed the vulnerability back in 2018, but if you have a very old model (like the Redmi 4X with MIUI 7), you can try it.

Method 3: Contact Xiaomi Service Center

If none of the methods worked, the official path remains:

  • πŸ“„ Prepare documents confirming the purchase (check, box with serial number).
  • 🏒 Find the nearest Xiaomi service center.
  • πŸ’° Be prepared to pay for the service (the cost of unlocking is from 1000 to 3000 rubles depending on the model).

The service centre may:

  • πŸ”§ Reset the lock through special software (Mi Flash in EDL mode).
  • πŸ“„ Request proof of ownership (if the phone is linked to another account).
  • πŸ”„ Reflash the device with data storage (in rare cases).

πŸ’‘

If the phone is bought from hand or tied to someone else's Mi Account, official unlocking may not be possible without proof of ownership.

Frequent Mistakes and How to Avoid Them

When trying to unlock Xiaomi, users often make critical mistakes that can make things worse.

Error 1: Repeatedly entering the wrong password

After the 10-15 failed attempts to enter the pattern lock or PIN- code, Xiaomi can:

  • πŸ”’ Lock your phone for 24-72 hours.
  • πŸ“± Require the entry of Mi Account data even if there was no prior binding.
  • 🚫 Completely disable the unlock without resetting.

What to do: If you forget your password, you can switch to alternative methods (via Mi Account or Safe Mode).

Mistake 2: Using unofficial firmware

Some users try to flash their phone through the SP Flash Tool or Mi Flash by downloading firmware from dubious sites.

  • πŸ’€ Filling of the device (phone stops turning on).
  • πŸ”“ Loss IMEI (phone does not catch the net).
  • πŸ›‘οΈ Spyware installation (in unofficial firmware may be backdoors).

What to do: Use only official firmware from Xiaomi and tools like Mi Flash from trusted sources.

Mistake 3: Ignoring backups

Many users start to panic because of the lock, forgetting that the data can be restored.

  • πŸ–₯️ Whether sync with Mi Cloud (Settings β†’ Mi Account β†’ Mi Cloud) was enabled.
  • πŸ“± Are there backups in Google Account (contacts, calendar, some settings)
  • πŸ’Ύ Are photos saved in Google Photos or another cloud?

What to do: Even if your phone is locked, connect it to your computer and check if it is defined as a removable drive (sometimes files can be copied without unlocking).

FAQ: Answers to Frequent Questions

Can I unlock Xiaomi without losing data?
Yes, but only in three cases: If you remember the backup PIN- code for the pattern lock; if the phone is unlocked through the Mi Account (Find Device function); If USB debugging was previously enabled and there is root access (rarely); in all other cases, the data will be lost.
What to do if you forget your Mi Account information?
Restore access to Mi Account via: πŸ“§ Email (if linked to an account). πŸ“ž Phone number (SMS with recovery code). πŸ”‘ Backup codes (if included two-factor authentication). If nothing helps, contact Xiaomi Support with documents confirming the purchase.
Does Google Account Unblocking Work on Xiaomi?
No. Since 2022, Xiaomi has completely abandoned unlocking through Google Account in favor of its own Mi Account, which was sometimes still available on older models (before MIUI 11), but now it is disabled.
Can you unlock Xiaomi if it’s tied to someone else’s Mi Account?
Technically, but legally, only if you prove ownership. Options: πŸ“„ Go to the service center with a check or a sales contract. πŸ’¬ Contact the previous owner and ask to remove the device from his account. πŸ”§ Use informal methods (e.g., firmware through EDL), but it's risky. If the phone is bought by hand without decoupling from the old account, the chances of unlocking are minimal.
How to protect Xiaomi from accidental blocking in the future?
So that you don't have to face the problem again: πŸ”’ Write down the backup. PIN-code for a pattern lock to a safe place. πŸ“± Link Mi Account and enable Find Device. πŸ–₯️ Regularly back up your files via Mi Cloud or Google Drive. πŸ”§ Turn on Debugging. USB (Settings β†’ The phone. β†’ Version. MIUI β†’ 7 times press β†’ Developer settings β†’ Debugging by USB).