Forgotten password on Xiaomi Redmi 7A β The main problem is that most standard unlocking methods (such as resetting via Recovery) lead to a complete cleanup of internal memory. However, there are ways to get around protection without losing data β photos, contacts, messages and applications. In this article, we will discuss the working methods for different types of locking: a pattern lock, PIN-code, password and even a linked Mi Account.
It's important to understand that success depends on several factors, such as the MIUI version, USB debugging (ADB), Google account tied, and battery status, such as if the phone has Find Device enabled, the chances of saving data are much higher. We have compiled current methods for 2026, tested on MIUI 12-14 firmware for Redmi 7A (codenamed pine).
Before you start, check:
- π Battery level (at least 30%, otherwise the phone may turn off during the process).
- π Availability of original USB-cables (cheap cables often do not transmit data to the ADB).
- π» Access to a computer with Windows/Linux (c ADB or Fastboot).
1 Unblocking through Google account (if linked)
This method works if Redmi 7A previously added a Google account and enabled sync, Suitable for devices running MIUI before version 12.5 (newer versions may disable the feature).
Instructions:
- On the lock screen, enter any password/key 5 times in a row until the message βForgot the password?β appears.
- Click on this caption β select βRestore via Googleβ.
- Enter the login and password from the Google account that was linked to the phone.
- Create a new password or pattern lock.
β οΈ Note: If Google enters the data and you have an error called βImpossible to connect to the serverβ, check your Internet connection (mobile data is better than Wi-Fi). Also make sure that the phone does not have a factory reset via Find My Device β in this case, the data will be erased.
Why is it that Googleβs new MIUI recovery is not working?
2.Use ADB (Android Debug Bridge) to delete the lock file
The method is suitable if on Redmi 7A The previous debugging was included USB (USB Debugging is the only way to unlock your phone without losing data if you forget your pattern lock or PIN-To work, you will need a computer with installed Xiaomi drivers and tools ADB.
Step-by-step:
- Download and install Platform Tools (includes ADB and Fastboot).
- Get Redmi on board. 7A computer-to-computer USB-cable.
- Open the command prompt (cmd) in the folder with ADB and execute the commands:
adb devices
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
rebootAfter the restart, the phone unlocks, but you may need to reconfigure the pattern lock. If the commands don't work, try an alternative:
adb shell am start -n com.android.settings/.ChooseLockGenericβ οΈ Attention: On some firmware MIUI Lock files can be stored in other folders (for example, in the, /data/system/users/0/). If the lock remains after the reboot, check for gatekeeper.password.key or gatekeeper.pattern.key files and delete them.
Install Platform Tools on PC|Enable debugging on USB on the phone (if previously available)|Download Xiaomi drivers for your OS|Connect your phone to the original cable|Check the visibility of the device by the team `adb devices`-->
3. bypass Mi Account through the test menu (for older versions of MIUI)
If Redmi 7A blocked by a Mi Account (for example, after a reset or purchase of a used phone), you can try to bypass the check through the test menu. MIUI 11 and demands SIM-mobile-internet cards.
Instructions:
- Put it in. SIM-card on your phone and turn it on.
- On the lock screen, dial ##3646633## (code for logging into the engineering menu).
- Go to the Connectivity section β Wi-Fi.
- Click on "Menu" β "Advanced" β "Disconnect" (this will disable the Mi Account verification).
- Return to the lock screen and try to enter any password.
If the method does not work, try an alternative method:
- π± Connect your phone to Wi-Fi on the lock screen.
- π Restart the device (clip the power supply) + Volume up for 10 seconds).
- π After the reboot, it may be possible to skip the account check.
β οΈ Attention: On new versions MIUI (12+) This method does not work due to enhanced security, and after bypassing Mi Account, the phone can be blocked again the next time you connect to the Internet (if the account was not deleted from the device through official channels).
4. Unlock through Recovery and Fastboot modes (partial data loss)
If previous methods didnβt work, you can try unlocking Redmi 7A via Recovery or Fastboot, but with minimal data loss, such as resetting only lock settings (without clearing user files).
Method 1: Reset via Recovery (Photos and videos are saved, but applications are removed):
- Turn off the phone.
- Press Power + Volume Up to Enter Recovery.
- Select "Wipe Data" β "Wipe All Data (Do not choose Format Data!).
- Confirm the action and wait for the reboot.
Method 2: Delete lock files via Fastboot (requires an unlocked bootloader):
fastboot flash cust cust.img
fastboot rebootβ οΈ Attention: On Redmi 7A Fastboot commands will not work without official unlocking through the Mi Unlock Tool. Also, after resetting via Recovery, you may need to re-authorize your Mi Account if it was tied to you.
π‘
Before resetting via Recovery, remove the memory card (microSD) β it does not clear, but can be damaged by unstable power.
5. Official ways to unlock from Xiaomi
If none of the methods worked, you can contact the official service center Xiaomi, the manufacturer provides two options for unlocking:
| Method | Timeline | Cost | Data retention |
|---|---|---|---|
| Unlocking through Mi Account (if tied) | 1-3 days | Free of charge. | Yes. |
| Contact the service center with documents | 3-7 days | 1 000β3 000 β½ | No (full reset) |
| Remote unlocking through Find Device | Instantly. | Free of charge. | No. |
To unlock through Mi Account:
- Go to account.xiaomi.com.
- Log in to your account.
- Select "Find the device" β "Unlock".
- Confirm the action via SMS or email.
Critical: If the phone was bought from hand and tied to someone else's Mi Account, official unlocking is only possible if there is a check or a sales contract.
6. Alternative methods (for experienced users)
If you're willing to take a chance, you can try informal firmware or tools like the Mi Flash Tool, but these methods require an unlocked bootloader and can lead to complete data loss or a phone "brick."
Ways for Advanced Users:
- π§ Custom Recovery firmware (TWRP) and manually delete lock files.
- π₯ Using the Mi Flash Tool to flash your phone while saving partition /data.
- π Exploitation of vulnerabilities in MIUI (For example, through DirtyCOW for older versions of Android).
β οΈ Warning: Unofficial firmware may contain malicious code or disrupt the Widevine module (issues with Netflix, banking applications). Also, after firmware custom Recovery can work Anti-Rollback protection, and the phone will stop turning on.
π‘
The best way to avoid data loss is to back up regularly through Mi Cloud or locally on your PC. Even if the phone is locked, files from the backup can be recovered after unlocking.