How to unlock Xiaomi phone if you forget your password without deleting data

A forgotten password on a Xiaomi smartphone is a situation that thousands of users face every day. The main problem is that standard unlock methods (such as Mi Account) often require a factory reset, which means losing all data β€” photos, messages, contacts. But there are alternative ways to bypass the lock without deleting information.

In this article, we will discuss 5 Xiaomi’s working methods to unlock without losing data relevant to models 2020–2026 years, including the Redmi Note 12/13, POCO X5/F5, Xiaomi 13/14). Important: the effectiveness of the method depends on the version MIUI, bootloader status and device attachment to Mi Account. Some methods require prior preparation (e.g. enabled). USB-smackdowns, so read carefully.

Warning: Unblock attempts can result in Mi Account blocking or Anti-Rollback protection activation. If the phone contains critical data, consider contacting Xiaomi Service Center – some models (for example, Xiaomi 13 Ultra) support official restoration of access through authorized centers.

1 Unlocking through Mi Account (official method)

The most reliable way is to use a tied Mi Account, which works on all Xiaomi models if:

  • πŸ“± The phone is connected to the Internet (Wi-Fi or mobile network).
  • πŸ”‘ You remember the username and password from Mi Account that was tied to the device.
  • πŸ”„ Find Device is not activated on the device (otherwise, you will need confirmation via the device). SMS).

Instructions:

  1. On the lock screen, tap Forgot password? (or Forgot password? on English firmware).
  2. Select the option to Sign in via Mi Account.
  3. Enter your email/phone and account password. If two-factor authentication is enabled, confirm your login via SMS or backup email.
  4. After successful authorization, the system will prompt you to create a new password or PIN-code.

⚠️ Note: If the device activates Find Device, after 5 failed login attempts, the system can block the account for 24 hours.

πŸ“Š What Unlocking Method Have You Tried Before?
Mi Account
ADB
Fastboot
Service centre
Nothing.

2. use ADB (if USB debugging is enabled)

The method only works if the phone has been pre-activated USB Debugging (USB Debugging), a common feature among developers, but ordinary users rarely turn it on.

  • πŸ”Œ You connect your phone to your PC to transfer files MTP.
  • πŸ€– Install applications through ADB (For example, Lucky Patcher or Magisk).
  • πŸ“± In the developer settings (Settings) β†’ The phone. β†’ Version. MIUI, 7 times) the item was included in the Debugging USB.

If debugging is activated, follow the instructions:

β˜‘οΈ Preparation for unblocking through ADB

Done: 0 / 4

Then enter the commands in order:

adb devices

(Your device should be displayed. If the list is empty, check the drivers or cable.)

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

Once the phone is rebooted, it unlocks, but the pattern lock or PIN will reset, and you will be asked to create a new password.

πŸ’‘

If the su command doesn't work, the device doesn't have root permissions. Try skipping it and running the rest of the commands without su (efficiency is lower, but sometimes it works).

3. Unlock via Fastboot (for unlocked bootloader)

The method is suitable for devices with unlocked bootloader (Unlocked Bootloader). You can check the status of the bootloader by reading when you turn on the phone:

  • πŸ”“ Unlocked – the bootloader is unlocked (the method is suitable).
  • πŸ”’ Locked – the bootloader is blocked (the method will not work).

If the bootloader is unlocked, follow the following steps:

  1. Turn off your phone and press the Power button + Volume down to log into the Fastboot.
  2. Connect the device to your PC and open the command line in the folder with ADB.
  3. Enter the command to check the connection: fastboot devices
  4. Reset your password through a modified image boot.img (You need to download the firmware for your model from the site Xiaomi Firmware Updater: fastboot flash boot patched_boot.img fastboot reboot

⚠️ Attention: Wrong firmware boot.img This can cause a device to blink (completely inoperable). Use only files designed for your model and version. MIUI.

Xiaomi modelSupported methodConditions required
Redmi Note 12/13Mi Account, ADB, FastbootLinked Mi Account or enabled debugging
POCO X5/F5Mi Account, FastbootUnlocked bootloader (for Fastboot)
Xiaomi 13/14Mi Account, Service CenterOfficial Unblocking through Authorized Centers
Redmi 10/11ADB, Mi AccountVersion. MIUI 13.0.5 (new versions are blocked) ADB-method)

4. Bypassing locks via Safe Mode (for older versions of MIUI)

On devices with MIUI 12 and older (released before 2021) sometimes works bypassing through Safe Mode.The method works if the lock is installed by a third-party application (for example, AppLock), and not by the system PIN-code.

Instructions:

  1. On the lock screen, hold the switch off button until the menu appears.
  2. Tap and hold the power off (or power off) before switching to Safe Mode.
  3. After downloading, remove the app that blocks the screen (such as AppLock or Smart Lock).
  4. Restart your phone in normal mode.

⚠️ Attention: On new versions MIUI 13/14 Safe Mode does not disable system lock screen.The method works only for third-party applications.

Why is Safe Mode not working on Xiaomi?
Starting with MIUI 13, Xiaomi removed the ability to bypass system lock through Safe Mode due to security vulnerabilities.Now this mode only disables third-party applications, but does not reset. PIN-code or pattern lock set in system settings.

5.Official Recovery through Xiaomi Service Center

If none of the methods worked, you can contact the authorized service center Xiaomi. the company provides an official unlock service with data storage for some models (the list is updated annually).

  • πŸ”§ Save all data (photos, messages, applications).
  • πŸ“„ Official job guarantee (no risk of bric).
  • πŸ”‘ Unlock even with activated Find Device function.

To use the service:

  1. Find the nearest service center on the Xiaomi Service website.
  2. Take it with you: πŸ“„ Checks or a box from the phone (to confirm possession). πŸ†” Passport (for the application process). πŸ”‹ Charger (the phone must be charged at least 50 times%).

Pay for the diagnosis (the cost of unlocking is from 1500 to 3000 rubles, depending on the model).

πŸ’‘ Useful tip: Before visiting the service center, make a backup copy IMEI This will help to avoid problems with restoring network functions after unlocking.

What do you do if nothing helps?

If all methods are tried and the phone remains locked, radical measures remain:

  1. Hard Reset via Recovery: Delete all data, but guaranteed to unlock the device. To do this: Turn off the phone β†’ Press <Power button + Volume up> β†’ Select Wipe Data β†’ Confirm the reset.
  2. Fastboot Flash: Install clean firmware through the Mi Flash Tool. Detailed instructions are on the 4PDA forum (part of your model).
  3. Sale/Exchange: If the data is not critical, you can exchange your phone using the Xiaomi Trade-In program (available in brand stores).
Can I unlock Xiaomi through the Engineering Menu (##...)?
No, the engineering menu (codes like ##4636##) does not provide access to password resets, but these codes are designed to diagnose network and hardware components, but do not affect system lock.