How to unlock Xiaomi Redmi 5A if you forget your password: all methods of 2026

Forgot the pattern lock or PIN-code 5A? The phone is locked after failed input attempts, and data access is urgent? This situation is familiar to many owners of Xiaomi smartphones, especially if the device has been left unused for a long time or someone else has set the password. 5A (The codename riva relies only on traditional methods of protection – and this is both a plus and a minus.

The main problem is that without knowing the password or the associated Mi Account, unlocking the phone is harder than on modern devices with biometrics. But the good news is that Redmi 5A supports several official and informal ways to reset the password, including Recovery mode, Fastboot and even bypassing through ADB. In this article, we will analyze all the current methods, from the simplest (if you remember the username from Mi Account) to radical (full reset via EDL).

1 Unblocking through Mi Account (if an account is linked)

The safest way is to use a linked Mi Account, which works if:

  • πŸ“± The phone is connected to the Internet (Wi-Fi or mobile network).
  • πŸ”‘ Remember the username and password from Xiaomi account.
  • πŸ”„ Synchronization is enabled on the device (usually activated by default).

After 5 unsuccessful attempts to enter the password on the lock screen will appear button Forgot the password?. Click on it and follow the instructions:

  1. Enter the email or phone number associated with the Mi Account.
  2. Confirm your personal data (CAPTCHA may be required).
  3. The confirmation code will come to the mail or SMS - enter it in the appropriate field.
  4. Create a new password or pattern lock.

πŸ’‘

If the Forgot Password button doesn’t appear, try connecting to another Wi-Fi network – sometimes the lock occurs due to lack of internet.

⚠️ Note: If the phone has been enabled factory reset via Mi Cloud, once unlocked through the account, the data can be erased automatically. MIUI.

2. Reset password via Recovery Mode (without loss of data)

If the Mi Account is not tied or you don't remember the login details, the next step is to use Recovery mode. On Redmi 5A, this only works if USB debugging has been enabled and ADB drivers have been installed. Otherwise, this method will not work.

Instructions:

  1. Turn off the phone (press the power button for 10 seconds).
  2. Press Volume Up + Power at the same time and hold until the Mi logo appears.
  3. From the Recovery menu, select Connect with MIAssistant (use volume buttons for navigation and power for confirmation).
  4. Connect your phone to your PC via USB and start the Mi Flash Tool program (you can download from the official Xiaomi website).
  5. In the program, select the Clean All and Lock option - this will reset the password, but save the data.

Install drivers ADB PC-only|Download the latest Mi Flash Tool version|Connect the phone to the original USB-cable|Check the battery charge (minimum 30%)-->

⚠️ Attention: On some firmware MIUI Connect with MIAssistant may not be available, in which case try an alternative method via Fastboot (described below).

3. Unlock via Fastboot (PC required)

The method via Fastboot is suitable if:

  • πŸ”Œ You have access to a Windows computer.
  • πŸ“± The phone has unlocked the bootloader (Bootloader).
  • πŸ”§ Xiaomi drivers and tools installed ADB/Fastboot.

Step-by-step:

  1. Turn off Redmi 5A and press Volume Down + Power to enter Fastboot Mode (a hare in a hat-eared image will appear).
  2. Connect the phone to your PC and open the command line (Win + R β†’ enter cmd).
  3. Check the connection command: fastboot devices If the device is displayed, continue. If not, install the drivers.
  4. Enter the command to reset the password: fastboot erase userdata fastboot erase locksettings
  5. Reboot the phone: fastboot reboot

Once rebooted, the password will be reset, but all the data on the phone will be deleted, a method that is effectively equivalent to factory reset, but works even if access to Recovery is blocked.

πŸ“Š What Unlocking Method Have You Tried Before?
Through the Mi Account.
Through Recovery.
Through Fastboot.
Never blocked your phone.
Another way.

4.Using EDL mode (for power users)

EDL (Emergency Download Mode) is an emergency firmware mode that allows you to reflash your phone even with a locked bootloader.

  • πŸ”’ All the other methods didn't work.
  • πŸ“¦ You have an official firmware for Redmi. 5A (for example, riva_global_images_...).
  • πŸ’» You can use tools like the Mi Flash Tool or QFil.

How to log into EDL:

  1. Turn off the phone.
  2. Press Volume up + Volume down + Power at the same time for 10-15 seconds.
  3. The screen will remain black, but the PC must identify the device as a Qualcomm HS-USB QDLoader 9008.

Then, through the Mi Flash Tool, select the firmware and press Flash. After the process is complete, the phone will restart with a clean system. ⚠️ Note: Incorrect Firmware in the EDL You can turn your phone into a brick. Use only official files for Redmi. 5A (riva).

What if the phone is not identified in the EDL?
If the PC doesn’t see the device as Qualcomm 9008, try: 1. Use the other USB-cable (original). 2. Disable driver signatures in Windows (to install Qualcomm driver). 3. Try another PC with Windows 7/10 (Windows 11 There may be problems with drivers). 4. Check if it's broken. USB-port on the phone (plug charging – if the charge is not going, the port is defective).

5. Factory reset via "Find the device" (Mi Cloud)

If the phone has enabled the β€œFind Device” function in the Mi Cloud, you can perform a remote reset:

  1. Go to i.mi.com and log in.
  2. Select the Redmi 5A blocked from the device list.
  3. Click Erase Data and Confirm Action.
  4. Wait until the process is complete (the phone must be connected to the internet).

Cons of the method:

  • ❌ All data, including photos and apps, is deleted.
  • ❌ The phone must be online (Wi-Fi or mobile network).
  • ❌ After the reset, a re-linking of the Mi Account may be required.

Comparison of Unlocking Methods

MethodPC requiredData retainedDifficultyIt works without a Mi Account.
Through the Mi Account.❌ No.βœ… Yes.⭐ Easy.❌ No.
Recovery Mode⚠️ Sometimes.βœ… Yes, if it works)⭐⭐ Middle-Averageβœ… Yes.
Fastbootβœ… Yes.❌ No.⭐⭐⭐ Hardly.βœ… Yes.
EDL Modeβœ… Yes.❌ No.⭐⭐⭐⭐ Very difficult.βœ… Yes.
Mi Cloud (remote reset)❌ No.❌ No.⭐ Easy.❌ No.

