The forgotten pattern lock on Xiaomi Redmi 5 is a situation that many users face. Especially frustrating if the phone stores important data and there are no backups. Fortunately, there are several ways to unlock, and not all of them require a complete reset. In this article, we will analyze all current methods - from recovery via Mi Account to using Fastboot mode and using the Fastboot mode. ADB-team.
It is important to understand that the effectiveness of each method depends on the version of MIUI, the status of the Xiaomi account and the availability of debugging over USB. For example, if you previously enabled Settings β Additional β For developers β USB debugging, the chances of saving data are much higher, but if you do not have a Mi Account attached or a forgotten password from it, you will have to resort to a hard reset.
Before you start, check:
- π Battery charge (at least 30% to avoid switching off during the procedure).
- πΆ A stable Internet connection (required for account recovery).
- π» Access to a computer (for methods with ADB or Fastboot).
1 Unlocking with Mi Account (the safest way)
If your Redmi 5 is tied to a Xiaomi account, this method will allow you to unlock the device without losing data, the main condition is to remember the username and password from the Mi Account, as well as have access to the Internet.
Instructions:
- On the lock screen, enter any pattern lock 5 times in a row until the message βForgot your password?β appears.
- Click on this caption and select "Restore via Mi Account".
- Enter the email or phone number associated with the account, then the password.
- Confirm your login via SMS or email (if two-factor authentication is enabled).
- Create a new pattern lock or PIN-code.
π‘
If the "Forgot Password?" button doesn't appear, try connecting to another Wi-Fi network or using mobile data, sometimes the problem is with no internet connection.
This method works on all versions of MIUI, but there are nuances:
- β οΈ If the phone was purchased with hands and the previous owner did not delete his account, unlocking through Mi Account will not be possible without his data.
- βοΈ Some of the majors (e.g., global) MIUI 12+) You may need to confirm that through SMS even with the right password.
2. Reset the pattern lock via ADB (for power users)
The method is suitable if Redmi 5 previously enabled debugging over USB. In this case, you can delete the file with the key via Android Debug Bridge (ADB), without erasing the rest of the data. You will need a computer with installed Xiaomi drivers and the ADB Tools package.
Step-by-step:
- Connect your phone to your PC through USB-cable.
- Open the command prompt (Windows) or terminal (macOS/Linux) in the folder with ADB.
- Enter the command to check the connection: adb devices If the device appears in the list, go further.
- Delete the file with the pattern lock: adb shell rm /data/system/gesture.key
- Reboot your phone: adb reboot
Once you reboot, the lock screen should disappear. If not, try entering any key or swiping away.
Install Xiaomi drivers on PC| Download ADB Tools (platform-tools)|Enable USB debugging on your phone (if previously available)|Connect your phone to your PC with the original cable-->
β οΈ Attention: MIUI 11 and later gesture.key can be stored elsewhere or protected. ADB-This method will not work and you will need a hard reset.
3. Hard Reset - a last resort
If other methods fail, you only have to reset your phone completely, and this method will erase all your phone data, including photos, contacts and apps, and only use it if you:
- π No Mi Account attached or you have forgotten your password.
- π₯οΈ Debugging by USB not included.
- π± The phone does not respond to other unlock methods.
Instructions for Xiaomi Redmi 5:
- Turn off the phone.
- Press the Power + Volume buttons up for 10-15 seconds at the same time until the Mi logo and Recovery menu appear.
- Use the volume buttons for navigation and the power button to select the Wipe Data (or Clear Data) item.
- Confirm the reset by selecting Yes.
- Once completed, select Reboot to reboot.
The first boot after reset can take 5-10 minutes, the phone will return to the factory settings, and you will need to configure it again.
Yes, I did it through Mi Account.|Yeah, I had to do Hard Reset.|No, it's the first time.|I remember.-->
| Unlocking method | Conditions required | Data retention | Difficulty |
|---|---|---|---|
| Mi Account | A linked and confirmed Xiaomi account | β Yes. | β |
| ADB | Included debugging over USB, access to PC | β Yes. | βββ |
| Hard Reset | No demands. | β No. | ββ |
| Fastboot | Unlocked bootloader, PC | β No. | ββββ |
4. Unlock through Fastboot mode (for firmware)
This is a good way to flash your phone, and it's more complicated than Hard Reset, but it can help in cases where standard recovery doesn't work, like if Redmi 5 is stuck on the logo after a failed reset.
What will be required:
- π» Computer with Xiaomi and Mi Flash Tool drivers installed.
- π₯ Official firmware for Redmi 5 (download from en.miui.com).
- π§ Unlocked bootloader (unless previously unlocked) will require waiting 72-360 hours).
Step-by-step action:
- Turn off the phone and put it into Fastboot mode, clamping Power + Volume down.
- Connect to your PC and check for device detection by command: fastboot devices
- Unpack the downloaded firmware and launch the Mi Flash Tool.
- Select the firmware folder and press Refresh, then Flash.
- Wait for the process to complete (5-10 minutes) and restart the phone.
What to do if the Mi Flash Tool is in error?
β οΈ Note: Fastboot flashing will void the warranty if it's still valid, and there's a risk of your phone getting bricked up if you're not sure, go to the service center.
5. Alternative methods (for specific cases)
If the standard methods don't work, you can try the lesser known ones, which are suitable for rare situations, but sometimes they save you.
Method 1: Calling a locked phone
Some versions of MIUI (especially older ones) could access the phone's interface without unlocking the screen when the call was in.
- Call Redmi 5 from another phone.
- Take the call, then press the Home or Back button.
- If you are lucky, you will be on the main screen.
This bug has been fixed, but it could still work on MIUI 9-10.
Method 2: Use of service codes
Some users claim that entering service codes can reset the lock, such as:
##7780##However, on Redmi 5, this code usually resets only the Google account settings, not the graphical key.Efficiency is close to zero, but you can try.
Method 3: Contact Xiaomi Service Center
If the phone is warranty or you do not want to risk, contact the official service. Employees can unlock the device on the purchase documents (even without knowing the password), the cost of the service is from 500 to 1500 rubles, depending on the region.
6.How to avoid blocking in the future
To avoid the problem of a forgotten pattern lock, follow the following simple rules:
- π Use it. PIN-code instead of a pattern lock, it is more difficult to forget.
- π Write your passwords in a secure location (e.g., Google Keep or Google Keep). 1Password).
- π Regularly back up through Settings β System system β Backup.
- π€ Link Mi Account and enable data synchronization.
- π οΈ Put the debugging on. USB (in case of future problems).
Xiaomi Redmi 5 with MIUI 11+ firmware has added the βFind the deviceβ feature, which allows you to unlock the phone remotely through the i.mi.com website. Activate it in advance in your account settings!
π‘
The most reliable way to avoid data loss is a combination of a tied Mi Account + Regular backups to the cloud.