How to open Xiaomi Mi 9: unlock the bootloader, reset the pattern lock and restore MIUI

Xiaomi Mi 9, released in 2019, is still a popular smartphone thanks to the powerful hardware (Snapdragon 855 processor, 6/8 GB of RAM) and the current MIUI firmware. However, owners often face the need to β€œopen” the device – whether it is unlocking the bootloader to install custom firmware, resetting a forgotten password or recovering from a software failure. In this article, we will analyze all the current ways to unlock the Mi 9 (codenamed cepheus), including official methods from Xiaomi and workarounds for complex cases.

It is important to understand that the term β€œopen” can mean different procedures:

  • πŸ”“ Unlocking the bootloader – a mandatory step for installation TWRP, Magisk or custom firmware type LineageOS.
  • πŸ”„ Resetting the screen lock – if you forget PIN, graphical key.
  • πŸ› οΈ Recovery after the β€œbrick” – when the smartphone does not turn on or hovers on the logo MI.
  • πŸ“± Bypassing the Mi Account - if the device is tied to someone else's data (after purchasing the used one).

Each of these scenarios requires a different approach, and we’ll go through them in detail, including the specifics of the Mi 9 model (like the Qualcomm chip and MIUI 14/15), starting with the most common request, which is unlocking the bootloader.

1. Official unlocking of the Xiaomi Mi 9 bootloader

The MIUI factory firmware blocks the bootloader on all Xiaomi devices, including the Mi 9. This is a security measure, but it also limits users in customization options. To install TWRP, obtain root rights or flash an alternative OS, you first need to unlock the bootloader through the official Mi Unlock Tool.

⚠️ Attention: Unlocking the bootloader resets all data on the device! make a backup through Settings β†’ Additionally. β†’ Backup and reset or Mi Cloud (unless your account is blocked).

Step-by-step:

  1. Link your Mi Account to your device Go to Settings β†’ Mi Account and log in. Then go to Settings. β†’ About the phone, press 7 times on the version MIUI, To activate the developer mode. Go back to Settings. β†’ Additionally. β†’ For developers and include: πŸ”§ Debugging by USB πŸ”— Unlocking OEM (point!)

Download the Mi Unlock Tool

The official utility is available on the Xiaomi website (registration required). Use a version at least 5.5.224.30 for compatibility with the Mi 9.

Connect your smartphone in Fastboot mode

Turn off the phone, then press Volume Down + Power until the Fastboot logo appears. Connect to the PC via the original USB Type-C cable.

Launch unlock.

In Mi Unlock Tool, log in with the same Mi Account as your phone. Press Unlock and wait until it's completed (usually takes 1-3 minutes). The device will reboot with the bootloader unlocked.

Linking your Mi Account to your device|Enable debugging on USB and OEM-unlock|Download Mi Unlock Tool from the official website|Connect your phone to Fastboot mode|Launch the utility and wait for completion-->

What if the Mi Unlock Tool gives you a "Couldn't unlock" error?
This error often occurs due to: - Mi accounts mismatch on the phone and in the utility. - Insufficient latency (Xiaomi requires 7-15 days after the account is tied for new devices). - Outdated version of the Mi Unlock Tool. Solution: check accounts, update the utility and try again in a week if waiting is required.

Once successfully unlocked, you can flash TWRP or custom firmware. However, remember: this will void Xiaomi’s warranty and may cause problems with MIUI over-the-air (OTA) updates.

2. Reset the pattern lock or password to the Mi 9

Forgotten. PIN-On the Xiaomi Mi 9 there are several ways to restore access, depending on whether debugging is enabled. USB Is the Mi Account tied.

Method 1: Mi Account (if the account is linked)

  1. After 5 failed attempts to enter, the button Forgot the password will appear.
  2. Select Restore via Mi Account and enter the associated account details.
  3. Follow the instructions for resetting the lock (may be required) SMS-code).

Method 2: Through Recovery Mode (if USB debugging was enabled)

If your Mi Account is not tied, but USB debugging has been activated before, you can use ADB:

adb shell rm /data/system/gesture.key


adb shell rm /data/system/locksettings.db




adb shell rm /data/system/locksettings.db-wal




adb shell rm /data/system/locksettings.db-shm

After you execute the commands, restart your phone and the lock will be reset.Caution: This method only works on some versions of MIUI and may not work on the latest updates.

Method 3: Hard Reset (Hard Reset)

If other methods do not help, you can still reset completely through Recovery:

  1. Turn off the phone.
  2. Press Volume Up + Power before the Mi Recovery logo appears.
  3. Select Wipe Data β†’ Wipe All Data (control – volume buttons, confirmation – power button).
  4. After resetting, the phone will restart in factory condition.

In these cases, the flashing through the Mi Flash Tool will help:

  1. Download the official firmware for Mi 9 (cepheus code) from the Xiaomi Firmware website.
  2. Unpack the archive and launch the Mi Flash Tool (version 2020.3.14.0 or later).
  3. Connect your phone in Fastboot mode (or EDL if not detected).
  4. Select the firmware folder and press Flash (recommended mode – clean all).

