How to reflash Xiaomi Mi 8: official and custom firmware

Xiaomi Mi 8

Snapdragon 845

Xiaomi

In this article, we will discuss all the available ways to flash the Mi 8: from the official update via MIUI Updater to install custom firmware such as LineageOS or Pixel Experience. Particular attention will be paid to unlocking the bootloader, without which it is impossible to install alternative software, as well as errors that users face. If you are a beginner, do not worry: we will explain each step in detail so that even without experience you can successfully update your smartphone.

Before you start, consider that flashing can nullify the warranty if it's still valid, and if you don't do it right, you can turn the phone into a brick. But if you follow the instructions, the risks are minimal. Ready? Then let's get started!

1. Preparation for flashing: what to do before the start

The Xiaomi Mi 8 flashing requires pre-preparedness, and without it, you risk losing data, crashing or even damaging your device.

βœ… Back up all your data. The firmware erases your internal memory, so transfer your photos, contacts and files to your computer or the cloud. Use Mi Mover or Google Photos for automatic backup.

βœ… Check the device model. Not all firmware is suitable for all Mi 8 modifications. Check your version in Settings β†’ About Phone β†’ Model. For example, Mi 8 SE (codename sirius) and standard Mi 8 (dipper) require different files!

βœ… Charge the phone to at least 60 percent. Interrupting the process due to battery drain may make it impossible to turn on the device.

βœ… Install the drivers you need. Fastboot and ADB PCs require Xiaomi and Google drivers USB. Download them from Xiaomi's official website or through the Mi Unlock Tool.

Make a backup of data | Check the device model | Charge the phone β‰₯60% | Install ADB/Fastboot drivers | Download the firmware for your model-->

If you plan to install custom firmware, you'll need to unlock the bootloader, and that's in the next section.

2. Unlock the bootloader on Xiaomi Mi 8

Official MIUI firmware can be installed with a locked bootloader, but custom ones (like LineageOS or HavocOS) require unlocking. Xiaomi allows this, but the process is not as simple as before.

⚠️ Warning: Unlocking will reset all data on the phone! also note that Xiaomi may refuse to unlock if the Mi Account is tied to the device for less than 7 days.

Here's the step-by-step instruction:

  1. Link your Mi Account to your phone. Go to Settings β†’ Mi Account and log in. Make sure the device is tied to your account for at least a week.
  2. Download Mi Unlock Tool. The official utility is available on the Xiaomi website (authentication will be required).
  3. Activate Developer Mode. Go to Settings β†’ About Phone and 7 times click on MIUI Version. Then to Settings β†’ Additional β†’ For developers, turn on USB Debugging and OEM Unlock.
  4. Connect your phone to your PC in Fastboot mode. To do this, turn off the device, then press Volume Down + Power until the hare appears in the eardress cap.
  5. Run the Mi Unlock Tool and follow the instructions. The utility will check whether it can unlock and, if all is well, start the process (usually takes 1-3 minutes).

If the utility gives you a "Couldn't unlock" error, try:

  • πŸ”„ Reconnect the phone in Fastboot mode.
  • πŸ”„ Use the other USB-port (preferably) USB 2.0).
  • πŸ”„ Wait 72-168 hours if you have a new account.
What if the Mi Unlock Tool can’t see the device?
If the utility does not recognize the Mi 8 in Fastboot mode, check: 1. Are Qualcomm HS-USB QDLoader 9008 drivers installed (for Snapdragon 845). 2. Disable the driver signature in Windows (via gpedit.msc β†’ User Configuration β†’ Administrative templates β†’ System β†’ Driver Installation β†’ Digital Signature). 3. Try another cable (original from Xiaomi).

3. Ways to flash the Xiaomi Mi 8

There are three main methods of flashing the Mi 8, each of which is suitable for different purposes, depending on which firmware you want to install and how deeply you are willing to interfere with the system.

MethodType of firmwareDo you need unlocking?DifficultyWhen to use
MIUI UpdaterOfficial (stable/beta)❌ No.⭐Update without losing data
Recovery (TWRP)Castomy or officialβœ… Yes.⭐⭐⭐To install ZIP- firmware
Fastboot (MiFlash)Official or customβœ… Yes.⭐⭐⭐⭐To restore a "brick" or clean installation

