Xiaomi Mi 8 firmware: official and custom methods with unlocking the bootloader

The Xiaomi Mi 8, released in 2018, remains a popular smartphone among Android enthusiasts thanks to its powerful hardware (Snapdragon 845, 6/8 GB of RAM) and active support for custom firmware. However, over time, official MIUI updates stop coming out, and users face slowdowns, bugs or the desire to install a more recent version of Android. Phone firmware is a process that requires attention, but with the right approach it is available even for beginners.

In this guide, we will analyze all the current ways of firmware Mi 8 (codename dipper): from the official update via MIUI Updater to install custom firmware like LineageOS or Pixel Experience. Particular attention will be paid to unlocking the bootloader, a mandatory step for most methods, which many users miss when they get the error โ€œThis device is locked.โ€ You will also find solutions to typical problems: hanging on the Mi logo, E3003 errors in the Mi Flash Tool, and ways to restore the โ€œbrickโ€.

Before you start, answer two key questions: 1. What is your goal? Updating to the latest MIUI, switching to clean Android, removing Blaatware or recovering from a crash? 2. Are you prepared for the possible loss of warranty (if it still works) and the risk of โ€œbrickingโ€ the device? With proper follow-up, the probability of problems is minimal, but they do exist.

๐Ÿ“Š Why do you want to install Xiaomi Mi 8?
Update MIUI to the latest version
Install custom firmware (LineageOS, Pixel Experience)
Remove unnecessary Xiaomi apps
Restore the phone after a failure
Other

1. Firmware preparation: Backup and unlock the bootloader

The first and most important step is to save all the data, and the firmware, especially through Fastboot, completely erases the phone's internal memory.

  • ๐Ÿ“ฑ Local Copy: Transfer Files to PC via USB-cable (enable File Transfer mode in notification curtain).
  • โ˜๏ธ Cloud Storage: Upload photos to Google Photos, sync contacts with your Mi Account or Google account.
  • ๐Ÿ”„ Backup applications: use Mi Mover (built into the app) MIUI) Third-party utilities like Swift Backup (requires root).

Without unlocking the bootloader, most firmware methods will not be available. Xiaomi blocks it by default, and you need to unlock:

  1. Link your device to your Mi Account (go to Settings โ†’ Xiaomi Account and log in).
  2. Activate the OEM Unlock option in Settings โ†’ For developers (if there is no item, tap 7 times on the MIUI version in the About Phone section).
  3. Connect your phone to your PC, install the Mi Unlock Tool (download from the official website) and follow the program instructions.

โš ๏ธ Note: Xiaomi may refuse to unlock if the account is new or the phone was purchased less than 7 days ago, in which case wait or use alternative methods (for example, through the use of a new account or a phone). EDL-regime, but it's risky).

Make a backup copy of the data

Unlock the loader (if required)

Charge your phone at least 60%

Download the necessary firmware (official or custom)

Install ADB/Fastboot drivers on PC

-->

Method 2: Official update via MIUI Updater (without unlocking)

The easiest and safest method is to upgrade through the built-in MIUI Updater app, which is suitable if:

  • ๐Ÿ“ฒ You need the latest stable version. MIUI for Mi 8.
  • ๐Ÿ”’ The bootloader is locked and you donโ€™t want to unlock it.
  • ๐Ÿ”„ The phone is stable, but security updates are needed.

Instructions:

  1. Open Settings โ†’ About the phone โ†’ System update.
  2. Click on the icon ยซโ‹ฎยป (three dots) in the upper right corner and select Select Service Package.
  3. If the update is available, download it (weight ~1.5-2.5 GB) and confirm the installation.

If the update does not come โ€œover the airโ€, download the full package (.zip) from the official MIUI Downloads website (select the Mi 8 model, Russia region or Global).

โš ๏ธ Warning: Don't interrupt the upgrade process! If the phone has been getting stuck on the Mi logo for longer than 15 minutes, try clamping the power + Volume up for forced reboot, if that doesn't work, you'll need firmware through Fastboot.

๐Ÿ’ก

Official updates via MIUI Updater do not require unlocking the bootloader and retain a warranty, but are limited to the MIUI versions released by Xiaomi for your model.

3. Method 2: Fastboot firmware (official and custom)

