Changing the operating system on Xiaomi smartphones is a task that may seem difficult for beginners, but with the right approach becomes quite feasible even for users with minimal technical experience. MIUI, But many owners want to install pure Android, custom firmware like LineageOS, or even experiment with alternative OSes. The reasons are different: from dissatisfaction with built-in advertising to the desire to get the latest security updates on older models.
Itโs important to understand that the process of changing systems to Xiaomi is not just about clicking the โUpdateโ button, it requires unlocking the bootloader, selecting compatible firmware, backing up data and sometimes even working with the command line. In this article, we will discuss all the steps from preparing the device to installing a new OS, and also consider the risks and ways to minimize them.
Device preparation: Backup and unlock the bootloader
Before you start changing your firmware, you need to save all the important data, even if you plan to "soft" flash without formatting the partition. /data, The risk of loss of information remains. Use official tools Xiaomi or third-party applications:
- ๐ฑ Mi Cloud โ syncs contacts, photos and notes (requires a Mi Account).
- ๐พ Titanium Backup (for rooted devices) โ saves applications and their data.
- ๐ Swift Backup โ alternative without root rights (partial reservation).
- ๐ฅ๏ธ ADB pull โ command utility for copying files to PC: adb pull /sdcard/ ~/Xiaomi_Backup/
The next critical step is to unlock the bootloader, which is locked by default on Xiaomi devices to protect against unauthorized changes.
- Linking your Mi Account to your device (require to confirm your email and phone!).
- Expectations are 7โ30 days after filing an application for unlocking (on new models, the period can reach 720 hours).
- Use the official utility Mi Unlock Tool (download only from the official website).
โ ๏ธ Warning: Unlocking the bootloader resets the device to factory settings. If you haven't made a backup at this stage, the data will be lost without the ability to recover.
Selection of firmware: official and custom options
Before you install a new system, you should decide on the type of system, and each option has its pros and cons:
| Type of firmware | Advantages | Deficiencies | Suitable for |
|---|---|---|---|
| Official MIUI (Stable/Global) | Maximum compatibility, OTA-Update and support all functions | Advertising, regional version restrictions, slow updates | For those who value stability |
| MIUI EU (unofficial) | No Ads, Weekly Updates, Advanced Settings | No. OTA, Possible bugs, requires an unlocked bootloader | Advanced users who want clean MIUI |
| Pixel Experience | Clean Android, Quick Updates, Minimalist Design | Branded functions (IR-blaster, camera) may not work | Fans of "stock" Android |
| LineageOS | Long-term support, open source, customization | Complex installation, possible performance problems | Enthusiasts, owners of old models |
To select firmware, use resources:
- ๐ Xiaomi Firmware Updater โ an archive of official and custom firmware.
- ๐ฑ XDA Developers โ a forum with discussions and instructions for specific models.
- ๐ Telegram channels (e.g, MIUI Russia) โ current news and links.
Critical: Check firmware compatibility with your deviceโs codename (e.g., raphael for Redmi) K20 Installing firmware for another model will result in a device "brick" (inoperability.
๐ก
Use the Droid Info app or the fastboot getvar product command to find out the code name of your smartphone.
How to install a new system: from Fastboot to TWRP
There are three main methods of changing firmware to Xiaomi, each of which is suitable for different scenarios:
1. via Fastboot (official method)
Suitable for installing official firmware MIUI (including the transition between the global and Chinese versions:
- ๐ฅ๏ธ PC with installed drivers ADB/Fastboot.
- ๐ฅ Firmware in.tgz or.zip format (unpacked in a folder).
- ๐ Cable USB (preferably original).
Installation commands (executed from the firmware folder):
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot erase userdata
fastboot reboot2. Through TWRP (squirrel)
Required for custom firmware installation (LineageOS, Pixel Experience, etc.)
- Install. TWRP Fastboot: Fastboot Flash Recovery twrp-3.7.0_9-0-raphael.img
- Getting into the Recavator: Fastboot boot twrp.img.
- Make a full backup (Backup option in the box) TWRP).
- Flip the firmware through Install, then Wipe โ Format Data (required!).
3. via Mi Flash Tool (for "briques")
Used if the device is not turned on or stuck on the logo.
- ๐ง Requires firmware in.tgz format for your model.
- ๐ Clean All Mode deletes all data, Clean All and Lock โ additionally blocks the bootloader.
- โ ๏ธ Don't interrupt the process! This could result in a complete loss of the device.
Download the firmware and check its hash sum|Install the drivers ADB/Fastboot|Unlock the loader|Backup in. TWRP|Disable signature verification in the Recaveri settings-->
Common mistakes and their solutions
Even when following instructions, users often face problems, and here are the most common ones and how to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| This device is locked in Mi Flash | The bootloader is not unlocked | Repeat the unlocking procedure with the Mi Unlock Tool |
| The device is stuck on the MI logo | Incompatible firmware or interrupted installation | Fastboot with the Clean All option |
| E: Unknown command [log] in TWRP | An outdated version of Recaveri | Update TWRP to the latest version for your model |
| No network after firmware | No modem or vendor available | Sweep the files. modem.img and vendor.img separately |
If the device overheats or discharges quickly after installing the new system, check:
- ๐ Compatibility of the firmware with the version MIUI, which was previously established (e.g., the transition from MIUI 12 on MIUI 14 may require intermediate firmware).
- ๐ก Correct operation of modem files (especially important for devices with Mediatek).
- ๐ ๏ธ Root rights or modifications that conflict with the core of the system.
โ ๏ธ Note: On devices with Mediatek chipsets (such as the Redmi Note 10 Series), custom firmware installation often leads to problems with the camera or Wi-Fi. Before firmware check the user reviews of your model on the Internet. XDA or 4PDA.
What if the sensor doesnโt work after the firmware?
Data recovery after system change
If you backed up before the firmware, it's not difficult to recover the data.
- ๐ Files on internal memory (/sdcard/): When you format the userdata partition, they are deleted. Restore them from your PC or the cloud.
- ๐ฑ Apps and their data: if you used Titanium Backup, restore backup TWRP (restore).
- ๐ Accounts and passwords: sync through Google or Mi Account (if the firmware supports it).
For devices with unlocked bootloader and root rights, you can use Migrat, an application for transferring data between firmware, and it stores:
- ๐ Call logs and SMS.
- ๐ต Application settings (including games).
- ๐ Wi-Fi networks and passwords.
If there is no backup, try the data recovery software:
- DiskDigger scans internal memory for deleted files.
- Dr.Fone โ Recovers contacts and messages (requires root).
- PhotoRec is a console utility for deep scanning.
โ ๏ธ Note: On devices with a file system F2FS (for example, Poco F1) Standard data recovery methods often don't work, and only a pre-built backup will help.
๐ก
Always check the integrity of the backup before you run the firmware, and try to restore 1-2 files on a test device or emulator.
Alternative operating systems: Ubuntu Touch, Sailfish OS others
In addition to Android firmware, some Xiaomi devices can be installed alternative OS. This is true for enthusiasts or owners of older models who want to extend the life of the gadget.
| Operating system | Supported models | Features | Complexity of installation |
|---|---|---|---|
| Ubuntu Touch | Poco F1, Redmi 4X, Mi A2 | Linux environment, PC convergence, no Google services | Medium (requires) TWRP) |
| Sailfish OS | Xiaomi Mi 8, Redmi Note 7 | Guest management, support for Android applications | High (needs a patch for the bootloader) |
| PostmarketOS | Redmi Note 5, Mi 6 | Modular system, updates to 10+ years | High (requires manual adjustment) |
Installing alternative OS has a number of limitations:
- ๐ต No modem support on some models (no calls)/SMS).
- ๐ฎ No hardware graphics acceleration (game and video problems).
- ๐ Fast battery discharge due to unoptimized core.
For experiments, we recommend using a second device or model with active community support (e.g. Poco). F1 or Mi A2). Instructions for installation, look for on the official sites of projects:
- ๐ Ubuntu Touch
- ๐ Sailfish OS
- ๐ฆ PostmarketOS
Security and risks: how not to turn a smartphone into a brick
Changing the operating system to Xiaomi is a process that involves risks.
- ๐งฑ "Brick (inoperable device) โ occurs when a firmware is interrupted or incompatible files are used.
- ๐ Loss of warranty โ unlocking the bootloader will void the official Xiaomi warranty.
- ๐ก๏ธ Security vulnerabilities โ custom firmware may contain backdoors (especially from unverified sources).
To minimize the risks, follow the following rules:
- Use only firmware from verified sources (XDA, official project sites).
- Check the hash sums (MD5/SHA-1) downloaded.
- Do not interrupt the firmware process (even if it is frozen - wait 10-15 minutes).
- Have an original cable and a charged battery (minimum 50%) on hand.
If the device has stopped turning on:
- ๐ Try to download to Fastboot (Power) + Vol Down or Recovery (Power) + Vol Up).
- ๐ฅ๏ธ Connect to your PC and check your response to commands: fastboot devices
- ๐ก If the device is detected, run the stock firmware through the Mi Flash Tool in Clean All mode.
โ ๏ธ Note: On Qualcomm chipset devices (e.g. Redmi) K20 Pro) in the case of a โbrickโ the regime may help EDL (Emergency Download Mode requires an authorized Xiaomi account and a Deep Flash Cable (Deep Flash Cable) to activate it).
๐ก
If you're not sure what you're doing, you can go to forums or power users for help. Most of the brilliance is recoverable, but the process may require special equipment.