Xiaomi

Xiaomi 12S (mayfly): Stock Fastboot Flashing Guide

Complete firmware flashing guide for the Xiaomi 12S using Mi Flash Tool. Covers prerequisites, firmware package setup, and step-by-step instructions.

Xiaomi 12S July 2022
Models
2206123SC (China / Global Import)
CPU
Octa-core (1x3.19 GHz Cortex-X2 & 3x2.75 GHz Cortex-A710 & 4x1.80 GHz Cortex-A510)
GPU
Adreno 730
RAM
8 GB / 12 GB LPDDR5
Storage
128 GB / 256 GB / 512 GB UFS 3.1
Display
6.28" FHD+ 120Hz AMOLED, 2400x1080 pixels, 1100 nits peak, Gorilla Glass Victus
Battery
4500 mAh Li-Po, 67W wired fast charging, 50W wireless, 10W reverse wireless
OS
Android 15.0 (HyperOS 3.0), Launched on Android 12 (MIUI 13)
Connectivity
5G Dual-SIM, Wi-Fi 6e, Bluetooth 5.2, USB Type-C 2.0 (OTG), NFC, IR Blaster
Colors: Black Silver Purple Wild Green

About the Xiaomi 12S

The Xiaomi 12S (hardware codename mayfly, model number 2206123SC) was released in July 2022, built on the Qualcomm SM8475 Snapdragon 8+ Gen 1 (4nm) platform with an Adreno 730 GPU, 6.28-inch FHD+ 120Hz AMOLED display, Leica co-engineered triple cameras featuring a 50 MP Sony IMX707 main sensor, and a 4,500 mAh battery supporting 67W fast charging.

This walkthrough guides you through flashing official stock Fastboot firmware on the Xiaomi 12S using Xiaomi Mi Flash Tool. Whether you are unbricking a phone stuck on the boot screen, recovering from failed modifications, or returning to a clean factory state, follow these verified steps to flash safely.

Which Flash Mode Should You Use?

Custom Recovery (TWRP Recovery)

Custom recovery environment for installing flashable ZIP packages, custom ROMs like Xiaomi.eu, or full system backups.

How to enter
Flash recovery via "fastboot flash recovery <recovery>.img", then press and hold Volume Up + Power to boot directly into TWRP.
Requires
Unlocked bootloader, fastboot flash recovery command

Stock Recovery / Local Update

Official on-device recovery update method for installing signed Recovery OTA ZIP packages without wiping personal data.

How to enter
Turn off phone completely. Press and hold Volume Up + Power together until the Mi recovery menu displays on screen.
Requires
Stock recovery, locked or unlocked bootloader, official recovery ZIP

Qualcomm EDL 9008 Mode

Low-level hardware recovery mode for completely bricked devices unable to boot into Fastboot or recovery.

How to enter
Remove rear cover, short the designated motherboard test pads with tweezers while inserting the USB cable.
Requires
Motherboard test point shorting, Qualcomm 9008 driver, authorized service account credentials

Essential Pre-Flash Hardware Checks & Driver Setup for mayfly

1
Windows PC & Platform Tools

A 64-bit Windows 10/11 computer with updated Qualcomm USB drivers and Android SDK Platform Tools (v35+).

2
Unlocked Bootloader

An officially unlocked bootloader via the Xiaomi Mi Unlock utility is mandatory for Fastboot partition flashing.

3
50%+ Battery Capacity

Ensure the 4,500 mAh battery holds at least 50% charge to prevent power loss during 7GB+ super partition writing.

4
Certified USB Type-C Cable

Use an authentic data cable connected directly to a rear motherboard USB port to avoid transmission interruptions.

5-Step Mi Flash & Fastboot Walkthrough for Xiaomi 12S

A quick 5-step overview built specifically for the Xiaomi 12S. The full Mi Flash Tool guide adds screenshots, progress tracking, and fixes for common errors.

  1. Unlock bootloader with official Xiaomi Mi Unlock
  2. Extract mayfly_images_OS3.0.3.0.VLTCNXM_20260312.0000.00_15.0_cn_ab4953c424.tgz twice
  3. Hold Volume Down + Power for 8 seconds to enter Fastboot
  4. Select folder in Mi Flash Tool with "clean all" (flash_all.bat)
  5. Click Flash to write super partition via fastbootd and wait for reboot

Fastboot Script Structure & Flashing Modes for mayfly

Fastboot firmware packages for the Xiaomi 12S unpack into an images folder containing raw partition binaries alongside automated flashing scripts: flash_all.bat (clean flash), flash_all_except_storage.bat (preserve user data), and flash_all_lock.bat (clean flash and relock bootloader). We recommend strictly selecting flash_all.bat to ensure clean partition formatting across UFS 3.1 storage.