Fastboot is a universal way to install both official and custom firmware.

  • ๐Ÿ”ง Recovery of the phone after a failure ("brickยป).
  • ๐Ÿ“ฅ Official installations MIUI fully discharged.
  • ๐Ÿ› ๏ธ Preparations for custom firmware installation (e.g, TWRP).

The work will require:

  • ๐Ÿ–ฅ๏ธ Windows PC (recommended) 7/10/11).
  • ๐Ÿ”Œ Cable USB Type-C (preferably original).
  • ๐Ÿ“ฆ Firmware in.tgz or.zip format (for Mi) 8 fitting dipper_global_images or dipper_images Chinese version).
  • ๐Ÿ› ๏ธ Mi Flash Tool (download from the official website).

Step-by-step:

  1. Unpack the archive with firmware in a folder without Cyrillic characters (for example, C:\Mi8_Fastboot).
  2. Turn off the phone and press Power + Volume down to enter Fastboot mode (a hare in a hat-hushanka will appear).
  3. Connect your phone to your PC, launch the Mi Flash Tool and press Select by specifying the firmware folder.
  4. At the bottom, select Clean All (Full Cleaning) or Clean All and Lock (Cleaning) mode. + For custom firmware, use Clean All.
  5. Press Flash and wait until it is completed (the process will take 5-10 minutes).

If the Mi Flash Tool is E3003 or This device is locked, then the bootloader is not unlocked. Go back to the first partition and unlock.

What to do if the Mi Flash Tool can't see your phone?
1.Install Qualcomm drivers HS-USB QDLoader 9008 manually via Device Manager. 2. Try another one USB-port (better 2.0, not 3.0). 3. Disable the antivirus - it can block the utility. 4. Use the original Xiaomi cable (cheap cables often do not support Fastboot mode).

Mistake.Reason.Decision
E3003bootloader lockedUnlocking with Mi Unlock Tool
This device is lockedbootloader lockedUnlock the boot loader (see Section 1)
Flash not doneProblems with drivers or cableReinstall drivers, try another port/cable
The phone does not turn on after the firmwareIncorrect firmware or interrupted processRepeat the firmware, select a different mode (Clean all)

4. Method 3: Installation of custom firmware (TWRP + LineageOS/Pixel Experience)

Custom firmware such as LineageOS, Pixel Experience or HavocOS allows you to get a โ€œpureโ€ Android without a MIUI shell, more recent versions of the system (for example, Android 13 instead of Android 10 in the latest official MIUI for the Mi 8), and additional features.

  • ๐Ÿ”“ Unlocked loader.
  • ๐Ÿ”ง Established custom recaveri TWRP.
  • ๐Ÿ“ฆ.zip firmware compatible with Mi 8 (dipper).

Installation steps:

  1. Install. TWRP: Download the last one. TWRP for Mi 8 from the official website (file) twrp-3.7.0_9-0-dipper.img Rename the file to recovery.img and put it in a folder with ADB/Fastboot. Enter the command line: fastboot flash recovery recovery.img fastboot boot recovery.img
  2. Sweeve custom firmware: Downloaded.zip with firmware (for example, LineageOS) put on SD-a card or internal memory. TWRP Choose the Wipe โ†’ Advanced Wipe and mark Dalvik, Cache, System, Data. Press Install, select the firmware file and confirm the installation. Once complete, click Gapps (if you need Google services) and Magisk (for root).

โš ๏ธ Note: Some custom firmware may not support Banking applications (due to lack of SafetyNet) or a full-power camera (problems with Snapdragon 845 drivers). XDA Developers.

๐Ÿ’ก

Before installing custom firmware, check it is compatible with a modification of your Mi 8 (Global/China). Installing firmware for another version may lead to broken communications or sensors.

5. Solving problems after firmware

Even with the exact instructions, there can be problems.

1.The phone does not turn on (black screen or getting stuck on the Mi logo):

  • ๐Ÿ’ก If the phone doesnโ€™t respond at all, try to enter. EDL-Mode (connect the phone off to the PC by clamping Volume upwards) + Volume down, then insert the cable. EDL You will need Mi Flash Pro and an authorized Xiaomi account.

2. no network (IMEI is missing or no signal):

  • ๐Ÿ“ถ Check if the firmware matches the phone region (e.g. Global for Mi 8 Global).

