How to clean up PIN-Xiaomi Phone Code: Official and Alternative Methods

Forgotten PIN-Xiaomi smartphone code is a situation that one in five users face, according to statistics from service centers, 63% Unlocking applications are made on devices with MIUI 12-14, So the security system was tighter, unlike the old versions, where you just typed in a pattern lock. 5 Once in a row, modern smartphones Redmi Note 12, POCO X5 or Mi 13 They are blocked afterward. 3 But there's a way out, from official Mi Account resets to engineering techniques using the same methods. ADB or Fastboot.

In this article, we will discuss all the current ways of removing PIN-It's important to know that some of the methods you use for Xiaomi in 2026, including those that work without a linked Mi Account or with the Internet down. USB-If you read this in advance, bookmark the instructions. If your phone is already locked, go straight to Emergency MeasuresΒ».

1 Unlocking through Mi Account (official method)

The most secure and recommended method for Xiaomi is to use a tied Mi Account.It works on all models, including the Redmi 10C, POCO F4 and the flagship Mi 13 Ultra, but there are nuances:

  • πŸ“Ά The phone must be connected to the Internet (Wi-Fi or mobile network).
  • πŸ”‘ The Mi Account must be linked to the device before being blocked.
  • ⏳ Unlock time: 5 minutes to 72 hours (depending on model and version) MIUI).

Instructions:

  1. On the lock screen, click β€œForgot Password?” (or β€œForgot Password?” on English firmware).
  2. Select β€œUnblock through Mi Account” and enter the login / password from the account.
  3. Confirm the action via SMS or email (if two-factor authentication is enabled).
  4. Follow the instructions of the system – the phone will unlock automatically.

⚠️ Note: If you bought a phone with your hands and the previous owner did not untie the account, this method will not work, in which case you will need to contact the service center with proof of purchase (check, contract).

πŸ“Š What kind of smartphone you Xiaomi?
Redmi (Note/Pro series)
POCO (F/X/M)
Mi (flagship series)
Black Shark (game)
Other

2. Recovery Mode reset (data loss)

If the Mi Account is not tied or you don’t remember the login details, you will have a hard reset via Restore mode, which will delete all data from your phone, including photos, contacts and apps, but will return access to the device, suitable for Xiaomi models based on Qualcomm Snapdragon and MediaTek (for example, Redmi 9A or POCO M4 Pro).

Step-by-step:

  1. Turn off the phone with a long press of the power button.
  2. Hold the combination: πŸ”§ For most models: Volume up + Nutrition. πŸ”§ For POCO F3/F4: Loudness down + Nutrition. πŸ”§ For Mi. 11/12: Loudness up + Loudness down + Nutrition.

Mi

Recovery

Wipe Data

Wipe All Data

Confirm the action and wait for the process to be completed (5-10 minutes).

Reboot

Reboot to System

Xiaomi modelCombination for RecoveryFeatures
Redmi Note 10/11/12Volume up + NutritionMenu in Chinese - look for the character "" (data cleanup).
POCO X3/X4/X5Loudness down + NutritionIt can be delayed up to 30 seconds when you download Recovery.
Mi 13/13 ProVolume up + down + NutritionConfirmation via Mi Account is required even after resetting.

⚠️ Note: On new models (Mi 13, Redmi Note 12 Pro)+) After resetting via Recovery, you may need to enter the Mi Account data associated with the device previously. If the account is not yours, the phone will turn into a brick».

Turn off the phone from charging.

Make sure the battery is at least 30% charged.

Prepare the original. USB-cable (to connect to a PC if required)

Download Xiaomi drivers for your model (from the official website)-->

3. Unlock via Fastboot (for advanced)

The method via Fastboot is suitable if:

  • πŸ”Œ The phone's debugging on. USB (Even if it is now blocked).
  • πŸ’» You have access to a computer with installed Xiaomi drivers and the Mi Flash Tool program.
  • πŸ“₯ You can download the firmware for your model (for example, from the Xiaomi Firmware Updater website).

Algorithm of action:

  1. Install on PC Mi Flash Tool and Xiaomi drivers (you can download on the official website).
  2. Download the firmware for your model (choose the Fastboot version, not Recovery!).
  3. Turn off the phone and put it in Fastboot mode: Clip Volume Down + Power before the hare appears in the hat-eared (logo Fastboot).
  4. Connect your phone to your PC via USB and start the Mi Flash Tool.
  5. In the program, click Select, specify the path to the downloaded firmware, then Refresh (should appear). COM-port).
  6. Select Clean All mode and press Flash.
  7. Wait for the process to complete (10-20 minutes) and restart the phone.
