How to unlock Xiaomi Redmi 5A: from the pattern lock to the Mi Account (Step-by-step)

Xiaomi Redmi 5A is one of the most popular budget smartphones, but even it is not immune to unlock problems. Forgot the pattern lock? Phone requires a password from your Mi Account after reset? Or the screen is locked due to multiple incorrect input? In this article, 5 working ways to unlock, including methods without loss of data and using official tools Xiaomi.

It's important to understand that not all methods are universal. For example, unlocking through Fastboot will require a computer and cable, and resetting through Recovery will delete all data. We'll analyze each option with its pros and cons, and give recommendations on how to avoid blocking in the future. If your Redmi 5A does not respond to touch or asks for a password after you have firmware, there's a solution here, too.

So let's start with a detailed analysis, and let's start with the simplest of methods, and gradually move on to more complex ones that require technical skills.

1 Unlocking through Mi Account (if the phone is connected to the Internet)

If you're Redmi. 5A It's connected to a Mi Account and has access to a network (Wi-Fi or mobile Internet), which is the fastest method, and it works even with a forgotten pattern lock or a digital key. PIN-code, but requires remembering the username and password from the Xiaomi account.

Algorithm of action:

  • πŸ”‘ On the lock screen, tap the Forgot Password button? (or a similar inscription at the bottom of the screen).
  • πŸ“§ Enter the email or phone number associated with the Mi Account.
  • πŸ” Confirm the entrance through SMS-account code.
  • πŸ“± After successful authorization, the phone will be unlocked automatically.

If the buttons Forgot your password? no, try entering any password 5 times in a row - the system may offer an alternative way to log in. This method does not delete data, but requires an active Internet connection.

⚠️ Note: If the phone was purchased from hand and the previous owner did not untie his Mi Account, unlocking through the account will become impossible.

πŸ“Š How often do you forget your smartphone password?
Never.
Once a year.
More than once every six months.
I use biometrics and I don't remember the password.

2. Reset the pattern lock via a call (for older versions of MIUI)

This is a way of working on Redmi 5A with MIUI 9 and below, and it's about exploiting an incoming call processing vulnerability that allowed you to bypass the lock screen. In newer versions of MIUI, this bug is fixed, but if your phone hasn't been updated in a while, try:

Instructions:

  1. From another phone, call the blocked Redmi 5A.
  2. Accept a call on a locked device.
  3. Before you complete the call, press the Home button (physical or touch).
  4. Quickly go to Settings β†’ Lock and Protection β†’ pattern lock.
  5. Turn off the pattern lock or change it to a new one.

