How to unlock Xiaomi phone if you forget PIN-Code: from simple methods to extreme measures

Forget it. PIN-Smartphone code is a bad situation, but it's not a bad one, especially if you're talking about Xiaomi phones, where the manufacturer has a few ways to restore access, and the key is not to panic and try to guess the code using a science squeak. After 5-10 failed attempts, the device can lock permanently or even erase all data (on some models with the device protection function enabled).

In this article, we will discuss all the current methods of unlocking, from the simplest (via Mi Account) to radical (full reset via Fastboot), each method is illustrated with step-by-step instructions, and we will also indicate what risks certain actions carry. If you are not sure of your technical skills, you should contact the Xiaomi service center, so as not to lose important data.

⚠️ Important: All methods except Mi Account unlocking result in deletion of user data (photos, contacts, messages). If backups to Mi Cloud or Google Account were enabled on the phone, they can be restored after unlocking.

1 Unlocking with Mi Account (the safest way)

If your Xiaomi is tied to a Mi Account (which is automatically created when you first turn on your phone), you can unlock the device through the manufacturer’s website, which works on most models, including the Redmi Note 10/11/12, POCO X3/X4/X5, Mi 11/12/13, and others.

Conditions for this method:

  • 📱 The phone is connected to the Internet (via Wi-Fi or mobile network).
  • 🔄 The device is synchronized with Mi Account.
  • 🔐 Remember the username and password from the Mi Account.

If all conditions are met, follow the instructions:

  1. On the locked screen, click Forgot Password? (or Forgot Password? on English firmware).
  2. Enter the username and password from Mi Account.
  3. Confirm unlocking via SMS or email (if two-factor authentication is enabled).
  4. Create a new one. PIN-code.

⚠️ Warning: If the phone is not connected to the network, this method will not work. MIUI 14+ You may need to confirm your Google Account (if it has been added to your device).

📊 What is the way to unlock Xiaomi you tried?
Mi Account
Hard Reset
ADB/Fastboot
I've been to the service.
I haven't tried it yet.

2.Reset via Recovery Mode (Hard Reset)

If Mi Account is lost or the phone is not connected to the Internet, it is hard to reset through the recovery mode, which deletes all data on the device, but returns access to the system, and is suitable for most Xiaomi models, except those that are protected by the Mi Cloud Lock (discussed below).

How to log in to Recovery Mode:

  1. Turn off the phone with a long press of the power button.
  2. Press Volume Up + Power at the same time and hold for 10-15 seconds until the Mi logo appears.
  3. In the recovery menu, select the language (usually English or Chinese).
  4. Go to Wipe Data → Wipe All Data (or Wipe All Data) → Chinese-made).
  5. Confirm the reset and wait for the reset.

⚠️ Note: On some models (Redmi) 9/10, POCO M3/M4) After Hard Reset, you may need to enter data from Mi Account, which was previously linked to the device. If you don't remember the password, the phone will turn into a brick».

☑️ Preparation for Hard Reset

Done: 0 / 4

3. Unlock via Fastboot (for advanced users)

If Recovery Mode is not available or the phone is locked at the bootloader level, you can try resetting via Fastboot.This method requires a computer with ADB/Fastboot drivers installed and USB Type-C cable. Suitable for Xiaomi models based on Qualcomm processors (for example, Redmi Note 11 Pro, POCO F4).

Step-by-step:

  1. Install Google’s Platform Tools on your PC.
  2. Turn off the phone and press Volume Down + Power to log into Fastboot Mode.
  3. Connect the device to your computer and open the command line in the adb folder.
  4. Enter the command to check the connection: fastboot devices If the phone is determined, continue.
  5. Run reset: fastboot erase userdata fastboot erase cache fastboot reboot

⚠️ Note: On Bootloader Lock phones, this method won’t work without first unlocking through the Mi Unlock Tool.

What is Bootloader Lock?
This is protection against unauthorized firmware changes: on new Xiaomi models (released after 2021), the bootloader is locked by default, unlocking requires binding to Mi Account and waiting 7-15 days (according to Xiaomi rules).

