How to unlock Xiaomi Mi 5 if you forget your password: the full guide 2026

Why Mi 5 is blocked and what to do

The forgotten password on Xiaomi Mi 5 is a situation faced by thousands of users. The 2016 smartphone is still popular due to its reliable hardware and support for custom firmware, but its security system does not forgive mistakes. PIN-5 times in a row, the device is locked for 30 seconds, and after 20 unsuccessful attempts – forever, requiring a reset.

Compounding the problem, the Xiaomi Mi 5 does not support unlocking through Google’s Find My Device (due to the lack of Google services on global versions with MIUI), and many users disable or forget the Mi Account data, depriving themselves of the most reliable way to restore access. In this article, we will analyze all the current methods of unlocking, from official to technical, taking into account the features of this model.

It’s important to understand that on Xiaomi Mi 5, you can’t get around the lock without losing data unless you have activated Mi Account or USB debugging. All β€œmagic” programs like Miracle Box or UFi Box require payment and often don’t work on modern versions of MIUI. We’ll focus on free and proven ways.

Method 1: Unlocking with Mi Account (official method)

If your Mi 5 has a Xiaomi account (Mi Account) linked and activated, this is the fastest and safest way to reclaim access, and works even after the screen is completely locked, but requires:

  • πŸ“± Access to another device (PC, smartphone, tablet) with the Internet.
  • πŸ”‘ Login and password from Mi Account (or associated) email/phone-restore).
  • 🌍 Connecting a locked phone to a Wi-Fi or mobile network.

Instructions:

  1. On the locked screen Mi 5 tap the button Forgot the password? (appears after 5 failed attempts to enter).
  2. Select Unlocking via Mi Account.
  3. Enter the email or phone associated with the account, and the specified address/number will receive a confirmation code.
  4. Enter the code on your phone and follow the system's prompts. Once authenticated successfully, the device unlocks.

⚠️ Note: If you have previously disabled your settings β†’ Xiaomi account β†’ This method will not work, and Xiaomi may also request additional verification (document photo or selfie) if the account was created a long time ago and was not used.

πŸ“Š You have used Mi Account on your Xiaomi?
Yeah, I tied it up on the first switch.
Yeah, but I turned off the sync.
No, I never did.
I remember.

Method 2: Hard Reset (complete reset via Recovery)

Hard Reset is a radical method that deletes all data on the phone, including the password. On the Xiaomi Mi 5, it is executed via Recovery Mode, but there are nuances:

  • πŸ”§ It works on any version. MIUI, Even if the phone is completely locked.
  • ⚠️ Deletes all files, photos, apps and settings (as when buying).
  • πŸ”’ Does not require a password or Mi Account, but may require confirmation through an account after a reset (if Device Protection was enabled).

Step-by-step:

  1. Turn off Mi 5 with a long press on the power button (10-15 seconds).
  2. Press Volume Up + Power Button at the same time and hold for 10-15 seconds until the Mi logo appears.
  3. Release the buttons and you will be taken to the Recovery menu (in Chinese or English).
  4. Use volume buttons for navigation and power button for selection. Select Wipe Data β†’ Wipe All Data.
  5. Confirm the action and wait for the process to be completed (2-5 minutes).
  6. Restart the phone (Reboot).

β˜‘οΈ Preparation for Hard Reset

Done: 0 / 4

⚠️ Note: If after reset, the phone requests a password from Mi Account, and you do not remember it, you will have to contact Xiaomi with proof of ownership (check, box, IMEI). In 2026, the company tightened its security policy and unlocking through support can take up to 30 days.

Method 3: Unlocking via Fastboot (for advanced users)

The method via Fastboot is suitable if:

  • πŸ”§ You have a computer with Xiaomi drivers installed and ADB/Fastboot.
  • πŸ”“ The phone was on debugging. USB (Even if the screen is blocked now).
  • πŸ“₯ You can download the official firmware for the Mi 5 (for example, from the Xiaomi Firmware Updater website).

