How to Reflash Xiaomi through 4PDA: A Complete Guide to Unlocking and Installing Custom Firmware

Reflashing Xiaomi smartphones through 4PDA is a popular way to get advanced features, remove embedded software or install a global version of MIUI. However, the process requires care: an error at any stage can turn a device into a โ€œbrick.โ€ In this article, we will analyze all the steps from preparation to final configuration, taking into account the nuances of 2026.

Many users choose 4PDA for its extensive firmware base and active community where rare solutions can be found, but it is important to understand that Xiaomiโ€™s official support does not apply to custom firmware, which means that when a warranty breaks, the warranty is canceled and recovery through the service center becomes paid, but the right approach minimizes the risks.

If you are a beginner, start by learning the terms bootloader, TWRP, fastboot, and ADB. Without this, it is difficult to understand what happens at every step. And for experienced users, this article will help refresh their knowledge and avoid common mistakes, such as choosing the wrong firmware version for a particular model.

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

The first step is to save data. Flashing erases all information from the device, including photos, contacts and messages. Use Mi Cloud or local backup via Settings โ†’ About phone โ†’ Backup. Pay special attention to:

  • ๐Ÿ“ฑ Contact (export to) VCF-file)
  • ๐Ÿ“ธ Photo/video (copy to PC or cloud)
  • ๐Ÿ”‘ Passwords (save from Google Smart Lock or Password Manager)
  • ๐ŸŽฎ Gaming progress (attach to your Google Play Games account)

Check the MIUI version and the device model, and this is critical: the firmware for the Redmi Note 10 Pro (sweet) will not work for the Redmi Note 10 (mojito), and you can find out the code name in the Device Info HW app or via the command:

adb shell getprop ro.product.device

Also prepare:

  • ๐Ÿ”Œ Cable USB (original, undamaged)
  • ๐Ÿ’ป Computer on Windows 10/11 Linux (MacOS is not recommended due to driver issues)
  • ๐Ÿ”‹ Battery charge of at least 60%
  • ๐Ÿ› ๏ธ Tools: Mi Unlock Tool, Platform Tools (ADB/Fastboot), TWRP for your model

โš ๏ธ Note: If your device was purchased in China (the C-suffix version in the model name), unlocking the bootloader can take up to 360 hours of waiting.

๐Ÿ“Š What kind of firmware do you plan to install?
Official Global MIUI
LineageOS (Pixel Experience)
MIUI EU (weekly/stable)
Another.

2 Unlocking the bootloader (Bootloader)

Without unlocking the bootloader, you can't install custom firmware. Xiaomi officially allows this, but the process requires you to link your Mi Account to the device. Here's a step-by-step guide:

  1. Activate Developer Mode: Go to Settings โ†’ About the phone and 7 times click on the version MIUI. Then go back to Settings. โ†’ Additionally. โ†’ For developers and include: ๐Ÿ”“ Unlocking OEM ๐Ÿ”Œ Debugging by USB

Link your Mi Account to your device: in Settings โ†’ Xiaomi Account โ†’ Mi Cloud, make sure the phone is linked to your account (should show as โ€œConnectedโ€).

Download the Mi Unlock Tool (official version only!) and run it on your PC. Sign in with the same Mi Account as your phone.

Connect your phone in Fastboot mode (turn off the device, then press Volume Down + Power). In Mi Unlock Tool, press Unlock.

Once confirmed, the waiting time will start counting down, 168 hours (7 days for new accounts), up to 30 days for old accounts, and there is no way to speed up the process: Xiaomi servers block bypass attempts.

โš ๏ธ Warning: If you see a Couldn't unlock error when you unlock, check: Is your Mi Account linked to your phone (reassignment sometimes helps), is your phone connected to the Internet (required for servers to check). VPN Proxies (they block access to Xiaomi servers).

โ˜‘๏ธ Preparation for unlocking the loader

Done: 0 / 4

3. Installation of custom recaveri (TWRP)

TWRP (Team Win Recovery Project) is an alternative recovery that allows you to install firmware, backup and restore the system. Official versions of TWRP are not available for all Xiaomi models, so you often have to use informal builds with 4PDA.

