Flush third-party ROM (EvoX) on Xiaomi 12 (cupid)
该文章根据 CC-BY-4.0 协议发表,转载请遵循该协议。
本文地址:https://fenying.net/en/post/2024/08/03/flush-custom-rom-on-xiaomi12-cupid/
Overview
Last Sunday, I flashed the third-party firmware EvoX on the Xiaomi 12 I mainly use. Here is the whole process, in case I forget how to operate next time…
Excluding the process of unlocking the Bootloader.
0. Preparation
-
Backup the data of the phone, because flashing ROM requires formatting all data.
-
Ensure you could connect to Google services, otherwise you’ll need a proxy service.
It’s recommended to use a WiFi that could connect to Google services, or there is a HTTP proxy server under the WiFi network that could connect to Google services. Remember the LAN IP and port.
1. Download Files
Download the following files:
WARNING:
- Ensure to download files from the official website, avoiding downloading malicious files.
- Put all these files in a folder for subsequent operations. Here I use the
D:\Mi12
directory.- Backup the data on the phone in advance, because flashing ROM requires formatting all data.
-
ROM Package
Release: https://xdaforums.com/t/rom-14-0-xiaomi12-cupid-official-evolutionx.4591391/
Download: https://sourceforge.net/projects/evolution-x/files/cupid/
The file I downloaded is
EvolutionX-14.0-20240716-cupid-v9.2-Official.zip
. Please download as needed and check the corresponding installation instructions.After downloading, copy it to the phone, preferably in the
Download
directory.Though there is a requirement for the official firmware of Xiaomi device, the ROM file already contains the firmware, so there is no need to download and flush additional firmware.
-
TWRP
Download: https://xdaforums.com/t/shared-official-twrp-by-skkk.4627207/
The one I used is
twrp-3.7.1_12-v8.6_A14-cupid-skkk.img
provided byskkk
.Download the
rec
version of the.img
file (instead of the boot version). -
Fastboot Tools
Download: https://developer.android.com/tools/releases/platform-tools
Download ADB and Fastboot tools from Google site, unzip to the computer, such as
D:\Mi12\adb
. -
Magisk (Optional, skip if no need for Root)
Download: https://github.com/topjohnwu/Magisk/releases
Download the stable version of Magisk
v27.0
. The downloaded file is namedMagisk-v27.0.apk
. Make a copy and rename it tomagisk-v27.0.zip
, so that it could be flushed by TWRP later. -
Shamiko (Optional, skip if no need for Root)
Download: https://github.com/LSPosed/LSPosed.github.io/releases
Download the version
v1.0.1
of Shamiko. The downloaded file is namedShamiko-v1.0.1-300-release.zip
.If you are using a Magisk version updated newer than 27.0, please download the corresponding Shamiko version.
- For
Magisk 27.0 Stable (27000)
, please useShamiko v1.0.1
。 - For
Magisk 27 Canary (>= 27003)
, please useShamiko v1.1
.
- For
2. Flush Recovery
If TWRP has been flushed, you can skip this step.
-
Reboot the phone into fastboot mode and connect it to the computer via USB.
-
Start PowerShell and enter the adb tool directory.
1cd D:\Mi12\adb
-
Check if you can connect to the device.
1./fastboot devices
If you can see the device number, the connection is successful.
Otherwise, you will need to install the driver for the phone.
-
Flush TWRP.
1./fastboot flash recovery_ab D:\Mi12\twrp-3.7.1_12-v8.6_A14-cupid-skkk.img # Please change the path to your TWRP img file path 2./fastboot reboot recovery # Reboot to recovery mode
Now the phone will reboot to the TWRP interface.
3. Flush ROM
The installation steps for every ROM may be different, please read the official instructions of the ROM before installation.
The following steps are only applicable to the EvoX ROM v9.2 for XiaoMi 12 (Cupid).
-
Enter TWRP Recovery
-
Choose Install
In the file explorer, find out the zip file of EvoX, and choose it, slide to install.
If there are many errors about mounting failure during installation, you can ignore them, that’s normal.
-
After flashing successfully, reboot to recovery again.
Now you will see the recovery interface provided by EvoX (because the EvoX ROM will overwrite TWRP).
- Choose Factory reset
- Execute Format data/factory reset
-
Now, reboot to the system.
-
And you can see the initialization interface for Android, follow the instruction to set up.
Ensure you connected a WiFi that could connect to Google services, or setup a proxy to connect to Google services.
4. Root (Optional)
4.0. Reinstall TWRP
Just do the same steps as Flush Recovery said.
4.1. Flush Magisk
-
Reboot to TWRP, choose Install, find the zip file of Magisk, choose it and slide to install.
-
Reboot to the system, click the Magisk icon on the desktop, it will prompt that the App is damaged, reinstall the App following the instruction.
-
Enter Magisk, it will prompt to install Magisk again, choose to install, select
Direct install (recommended)
, and then reboot after installation. -
After rebooting, enter Magisk, everything should be fine.
4.2. Hiding Root (Optional, but recommended if rooted)
4.2.1. Hiding Magisk App
-
Click the setting icon in the top-right corner of the Magisk software, click “Hide Magisk App”.
-
In the “Install unknown apps” interface, find Magisk, and enable “Allow from this source”.
-
Enter the alternative App name (it’s not suggested to use keywords like Magisk, root, etc., you can name it as
xxxx-settings
) -
Wait for the background download of the App to reinstall.
Note: If it gets stuck at “Hiding Magisk App” for a long time, there may be a problem with the background download, please switch to another network or connect to a proxy and then try again.
-
After installation, allow Magisk to start the newly installed App, create a desktop shortcut as prompted, and then reboot the phone.
4.2.2. Enabling Zygisk
Start the Magisk, click the setting icon in the top-right corner, and enable the Zygisk option.
WARNING:
- Don’t reboot after enabling Zygisk, wait until Shamiko installed.
- Don’t enable the “Comply with exclusion list” option in Magisk settings, it might conflict with the Shamiko module.
4.2.3. Install Shamiko
Copy the zip file of Shamiko to the phone, enter Magisk module view, click the +
icon, choose the zip file of Shamiko, install it and reboot the phone.
4.2.4. Hiding Root
Now, go to the Magisk settings, click the exclusion list, choose all Apps without needs for acquiring Root privileges.
Don’t just select an App by simply clicking on the checkbox, you’d better expand it first, and then click on its checkbox, so you could select all sub-modules of the App to hide once.