When you pick up your Xiaomi Redmi 4 and find yourself forgetting your pattern lock or digital code, the lock screen becomes an insurmountable barrier, leaving important contacts, photos and work files behind. At this point, the main thing is not to panic, as there are several proven ways to return access to the device, even if you do not remember the combination of characters.
The process of restoring access depends on which security settings were activated in advance and whether your smartphone is tied to the Mi Account. In some cases, you can do without losing data, in others you will need to completely reset the system to factory settings. Below we will discuss in detail all available algorithms of actions, from simple methods to using the engineering menu.
Itβs worth noting that modern versions of MIUI firmware have a high level of protection, so some old tricks may not work.However, for the Redmi 4 model, which often runs on Android 6.0 or 7.0 bases, effective methods of bypassing locks are still relevant.
Using a Mi Account to Unblock
The most civilized and secure way to restore access is to use the Forgot Password feature, which is built into Xiaomiβs security system, which will only work if your smartphone is connected to a Wi-Fi or mobile Internet network, and if you have previously linked the device to your personal profile. After five failed attempts to enter a pattern lock, a notification should appear on the screen.
Click on the link that appears, and the system will prompt you to enter the username and password from your account, this can be the phone number or email address that was used during registration, authorization will confirm that the device is owned by its owner, after which the lock will be removed automatically.
β οΈ Note: If you do not remember the password from the Mi Account, you will not be able to restore access to the phone in this way, in which case you will first need a procedure to restore access to the account through the official website of the manufacturer.
It is important to understand that the feature may not appear immediately if the lock option has been disabled in the security settings, and older versions of MIUI sometimes require a certain time (15 minutes to an hour) before the system offers an alternative login method.
Resetting settings through Recovery mode
If you canβt log in through your account, the most radical but effective method is to completely reset your data through the Recovery menu, which will remove all information from your phoneβs internal memory, including photos, contacts and apps, but will restore your device to work. Before starting the procedure, make sure that the battery is at least 50% so that the phone doesnβt turn off at a critical moment.
To enter recovery mode, you need to turn off your 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, continue to hold the volume. A menu will open, where the volume button is controlled and the power button is selected.
βοΈ Preparation for Hard Reset
From the Recovery menu, select English, then go to Wipe Data. The system can request confirmation of the action, as this is an irreversible operation. Once confirmed, the cleaning process will begin, which will take a few minutes. Once completed, select Reboot to restart the device.
| Action. | Navigation buttons | The result |
|---|---|---|
| Entrance to Recovery | Volume + and Nutrition | Launching the Recovery Menu |
| Choice of menu item | Volume buttons | Moving the cursor |
| Confirmation | Power button | Execution of the team |
| Data resetting | Wipe Data -> Wipe All Data | Deletion of password and files |
Service codes and engineering menu
Redmi 4 models use special character combinations to get into hidden diagnostic menus on certain firmware versions, one of which involves using code to reset statistics or test that sometimes bypasses the lock screen, but this method does not work on all devices and depends on the specific version of Android.
Try dialing the emergency call button (Emergency Call button is available even when the screen is locked) the following code: ##7780##. If the system recognizes the command, it can suggest resetting without deleting system files, but with clearing user data and passwords. In some cases, this allows you to return to the desktop.
Do the codes work on new versions of MIUI?
There is also a method using the Calculator app. If you have access to widgets or notification curtains, try running the calculator and entering a secret command, for example, 123456789= (the specific combination depends on the version of the application). In the hidden menu that opens, you can sometimes find the option of cleaning data, but this is more the exception than the rule for modern assemblies.
Delete passwords via ADB and computer
More advanced method that requires a computer and cable USB. For its implementation, it is necessary that the debugging on the phone is included USB (USB If this function was activated before the lock, the chances of success are very high, and the data can be saved.
Connect your phone to your PC, install ADB drivers, and open the command line. Enter the command to check the connection: adb devices. If the device is determined, you can enter a command to delete the file that stores the access keys. The path to the file may be different, but often the command is used:
adb shell rm /data/system/gesture.keyOnce you have completed the command, restart the device, and if it has been successful, the phone will let you in without entering a password, or ask you to enter any combination that is also accepted, which requires a certain level of technical literacy and understanding of the Linux/Android file system.
π‘
If the rm command is not executed due to access rights, try first entering the "adb shell", then obtaining root rights (if any) or using the "su" command before deleting the file.
What to do if your phone requires an account after a reset
Once you run Hard Reset through Recovery, modern Xiaomi smartphones will activate theft protection. When you first boot, the device will require you to enter a password from the Mi Account that was synced to the phone before the reset, an Activation Lock mechanism designed to protect the ownerβs data even when you completely flash it.
If you remember the username, but forgot the password, restore access through the site mi.com. In the case when the account is someone else (phone bought with hands) or data is lost irrevocably, the situation becomes complicated. Officially unlock the device without account data is impossible, since the binding is stored on the company's servers.
β οΈ Note: Attempts to bypass activation protection using paid software or bootloader flashing can lead to complete inoperability of the device ("brick"). Be extremely careful with recommendations from unverified sources.
In some cases, waiting helps: if you don't connect your phone to the Internet immediately after a reset, but try to configure it through proxy or special access points, you sometimes get past the verification stage. However, on Redmi 4 with updated firmware, such vulnerabilities are most often closed.
π‘
Mi Account protection is server-side, so simply resetting your settings does not remove the deviceβs binding to the owner.
Prevention and backup
To avoid such problems and lose important data in the future, you need to regularly create backups. Xiaomi smartphones have a built-in Mi Cloud, which automatically saves contacts, messages, notes and system settings. Regular synchronization will allow you to restore the phone book even after a complete flashing.
It is also recommended to write your graphical keys and passwords to a secure location or use password managers. Write down the IMEI devices and account data on paper and store it separately from your phone, which will help quickly restore access in a critical situation.
Remember to check periodically if sync is active, go to your account settings and make sure that the sliders opposite the important items (Contacts, Gallery, Recorder) are on, which will take a minute, but saves hours of recovery.