Fast battery discharge after firmware:

  • ๐Ÿ”‹ Reset the battery settings: Settings โ†’ Battery โ†’ โ‹ฎ โ†’ Optimizing the battery โ†’ Drop it.
  • ๐Ÿ“‰ Calibrate the battery: discharge the phone to 0%, then charge to 100% without interruptions.
  • ๐Ÿ” Check Active Applications in Settings โ†’ Battery โ†’ Battery utilization.
How to restore IMEI to Mi 8?
1. Download the archive with the original nvram for your model (see on the 4PDA mi-themed 8). 2. Place the file. nvram.bin on SD-map. 3. V TWRP Choose Install โ†’ Install Image โ†’ choose nvram.bin โ†’ Flash to NVRAM. 4. Restart your phone and check it. IMEI into *#06#.

6.How to get back the official MIUI after custom firmware

If custom firmware was unstable or you want to return the warranty, you can set the official MIUI back.

  1. Download Fastboot firmware for your model from the official website.
  2. Unpack the archive and launch the Mi Flash Tool.
  3. In Fastboot mode, swipe your phone by selecting Clean all and lock mode (this will block the bootloader back).

After this procedure:

  • โœ… The phone will return to factory condition.
  • ๐Ÿ”’ The bootloader will be blocked (the warranty is saved if it is still valid).
  • โš ๏ธ All data will be erased, including internal memory.

If after firmware the phone requires authorization in Mi Account (anti-Rollback protection), enter the account details that was associated with the device before unlocking. If you do not remember the password, restore it on the Xiaomi website or contact for support.

7. Alternative firmware methods: EDL and QFil

If the phone has turned into a โ€œbrickโ€ (it does not turn on, does not respond to buttons, is not determined in Fastboot), there is a last chance โ€“ firmware through the phone. EDL-This is an Emergency Download Mode:

  • ๐Ÿ–ฅ๏ธ PC with Qualcomm 9008 drivers installed.
  • ๐Ÿ”Œ Special cable or closure of contacts on the board (for forced entry into the board) EDL).
  • ๐Ÿ› ๏ธ Mi Flash Pro or QFil.
  • ๐Ÿ“ฆ Firmware in.mbn or.elf format.

Instructions for QFil:

  1. Connect the phone in EDL mode (usually just turn off the phone, pinch Volume up + Volume down and plug in the cable).
  2. In QFil, select Flat Build and specify the path to the file. prog_emmc_firehose_8998.mbn (It should be in the firmware archive).
  3. Click Load XML and select rawprogram0.xml and patch0.xml files.
  4. Press Download and wait until it is completed (the process can take up to 30 minutes).

โš ๏ธ Attention: Firmware through EDL โ€” The wrong thing can permanently knock your phone out of order. If you're not sure, go to the service center.

FAQ: Frequent questions about the firmware Xiaomi Mi 8

โ“ Can I flash the Mi 8 without unlocking the bootloader?
Yes, but only through MIUI Updater (official updates). To install custom firmware or firmware through Fastboot, unlocking is mandatory.
โ“ Which firmware is better to choose: official MIUI custom-made?
Depends on the goals: ๐Ÿ”น Official. MIUI: Stability, support for all functions (camera, NFC, Banking, but an outdated version of Android. ๐Ÿ”น LineageOS, Pixel Experience: fresh Android, no bloatware, but possible bugs with camera or communication. MIUI, experimentation.
โ“ What to do if the camera does not work after the firmware?
The problem is typical of custom firmware: ๐Ÿ“ท Install an alternative camera app (e.g. GCam). ๐Ÿ”ง Sweep separately the camera module from the official firmware through Fastboot: fastboot flash vendor vendor.img ๐Ÿ”„ Get back to the official one. MIUI, if the camera is critical.
โ“ How to know if the bootloader is unlocked on the Mi 8?
Turn off your phone and press Power + Volume down to log in to Fastboot. If the bottom of the screen says This device is unlocked, the bootloader is unlocked. If This device is locked, locked.
โ“ Can I use the Mi 8 to run through the OTG-cable?
No, you need a PC to run your firmware through Fastboot or EDL, and the only way to do it without a computer is to upgrade through MIUI Updater (if the phone is turned on) or install custom firmware through TWRP (if it's already installed), but you also need to pre-download the firmware to your phone.