How to remove the pattern lock from Xiaomi Redmi 5A: the complete guide

The situation of picking up a smartphone to answer an important call or check a message, but the screen greets you with an insistence on entering a forgotten code, is familiar to many. 5A This is a problem that is often encountered as the device is actively used as the first smartphone or gadget for older adults. PIN-The code blocks access to all contacts, photos and applications, turning a modern device into a brick.

There are several proven ways to restore access to your Android system on your device, some methods allow you to save personal data, others require complete deletion of information, but ensure that the gadget is returned to work, the choice of the specific path depends on whether the Mi Account account was linked, whether debugging is enabled over USB and which version of the firmware is installed on board.

In this article, we will take a look at all possible options, from standard recovery procedures to more complex manipulations through the engineering menu. It is important to understand that modern security systems are designed to protect your data, so the unlocking process can take time and care. Follow the instructions consistently to avoid errors.

Recovery methods with Google and Mi Account

The easiest and safest way to get back access to your device is to use the built-in recovery mechanisms offered by the operating system. If your Redmi 5A had internet (Wi-Fi or mobile data) active at the time of locking, and logged in to your Google or Xiaomi account, you have a high chance of doing without losing files. After five failed password attempts, the screen usually appears with the words "Forgot the pattern lock?" or a similar button.

Clicking this button will initiate a request for authorization data. You will need to enter the login and password from the account that was the main one on the device. The system will contact the server, check the credentials and, if successful, suggest installing a new method of protection or disabling the screen lock completely. However, it is worth considering that new versions of the MIUI shell and Android versions above 7.0 this functionality is often cut down for security purposes.

⚠️ Note: If the device is not connected to the network, the recovery button will not appear or will be inactive, in which case the standard methods through the account will not work without first connecting to the Internet, which is difficult to do with a locked screen.

For owners of the Xiaomi ecosystem, having a Mi Account tied is critical. If you remember the data from it, you can try remote unlocking via cloud.mi.com from a computer or other smartphone, which requires that the β€œFind Device” function be enabled on a blocked Redmi 5A.

πŸ“Š Did you remember your Mi Account password on the first attempt?
Yes, the password is saved in the browser
Yeah, I put it in my notebook.
No, we'll have to restore access.
I don't remember creating an account in the store.

Resetting settings via Recovery (Hard Reset)

If the soft methods didn’t work, the only working option is to force the reset to factory settings.This process, known as Hard Reset, completely cleans the device’s internal memory by removing photos, contacts, apps and, most importantly, a forgotten pattern lock. Before starting the procedure, make sure that the battery is at least 50-60%, as turning off the smartphone during partition firmware can lead to serious boot errors.

Xiaomi uses a combination of physical buttons to enter recovery mode. Because the screen doesn't respond to touch, all actions are done mechanically. First, turn off the smartphone completely. Then press the volume button and the power button at the same time. Hold them until the Mi logo appears, then release the power button, but keep the volume up until the Recovery menu appears.

β˜‘οΈ Checklist before reset

Done: 0 / 4

In the Recovery menu, the touch screen is not working, the navigation is done with volume buttons (up/down), and the choice is confirmed by the power button. You need to find Wipe Data or Clear Data. In some versions of Recovery, you will need to select an additional subitem Wipe All Data and confirm the action by selecting Confirm. The cleaning process takes from a few seconds to a couple of minutes.

Action on the menuFunction of the Volume+ buttonThe function of the Volume button--Function of the Power button
Navigating the menuClimbing up the listDown the list.Confirmation of choice
Wipe Data--Starting the cleanup
Reboot--System restart
Connect with MIAssistant--Firmware mode

Once the cleanup is completed, the system will offer a reboot system. The smartphone will reboot, and you will see the screen of the initial setup, as when you first turn on the new device. The pattern lock will be deleted, but with it all user data that is not stored in the cloud will disappear.

Unlocking with Find Device (Mi Cloud)

Xiaomi device owners have the advantage of having a built-in search and security service for their device. If the Redmi 5A was signed in to Mi Account and the Internet is turned on, you can remove the screen lock remotely. To do this, go to the official i.mi.com website from any computer or other smartphone and log in under the same account as on the locked device.

In the service interface, select your device from the list (Redmi 5A). If the device is online, you will have access to the functions "Sound", "Message" and "Blocking". We are interested in the lock function. Despite the name, it allows you not only to put a new password, but also, in some versions of the firmware, remove the old or simply install a new code known to you, which will block the forgotten pattern lock.