What to do if the Mi Flash Tool can't see your phone?
1. Check the connection. USB-cable (try another port or cable). 2. Install drivers manually through Device Manager (select "Update driver" β†’"Perform a search on this computer" β†’ Please specify the folder with the Xiaomi drivers. 3. Disable the antivirus - it can block the work of the Mi Flash Tool. 4. Try to run the program on behalf of the administrator.

This method is more difficult than resetting via Recovery, but has the advantage that if the firmware is selected correctly, the chances of successful unlocking are higher. However, there is no guarantee - on some models (for example, Redmi K50) after the firmware is blocked Mi Account.

4.Use of ADB (if debugging is enabled)

If the phone was pre-installed on the debugging USB (USB Debugging, you can try to remove PIN-code ADB (Android Debug Bridge: This method does not result in data loss, but only works if two conditions are met:

  1. Debugging is activated in the developer settings (Settings β†’ About Phone β†’ MIUI version – tap 7 times, then go back to Additional Settings β†’ For Developers).
  2. The computer you connect to is authorized (i.e. you confirmed access when you first connected).

Instructions:

  1. Connect your phone to your PC via USB.
  2. Open the command line (Win + R β†’ enter cmd).
  3. Enter the commands in order: adb devices (to display your device) 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
  4. After the reboot, the phone will be unlocked.

⚠️ Attention: On new versions MIUI 13/14 This method may not work because of the enhanced security, and if you haven't confirmed debugging access on this PC before, the adb device team will return the blank list.

πŸ’‘

If the su command doesn't work, the phone doesn't have root permissions. Try skipping it and running the rest of the commands without it.

5. Alternative methods (for older models)

Xiaomi smartphones before 2019 (e.g. Redmi 4X, Mi A1, Mi Max 2) sometimes run security holes to bypass locks without resetting.

Method 1: Emergency call (for MIUI 8-10)

  1. On the lock screen, click "Emergency Call".
  2. Enter #4636## and the test menu will open.
  3. Return to the home screen via the home button (if any) or swipe.
  4. Now you can go into the settings and disable PIN-code.

Method 2: Reset via Google Account (for Android 7-9)

If you have a Google account on your phone:

  1. On the lock screen, enter any PIN 5 times in a row.
  2. The button β€œForgot the pattern lock?” will appear.
  3. Enter the login and password from the Google Account linked to the device.
  4. Follow the instructions for resetting the lock.

These methods don’t work on all devices and can be closed in new updates.If your model is released after 2020, the chances of success are minimal.

πŸ’‘

On new Xiaomi models (2021-2026), alternative unlock methods are practically not working due to hardware encryption of data and binding to Mi Account.

6. Contacting a service center: when nothing helps

If all of these methods do not work, there are two options:

  • πŸ”§ Official Xiaomi Service Center (check or sales contract required).
  • πŸ› οΈ Unofficial workshops (risk of losing warranty or data).

The cost of unblocking in official centers:

Type of lockdownCost (β‚½)Timeline
Resetting your PIN via Mi Account (if your account is yours)Free of charge.5-30 minutes
Unblocking without account data (with proof of purchase)1 500–3 0001-3 days
Reset via EEPROM (for phones with damaged firmware)3 000–6 0002-5 days

Before you bring your phone to the service, check:

  • πŸ“„ A check or contract (without them, the official center will not help).
  • πŸ”’ Mi Account Status – If it is blocked, unlocking the phone will become impossible.
  • πŸ“± Device model – some (such as Black Shark) require special tools.

⚠️ Warning: In informal workshops, they may suggest "swiping the phone through the box" (like a UFi Box or a Medusa: 15% These operations end in complete failure of the device (especially on models with Snapdragon). 8 Gen 1/2).

FAQ: Frequent questions about unlocking Xiaomi

Can I take it down? PIN-code without loss of data?
Yes, but only if the phone is debugging USB and the computer is authorized, and the ADB method (Section 4) will help, and on newer models (Mi 13, Redmi Note 12), even this method may not work due to hardware encryption.
What to do if you forget your Mi Account login/password?
Restor your access via the official Mi Account website. If you have an email or phone number attached, follow the recovery instructions. Importantly, it is officially impossible to unlock your phone without access to your account (except for resetting via Recovery, but it will delete all data).
Does Google Account Unblocking Work on New Xiaomi?
No. Since MIUI 12 (2020), Xiaomi has completely removed Google’s unlock support, which now only works on older Android 7-9 models (like the Redmi 5 Plus or Mi A2).
Can I unlock Xiaomi through IMEI?
No, it's a myth. IMEI is used to identify a device on the network, but not to unlock it. Fraudsters often offer "IMEI code generators" - that's a hoax. The only official way without account data is to contact a service center with proof of purchase.
How to protect your phone from accidental locks in the future?
Follow these recommendations: πŸ” Use a fingerprint or facial recognition as an additional way to unlock. πŸ“ Write it down. PIN-code in a secure location (for example, in the Bitwarden password manager or 1Password). πŸ”— Link your Mi Account and make sure you remember your password. πŸ’» Turn it on. USB-Debug and authorize your home PC (in case of use) ADB).