Let’s look at each method in more detail.

3.1 Update via MIUI Updater (the easiest way)

If you need to upgrade the Mi 8 to the latest official version of MIUI without losing data, this method is best. It does not require unlocking the bootloader and runs directly from the system.

Instructions:

  1. Open Settings β†’ About the phone β†’ System update.
  2. Click on the three dots in the upper right corner and select Select the firmware file.
  3. Specify the path to the downloaded firmware file (.zip format for Recovery).
  4. Confirm the installation and wait for the reboot.

⚠️ Warning: If you downloaded firmware for another model (e.g., Mi 8 SE instead of Mi 8), the phone may stop turning on. Always check the device's code name (dipper for the standard version).

3.2 Installation via TWRP Recovery

To install custom firmware (such as LineageOS 20 or Pixel Experience), you will need TWRP Recovery, an alternative recovery menu, which you need to flash through Fastboot, and then install the firmware.

Steps:

  1. Download TWRP for Mi 8 (twrp-3.7.0_9-0-dipper.img file).
  2. Connect your phone in Fastboot mode (clamp Volume down + Power).
  3. Open the command line in the folder with ADB and execute: fastboot flash recovery twrp-3.7.0_9-0-dipper.img fastboot boot twrp-3.7.0_9-0-dipper.img
  4. From the TWRP menu, select Wipe β†’ Advanced Wipe and select Dalvik, Cache, System, Data.
  5. Return to the main menu, click Install and select ZIP-firmware.

After installation, the first start can take 10-15 minutes – do not interrupt the process!

Official MIUI|LineageOS|Pixel Experience|HavocOS|Another custom |Not yet decided-->

Firmware via Fastboot (MiFlash)

This method is used to completely reinstall the system, for example, if the phone is not turning on or you need to return the stock firmware.Requires an unlocked bootloader and a PC with the MiFlash Tool installed.

Instructions:

  1. Download Fastboot firmware for Mi 8 (select the version for your model!).
  2. Unpack the archive in a folder without Cyrillic characters (for example, C:\Mi8_Fastboot).
  3. Connect your phone in Fastboot mode.
  4. Launch MiFlash, press Select and specify the firmware folder.
  5. At the bottom, choose Clean all (full cleaning) or Clean all and lock (if you want to lock the bootloader after you have firmware).
  6. Press Flash and wait until it is completed (usually 5-10 minutes).

Important: If MiFlash gives you a "cannot receive hello packet" error, try reconnecting your phone or using another USB-port. Also check that Device Manager defines your phone as "Android Bootloader Interface."

4. Where to download firmware for Xiaomi Mi 8

The right firmware depends on the stability of the device, and here are the reliable sources for downloading:

  • πŸ“₯ Official firmware MIUI: πŸ”Ή Xiaomi official website (choose Mi 8 β†’ dipper). πŸ”Ή Xiaomi Firmware Updater (the latest version).
  • πŸ“₯ Castom firmware: πŸ”Ή XDA Developers (discussed Mi 8 threads). πŸ”Ή LineageOS (official builds for dipper). πŸ”Ή Pixel Experience (clean Android firmware).

⚠️ Warning: Download firmware only from trusted sources! Files from torrents or little-known sites may contain viruses or be corrupted.

Before downloading, check:

  • πŸ” Does the code name (dipper for Mi 8, sirius for Mi 8 SE) match?
  • πŸ” Android version (e.g. LineageOS 20 Android 13).
  • πŸ” Assembly date (fresh firmware is usually more stable).

πŸ’‘

If you are installing custom firmware for the first time, choose builds marked "Stable" or "Official." Nightly builds may contain bugs.

5. Typical firmware errors and their solutions

Even when following instructions, users often encounter problems, and here are the most common errors and ways to correct them:

