The Xiaomi Mi 4, released in 2014, is still a popular device due to its reliability and the ability to install modern firmware. However, owners often face access problems: a forgotten pattern lock, a locked bootloader after a failed update, or buying a used phone with a tied Mi Account. In this article, we will analyze all the current ways to unlock the Mi 4 β from official methods to bypassing protection through the engineering menu.
It is important to understand that the procedures for the Mi 4 differ from the new Xiaomi models due to the outdated architecture (Qualcomm Snapdragon 801) and the bootloader version. For example, it does not work unlocking through Fastboot using the Mi Unlock Tool utility for modern devices. We will focus on methods that are guaranteed to work in 2026, including bypassing. FRP (Factory Reset Protection) and reset via Recovery.
If your Mi 4 doesnβt turn on, hangs on the logo, or requires a password after a reset, youβll find solutions for each situation in this article. For convenience, weβve divided the instructions by lock type and difficulty level, from simple actions for beginners to advanced methods for power users.
1. Determine the type of lock on Xiaomi Mi 4
Before you start unlocking, you need to diagnose the problem accurately. The Mi 4 can be locked on three levels:
- π Screen lock: pattern lock, PIN-code or password set by the user.
- π± Mi Account: Linking to a Xiaomi account that requires a login/password after resetting.
- π§ Bootloader: locking at the firmware level, preventing the installation of custom software.
To determine the type of lock, pay attention to the behavior of the phone:
| Symptoms. | Probable cause | Decision |
|---|---|---|
| The phone turns on but asks for a pattern lock/PIN | Screen locking | Reset via Recovery or bypass through ADB |
| After reset, you need a login / password from Mi Account | FRP (Factory Reset Protection) | Bypassing the test menu or firmware without checking |
| You canβt flash custom software, Device is locked error | Locked loader | Official Unlocking via Mi Unlock (old version) |
| The phone is not turned on, the red indicator flashes. | Hardware failure or damaged firmware | Firmware via EDL Mode (Emergency Mode) |
Critical feature of the Mi 4: on this model it is impossible to unlock the bootloader through the official Mi Unlock Tool of the new version (2023)+). You need to use the utility version 2.3.803.1 or lower, otherwise the device will not be recognized.
β οΈ Note: If the phone was purchased from hand and tied to someone else's Mi Account, official unlocking is impossible without the data of the previous owner. EDL tyre-free.
2. unlocking the screen: resetting the pattern lock or PIN-code
If you forget the lock screen password but the phone is turned on, there are several ways to regain access without losing data (unless it is encrypted).
Method 1: Recovery Mode (Data Loss)
The most reliable method is to reset the settings through standard recovery. CWM recovery TWRP (custom-set).
- Turn off the phone.
- Press Volume Up + Power before the Mi logo appears.
- In the Recovery menu, select Wipe Data/Factory Reset (control β volume buttons, confirmation β power button).
- After reset, reboot through Reboot System Now.
Warning: This method deletes all data on the phone, including photos, messages and apps. If encryption is enabled on the phone, you may need to enter a password even after reset.
Method 2: Bypassing the lock through ADB (without data loss)
If the phone is debugging on USB (USB Debugging, you can delete a password file through a computer, and this method only works when you connect to a previously authorized PC.
Install Qualcomm drivers for Mi 4|Download and unpack ADB Tools|Connect your phone to your PC in charge mode|Start the command line on behalf of the administrator-->
adb shell
su
rm /data/system/gesture.key # for pattern lock
rm /data/system/password.key # for PIN/password
rebootIf the commands are executed without errors, the phone will restart without locking the screen. Importantly, some firmware may call the files differently (for example, locksettings.db), and you will need to edit them through SQLite.
β οΈ Attention: On firmware MIUI 10+ With encryption enabled, this method will not work β the data will be blocked before entering the password.
pattern lock|PIN-code|Password.|I remember.|Other-->
3.Traffic bypass FRP (Mi Account) after resetting settings
If after resetting via Recovery, the phone requires data from Mi Account that you do not know, this means activation of Factory Reset Protection (FRP). On the Mi 4, this protection can be circumvented in several ways.
Method 1: Test Mode (Test Mode)
This method works for most versions. MIUI for Mi 4:
- On the account entry screen, click on the login field.
- Enter any text, highlight it and select Share β Message.
- In the recipient field, type ##4636## and send it.
- You'll open the test menu. Go to Settings and turn off Factory Protection.
If this method does not work, try an alternative:
- π± On the account login screen, click Add Account.
- π Select Google and enter any email, then click Forgot Password?.
- π In the browser that opens, go to the site miui.com/unlock Download the unlock utility (if the phone is connected to Wi-Fi).
Method 2: Fastboot Firmware with Deletion FRP
If the menu crawling doesn't work, you'll need to flash the modified firmware without checking your Mi Account.
- Download the firmware. MIUI for Mi 4 (Cancro version) from en.miui.com.
- Unpack the archive and delete the file frp_lock.img (if there is).
- Fastboot commands: fastboot flash system system.img fastboot erase frp
π‘
If after firmware the phone hangs on the logo, reset through Recovery (Wipe Data).
4. Unlock the bootloader on Xiaomi Mi 4
To install custom firmware (LineageOS, Pixel Experience) or obtain root rights to the Mi 4, you need to unlock the bootloader.
Step 1: Getting permission to unblock
Even on older Xiaomi models, you need to link your account to your device:
- Turn on the phone and go to Settings β The phone. β Version. MIUI (Press 7 times to activate the developer mode).
- Back to Settings β Additionally. β For developers and turn on OEM-unlocking and debugging USB.
- Link your Mi Account to Settings β Accounts.
Step 2: Unlock with Mi Unlock Tool (old version)
Download the Mi Unlock Tool version 2.3.803.1 (new versions do not support Mi 4):
- π₯οΈ Install Qualcomm drivers for Mi 4 (download at forum.xda-developers.com).
- π± Transfer the phone to Fastboot mode (clip Volume Down) + Nutrition).
- π Connect to your PC and launch the Mi Unlock Tool. Sign in with the same account you have on your phone.
- π Press Unlock and wait until it is completed (usually 10-15 seconds).
What if the Mi Unlock Tool canβt see the device?
β οΈ Warning: Once the bootloader is unlocked, the phone will reset to factory settings.
5. Recovery through EDL Mode (Emergency Mode)
If the Mi 4 doesnβt turn on, hovers on the logo, or doesnβt respond to buttons, firmware may need to be installed through the device. EDL Mode (Emergency Download Mode) is a method used to restore bricks).
How to enter EDL Mode on Mi 4
There are two ways:
- Hardware method: Turn off the phone. Press Volume up. + Loudness down + Power for 10-15 seconds. Connect to a PC β Qualcomm should appear in Device Manager HS-USB QDLoader 9008.
- Programming method (through ADB): adb reboot edl
Firmware via Mi Flash Tool
For firmware in EDL you will need:
- π₯οΈ Mi Flash Tool (version 2016β2018).
- π.tgz firmware for Mi 4 (e.g, MIUI 10 Global Stable).
- π Cable USB (preferably original).
Instructions:
- Unpack the firmware in a folder without Cyrillic symbols.
- Launch the Mi Flash Tool, press Select and specify the path to the firmware folder.
- Connect the phone in EDL mode.
- Select Clean All mode and press Flash.
π‘
Firmware through EDL It deletes all data, including the Mi Account link, and it's the only way to restore the phone if it doesn't respond to other methods.
| Mistake. | Reason. | Decision |
|---|---|---|
| Sahara Communication Failed | Incorrect drivers or damaged cable | Install the driver manually, try another one. USB-port |
| Firehose Match Fail | The discrepancy between the firmware and phone version | Download the firmware for the Cancro model |
| Device Not Found | Phone not detected in mode EDL | Check the connection, try another cable. |
6. Installation of custom firmware after unlocking
Once the bootloader is unlocked on the Mi 4, you can install alternative firmware such as LineageOS, Pixel Experience or the likes of the newer ones. AOSP This will allow you to upgrade Android to a new version (for example, to Android 10) and improve performance.
Step 1: Installation of TWRP Recovery
Download the latest version TWRP For Mi 4 (cancro model) from twrp.me:
fastboot flash recovery twrp-3.6.0_cancro.img
fastboot boot twrp-3.6.0_cancro.imgStep 2: Firmware custom software
Instructions for LineageOS 17.1 (Android 10):
- Download firmware and GApps (such as OpenGApps pico).
- Reboot to TWRP (Loudness Up + Power).
- Run Wipe β Advanced Wipe and mark Dalvik, Cache, System, Data.
- Sweep through the firmware, then GApps.
- Reboot (Reboot System)
π‘
If there is no network after firmware, check the settings APN or file separately (file) modem.img stock-stack).
Popular custom firmware for Mi 4
| Firmware | Android version | Features | Reference |
|---|---|---|---|
| LineageOS 17.1 | 10 | Stable, minimalist interface | forum.xda-developers.com |
| Pixel Experience | 10 | The interface is like Google Pixel | download.pixelexperience.org |
| Havoc OS | 10 | Lots of customization, good performance | havoc-os.com |
| MIUI 12 (port) | 10 | Official interface with new functions | miui.su |
7. Frequent errors and their solutions
When unlocking the Xiaomi Mi 4, users face typical problems.
Error: This device is locked when running
That means the bootloader is not unlocked.
- π Unlock the bootloader through the Mi Unlock Tool (see section 4).
- π± If the utility does not work, try to sew TWRP Fastboot commands fastboot oem unlock (on some versions) MIUI).
Mistake: Invalid IMEI post-fix
If it's gone after the firmware. IMEI, restore it:
- Download the Chimera Tool or Maui utility META.
- Enter the original IMEI (It is under the battery or on a box).
- Fastboot: Fastboot Flash Modem NON-HLOS.bin
Error: The phone does not turn on after resetting
Possible causes and solutions:
- π Battery discharged β charge your phone for 30 to 60 minutes.
- π Damaged firmware - sew stock MIUI through EDL.
- π οΈ Hardware malfunction β check plumes or battery.
π‘
If the phone does not respond to buttons and does not charge, try to light up from another battery (3.7V) β Sometimes it helps to revive the device.