If the screen locks again after pressing the Home button, try again by holding the Power button to call the off menu (but don't turn off the phone!).This method does not guarantee 100% results, as it depends on the firmware version.

Why did this method stop working in new versions of MIUI?
In MIUI 10 and higher, Xiaomi has closed a vulnerability that allows you to interact with the interface during a call. Now, when an incoming call, the lock screen remains active, and access to the settings is blocked until the conversation is completed or the password is entered.

3. Unlock through Recovery Mode (with data loss)

If the previous methods didn't work, you'll have to use Recovery Mode, which removes all data from your phone, including photos, contacts and apps, but it's guaranteed to unlock the device.

  • πŸ”’ Password is forgotten and Mi Account is not tied.
  • πŸ“΅ The phone is not connected to the Internet.
  • πŸ”„ We need to get back to the factory settings.

Step-by-step:

  1. Turn off Redmi 5A with a long press of the Power button.
  2. Press Volume Up + Power at the same time and hold for 10-15 seconds until the Mi logo appears.
  3. In the Recovery menu (manage volume buttons, select Power button) select Wipe Data.
  4. Confirm the reset by selecting Wipe All Data.
  5. After the process is complete, select Reboot to reboot.

The phone will boot as new, factory-settled, which doesn't require a computer, but completely erases user data. If the phone has been synced to Mi Cloud, some of the data (contacts, notes) can be restored after you log in.

Backup important data (if the phone is unlocked)|Charge your phone at least 50 times%|Prepare a username and password from Mi Account to recover data|Make sure the volume and power buttons are correct-->

4 Unlocking via Fastboot and Mi Flash Tool (for advanced users)

This method is suitable if:

  • πŸ–₯️ You have a computer with Windows.
  • πŸ”Œ There's original. USB-cable (preferably from the set).li>
  • πŸ› οΈ You are ready to work with the command line.

The method involves flashing the phone through Fastboot using the official Mi Flash Tool utility. This will delete all data, but unlock the device even when the bootloader is blocked.

What you need:

  • πŸ’» Windows computer 7/10/11.
  • πŸ”— Mi Flash Tool (official website).
  • πŸ“ Firmware for Redmi 5A (Download the Xiaomi Firmware Updater).
  • πŸ”§ Qualcomm drivers (set automatically when you connect your phone in Fastboot mode).

Instructions:

  1. Turn off the phone and put it in Fastboot mode: press Volume down + Power before the hare appears in the hat-eared.
  2. Connect Redmi 5A to your computer with a cable.
  3. Launch the Mi Flash Tool, press Select and point the path to the unpacked firmware.
  4. At the bottom, select Clean All (Full Cleaning) mode.
  5. Press Flash and wait for the process to complete (5-10 minutes).

Once flashed, the phone will boot with a clean system, the most reliable method, but it requires care: an incorrect firmware can lead to a device blink (complete failure).

⚠️ Note: If the phone has been blocked Bootloader, before the firmware will need to unlock it through the official tool Xiaomi - Mi Unlock Tool. the process takes up to 720 hours (30 days) of waiting due to the security policy of Xiaomi.

πŸ’‘

Before you run your Fastboot, check the phone model in Fastboot mode, which should match the firmware. For Redmi 5A, it's riva code (shown at the bottom of the screen in Fastboot mode).

5. Unlock via ADB (if USB debugging is enabled)

If your phone has previously enabled USB debugging (Settings β†’ Developer β†’ USB debugging), you can unlock it via ADB (Android Debug Bridge) without losing data.

What needs to be done:

  1. Connect Redmi 5A to your computer with a cable.
  2. Open the command line (Windows) or terminal (macOS/Linux) and type:
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

After rebooting the pattern lock or PIN-If the commands are not executed because of root rights, try an alternative method:

adb shell am start -n com.android.settings/.ChooseLockGeneric

This command will open a lock change menu where you can set a new password, which only works when debugging is enabled, and is not suitable for phones with a locked Bootloader.

πŸ’‘

USB debugging should be enabled before you get your phone locked, and it's not going to be activated, and it's only good for prevention or if you've seen a problem.

Comparison of unlocking methods Xiaomi Redmi 5A

MethodComputer requiredLoss of dataDifficultyTime.
Through the Mi Account.❌ No.❌ No.⭐Easy2-5 minutes
Resetting over a bell❌ No.❌ No.⭐⭐Medium5-10 minutes
Recovery Mode❌ No.βœ… Yes.⭐Easy10-15 minutes
Fastboot + Mi Flashβœ… Yes.βœ… Yes.⭐⭐⭐Hard30–60 minutes
ADBβœ… Yes.❌ No.⭐⭐⭐Hard15-20 minutes

How to avoid blocking in the future

To avoid the issue of a blocked Redmi 5A again, follow these tips:

  • πŸ” Use a fingerprint or facial recognition as an additional way to unlock (configure in Settings) β†’ Lockdown and protection).
  • πŸ“ Write down a pattern lock or PIN-code to a secure location (for example, a password manager).
  • πŸ”„ Regularly back up your Mi Cloud or locally on your computer.
  • πŸ”§ Put the debugging on. USB beforehand (in Settings) β†’ The phone. β†’ Version. MIUI Tap 7 times, then return to the additional β†’ For developers).
  • πŸ“± Attach Mi Account and confirm email/The phone will make it easier to unlock.

If you often forget passwords, consider using a Smart Lock (in security settings) feature that automatically unlocks the phone in trusted locations (like your home) or when connecting to a trusted device (like a smartwatch).

πŸ’‘

In Redmi 5A, you can configure emergency information on the lock screen (in Settings β†’ Lock and Protection β†’ Emergency Information), and you can add an alternative phone number to communicate in case of locking.

FAQ: Frequent questions about unlocking Xiaomi Redmi 5A

Can I unlock Redmi 5A without losing data?
Yes, if: The phone is tied to Mi Account and has Internet access. USB debugging was enabled earlier (ADB would help), the old version of MIUI is installed (up to 10th), and the call method will work. In all other cases, the data will be lost.
What if after reset via Recovery, the phone asks for a password from Mi Account?
This is FRP (Factory Reset Protection) protection. To unlock: Enter the username and password from Mi Account that was tied to the phone before the reset. If the account is not yours, contact the previous owner or support Xiaomi with proof of purchase. It is impossible to bypass FRP on Redmi 5A without account data by legal means.
Why does the phone not turn on after Fastboot?
Possible causes: πŸ”Œ Incorrectly selected firmware (not for the riva model). πŸ”‹ The phone is dead during firmware (needs at least 50% charge). πŸ› οΈ The cable or port is damaged. USB. πŸ” The bootloader has been locked and unlocked, so you can either repeat the firmware with the correct version of the software or contact the service center.
Can I unlock Redmi 5A through Xiaomi Service Center?
Yes, but only under conditions: πŸ“„ You have a check or warranty card confirming the purchase. πŸ”‘ Phone not blacklisted (not stolen). πŸ’³ Willingness to pay for the service (cost) ~1000–3000 β‚½ Service centers will not unlock phones with a tied Mi Account without proof of ownership.
How to find out MIUI version on Redmi 5A blocked?
If the phone is locked but turns on: On the lock screen, swipe down to call the notification bar. βš™οΈ Settings (if any) Go to About Phone β†’ Version. MIUI. If the notification panel is not available, the version MIUI will be displayed when booting in Fastboot mode (bottom line of the screen).