flash_all.bat

Official Fastboot images for the Xiaomi 12S include automated command scripts for different repair scenarios. Understanding these scripts ensures you select the correct operation in Mi Flash Tool.

Never select flash_all_lock.bat when flashing on imported hardware or modified software, as relocking the bootloader against mismatched cryptographic root-of-trust certificates will result in an irrecoverable brick.

Verified Xiaomi 12S Stock & Hybrid ROM Packages

Below are the tested factory Fastboot and Xiaomi.eu hybrid packages for the Xiaomi 12S China model. For older builds, stock OTA archives, and custom recoveries, visit the master archive.

Version Region Android Version Size MD5 Download
OS3.0.3.0.VLTCNXM (HyperOS 3.0 Fastboot) China (CN) — 2206123SC Android 15.0 7.12 GB ab4953c4247f747e9168ea13d065d0e7 ⬇️ Download
OS3.0.3.0.VLTCNXM (Xiaomi.eu Hybrid ROM) Multi-Language (EU / Custom) Android 15.0 5.53 GB — ⬇️ Download
OS3.0.3.0.VLTCNXM (Stock Recovery OTA) China (CN) — 2206123SC Android 15.0 5.91 GB 16f6dcd3383d20ccae404262cdd14340 ⬇️ Download

Looking for older MIUI 14 builds, stock recovery OTAs, or TWRP images? Browse the full Xiaomi 12S archive on AndroidFirmwareFile.com →

Snapdragon 8+ Gen 1 Dynamic Partitions & Recovery Architecture

The Qualcomm Snapdragon 8+ Gen 1 platform in the Xiaomi 12S employs Google Virtual A/B architecture with dynamic partitions hosted inside a physical super partition. Flashing packages like mayfly_images_OS3.0.3.0.VLTCNXM_20260312.0000.00_15.0_cn_ab4953c424.tgz starts in bootloader Fastboot mode and automatically transitions into userspace fastbootd to write the logical partitions (system, vendor, product, system_ext, and odm) into UFS 3.1 storage. For multilingual support and European services, owners can also install xiaomi.eu_MAYFLY_OS3.0.3.0.VLTCNXM_15.zip using custom recovery.

Troubleshooting Xiaomi 12S Flashing & Fastbootd Errors

Fastbootd Transport Stalled: "FAILED (remote: 'fastbootd transport stalled') during super.img chunk writing"

While writing dynamic super partitions on the Snapdragon 8+ Gen 1 platform, the device transitions from bootloader Fastboot into userspace fastbootd. If PC USB controllers apply power-saving sleep states or delay USB detection beyond 10 seconds, the flashing script aborts mid-transfer. We recommend plugging directly into a rear motherboard USB port, running Mi Flash Tool as Administrator, and disabling USB selective suspend in Windows Power Options.

Bootloader Lock Rejection: "FAILED (remote: 'Command not allowed / Token verify failed')"

The device bootloader remains locked, rejecting partition writes dispatched by Mi Flash Tool. Check Developer Options to verify "OEM Unlocking" is turned on and link your authorized Xiaomi account under "Mi Unlock Status". Then run the official Mi Unlock utility on a PC to complete bootloader unlocking before retrying Fastboot flashing.

Anti-Rollback (ARB) Protection & Relock Trap: "The system has been destroyed / dm-verity failed"

Attempting to downgrade from HyperOS 3.0 (Android 15.0) to older MIUI builds with a lower Anti-Rollback index triggers Qualcomm hardware efuse protection. Furthermore, selecting "clean all and lock" (flash_all_lock.bat) on modified software locks the bootloader against mismatched cryptographic signatures, causing an immediate boot failure. Always flash matching or newer firmware and confirm that "clean all" (flash_all.bat) is selected.

Qualcomm EDL Authentication Barrier: "Sahara Fail S9 / Authentication Required in Qualcomm EDL Mode"

Low-level Qualcomm Emergency Download (EDL 9008) mode on the Snapdragon 8+ Gen 1 platform enforces cryptographically signed server authentication tokens. Attempting to flash raw XML partitions with unauthenticated tools like standard QFIL fails with Sahara protocol rejection. Recovering from a hard brick in EDL mode requires an authorized Xiaomi service account token.

Encountering issues during flashing? Review these verified workshop troubleshooting notes for the Xiaomi 12S. Troubleshooting & Common Errors →

Xiaomi 12S Workshop Troubleshooting & Partition Recovery FAQ

Ready to Flash?

Follow the full step-by-step Mi Flash Tool guide with interactive progress tracking, prerequisite checklist, and complete troubleshooting.

Open Full Guide