Firmware guide · Updated 2026-10-28
How to Find Your Xiaomi Device Codename
Every firmware package is matched to a device by codename. Learn how to read the codename from Settings, the Fastboot screen or an ADB command, and how it appears in recovery and fastboot file names so you never flash the wrong package.
The codename is the only reliable match between a phone and a firmware package: the Redmi 12C, for example, is earth. You can find it in Settings, on the Fastboot screen, or with adb shell getprop ro.product.device, and it must match the codename in the package file name.
Method 1: Settings
- Open Settings, then About phone, then Detailed info and specs.
- Tap the kernel version repeatedly to open the system information screen; some models show the codename there.
- You can also note the model number, such as 22126RN91Y, and search this site by name.
Method 2: The Fastboot screen
Power off, then hold Volume Down and Power. The Fastboot screen shows PRODUCT NAME at the bottom, for example earth. This is the most direct source, and the same codename appears in fastboot package file names.
Method 3: An ADB command
Enable developer options and USB debugging, connect the phone, then run adb shell getprop ro.product.device. The value it returns is the device codename. adb shell getprop ro.product.model returns the model number instead.
How the codename appears in file names
Fastboot packages start with the codename, for example earth_images_OS1.0.8.0.UCVCNXM_...tgz. A different codename means the package does not belong to that device, and forcing it will fail or damage the phone.
- Same codename: safe to flash
- Different codename but the same product family: still not interchangeable
- Similar marketing names: always trust the codename, since names change by market
Questions about this guide
The names match but the codenames differ. Can I flash anyway?
No. One marketing name can cover several hardware variants, such as 4G and 5G, and a different codename means a different partition layout and drivers, so the firmware is not interchangeable.
Is the codename printed on the box?
Boxes usually show the model number, not the codename. Read the codename from Settings, the Fastboot screen or ADB; device pages on this site also list it.
Where is the codename in a package file name?
Fastboot packages begin with it, for example gold_global_images_...; recovery packages include it too, as in miui_EARTH_.... Letter case does not matter.