Installation instructions:

  1. Download the file. twrp.img for your model (for example, twrp-3.7.0_sweet.img For the Redmi Note 10 Pro. Check the hash file (MD5) original!
  2. Place the file in the folder with Platform Tools (where adb.exe and fastboot.exe are located).
  3. Connect your phone in Fastboot mode and execute the command: fastboot flash recovery twrp.img
  4. Immediately after installation, go to TWRP, holding Volume Up + Power. If the standard MIUI Recovery boots, repeat step 3, as the system has overwritten TWRP.

In TWRP, the first thing you do is make a full backup of the Boot, System, and Data partition, which will save you if the firmware goes wrong. Store the backup on your PC or microSD -- don't rely on internal memory alone!

SectionWhat does it contain?Should I backup?
BootCore and loaderโœ… Yes.
SystemFirmware and system filesโœ… Yes.
DataApplications and user dataโœ… Yes.
VendorDrivers and proprietary filesโš ๏ธ If you wish,
EFSIMEI and network settingsโœ… I'll be sure!

๐Ÿ’ก

If TWRP doesn't see internal memory, try formatting it as F2FS in the recovery settings, which often solves mounting problems.

4. Selecting firmware for 4PDA: what to download and where to look

On 4PDA, Xiaomi firmware is published in model-specific themes, like the Poco X3 Pro, which will be a theme of the [Poco X3 Pro] firmware, Recovery, Unlock. Here's how to find the current version:

1. Determine the type of firmware you need:

  • ๐ŸŒ Global MIUI โ€” official firmware for the international market (without Chinese applications).
  • ๐Ÿ‡ช๐Ÿ‡บ MIUI EU โ€” Modified version with deleted bloatware and weekly updates.
  • ๐Ÿ› ๏ธ LineageOS (Pixel Experience) - Firmware based AOSP pure Android.
  • ๐Ÿ‡จ๐Ÿ‡ณ Chinese MIUI โ€” Only for experienced users (many restrictions, need to be bypassed).

2. Check the compatibility:

- Check the code name of your model (e.g. vayu for Poco X3 Pro) with the firmware name.

Note the Android version (12, 13, 14) โ€“ some custom firmware requires a specific base.

3 Download firmware and additional files:

The firmware itself (usually in.zip format).

Disable Force Encryption (if the firmware does not support encryption)

Magisk (to obtain root rights if necessary)

Example of file structure for MIUI EU installation:

/sdcard/




โ”œโ”€โ”€ miui_SWEETEEAGlobal_V14.0.1.0.TKFMIXM_...




โ”œโ”€โ”€ disable_force_encrypt.zip




โ”œโ”€โ”€ Magisk-v26.4.zip

โš ๏ธ Attention: Firmware with 4PDA Check the forum reviews before installing, especially for camera bugs, NFC or 5G.

What to do if the firmware is not installed?
If you see an Error 7 error when you install in TWRP, it means that the device model and firmware are not matched. Solution: 1. Check the code name of the firmware (should match ro.product.device). 2. Try another version of the firmware (for example, take 13.0.5.0 instead of 14.0.1.0). 3. If the problem persists, download the firmware from another source (for example, Xiaomi Firmware Updater).

5. Firmware process: step-by-step instruction

Now, let's get to the most critical stage, which is the sequence of actions.

  1. Boot to TWRP (hold Volume Up + Power when turned on).
  2. Click on Wipe โ†’ Advanced Wipe and mark Dalvik / ART Cache System Data Cache

Swipe for confirmation (this will delete all data!).

Go back to the main menu and select Install. Specify the path to the firmware file (.zip).

Add more zips to the installation of Disable Force Encryption and Magisk (if root is required).

Swipe the installation to begin. It'll take 5-15 minutes.

Once completed, press Reboot System. The first download can last up to 10 minutes - don't interrupt it!

If the phone has been stuck on the MIUI logo for more than 20 minutes:

  • ๐Ÿ”„ Reboot to TWRP and re-set.
  • ๐Ÿ”ง Check if the firmware is suitable for your model.
  • ๐Ÿ“ฑ Try another version. TWRP (Sometimes an older assembly helps).

๐Ÿ’ก

Always install firmware and Magisk in one TWRP session. If you put the firmware first and then reboot and log back into the Magisk recavatories again, the system can become encrypted and you lose access to the files.

6.Setting up the system after firmware

After successful firmware installation, several steps must be taken to ensure stable operation:

Initial setting:

Select a language, connect to Wi-Fi and log in to your Google/Mi Account (if required).

Skip the data recovery suggestions (itโ€™s better to do it manually later).

Verification of functionality:

  • ๐Ÿ“ถ Network: Make sure there is a signal and mobile internet is working.
  • ๐Ÿ“ท Camera: check all modules (wide-angle, macro, telephoto).
  • ๐Ÿ”Š Sound: Test of speakers and microphone.
  • ๐Ÿ”‹ Charging: Connect the charger and check the indication.

3. Additional tweaks (optional):

Install Magisk Manager to manage root rights.

Set up build.prop to change DPI or disable ads (requires root).

- Install Xiaomi.eu OTA Updater for automatic updates (only for the MIUI EU).

โš ๏ธ Note: If the firmware stopped working NFC or Google Pay, check: Magisk is installed with MagiskHide Props Config (to hide root) and SafetyNet is activated (check through SafetyNet Test app).

7.Typical errors and their solutions

Even with the exact following of the instructions, there can be problems.

Mistake.Reason.Decision
Error: 7 in TWRPDisparity between the device model and firmwareDownload the firmware for your code name
The phone does not turn on after the firmwareBoot or EFS section damagedRestore the backup via TWRP or reflash boot.img manually
No network (IMEI lost)EFS or incorrect modem is damagedRestore EFS from the backup or run through the original vendor
Hanging on the MIUI logoModule conflict or incomplete installationRepeat the installation of the firmware with a full WIP

If you're facing a loss of IMEI, that's one of the biggest problems, and you can only recover it with the backup of the EFS partition. If you don't have a backup, try the following steps:

  1. Download the original firmware for your model from the Xiaomi website.
  2. Extract the file. nv_data.bin from the firmware (it is in the images folder).
  3. Fastboot: Fastboot Flash Modem NON-HLOS.bin fastboot flash fsg fsg.mbn fastboot erase nv_data fastboot flash nv_data nv_data.bin

If nothing helps, contact the service center โ€“ self-recovery of IMEI without a backup is fraught with the ultimate loss of the network.

8.Firmware updates in the future

After installing custom firmware, you can update it in two ways:

1. Through OTA (over the air):

For MIUI EU, use the Updater app.

For custom firmware (LineageOS) - built-in updater.

2. Manually via TWRP:

- Download the new firmware version.

- Load to TWRP and install it on top of the old one (without data wip if the firmware is the same type).

โš ๏ธ Note: When you upgrade to a new version of Android (for example, from 13 to 14), you sometimes need a full data waip. 4PDA.

There's a handy tool for MIUI EU, Xiaomi.eu OTA Updater, that automatically checks for updates and installs them. Install it from XDA Developers.

๐Ÿ’ก

Check user reviews in the 4PDA firmware theme before updating. Sometimes newer versions contain critical bugs (such as a broken camera or fast battery drain).

FAQ: Frequent questions about Xiaomi flashing

โ“ Can I return the official firmware after the custom?
Yes, but it does: Download the official firmware (.tgz or.zip) from Xiaomi's site, install it via Fastboot using the Mi Flash Tool (selecting the Clean All option), which will delete all data and block the bootloader back (if you flash the official global version).
โ“ Why Google Pay doesnโ€™t work after the firmware?
This is related to SafetyNet, the Android Integrity Verification System. Solutions: Install Magisk and activate MagiskHide. Use the Universal SafetyNet Fix module. Check status in the SafetyNet Test app (should be CTS Profile: True).
โ“ How to Bypass Waiting to Unlock the bootloader?
Officially, no. Xiaomi blocks circumvention of this restriction. Informal methods (such as resetting time through ADB) can lead to a ban on an account or locking the device.
โ“ Which firmware to choose for maximum performance?
Depending on the goals: Stability: official global MIUI. Pure Android: Pixel Experience or LineageOS. Maximum features: MIUI EU (weekly updates, no bloatware). Games: custom cores (for example, Perseus for Poco F3). For weak devices (for example, Redmi 5A) are recommended lightweight firmware like MIUI Lite.
โ“ What to do if the phone overheats after the firmware?
Possible causes and solutions: Incompatible core: flash the original boot.img. Background processes: check activity through Settings โ†’ Battery. Wrong CPU settings: set Kernel Adiutor and reset the settings to default. Battery marriage: if you overheated before the firmware, replace the battery.