⚠️ Warning: Remote unlock only works if the device is connected to the network.If the smartphone is lying at home without Wi-Fi, and the mobile Internet is turned off or the SIM card is blocked PIN-code, the command from the server will not reach the gadget.

Sometimes security requires confirmation via SMS or an additional code sent to the linked phone number, so that an attacker cannot unlock the stolen phone just by knowing the username and password from the cloud.

What to do if the device is offline?
If your smartphone is not connected to the Internet, you can send a command to lock or clear the data in delayed mode. Once the Redmi 5A is in Wi-Fi coverage or receives a packet signal, the command will run automatically, but this method will not work for instant unlocking.

Use of USB and ADB debugging (for advanced ones)

This method is suitable only for those users who have previously enabled the developer mode and activated debugging. USB In the system settings, if on your Redmi 5A These functions were enabled before locking, you can try to delete the file that stores the access keys through the computer. ADB Minimum set of tools on PC.

Connect your smartphone to your computer through USB-Open the command line or terminal on your PC in the tool folder ADB. Enter a command to check the connection. If the device responds, you can try to delete the system lock files. Usually these are gesture.key or password.key files that are in the directory. /data/system/.

adb shell rm /data/system/gesture.key


adb shell rm /data/system/password.key

Once the commands are executed, you need to restart the device. If it goes well, the system will not find the key file and let you go to the desktop without asking for a password. However, on modern versions of Android, access to the /data partition without root rights is often closed, making this method only work on old firmware or custom builds.

πŸ’‘

Expert advice: If the rm command is not executed due to lack of rights, try getting root access through ADB first if the bootloader is unlocked: adb root. But on Xiaomi stock firmware with a blocked bootloader, this will not work.

Specificity of blocking Mi Account and FRP

Once you reset through Recovery (Hard Reset), you may encounter additional protection called FRP (Factory Reset Protection) or Mi Account locking.The system will ask you to enter a password from a Google account or Mi Account that was synced to the phone before the reset.This is an anti-theft mechanism that can't be circumvented by simply clicking buttons.

If you forget your password and your account, too, things get complicated: You have to restore access to your Google or Xiaomi account through their official websites using a backup email or phone number. Without this step, the phone will remain locked even after a full reset, since server verification occurs when you first start after the wipe.

There are many videos and instructions for FRP bypassing, but they often depend on the specific version of Android and the security patch. For Redmi 5A, which runs on Android 7.0 (Nougat), there are working methods for bypassing special browser apps or accessibility settings, but they require an accurate hit to the software version.

⚠️ Attention: Attempts at hacking FRP using third-party software can lead to the installation of malware on your computer or the final locking of the device on the computer. IMEI. Use only official methods of account recovery.

Prevention and backup

To avoid facing this problem again in the future, experts recommend setting up automatic backup. Xiaomi smartphones have a built-in application "Mi Cloud" or "Backup", which allows you to save settings, SMS, call log and even the location of icons on the desktop. Regular copy creation will help quickly restore the familiar environment after reset.

It's also worth considering a more reliable but memorable security method: a pattern lock is convenient, but it's easy to peek at or forget a complex pattern. Biometrics like a fingerprint on the Redmi 5A work consistently and allow you to avoid entering a password every time you unlock the device with a touch.

πŸ’‘

Regular synchronization of contacts and photos with a Google account is the only way to guarantee the safety of data in the event of complete loss of access to the device.

Write complex passwords in a safe place, like a paper notebook or a secure password manager on another device. Human memory is imperfect, and what seemed obvious when installed can completely fly out of your mind in a month. Careful attitude to credentials is the key to the safe use of the gadget.

Frequently Asked Questions (FAQ)

Will the pattern lock be dropped if you just discharge the phone?
No, battery discharge does not affect the lock files. Once charged and turned on, the phone will again require key input, the only way is to reset via Recovery or an account.
Can I unlock Redmi 5A without losing data?
Without data loss, you can unlock your phone only if you restore your Google/Mi Account from the lock screen or if you have debugging on USB. In 90% of cases, you have to do Hard Reset with the removal of all information.
What if the phone says "Device locked" after resetting?
This is FRP protection. You need to enter the login and password from the Google account that was on the phone before the reset, and if you don't remember them, retrieve access through the Google site from your computer.
Will the phone be able to remove the key?
Yes, full Fastboot flashing is similar to Hard Reset and will remove the key, but will also require an account input (FRP) on the first run if the phone was tied up.This is a more complex process requiring a PC and special utilities.