Forgotten. PIN-Xiaomi code and you can't unlock your phone, or you just want to remove the security that prevents quick access β 5 working methods of pin-code removal, from standard settings to advanced technical solutions, we will discuss the options without loss of data (if the phone is unlocked) and ways of complete reset for locked devices, including the Redmi Note models. 10/11/12, POCO X3/X4/X5, Mi 11/12/13 others.
Important: the procedure depends on the version of MIUI (12/13/14) and the status of the Mi Account. For example, on devices with MIUI 14 and associated Mi Account, additional recovery options are available.
If there are important files on your phone, try the non-reset methods first (sections 2β3). If the screen is completely locked, go to sections 4β5, but be prepared to delete the information.
πΉ Brief navigation on the article:
- π Withdrawal PIN Settings (if the phone is unlocked)
- π± Unlocking with Mi Account (requires binding)
- π₯οΈ Reset via Fastboot (for advanced users)
- π§ ADB-teams (if debugging is included)
- β οΈ Hard reset (last option, data will be deleted)
1. How to clean up PIN-code through phone settings (if phone unlocked)
If you remember the current PIN and the phone is not locked, the easiest way is to turn off the protection in the settings menu.This method works on all Xiaomi models, including the Redmi 9/10/11, POCO F3/F4/F5 and the flagship Mi 12T/13.
π Step-by-step instruction:
- Open the Settings app (cog icon).
- Go to the Passwords and Security section.
- Select Screen Lock.
- Enter the current one. PIN-proof-code.
- Click No or Delete Password (depending on the MIUI version).
β οΈ
π΄ Note: If the phone has enabled the βData Protection when blockedβ (encryption), the system may require you to enter a password from Mi Account even when you remove it. PIN. This is a Xiaomi security measure that canβt be circumvented without a reset.
π‘ What to do if there is no "Delete password" item?
- π Update. MIUI Up to the latest version β in old firmware interface may differ.
- π± Try changing the type of lock: first install the pattern lock, then delete it.
- π§ If the phone is corporate, the administrator may have banned the change in security settings.
2 Unlocking through Mi Account (if the phone is linked to the account)
If you forget your PIN, but your phone is tied to your Mi Account, you can restore access through Xiaomiβs official service, which only works when you connect to the Internet (Wi-Fi or mobile network) and if you have previously enabled sync with your account.
πΉ Unblocking conditions through Mi Account:
- πΆ Phone is connected to the network (even if the screen is locked, check Wi-Fi notifications).
- π You remember the username and password from Mi Account (email or phone number).
- π± The device has enabled the function Find the device (in the account settings).
π Unlocking instructions:
- On the locked screen, click Forgot Password? (or Forgot Password).
- Select the recovery option through Mi Account.
- Enter your email/phone and password from your account.
- Confirm unlocking via SMS or email (if two-factor authentication is enabled).
- Set a new PIN or remove the lock completely.
β οΈ
π΄ Note: If you do not remember the password from Mi Account, you can restore it on account.xiaomi.com. email/This is not possible, Xiaomi does not provide alternative ways to restore the phone.
What if the "Forgot Password" button is not used?
3. PIN reset via ADB (USB debugging enabled required)
If the phone is debugging on USB (Settings β The phone. β Version. MIUI β 7 times press to unlock the developer mode, you can remove PIN through ADB-This method saves data, but only works when the screen is unlocked (or if you can connect to a PC without locking it).
π οΈ What's the matter:
- π₯οΈ Computer with Android installed SDK Platform-Tools.
- π± USB-cable (original so that there are no connection problems).
- βοΈ Included debugging by USB and permission to connect to this PC.
π Step-by-step instruction:
- Connect your phone to your PC and open the Command Prompt (Windows) or Terminal (macOS/Linux) in the folder with the platform-tools.
- Check the connection command: Adb devices should appear serial number of the device.
- Enter the PIN removal command: adb shell rm /data/system/locksettings.db adb shell rm /data/system/locksettings.db-wal adb shell rm /data/system/locksettings.db-shm
- Reboot your phone: adb reboot
β After the reboot, the lock will be reset. PIN, Just click Miss or Cancel.
β οΈ
π΄ Attention: MIUI 14 And this method may not work because of the increased protection, so try the alternative command: adb shell su. -c "rm /data/system/gesture.key" (Root rights are required).
βοΈ Preparation for ADB-unlock
4. reset PIN via Fastboot (without data loss, but with the bootloader unlocked)
If USB debugging is disabled but you have access to Fastboot mode, you can try resetting the PIN through the persist partition firmware.This method does not delete user data, but requires an unlocked bootloader.
π§ What you need to know:
- π Unlocking the bootloader erases all data on the phone (but not in this case, as we work with persist).
- β³ The process can take 10 to 30 minutes.
- π± Suitable for most Xiaomi models, except for some flagships (e.g. Mi 11 Ultra with enhanced protection).
π Instructions:
- Turn off your phone and press the Power button + Volume down to log into the Fastboot.
- Connect your device to your PC and check for detection: fastboot devices
- Download the firmware for your model (select the Fastboot version).
- Unpack the archive and find the file persist.img.
- The command section: fastboot flash persist persist.img
- Reboot the phone: fastboot reboot
π After the reboot. PIN-If you have a request to create a new password, skip this step.
β οΈ
π΄ Note: On some models (e.g, POCO F4 GT or Redmi K50) Persistent firmware can cause the camera or sensors to crash, and you'll have to flash a full Fastboot-ROM with data loss.
π‘
If the fastboot flash persist command does not work, try to unlock the bootloader first using the official Mi Unlock Tool. This will take 7-15 days of waiting, but ensures stable operation.
5 Hard Reset - The Last Option
If no methods have worked, you can completely reset your settings through Recovery Mode, which deletes all data (photos, contacts, messages) but is guaranteed to unlock your phone.
β οΈ When to use Hard Reset:
- π You forgot. PIN and the password from the Mi Account.
- π΅ Debugging by USB It is disabled and Fastboot is not helping.
- π± The phone was bought from hand and the previous owner did not remove the lock.
π How to make a hard reset:
- Turn off the phone.
- Press the Power button + Volume up to enter Recovery Mode.
- Use volume buttons for navigation and power button for selection.
- Choose Wipe Data β Wipe All Data.
- Confirm the reset (usually you need to enter Yes).
- After completion, select Reboot.
β What will be removed:
| Type of data | Removed? | Can we restore it? |
|---|---|---|
| Contacts | β Yes. | β If synchronized with Google/Mi Account |
| Photos and videos | β Yes. | β Without a backup, no. |
| Messages (SMS) | β Yes. | β Not (unless there was a backup) |
| Installed annexes | β Yes. | β You can reinstall from Google Play |
| System settings | β Yes. | β No. They'll drop to the factory) |
β οΈ
π΄ Attention: On phones with MIUI 13/14 And the File-Based Encryption, after reset, may require you to enter the Mi Account password, or the device will not boot. If you don't remember the password, the phone will turn into a brick, you'll need to run the firmware through the device. EDL-The service (only in the service center).
π‘
Hard reset is a last resort. If your phone has important data, try connecting it to your PC in Fastboot mode and copying files via adb pull /sdcard/ (if debugging was enabled earlier).
6.Alternative methods: bypassing PIN through service centers and EDL
If the independent methods do not work, professional solutions remain:
- π§ Xiaomi Service Center β Official Unblocking (requires a check or confirmation of purchase).
- π EDL-Emergency Download Mode β Firmware through a special cable (risky for beginners).
- π± Unlock Services β Paid services like DC-Unlocker or Mi Flash Pro (beware of scammers!).
π° Cost and risk:
| Method | Cost (β) | Risks. | Timeline |
|---|---|---|---|
| Official Xiaomi service | 1 500β3 000 β½ | Low (guarantee maintained) | 1-5 days |
| Firmware through EDL | 1 000β2 500 β½ | High (risk of "bricking") | 1-2 hours |
| Paid online services | 500β1 500 β½ | Medium (fraud, viruses) | 5-30 minutes |
β οΈ Fraudster warning:
- π¨ Donβt trust services that ask for advance payment without warranties.
- π Don't download "breakers." PIN" From a questionable website, it could be a virus.
- π Always check the reviews of the service center before contacting.
7.How to avoid blocking in the future
To avoid facing the problem of a forgotten PIN again, follow these tips:
- π Use biometric unlocking (fingerprint or face) as a backup option.
- π Write it down. PIN Password Manager (e.g. Google Password Manager or KeePass).
- π Make backups regularly through Settings β System system β Backup.
- π§ Link Mi Account and enable data synchronization.
πΉ Security settings that are worth checking:
- Open Settings β Passwords and Security β Locking settings.
- Make sure you have enabled the Unlock option via Mi Account.
- Add a spare PIN or pattern lock.
- Set up a Smart Lock (automatically unlock in secure places, such as at home).
π‘
If you often forget passwords, install the Xiaomi Cloud app and enable automatic data synchronization, which will help restore access to contacts and files even after a reset.