Hard Brick (hard Brick) failure:

If the phone does not respond to charging, the indicator does not burn and is not detected by the computer, the problem may be:

  • πŸ”‹ Battery – try charging with another cable or from another source.
  • πŸ”Œ porte USB-C β€” Check for damage or oxidation.
  • πŸ’Ύ Memory eMMC – if the phone is not sewn through EDL, Maybe the memory chip is out of order.

πŸ’‘

If the Mi 9 isn't powered on or charging, check the power supply and cable first. Often the problem lies in the faulty charger, not in the phone itself.

5. Unlock the network (unlock SIM) on Xiaomi Mi 9

Xiaomi Mi 9 was sold in several versions: global (M1902F1G), Chinese (M1902F1A) and for specific operators (for example, M1902F1T for Three UK).If your device is tied to the operator (for example, shows "SIM-network is locked"), it should be unlocked.

Official method:

  • Contact the operator from whom you bought the phone, with a request to provide an unlock code (SIM unlock code).
  • The cost of the service varies from free (if the phone is fully paid) to 1000-3000 β‚½.
  • After receiving the code insert SIM-card of another operator and enter the code when requested.

Alternative methods:

If the operator refuses to help, you can try:

  • πŸ“± Software unlocking through services like DC-Unlocker or Octopus Box (requires payment and software skills).
  • πŸ’» Modified modem firmware is a risky method that can lead to loss IMEI.

⚠️ Warning: Unofficial network unlocking may disrupt module operation 4G/LTE or cause a loss of warranty. 9 Snapdragon-powered 855 Some methods require an unlocked bootloader.

6. Frequent errors and their solutions

When working with Xiaomi Mi 9 users often face typical problems, we have collected the most common errors and ways to fix them:

Mistake.Reason.Decision
Couldn't unlock the Mi Unlock ToolMi Account is not tied to the device or there is not enough waiting timeRe-link your account and wait 7-15 days (Xiaomi requirement)
The phone does not turn on after the firmwareIncompatible version of MIUI or interrupted processFlip the official firmware through Fastboot or EDL
Invalid IMEI after resettingDamage to the modem partition or incorrect backupRestore. IMEI through QCN-file-center
The touchscreen is not working after the update.Display driver conflict in new MIUI versionReverse to the previous version or firmware through TWRP
Anti-rollback errorTrying to flash the old version of MIUI after the updateCheck out compatible versions (check out Xiaomi Firmware Updater)

If your problem doesn’t make it to the table, check the error logs through ADB:

adb logcat > log.txt

Or refer to specialized forums such as 4PDA (Section Xiaomi Mi 9), which are collected solutions for rare cases.

7. Useful tools and resources for Xiaomi Mi 9

To successfully work with Mi 9, the following tools and sources of information are useful:

  • πŸ”§ Programs: Mi Unlock Tool - the official utility for unlocking the bootloader. Mi Flash Tool - firmware through Fastboot and EDL. TWRP for cepheus - custom recavers for Mi 9. XDA-Developers - discussion and firmware for Mi 9.
  • πŸ“„ Xiaomi Firmware Updater – an archive of official and custom firmware. MIUI EU β€” Multilingual firmware without Chinese services.
  • πŸ› οΈ Service centers: Official Xiaomi service centers (warranty repairs). Local workshops (for example, Cellular Doctor, Fix Price) - for non-warranty cases.

Before using any tools, check that they are compatible with your Mi 9 version (codename cepheus). For example, the firmware for Mi 9 SE (grus) will not work!

FAQ: Answers to Frequent Questions

Can I unlock the bootloader on the Mi 9 without waiting 7 days?
No, this is a requirement for Xiaomi for all devices released after 2018. Even if you previously unlocked the bootloader on this phone, re-unblocking will require waiting. This restriction can only be circumvented through informal services (for example, paid accounts with developer rights), but this violates Xiaomi’s rules.
Lost data after resetting it through Recovery. Can it be recovered?
If you've made Wipe Data, you've got a very small chance of recovery, but you can try programs like DiskDigger or Dr.Fone by connecting your phone to Fastboot and getting root access, and remember, success depends on whether the data has been overwritten with new information.
After you run the firmware through the Mi Flash Tool, the phone doesn't turn on.
There was probably a firmware error: Try: Swipe again in clean all (not clean all and lock!); Use a different firmware version (for example, try EEA instead of Global); Swipe through EDL (requires an authorized account); If nothing helps, contact the service - the memory chip may have been damaged.
How to check if the bootloader is unlocked on the Mi 9?
Turn off your phone and press Volume Down + Power to log into Fastboot. If there's Unlocked (usually red) at the bottom of the screen, the bootloader is unlocked. If there's no sign or it says Locked, the bootloader is locked.
Can I install Android 13/14 on the Mi 9?
Xiaomi officially stopped supporting the Mi 9 on MIUI 13 (based on Android 12).However, there are unofficial firmware: LineageOS 20 (Android 13) - stable build for the cepheus. Pixel Experience (Android 14) - requires an unlocked bootloader and TWRP. Before installing check the reviews on the forums - some builds may have problems with the camera or NFC module.