Forgotten pattern lock on Xiaomi smartphone is one of the most common problems faced by Redmi users, POCO and the Mi line. Unlike the Mi line. PIN-If you have a code or a password, you don't always have a lock pattern that's easy to recover from memory, especially if you rarely change it. Fortunately, the manufacturer has a few formal and alternative ways to unlock that don't require you to go to a service center.
In this article, we will discuss all the current methods of removing graphics keys on Xiaomi devices (including models from 2023-2026), from the simplest β using a tied Mi Account, to advanced β through ADB or Fastboot. Special emphasis will be placed on saving user data: you will learn in which cases you can do without a complete reset, and when it is inevitable.
1 Unlocking through Mi Account (official method)
The most secure and recommended method for Xiaomi is to use a Mi Account tied to the device, which works on all modern smartphones of the brand (starting with MIUI 10), if:
- π± The phone is connected to the Internet (Wi-Fi or mobile network).
- π You have access to email/The phone number associated with the Mi Account.
- π Find Device has been activated in the settings.
To unlock the phone:
- On the lock screen, click Forgot Password? (or Forgot Pattern? on English firmware).
- Select the option to Sign in via Mi Account.
- Enter your email/phone and account password. If two-factor authentication is enabled, confirm your login via SMS or Mi Security.
- Follow the instructions on the screen to create a new pattern lock.
π‘
If the button "Forgot password?" does not appear, try to enter the wrong pattern 5 times in a row - the system will offer alternative ways of login.
β οΈ Note: If you have previously disabled Find Device in your settings (Settings) β Mi Account β Find the device, this method won't work, so move on to the next section.
2. Reset the pattern lock via Recovery Mode (without loss of data)
If the Mi Account is not tied or you don't remember the login details, you can try resetting the key through Recovery Mode. MIUI 12-14 and does not require a complete reset, but only works if debugging is enabled USB (USB Debugging).
Instructions:
- Turn off the phone with a long press of the power button.
- Press the Volume Up + Power combination and hold for 10-15 seconds until the Mi logo and Recovery menu appear.
- Use volume buttons for navigation and select Connect with MiAssistant (on some firmwares - Advanced β Connect to PC).
- Connect your phone to your computer through USB-cable and run the Mi program PC Suite (download from the official website).
- In the program, select Unlock and follow the prompts to reset the pattern lock.
Download Mi. PC Suite on PC|Enable debugging on USB (If the phone has been unlocked before)|Use the original USB-cable|Check the battery charge (minimum 30%)
-->
β οΈ Note: On some models (Redmi Note 11, POCO X5) The Connect with MiAssistant may not be available. ADB (section).
3. Full reset to factory settings (Hard Reset)
If the previous methods didnβt work, the radical solution is a complete Hard Reset, which will remove all data from the device, including photos, contacts and apps, so use it only as a last resort.
How to perform the reset:
- Turn off the phone.
- Press Volume Up + Power to Enter Recovery Mode.
- In the recovery menu, select Wipe Data β Wipe All Data (navigation with volume buttons, confirmation β power button).
- Confirm the action, wait for the process to be completed (5-10 minutes).
- Reboot your device with Reboot β Reboot to System.
| Xiaomi model | Combination for Recovery | Does the reset support data loss without data loss |
|---|---|---|
| Redmi Note 12/13, POCO X5 | Volume up + Nutrition | No (full reset only) |
| Mi 11/12, Mi Mix 4 | Volume up + Nutrition | Yes (via MiAssistant) |
| Redmi 10A, POCO M4 | Volume up + Nutrition | Partially (depends on firmware) |
β οΈ Warning: Once reset, the phone will require input from the Mi Account that was previously tied (Factory Reset Protection) if you don't remember the credentials, the device will become a brickΒ»!
Mi Account|Recovery Mode|ADB/Fastboot|Reset to factory settings|None of the above.-->
4. Unlock through ADB (for advanced users)
The Android Debug Bridge (ADB) method is suitable if the phone has previously enabled USB debugging and access to the computer, which allows you to delete the file with the pattern lock without losing data.
Step-by-step:
- Download and install ADB Tools on PC.
- Connect your phone to your computer via USB.
- Open the command line (cmd) in the adb folder and execute the commands:
adb shell
su
rm /data/system/gesture.key
rm /data/system/locksettings.db
rm /data/system/locksettings.db-wal
rm /data/system/locksettings.db-shm
rebootAfter the reboot, the pattern lock will be reset. If the commands don't work, try the alternative:
adb shell am start -n com.android.settings/.ChooseLockGenericWhat if the ADB canβt see the device?
5.Using Fastboot to unlock the bootloader
If ADB doesnβt work, you can try unlocking the bootloader via Fastboot.This method requires unlocking the Bootloader (which erases all data) and is suitable for power users.
Algorithm of action:
- Turn off the phone and press Volume Down + Power to log in to Fastboot Mode.
- Connect the device to your PC and open the command line in the folder with fastboot.
- Run the command to unlock the bootloader:
fastboot oem unlockAfter that, run the device through the Mi Flash Tool with the official firmware.
β οΈ Attention: Unlocking Bootloader on Xiaomi requires a binding to Mi Account and waiting 7-15 days (on new devices!
6. Alternative methods and warnings
If none of the methods worked, consider the following options:
- π§ Contact Xiaomi Service Center (official centers can unlock the device on purchase documents).
- π± Use service codes (e.g. #7378423## for reset on some models), but they donβt work on all firmware.
- π Installation of custom Recovery (TWRP) manual deletion of key files is a risky method that can lead to loss of warranty.
To avoid problems in the future:
- π Link Mi Account and enable Find Device.
- π Write the pattern lock to a secure location (for example, in the password manager).
- π Regularly back up through Settings β Additionally. β Backup.
π‘
The most reliable way to unlock is to link Mi Account, all other methods either require prior preparation (debugging over USB) or lead to data loss.