Instructions:

  1. Download and install Platform Tools (includes fastboot and adb).
  2. Connect the Mi 5 to your PC in Fastboot mode: Turn off the phone, then press Volume Down + Power before the screensaver with a rabbit in its cap appears.
  3. Open the command prompt (cmd) in the folder with Platform Tools and check the connection command: fastboot devices Must appear serial number of the device.
  4. Unpack the downloaded firmware (.tgz format) and find the file flash_all.bat (for Windows or flash_all.sh (for macOS/Linux).
  5. Launch the file and start the firmware of the phone with a complete reset.

⚠️ Warning: Don't interrupt the firmware process! If you turn off your phone while you're recording a system or boot partition, the device can turn into a brick (not even on Fastboot). MIUI Chinese (and vice versa) can lead to problems with the IMEI mobile.

What if Fastboot can’t see the phone?
1. Check the cable - use the original USB-Type-C from Xiaomi.2. Install the drivers manually through Device Manager (select "Mi Flash" or "Android Bootloader Interface").3. Try another USB port (preferably USB 2.0).4. Disable the antivirus - it can block fastboot.

Method 4: Bypassing the lock through ADB (if debugging was enabled)

If the Mi 5 was activated before the lock was activated debugging USB (in Settings β†’ About Phone β†’ MIUI version, tap 7 times, then in Additional β†’ For developers), you can try to delete the file with a password through ADB. This method does not erase data, but only works if the conditions are met:

Instructions:

  1. Connect your phone to your PC (it should be determined in adb devices).
  2. In the command line, type: 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
  3. After resetting, the password will be reset.

⚠️ Attention: On new versions MIUI (12+) Xiaomi has blocked this method β€” locksettings.db is protected by SELinux. If the phone still requires a password after rebooting, try repeating the commands by pre-mounting the partition to record:

adb shell


su




mount -o rw,remount /data

Method 5: Contact Xiaomi Service Center

If none of these methods worked, the official way to do this is to contact the service center, and in 2026, Xiaomi tightened the unlock rules, so you'll need to:

  • πŸ“„ Check or warranty card for the purchase of the phone (with indication) IMEI).
  • πŸ†” Passport of the holder (to confirm the identity).
  • πŸ“± Phone itself (must be turned on even if locked).

The process can take 3 to 30 days, as the data is sent to China for verification, the cost of the service is from 1,500 to 3,000 rubles (depending on the region), if the phone was bought with hands, the chances of unlocking are minimal.

πŸ’‘ Useful advice: Before visiting the service, check IMEI phone (on the box or under the battery) and check it with the data on the IMEI.info website. IMEI does not match or the phone is listed in the blacklist, unlock will be denied.

Unlocking Methods Comparison: What to Choose

MethodConditions requiredData retentionDifficultyRisks.
Mi AccountA linked and confirmed accountβœ… Yes.⭐⭐ (easily)Verification may be required
Hard ResetAccess to Recovery❌ No.⭐⭐ (easily)Loss of all data
FastbootPC, firmware, drivers❌ No.⭐⭐⭐ (middle-of-the-road)Risk of "bricking"
ADBUSB debugging enabledβœ… Yes.⭐⭐⭐⭐ (difficult)It doesn't work for the new MIUIs.
Service centrePhone IDs.❌ No (usually)⭐ (easily)Long, expensive, not always possible.

πŸ’‘

If the Xiaomi Mi 5 didn’t have Mi Account tied and USB debugging enabled, the only working ways are Hard Reset or Fastboot, but both lead to data loss.

Frequent Mistakes and How to Avoid Them

When trying to unlock the Mi 5, users often face typical problems:

  • πŸ”Œ The phone is not charging in mode Recovery/Fastboot. Solution: Use the original cable and charging on 2A. Connect your phone to your PC – sometimes it only charges like that.
  • πŸ” Mi Account doesn't accept passwords. Solution: try to restore access via account.xiaomi.com using a backup email or phone. If the account is tied to a Chinese number, it's almost impossible to restore it.
  • πŸ“± After Hard Reset, the phone asks for the old password. Solution: it means that the device has been enabled, Mi Account. Without the data from the account, you can't unlock the phone.
  • πŸ–₯️ Fastboot doesn't see the device Solution: Check the drivers (install the Mi Flash Tool) and try another one USB-Windows 11 may require disabling driver signatures.

⚠️ Warning: Never buy "unblock" from dubious sites (like gsm-flasher.com).Crackers often sell "unblock codes" that are actually phishing links to steal Mi Account data.The only official way is through Xiaomi's service center.

Can I unlock the Xiaomi Mi 5 without losing data?
Yes, but only if: Mi Account was linked and confirmed on the phone (method 1). USB debugging was enabled and the phone is determined in ADB (method 4).
What to do if you forget your Mi Account information?
Try to restore access via account.xiaomi.com using a backup email or phone.If the account is tied to a Chinese number, contact Xiaomi support via the feedback form.Recovery can take up to 30 days and require document scans.
Why does the phone ask for a password from Mi Account after resetting via Recovery?
This means that the phone has activated the function of Device Protection (Mi Cloud), without the data from the account, you can not unlock the phone.
Can I unlock Mi 5 through Google Find My Device?
No. Xiaomi Mi 5 on global MIUI versions does not support Google services (including Find My Device), which only works on phones with pure Android or firmware like LineageOS.
How to avoid blocking in the future?
Follow these guidelines: Attach Mi Account and enable synchronization. Activate Debugging by USB (Regularly back up your account through Settings. β†’ System system β†’ Backup. Use a password manager (like Bitwarden) for storage PIN-code.