Mistake.Reason.Decision
Error: cannot load'twrp.img'Wrong path to file or corrupted imageCheck the file name and folder (no spaces/Cyrillic). Download TWRP again.
This package is for"dipper" devices; this is a"sirius".Firmware for another modelDownload firmware for dipper (for Mi 8) or sirius (for Mi 8 SE).
Phone stuck on MI logoIncompatible firmware or incomplete installationFastboot with a full clean (Clean all)
MiFlash:"flash_all_lock.bat failed"The bootloader is blocked or damagedUnlock the bootloader again through the Mi Unlock Tool.
No network after firmwareNo modems are installed (firmware)Run firmware separately through TWRP or Fastboot.

If the phone doesn’t turn on after firmware (black screen, no button response), try:

  1. Press Volume up + Power for 20-30 seconds (forced reboot).
  2. Connect to charging for 10-15 minutes (sometimes helps with discharge).
  3. Swipe stock firmware through Fastboot with a full cleanup.

πŸ’‘

If the phone doesn't boot after firmware, don't panic: 90% of the time, it can be restored via Fastboot. The main thing is not to interrupt the process and use the correct firmware files.

6.What to do after a successful firmware

Your Xiaomi Mi 8 is well-stitched, but to keep the device running smoothly, take a few extra steps:

πŸ”§ Set up the system:

  • πŸ”Ή Go through the initial setup (language selection, Wi-Fi connection).
  • πŸ”Ή Restore data from the backup (contacts, photos, applications).
  • πŸ”Ή Update Google Play Services and other system applications.

πŸ”§ Check the performance:

  • πŸ”Ή Test the camera, sound, network (mobile internet, Wi-Fi, Bluetooth).
  • πŸ”Ή Make sure the fingerprint sensor and NFC are working (if you used custom firmware).

πŸ”§ Optimize your performance:

  • πŸ”Ή Disable unnecessary applications in Settings β†’ Apps.
  • πŸ”Ή Enable Developer Mode and activate GPU- Acceleration (if the firmware supports).
  • πŸ”Ή Install Magisk for root rights (optional).

If you have installed custom firmware, it is also recommended to flash:

  • πŸ”Ή NikGapps (an alternative to Google Apps if they are not included in firmware).
  • πŸ”Ή Magisk for root access and modules (e.g. ViPER4Android for audio enhancement).

7.Alternative firmware for Xiaomi Mi 8: what to choose

If you’re tired of MIUI or want to try pure Android, here are the best custom firmware for the Mi 8 in 2026:

FirmwareBasisPlusesConsReference
LineageOS 20Android 13βœ… Pure Android without Blaatwareβœ… Regular updates❌ No proprietary features MIUI❌ Camera worse than stockDownload
Pixel ExperienceAndroid 13/14βœ… Interface as on Google Pixelβœ… Good optimization❌ Sometimes gesture bugsDownload
HavocOSAndroid 13βœ… Multiple customizationsβœ… Easy and fast❌ Fewer updatesDownload
MIUI EUMIUI (without Chinese services)βœ… All features MIUI without bloatβœ… Weekly updates❌ Requires unlocking the loaderDownload

πŸ’‘ Tip: If you want a camera, you should stay on MIUI or install firmware with ported modem and camera (e.g., MIUI EU with a GCam patch).

FAQ: Frequent questions about the firmware Xiaomi Mi 8

❓ Can I flash the Mi 8 without unlocking the bootloader?
Yes, but only official firmware via MIUI Updater or Recovery (if the bootloader has already been unlocked before).
❓ How to return the stock firmware if the phone does not turn on?
Use Fastboot firmware and MiFlash Tool with Clean all option. Download the official firmware from Xiaomi website and follow the instructions in Section 3.3.
❓ Why does the mobile network not work after the firmware?
This is because there are no validware files, download a separate firmware package for your model and run it through TWRP or Fastboot.
❓ Can I get the root rights to the Mi 8 after I have firmware?
Yes, you need to install Magisk. Download the latest Magisk.zip from GitHub and run it through TWRP.
❓ How long does it take to run a Fastboot?
Usually 5-15 minutes, depending on the speed of the USB- port and the size of the firmware. If the process took longer than 20 minutes, check the connection or try again.