Installing custom or official firmware on a Xiaomi smartphone via a PC is a process that requires care and preparation. Many users resort to this method when standardized software is used. OTA-Update is not available, the device is βblinkedβ or you need to install alternative firmware such as LineageOS or Pixel Experience. Unlike an update over the air, firmware through a computer gives you full control over the process, but also carries risks - from losing data to turning the phone into a brickΒ».
In this article, we will discuss all the steps from tool preparation to the final restart. Particular attention will be paid to unlocking the bootloader (without it, firmware is impossible), choosing the right version of the software for your model (Redmi Note 12, POCO X5, Mi 11, etc.), as well as the nuances of working with MiFlash and fastboot utilities. If you have never flashed a smartphone before, do not worry: the instruction is adapted for beginners, but with all the technical details.
1. Firmware Preparation: What to Do Before Starting
Before you connect Xiaomi to a PC, follow the mandatory preliminary steps, and ignoring them can cause failures or permanent damage to the system.
- π± Check the device model: go to Settings β The phone. β Model: For example, the Redmi Note 10 Pro and Redmi Note 10 Pro (India) are different devices with different firmware!
- π Charge the battery to at least 60%. With a low charge, the phone may shut down during firmware.
- πΎ Backup: Use Mi Cloud, Google Drive, or local copy on your PC!
- π Install drivers: download Mi PC Suite or Xiaomi package USB Drivers for correct device recognition.
Also make sure your PC has disabled the antivirus, which can block firmware or utilities. Windows 10/11 additionally requires you to disable the driver digital signature check (instruction below).
How to disable driver signature verification in Windows?
If your device was purchased in China (the C-suffix version, like the Mi 11 Ultra C), it may require a dedicated global firmware that unlocks regional restrictions. 4PDA or XDA Developers.
2 Unlock the bootloader: without it, firmware is impossible
Xiaomi blocks the bootloader on all devices by default, a security measure, but it also makes it harder to install custom firmware. Unlocking takes 3 to 30 days (depending on Xiaomi's policy) and requires you to link your Mi Account to the device.
Here's a step-by-step algorithm:
- Activate Developer Mode: Go to Settings β About Phone and click on MIUI Version 7 times.
- Back to Settings β Additionally. β For developers and include: π Unlocking OEM (It may be called a factory unlock) π Debugging by USB
Mi Unlock Tool
Mi
fastboot
Loudness down + Nutrition
Linked to Mi Account on phone|Debugging is on. USB|Xiaomi drivers installed|Phone in fastboot mode|Mi Unlock Tool Launched on Administrator's Name-->
Important! Once the bootloader is unlocked, the phone will perform a hard reset, all data will be erased, and some features (such as Mi Pay or Widevine L1 for Netflix in HD) may stop working.
Less. 7 days|1-2 weekdays|3-4 weekdays|More than a month.|I haven't tried it yet.-->
3. Selection of firmware: official vs custom
The type of firmware depends on the functionality of the device and the risks. (official) firmware from Xiaomi are divided into:
- π Global Stable β stable version for the international market (recommended by most users).
- π¨π³ China Stable β Chinese version with local services (may not support Google).
- π§ͺ Developer β test builds with new features but possible bugs.
Custom firmware (e.g. LineageOS, ArrowOS, HavocOS) gives you more freedom, but it requires experience.
- β Remove the adverts in MIUI.
- β Speed up the system.
- β Add features (e.g. Always-on Display on unaccompanied models).
- β οΈ Break the camera, NFC or wireless charging (if the firmware is not optimized for your model).
Where to download:
| Type of firmware | Source | Risks. |
|---|---|---|
| Official (Global/China) | Official Xiaomi website | Minimum (if the version is chosen correctly) |
| Castomic (AOSP) | XDA Developers | High (possible bugs, loss of function) |
| Port from another device | Telegram chat, 4PDA | Critical (risk of "bricking") |
Tip: For beginners, itβs best to start with the official global firmware. If you need custom features, choose firmware marked Official on XDA and read user reviews of your model.
4. Install firmware via MiFlash (for official versions)
MiFlash is the official utility from Xiaomi for fastboot firmware. It is suitable for restoring "bricks" or installing stock MIUI. You can download it from the official website (Tools section).
Step-by-step:
- Unpack the downloaded firmware (a file with the.tgz or.zip extension) into a folder without Cyrillic characters (for example, C:\MiFlash\proshivka).
- Run MiFlash.exe on behalf of the administrator.
- Connect your phone in fastboot mode (clip Volume down + Power when the device is off).
- In the utility, click Select and specify the path to the folder with the firmware.
- Select firmware mode: Clean all - complete cleaning (recommended when changing the version of MIUI); Clean all and lock - cleaning + lock bootloader (only for official firmware!); Save user data - saving data (risky, can lead to failures).
Refresh
Flash
1. Reinstall drivers manually through Device Manager.
2. Use an older version of MiFlash (e.g., 2018).
3. Post in mode EDL (You need an authorized Xiaomi account).-->
Mistakes and solutions:
- π« Device not found β Check the connection. USB (Port 2.0 is more stable than 3.0 or reinstall drivers.
- π« Flash not done β Try a different version of the firmware or MiFlash.
- π« The phone does not turn on after the firmware β Keep your food on. + Loudness up 10-15 second-on-seconds.
5. Firmware via fastboot (for custom firmware)
If you install LineageOS, AOSP, or any other custom firmware, you'll need fastboot and manual execution, which is more complicated, but gives you more control.
What will be required:
- π₯οΈ ADB Fastboot tools (download from Android site).
- π Firmware in.img or.zip format (some firmware requires a separate firmware). boot.img).
- π§ Unlocked loader (see section 2).
Instructions:
- Unpack the firmware in a folder with fastboot (for example, C:\platform-tools).
- Connect your phone in fastboot mode and check the connection with the command: fastboot devices must display the serial number of the device.
- For most custom firmware, commands are sufficient: fastboot flash boot.img fastboot flash system.img fastboot flash vendor.img fastboot flash vendor.img fastboot flash dtbo.img fastboot reboot
- If the firmware is.zip, use TWRP (see the next section).
π‘
Always check the partition list (fastboot getvar all) before you run. Some custom firmware requires additional commands for modem, bluetooth, or recovery.
Warning: Some firmware (for example, for POCO F3 or Redmi K40) You need a special patch for Widevine, otherwise Netflix and other services will not work in the future. HD. Look for patches on XDA or in telegram chat rooms.
Installation via TWRP (for zip firmware)
TWRP (Team Win Recovery Project) is a custom recovery that allows you to install firmware in.zip and make backups. It must be flashed before installing custom firmware.
How to install TWRP:
- Download the TWRP image for your model from the official website.
- Connect your phone in fastboot mode and execute the command: fastboot flash recovery twrp-3.7.0_12-0-surya.img (Replace the file name with yours).
- Immediately after firmware, go to TWRP, holding Volume Up + Power.
Install firmware through TWRP:
- Copy the firmware (.zip) on your phone or flash drive.
- In TWRP, select Install β Select Storage (if the firmware is on a flash drive).
- Select a firmware file and make Swipe to Confirm Flash.
- After installation, run Wipe β Format Data (required for the first installation!).
- Reboot to the system.
What to do if TWRP asks for a password?
Some new Xiaomi models (e.g. Redmi Note) 12 or POCO X5) Use dynamic partitions (dynamic_partitions). They need special versions for them. TWRP or firmware through fastboot.
7. Solving problems after firmware
Even with the right installation, there can be problems, and here are the most common ways to solve them:
| Problem. | Possible cause | Decision |
|---|---|---|
| Phone not turned on (black screen) | Incorrect firmware or interrupted process | Re-swipe in EDL mode (authorization required) |
| Hanging on the MI logo | Core conflict or incompatible firmware | Install the correct version of boot.img via fastboot |
| No network (IMEI lost) | No modem or nvram partitions are stitched | Switch modem separately or restore IMEI via SN Write Tool |
| The camera's not working. | There is no vendor or libcamera driver | Install an ANX Camera patch or flash a stock vendor |
If Widevine L1 (Netflix in low resolution) is missing after firmware, try:
- Switch DRM-fix for your model (see 4PDA).
- Install Magisk with the Universal SafetyNet Fix patch.
- Return to the official firmware and unlock the bootloader again.
Tip: After successful firmware, check SafetyNet status through the YASNAC application. If the test is not passed, some banking applications (for example, SberBank Online) may not work.
8 How to return the official firmware if something went wrong
If custom firmware is unstable or you want to return the warranty, you can roll back to the official MIUI.
- Download the latest stable firmware for your model from the official website.
- Unpack it and swipe through MiFlash in Clean all and lock mode (this will block the bootloader back).
- If the phone is not turning on, use EDL mode: Connect the phone to a PC with the button "Loud up + Volume down." In MiFlash, select firmware and press Flash.
Attention! Once you lock the bootloader, you wonβt be able to install custom firmware until you re-unblock it (this is again 7-30 days of waiting).
If MiFlash refuses to flash your device in EDL mode, you may need to log in to your modelβs Xiaomi account, in which case, refer to the 4PDA or XDA forums, which often post authorized accounts (or instructions for receiving them).