Critical Warning
Modifying system partitions and flashing custom recoveries carries inherent risk. It can void your manufacturer warranty and will permanently erase user data. Charge your battery to at least 80% (ideally 100%), backup your credentials, and follow the exact commands below.
Preparation
Prerequisites Checklist
Computer with ADB & Fastboot
Install Google Platform Tools on Windows, macOS, or Linux with USB drivers configured.
High-Quality USB Cable
Use the original Xiaomi cable or a tested data-transfer cable. Avoid loose hubs.
Battery Charge
Ensure at least 80% to 100% battery before starting to prevent sudden power loss.
Downloaded ROM & Vendor Boot
Obtain your ROM package and the matching vendor_boot.img file.
Video Tutorial Walkthrough
Watch the video by Yousef Sayed alongside these written steps for full clarity.
Execution
Step-by-Step Installation
Download Required Files
Place the following files in your platform-tools directory on your computer:
- vendor_boot.img — Partition image matching your chosen ROM.
- Custom ROM zip — Downloaded from our Custom ROM catalog.
- GApps package (optional) — E.g., MindTheGapps arm64 for your Android version if the ROM is Vanilla.
- Magisk / KernelSU (optional) — For root access after first boot.
Boot into Fastboot Mode
Turn off your phone completely. Press and hold Volume Down + Power simultaneously until the orange Fastboot logo appears. Connect the phone to your PC via USB.
fastboot devices
You should see your device serial number returned in the terminal window.
Flash vendor_boot.img
Execute fastboot reboot — DO NOT USE fastboot reboot recovery, or your partition tables may get corrupted!
fastboot flash vendor_boot --slot=all vendor_boot.img fastboot reboot
Boot into Recovery
As soon as the screen turns black after typing fastboot reboot, immediately press and hold the Volume Up button.
Keep holding Volume Up until the AOSP / TWRP recovery interface displays on screen.
Format Data
In Recovery mode:
- Select Factory Reset or Wipe.
- Tap Format Data (or Format data partition).
- Type “yes” or confirm formatting when prompted.
- Return to the main Recovery menu.
Flash Custom ROM
In Recovery, select Apply Update → Apply from ADB.
adb sideload rom-filename.zip
Tip: You can type adb sideload and drag-and-drop the zip file into your terminal.
Post-Flash Steps (Optional GApps & Root)
After the ROM finishes installing, if the recovery asks to Reboot to Recovery to flash additional zip files, select Yes.
- GApps: If your chosen ROM is Vanilla and requires Google Apps:
adb sideload MindTheGapps-15.0-arm64.zip
- Magisk: If you wish to install root:
adb sideload Magisk-v28.0.zip
Reboot to System
In Recovery, select Reboot System Now.
First boot may take between 5 to 10 minutes while Android completes compilation and sets up internal encryption. Keep the device powered.
Solutions
Frequently Encountered Issues
Sideload stops at 47%
This is normal behavior on certain recovery builds. The terminal may display “Total xfer: 1.00x” or step 2/2 completed. Check device screen for completion.
Device not recognized in fastboot
Check Windows Device Manager for an “Android” device with a yellow exclamation mark. Install the Google USB Driver or MediaTek VCOM driver.
Stuck in bootloop / ROM won't boot
Re-flash the exact matching vendor_boot.img from your ROM developer and format data again. Clean flash is mandatory when changing ROMs.
Cannot access recovery mode
Power off phone. Hold Volume Up + Power simultaneously until the recovery logo displays. Ensure USB cable is unplugged if key combos are stubborn.