Owners of Xiaomi devices often face intrusive advertising in system applications and an overloaded MIUI interface. Pure Android offers an alternative: speed, no excess software and up-to-date security updates. Installing custom firmware allows you to turn a budget smartphone into a powerful tool, but requires care.
The process of replacing the operating system involves the deep layers of the bootloader and the system partition. Before you start, it is important to realize that any manipulation of the software carries risks. If you are ready to experiment for the sake of the perfect system, this article will be your guide to the world of modification.
Device preparation and backup
The first step is to save all the important data, and the process of installing the new system involves completely formatting the internal memory, and photos, contacts and documents will be permanently deleted unless you backup them in advance.
Use Google cloud services or local copying to your computer. Make sure that your contacts are synced with your Google account to move them, which will take a few minutes, but save you from losing important information.
You also need to charge the battery to at least 80%. Interrupting the firmware process due to battery discharge can lead to serious consequences. USB-cable that will be used to connect to the PC.
βοΈ Firmware readiness
Remember that some banking applications may stop working after the procedure due to system integrity checks, and consider alternative payment methods or installing the necessary certificates in advance.
Unlocking the Xiaomi bootloader
Without an unlocked Bootloader, installing third-party firmware is impossible. Xiaomi requires a formal procedure for unlocking through Mi Unlock servers, a mandatory step that cannot be circumvented software without special vulnerabilities.
You'll need a Mi Account and a phone number to be linked to your device. β The phone. β Version. MIUI You have to press the build number several times to activate the developer mode. USB-debugging and unlocking.
β οΈ Note: After applying for an unlock, it may take a wait of 7 to 15 days.The Xiaomi server checks the device, and trying to speed up the process can lead to an account being blocked.
To unlock yourself, download the Mi Unlock Tool to your computer. Put your smartphone into Fastboot mode with the volume and power buttons and connect it to your PC. The program will show the status of the device and allow unlocking if the wait period has expired.
What to do if Mi Unlock is frozen?
Installation of custom TWRP Recovery
The standard recovery menu doesn't allow you to install modified systems. You'll need TWRP, the most popular customized recaves, which provides a user-friendly interface and file system support.
First, find the.img image file that matches your smartphone model. Using the version for another device can lead to a brick (completely inoperable), download the firmware file and, if necessary, the Magisk root rights patch.
Connect your phone in Fastboot mode and execute a command via ADB:
fastboot flash recovery twrp_image_name.imgRight after the firmware, the recaveri needs to boot into it, not including the normal system. It's usually a combination of a volume button and a power button. If you accidentally download a standard MIUI, it can overwrite the TWRP back to the stock one.
π‘
Use the fastboot boot twrp.img command to temporarily run the Recovery without writing to memory, which will allow you to check the operation of the TWRP before permanent installation.
Process of installing a clean system
Once you log in to TWRP, the first thing you do is complete a full reset. From the Wipe menu, select the Dalvik/ART Cache, System, Data, and Cache sections. Don't wipe the Internal Storage section if there are firmware files in there.
Then go to the Install menu and select an archive with a pure Android firmware (like LineageOS or Pixel Experience). Confirm the swipe installation and wait for the process to be completed. This can take anywhere from 5 to 15 minutes.
Once installed, it is recommended that you install the Magisk patch immediately if you need root rights, and similarly, you select the zip archive of the magick through the Install menu, without which the banking applications may not work, but there may be conflicts with it.
The table below shows a comparison of popular builds of pure Android for Xiaomi devices:
| Name of firmware | Basis | Stability | Root by default |
|---|---|---|---|
| LineageOS | AOSP | Tall. | No. |
| Pixel Experience | Google Pixel | Medium | No. |
| crDroid | LineageOS | Tall. | Optionally. |
| RisingOS | AOSP/MIUI | Experiment | No. |
It is important to follow the sequence of actions. If you miss the partition cleaning step (Wipe), you can experience cyclical reboots or errors in the operation of applications.
Configure Google services and drivers
Pure Android doesnβt always contain the full Google App Package (GApps). Depending on the firmware you choose, you may need to install them separately. Use OpenGApps or NikGApps to do this, choosing the ARM64 architecture and the Android version.
Installation is also done via TWRP in Recovery mode. Flashing GApps requires a rerun of Wipe Dalvik/Cache, a critical step for the Play Market and sync services to work properly.
The first boot, the system can be slow. That's normal, because it's optimized applications and cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache-cache. 10-15 Adaptation minutes before making conclusions about performance.
β οΈ Note: Some features such as Widevine L1 (HD Netflix content may stop working after unlocking the bootloader. DRM, which cannot be bypassed by software methods on most devices.
Possible problems and solutions
When modifying software, there are often errors, and the most common problem is Bootloop, and if your phone is stuck on the logo, try logging back into TWRP and making Wipe Data/Format Data.
If the touch screen or sound isnβt working, youβve probably used an incompatible version of your firmware or backpack. Check the forums (like 4PDA or XDA) carefully for your device codename.
In the event of loss of IMEI or network problems, it may be necessary to restore the backup of the EFS. That is why experienced users backup this partition immediately after unlocking the bootloader.
π‘
Always save the MIUI stock firmware on your computer. It will be needed to return the warranty or restore the device to its original state via Mi Flash.
Don't be afraid to experiment, but do it consciously. The firmware community is constantly updating, fixing bugs and improving autonomy. A properly configured, clean Android can extend the life of a smartphone by several years.