Over the past few months, I've flashed many devices, and I often forget some things each time. So I wrote this article for reference during my next flashing session.
Disadvantages of Leaving MIUI
- The camera will be limited to 12 million pixels, and there is currently no solution.
- Some custom features may not be available, such as MIUI's "Dual Apps" feature, Dolby audio, and unlocking by pressing the power button.
- Some devices may no longer be able to use access control cards.
- Gaming performance may decline.
Unlocking the Bootloader
Unlocking the Bootloader comes with certain risks, including potential data leakage, so please be cautious.
- Download the unlocking tool from the official Xiaomi website.
- Connect your phone to the computer using a data cable (make sure it supports file transfer).
- Follow the prompts in the tool; you may need to wait for 7 days.
- After unlocking, you can check the unlock status in the developer options.
Rooting & Flashing Magisk
Magisk works by directly writing the API into the system's boot.img, and its installation method involves flashing a pre-hacked image. Once Magisk is successfully installed, you will also have root access.
- Extract the boot.img from the currently running system image and send it to your phone. Typically, the "line flash package" contains this file, while the "card flash package (with a .zip extension)" needs to be extracted using a tool.
- Install the Magisk APP on your phone. It is recommended to download the installation package from the official GitHub repository.
- Click "Install," select "Patch a file," and choose the previously extracted boot.img. After patching, the patched image will be placed in the /Download folder by default.
- Connect your phone to the computer using a data cable (make sure it supports file transfer).
- Copy the patched image from your phone to the computer.
- With the phone powered off, press and hold the volume down and power buttons simultaneously to enter Fastboot mode.
- Open the adb command line and execute
fastboot flash boot <img_directory>. - After flashing, execute
fastboot rebootto restart the device. Done.
Flashing Official ROM
⚠ Please make sure to back up your device data, such as photos, contacts, messages, etc.
- Download the ROM and Miflash from the official Xiaomi website, and extract the ROM.
- With the device powered off, press and hold the volume down and power buttons simultaneously to enter Fastboot mode. Connect your phone to the computer using a data cable.
- Open Miflash and select the just-extracted ROM folder.
- Click "Load Device" and select the device you want to flash.
- Check "Clear all data" in the lower right corner.
- Click "Flash" and wait for the flashing process to complete. This may take 5-20 minutes.
Flashing Third-Party ROM
Please make sure to back up your device data, such as photos, contacts, messages, etc.
This is not a very complicated operation; please remain calm and composed.
- Ensure that the device is currently running an OS that meets the requirements of the third-party ROM, including: device codename, Android version, OS version, etc.
- Ensure that the Bootloader is unlocked. You can check the unlock status in the developer options.
- Download the third-party ROM and recommended Recovery (if available).
- With the device powered off, press and hold the volume down and power buttons simultaneously to enter Fastboot mode. Connect your phone to the computer using a data cable.
- Open the adb command line on the computer and execute
fastboot boot <recovery_directory>. If everything goes well, the phone will enter Recovery. - Once in Recovery, if the recovery supports sideload mode, you can directly enter sideload mode and execute
adb sideload <rom_directory>; if it does not support sideload mode, you can choose to flash the zip package by executingadb push <rom_directory> /sdcard/Download, and then select the zip package to flash in Recovery.
Other Resources
System Enhancement Apps
These apps fill in some gaps in the near-native system or enhance its functionality.
- Magisk Manager: Can run some apps in a sandbox and acts as "Dual Apps," such as WeChat, QQ, Alipay, etc.
- Shizuku: Application permission management
- Thanox: Background management
- Scene4: Scene mode
- Google Camera: The strongest camera on the Android platform
- SD Maid SE: A long-standing junk cleaning software
Cleaning MIUI Bloatware
1adb uninstall -k --user 0 com.miui.analytics 2adb uninstall -k --user 0 com.miui.analytics.service 3adb uninstall -k --user 0 com.miui.bugreport 4# More package names can be checked in settings