4. Unlock via ADB (if USB debugging is enabled)

If the phone has previously been turned on USB (In the developer settings, you can try to delete the file from PIN-codewise ADB. This method only works when connected to a PC and requires pre-configuration.

Instructions:

  1. Connect your phone to your computer and open the command line in the adb folder.
  2. Check the connection: Adb devices
  3. Delete password files: adb shell rm /data/system/gesture.key adb shell rm /data/system/password.key adb shell rm /data/system/locksettings.db
  4. Reboot your phone: adb reboot

Once you reboot, the lock screen should disappear. If not, repeat the steps or try another method.

⚠️ Attention: MIUI 13/14 This method may not work because of the system's enhanced security, and after the keys are removed, the phone may require the old one to be entered. PIN-code at the next inclusion.

💡

If USB debugging has been disabled, but the phone is recognized by the computer as a media device, try using Mi PC Suite to unlock it, which in some cases allows you to reset your password without losing data.

5 What to do if the phone requires Mi Account after reset

Many Xiaomi models (especially those released after 2020) will have a request for input from Mi Account, which was previously linked to the device, after Hard Reset or Fastboot firmware, which is a theft protection, but it also becomes a problem if you forget your password.

Options for a solution:

  • 🔑 Restor access to Mi Account via the official account.xiaomi.com website (access to the email or phone number specified during registration is required).
  • 📄 If the account is not restored, contact the Xiaomi service center with proof of purchase (check, box, warranty card).
  • 🚫 Do not use third-party services to bypass Mi Account – this violates Xiaomi’s rules and may lead to device locking at the level of the user. IMEI.

⚠️ Note: On phones with Mi Cloud Lock (e.g. Redmi Note) 10S, POCO X3 GT) Bypassing account binding is impossible without official unlocking. Attempts to flash custom software or use security holes lead to a complete lockdown of the device at the hardware level.

6. Alternative methods and myths about unlocking

There are dozens of “secret” ways to unlock Xiaomi online, but most of them are either outdated or simply not working.

MythReality.
“You can unlock it by phone call.”This method doesn't work on MIUI 12+, and you could take a call and access the settings through the call menu, but now the vulnerability is closed.
There is a universal code for resetting PIN.There's no such code. All generators» PIN-codes are fraud.
You can flash custom Recovery (TWRP) and bypass the lock.On new Xiaomi models, TWRP installation requires unlocking the bootloader, which is impossible without the Mi Account.
“Service centers can reset the lock without proof of purchase.”The official Xiaomi SCC requires a check or a warranty card. Unofficial can help, but the risk of running into scammers is high.

⚠️ Warning: If you are offered to “unlock” your phone for a fee through remote access to your PC, it is 100% fraud. Xiaomi does not provide such services, and all the “specialists” are simply stealing data or installing malware.

💡

The only working ways to unlock Xiaomi without losing data is to restore it through Mi Account or contact an official service center with documents on the phone.

FAQ: Frequent questions about unlocking Xiaomi

Can I unlock Xiaomi without losing data?
Yes, but only if: The phone is tied to Mi Account and connected to the Internet, previously USB debugging was enabled and there is access to the PC, otherwise the data will be erased.
What to do if you forget your Mi Account password?
Restore it through the recovery page, you will need access to the email or phone specified during registration, if the data is lost, contact Xiaomi with proof of purchase of the device.
Why does a Hard Reset phone ask for an old PIN?
This is a feature of MIUI protection: On some models (for example, Redmi Note 11), after a reset, the system can request the last used PIN or password from Mi Account.
Can I unlock Xiaomi through my Google Account?
On phones with MIUI 12 and later, unlocking through Google does not work, and this method is only relevant for older models (until 2019 release) or devices with custom firmware.
How much does it cost to unlock in the service center?
Cost depends on model and reason for lock: Reset PIN-code (without reference to Mi Account) – 500-1500 ₽. Unlocking Mi Account (with proof of purchase) – 1000–3000 ₽. Complex cases (for example, a broken bootloader) – from 3000 ₽. Xiaomi’s official SCCs charge a fixed fee, unofficial can overstate prices.