Xiaomi Redmi 7 remains a popular budget smartphone even years after the release, but its owners often face the problem of blocking: a forgotten pattern lock, PIN-It's a code or a Mi Account that requires confirmation after reset, and unlike the flagship models, there's no fingerprint scanner on all the modifications, which increases the risk of locking the device. This article covers all the current ways of unlocking - from official to engineering, taking into account the features of the firmware Redmi 7 (codename onc).
Important: Methods vary depending on the type of lock and version MIUI. For example, bypassing Mi Account on older versions MIUI 12.5 requires additional manipulation of the EDL-Recovery on some firmware may result in a loss IMEI β We'll analyze each scenario with risk warnings and step-by-step instructions.
If youβre looking for a way to unlock Redmi 7 without losing data, go straight to the pro section. ADB-For cases with a Mi Account reference, you will need access to mail or backup phone, but there are alternative methods as well (see the method comparison table below).
1. Unlock via Safe Mode (if the pattern lock is forgotten)
This method works if Redmi 7 has only a pattern lock or PIN installed, but there is no binding to Mi Account.The point is to boot the phone in safe mode, where all third-party applications, including the screen locker, are disabled.
Algorithm of action:
- Turn off Redmi 7 with a long press on the power button.
- Press the power button and hold it until the Xiaomi logo appears.
- As soon as the logo appears, release the power button and immediately press the volume down button.
- Hold the volume button until the phone boots into Safe Mode (the screen will read βSafe Modeβ at the bottom).
In this mode:
- π Try unlocking the screen β sometimes the pattern lock is reset.
- π± If the key is still active, go to Settings. β Annexes β All applications.
- π Find the Lock Screen app (or com.android.keyguard) and clear its data.
- π Restart your phone β the lock should disappear.
β οΈ Warning: If you want to enter Mi Account after you restart, this method didn't work. ADB or hard reset.
π‘
If Safe Mode doesnβt turn on the first time, try repeating the steps by holding the volume button longer β sometimes it takes 10-15 seconds.
2.Reset via Recovery Mode (Hard Reset)
It's a radical way of erasing all the data from your phone, including photos, contacts and apps.
- π Forgot the pattern lock and password from Mi Account.
- π± The phone does not respond to other unlock methods.
- π You need to return the phone to the factory settings before selling.
Step-by-step:
- Turn off Redmi 7.
- Press the power button and the volume button at the same time.
- Hold them for 10-15 seconds until the Recovery Mode menu (the logo of Xiaomi with Android robot) appears.
- Use volume buttons for navigation and power button to select the item.
- Select Wipe Data β Wipe All Data (on some Factory Reset firmware).
- Confirm the action and wait for the process to be completed.
- Choose Reboot. β Reboot to System.
| Advantages | Deficiencies |
|---|---|
| β It works on any firmware. | β Deletes all data without recovery |
| β No need for PC or special programs | β Maybe she can. IMEI loose-leaf |
| β Bypasses the pattern lock and PIN | β It doesnβt help if your phone is tied to your Mi Account. |
β οΈ Note: On some versions MIUI 11-12 after Hard Reset, the phone may require you to enter the Mi Account information that was previously linked. If you do not remember the username / password, go to the section about bypassing the account.
3. Unlock through ADB (without data loss)
This method allows you to delete a password file via Android Debug Bridge (ADB) without erasing user data.It works if the phone is debugging on USB and has access to a PC.
What you need:
- π₯οΈ A computer with installed Xiaomi drivers and ADB.
- π USB-cable (preferably original).
- π± Included debugging by USB (Settings β The phone. β Version. MIUI β 7 times to press to unlock the developer settings).
Instructions:
- Connect Redmi 7 to your PC via USB.
- Open the command line (Windows) or the terminal (Mac/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
rebootAfter the reboot, the lock should disappear. If there is a su: not found error, then there is no root permission on the phone - try an alternative way:
adb shell
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
update system set value=0 where name='lock_pattern_autolock';
update system set value=0 where name='lockscreen.lockedoutpermanently';
.quit
rebootβοΈ Preparation for unblocking through ADB
β οΈ Note: If after execution of commands the phone still requires a password, then the lock is implemented at the level MIUI, It's not Android. It's only Recovery reset or Mi Account bypass.
4. bypassing the lock Mi Account (if the login / password is forgotten)
Xiaomi smartphones are linked to the Mi Account, and after resetting settings or firmware, they may require authorization. If you don't remember your account details, there are several ways to bypass:
Method 1: Through the official Xiaomi website
- π Go to account.xiaomi.com.
- π Click βForgot your password?β and enter your linked email or phone.
- π§ Follow the instructions to restore access (confirmation code will come to the mail or SMS).
Method 2: Through EDL-The mode (for advanced users)
If the official method doesnβt work, you can flash the phone into Emergency Download Mode (EDL), but it requires:
- π₯οΈ PC with Mi Flash Tool installed.
- π Firmware for Redmi 7 (codename onc).
- π§ Screwdriver for disassembling the phone (you need to close the contacts test point).
Step-by-step:
- Turn off the phone and remove the back cover (on Redmi 7 it is removable).
- Find a test point (usually next to the SIM card jack) and close the contacts with tweezers.
- Connect your phone to your PC via USB, and it should be defined as Qualcomm HS-USB QDLoader 9008.
- Start the Mi Flash Tool, select the firmware and press Flash.
What happens if you interrupt the firmware in EDL?
Method 3: Through Fastboot (without disassembly)
Less risky method, but requires unlocked bootloader:
- Load your phone to Fastboot Mode (Power button + Volume down).
- Connect to the PC and check the connection with the command:
fastboot devices- Enter the command to reset FRP (Factory Reset Protection):
fastboot oem clean_frp- Reboot the phone:
fastboot rebootπ‘
Bypassing Mi Account via EDL or Fastboot can result in a device being locked if it has been stolen. Xiaomi tracks such activities and can block IMEI.
5. Unlock with Find My Device (if your phone is connected to Google)
If a Google account has been set up on Redmi 7, you can try to unlock it through Find My Device, which works even if you have forgotten your graphical key, but:
- πΆ The phone must be connected to the Internet (Wi-Fi or mobile network).
- π The battery level should be above 5%.
- π Find the device must be enabled in Google settings.
Instructions:
- Go to the Find My Device website.
- Sign in with the same Google account that is linked to your phone.
- Select your Redmi 7 from the list of devices.
- Click Lock the device and enter a new password.
- Confirm the action β the phone will appear field to enter a new password.
After unlocking, donβt forget to delete the old pattern lock in the security settings.
Alternative methods: OTG-cable
If none of the above methods worked, you can try the lesser known tricks:
Method 1: Unlocking through OTG-cable
Suitable if the lock screen has an emergency call button:
- Put it on the phone. OTG-cable USB-mouse.
- Click Emergency and enter ##4636###.
- With the mouse, go to the Settings menu and turn off the screen lock.
Method 2: Service codes for resetting
Some of the Redmi 7 firmware supports hidden commands:
- π Enter the dial number: ##7780### - reset settings (retained data).
- π Enter *2767*3855# β Full reset (removes everything, including firmware).
β οΈ Attention: Code *2767*3855# may result in loss IMEI on some versions of Redmi 7. Use it only as a last resort!
Comparison of all Unlocking Methods
| Method | PC required | Data retained | Works with Mi Account | Difficulty |
|---|---|---|---|---|
| Safe Mode | β No. | β Yes. | β No. | ββ (simple) |
| Hard Reset (Recovery) | β No. | β No. | β No (requires Mi Account) | β (simple) |
| ADB | β Yes. | β Yes. | β No. | βββ (middle-class) |
| Bypassing Mi Account (EDL) | β Yes. | β No. | β Yes. | βββββ (difficult) |
| Find My Device | β No. | β Yes. | β No. | ββ (simple) |