Xiaomi secret codes are short USSD/MMI dialer sequences you type into the Phone app to open hidden diagnostic menus, view hardware information, and run quick service tests on MIUI and HyperOS devices. Most of these Xiaomi secret codes are not exclusive to Xiaomi at all – they are standard Android MMI codes that work on Redmi, POCO and Mi phones because the underlying operating system is Android. They are genuinely useful when you want to check your IMEI before selling a phone, confirm the screen is working before a warranty claim, or verify your firmware version after an update. A few of them, however, trigger destructive actions, so it pays to understand each one before you press dial.
To use any code, open the Phone app, switch to the keypad, and type the sequence exactly as shown. Codes that start and end with asterisk and hash symbols usually run instantly when the last character is entered, while codes wrapped in *#*#…#*#* open a hidden test screen. Note that newer HyperOS and MIUI builds, along with stricter Google security policies, have disabled some legacy engineering codes, so a sequence that does nothing on your model has simply been blocked by the manufacturer rather than mistyped.
Standard Xiaomi secret codes for MIUI and HyperOS
The table below lists widely documented standard Android MMI codes that commonly work on Xiaomi handsets. Behaviour varies by model, region and software version, so treat this as a reference rather than a guarantee. Read the Caution notes carefully.
| Code | What it does |
|---|---|
| *#06# | Displays the IMEI number (and serial) for each SIM slot. Useful for checking blacklist status before buying or selling. |
| *#*#4636#*#* | Opens the Android testing menu with phone information, battery details and usage statistics on supported builds. |
| *#*#64663#*#* | Launches the hardware test (QC Test) menu on many Xiaomi models to check touchscreen, speakers, sensors and cameras. |
| *#*#0*#*#* | Runs an LCD display test to check for dead pixels and colour banding (availability varies). |
| *#*#2664#*#* | Runs a touchscreen test so you can confirm every part of the panel registers input. |
| *#*#1111#*#* / *#*#2222#*#* | Shows FTA software and hardware version details on some firmware versions. |
| *#*#7780#*#* | Caution: this resets the phone to factory settings, removing apps and app data. Back up first and expect Google FRP lock to apply afterwards. |
| *2767*3855# | Caution: this is a full factory wipe that erases all internal storage with no confirmation. It is irreversible and triggers Google FRP – never enter it casually. |
The last two codes are destructive. If a code in this list does nothing on your device, it has most likely been disabled in your version of MIUI or HyperOS, which is normal and not a fault.
Safety first before you dial
Any code that wipes data is permanent, and the same is true of a normal reset done through the menus. Before running a factory reset code – or resetting through Settings > About phone > Factory reset on HyperOS, or Settings > About phone > Backup & reset on older MIUI – protect your files first. Take a moment to back up and restore your Android device so photos, messages and app data are safe.
Crucially, understand Google’s anti-theft protection. After any factory reset, Factory Reset Protection (FRP) requires the Google account that was previously signed in on the device. If you do not know that account password, the phone can lock you out. Before wiping, sign out of your Mi Account and your Google account, and remove the screen lock. If you intend to reset the device anyway, the safer route is usually the official method rather than a dialer code – see how to hard reset any Android mobile step by step. If your phone is stuck on a boot loop and you cannot reach Settings at all, you can also use recovery mode to fix your Android phone instead of relying on secret codes.
Frequently asked questions
Do these secret codes work on every Xiaomi, Redmi and POCO phone?
No. They are standard Android MMI codes, so many work across Xiaomi’s lineup, but each one depends on the specific model, the MIUI or HyperOS version and your region. Manufacturers and Google have disabled several engineering codes over the years for security, so a code that does nothing has simply been blocked on your build.
Will a secret code remove my screen lock or Google account?
No code reliably or legitimately bypasses a screen lock, Mi Account or Google FRP. Codes like *#*#7780#*#* and *2767*3855# wipe data but the device will still demand the previously linked Google account after the reset. Always recover your account credentials before resetting rather than hoping a code will skip the lock.
Is it safe to enter the hardware test code?
Yes, the diagnostic codes such as *#06#, *#*#64663#*#* and the display and touch tests only read information or run non-destructive checks, so they will not erase anything. The only codes to be cautious with are the two factory reset codes marked Caution in the table above, because those delete your data.