πŸ’‘

If the phone has been turned on factory reset via Mi Cloud, after unlocking by any method (except Mi Account), the data will most likely be deleted automatically, this is Xiaomi's security measure against theft.

Frequent Mistakes and How to Avoid Them

When unlocking Redmi 5A, users often face typical problems:

  1. Phone not included in Recovery/Fastboot: Check the button combination (on Redmi 5A it's Volume Up + Power for Recovery and Volume Down + Power for Fastboot). If it doesn't work, try clamping the buttons on the phone off longer (up to 20 seconds).
  2. PC doesn’t see phone in Fastboot/EDL: Install drivers from Xiaomi’s official website or use the universal ADB Driver Installer drivers.
  3. Error "Device is locked" in Fastboot: This means that the bootloader is locked. You can unlock it through the official Xiaomi tool, but you will need a tied Mi Account and wait 72-360 hours.
  4. After reset, you need an old password: This happens if the phone has been encrypted, in which case only a complete flashing through the EDL will help.

⚠️ Note: If you have purchased a Redmi 5A hand and the previous owner did not untie his Mi-account, to unlock the phone official methods will not work.

FAQ: Answers to Frequent Questions

Can I remove the Redmi 5A password without losing data?
Yes, but only if: You remember the data from the linked Mi Account (method 1). You have been debugging on USB and have access to your PC (method 2 via Recovery). In all other cases, the data will be erased.
What to do if you forget your password and Mi-account?
The only remaining "hard" methods are: Fastboot reset (method 3); EDL flashing (method 4); Service center contact (if the phone was in use); and data recovery will be impossible without backup.
Why does the phone ask for an old password after reset via Fastboot?
This means that the phone has been encrypted, in this case: Try entering any password 30 times, after which the phone will suggest a reset, or run the phone through EDL with a complete clean (method 4).
Can I unlock Redmi 5A without a computer?
Yes, but only if: Mi-account is linked (method 1 or 5), you have access to another phone to get the confirmation code, without an account and a PC, you can not unlock the phone.
How much does it cost to unlock in the service center?
Cost depends on the reason for blocking: Reset password (if you know the Mi-account): ~500–1000 β‚½. Unblocking without an account (through a EDL): ~1500–3000 β‚½. Removing the link to someone else's Mi-account: ~3000–5000 β‚½ (Xiaomi official services may be denied unless you provide proof of ownership.