Forgot the pattern lock or PIN-Can't unlock your phone after buying with your hands? this situation is familiar to many smartphone owners, especially if the device has been unused for a long time or was bought on the secondary market. Fortunately, there are formal and informal ways to reset your password without losing data β or with minimal file consequences.
In this article, we will discuss 5 proven methods that work on Redmi 4 (including modifications of Redmi 4A/4X/4 Pro). You will learn how to bypass the lock via Mi Account, use Recovery Mode or Fastboot, and also what to do if the phone requires an old password after reset. Important: some methods require preliminary preparation, for example, linking a Xiaomi account or debugging on USB.
Before you start, check if one of the simple options is right: you may enter the wrong password because of the βInvisible PINβ mode (when the numbers are not displayed when you enter) or the smartphone is locked after unsuccessful attempts, in which case it is enough to restart the device or wait 30 minutes - the temporary lock will be removed automatically.
1 Unlocking through Mi Account (official method)
The most secure and recommended method for Xiaomi is to use a tied Mi Account, which works if:
- π± The phone was synced to Xiaomiβs account (even if you donβt remember it).
- π Internet access (via Wi-Fi or mobile network).
- π You remember the username and password from Mi Account (or you can restore them).
After 5 failed attempts to enter the password, the button "Forgot the password?" will appear on the lock screen. Click on it and follow the instructions:
- Enter the email or phone number associated with the Mi Account.
- Confirm your identity via SMS or email.
- Create a new password or pattern lock.
If you don't have a "Forgot Password?" button, try entering any password 5 times in a row, it should appear. Importantly, this method doesn't work if your phone has lost its Internet connection or has previously reset via Recovery without deleting your account.
π‘
If you donβt remember the Mi Account, try to restore access via account.xiaomi.com. Use a backup email or a linked phone number.
2.Reset via Recovery Mode (without loss of data)
If Mi Account is not tied or you don't remember the login details, the next step is to use Recovery Mode, which doesn't erase user files (photos, videos, music), but resets system settings, including the lock password.
- β οΈ After reset, you may need to enter an old password to decrypt the data (if encryption was enabled).
- π§ On some Redmi 4 firmware, this method is disabled, instead of resetting, the error will appear: "Can't verify the package".
- π± The phone must be charged at least 30% or the process will be interrupted.
Resetting instructions:
- Turn off the phone with a long press on the power button.
- Press the Volume Up (+) and Power button for 10-15 seconds at the same time until the Mi logo appears.
- From the Recovery menu, select the language (usually English) and go to Wipe & Reset β Wipe All Data.
- Confirm the action and wait for the reboot.
If after resetting the phone requires you to enter the old password for decrypting data, and you do not remember it, you will have to perform a complete reset with the removal of all files (see the next section).
Charge your phone at least 30 times%|Download the official firmware for Redmi 4 (in case of errors)|Prepare. OTG-cable (if you need to connect your mouse)|Make sure that the phone does not have encryption enabled (otherwise the data will be lost)-->
3. Complete reset with deletion of all data (Hard Reset)
If previous methods have failed, the radical way is to completely reset, which deletes all data, including photos, contacts and apps, but is guaranteed to unlock the phone. Use it only as a last resort!
There are two options for Redmi 4 Hard Reset:
| Method | When to apply | Whether a PC is required | Difficulty |
|---|---|---|---|
| Through Recovery Mode | If the phone is turned on but blocked | No. | ββ |
| Through Fastboot. | If the phone is not loading or Recovery is not available | Yes. | βββ |
| Through the Mi Flash Tool | If the firmware is damaged or the phone is "brick". | Yes. | ββββ |
For reset via Recovery Mode:
- Press Volume Up (+) + Nutrition to enter Recovery.
- Choose Wipe Data β Wipe All Data.
- Confirm the action and wait for the completion (5-10 minutes).
- Reboot the phone (Reboot) β Reboot to System).
β οΈ Warning: If encryption is enabled on the phone (in the security settings), the data will become unavailable after the reset - even specialized programs will not be able to restore it.
4. Unlock via Fastboot (for advanced users)
If Recovery Mode is unavailable or if it is not available, you can use Fastboot mode, USB-cables and installed drivers ADB/Fastboot. It is suitable for cases where:
- π§ The phone does not load beyond the Mi logo.
- π± Recovery is an error called "This" MIUI version cannot be installed on this device".
- π You need to flash your phone from scratch (for example, after a failed update).
Step-by-step:
- Download and install Platform Tools (includes fastboot and adb).
- Turn off the phone and press Volume Down (-) + Power to log into Fastboot.
- Connect your phone to your PC via USB.
- Open the command line in the folder with Platform Tools and type:
fastboot devicesIf the phone is determined (the serial number will appear), reset:
fastboot erase userdata
fastboot erase cache
fastboot rebootOnce rebooted, the phone will be like new, without a password, but without your data. If this method doesn't work, try flashing the phone through the Mi Flash Tool (instructions in the next section).
Yes, I had to reset | No, I always remember passwords | Using a fingerprint/face | I keep backups of passwords-->
5. Firmware through Mi Flash Tool (extreme case)
If all previous methods did not work, you can reflash the phone using the official Mi Flash Tool utility, which is guaranteed to delete the password, but:
- β οΈ All data will be erased without recovery.
- π§ You will need a Windows computer and original USB-cable.
- π₯ You need to download the firmware for your model (Redmi 4, Redmi). 4A, Redmi 4X Or Redmi 4 Pro).
Instructions:
- Download the official firmware for your model (choose the Fastboot version).
- Unpack the archive in a folder without Cyrillic characters (for example, C:\Redmi4_Firmware).
- Download and install the Mi Flash Tool.
- Log in to Fastboot on your phone (as in the previous section) and connect it to your PC.
- In the Mi Flash Tool, click Select, specify the firmware folder, then Refresh (the serial phone number should appear).
- Select Clean All mode and press Flash.
It takes 5-15 minutes to do this, and when it's done, it'll restart in a factory state, and if the Mi Flash Tool is a bug, try:
- π Use the other USB-port (preferably) USB 2.0).
- π Reinstall the driver (via Mi Phone Manager).
- π₯ Download another firmware version (for example, an older one).
What if the Mi Flash Tool can't see the phone?
6. Alternative methods (if nothing helps)
If the standard methods don't work, you can try less obvious solutions, and they'll work for specific cases.
π Unlocking by Call (for Older Versions) MIUI)
Some MIUI 8-9 firmware (installed on Redmi 4 at release) ran a vulnerability:
- Call the locked phone from another device.
- Accept the call, then quickly roll the call screen (without completing it).
- In some cases, this allowed access to the phone menu.
Now this method is closed in new versions of MIUI, but if the phone is old firmware β try.
π§ Use of the OTG-cable
If the keyboard for entering the password is displayed on the lock screen, but the sensor does not work:
- Buy or borrow. OTG-adapter (Micro-USB) β USB).
- Put a wired phone on. USB-mouse.
- With the mouse, enter a password or reset through Recovery.
π± Bypassing the lock through ADB (if debugging is on)
If USB debugging was previously enabled on the phone, you can try to delete the password file via ADB:
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
rebootOnce you reboot, the password will be reset, but this method only works when the bootloader is unlocked and debugging is enabled.
π‘
If the phone was bought from hand and locked by the previous owner, contact him to delete the Mi Account through the Xiaomi website. Without this, it is officially impossible to unlock the device - you will need firmware with loss of data.
Frequent Mistakes and How to Avoid Them
When you reset your password to Redmi 4, users often face typical problems.
| Mistake. | Reason. | Decision |
|---|---|---|
| "This device is locked" on Fastboot | The bootloader is blocked (Bootloader) | Unblock through the official Xiaomi website (it takes 7-30 days to wait) |
| Phone asks for old password after reset | Encryption of data is enabled | Complete reset via Fastboot or Mi Flash Tool |
| "Can't verify the package" in Recovery | Damaged firmware or unofficial recovery | Switch your phone to the Mi Flash Tool with Clean All |
| The phone will not turn on after resetting | Interrupted firmware or battery | Charge the phone for 30+ minutes, repeat the firmware from the beginning |
β οΈ Note: If you bought a Redmi 4 with your hands and the previous owner did not delete your Mi Account, the phone may remain locked even after the reset.In this case, contact the seller and ask him to delete the device from the account through the Xiaomi website (i.mi.com). Without this, it is officially impossible to unlock the phone.