If you own a Xiaomi smartphone based on MIUI, you’ve probably encountered the term “overlay” in a developer’s settings or when installing apps, a feature that often raises questions about whether it’s responsible for transparency of the interface, or for the work of the design themes, or even seems like a suspicious “trick” of the manufacturer. In fact, overlay in Xiaomi is a technical mechanism that affects the display of system elements and applications, but if you don’t set up correctly, it can lead to failures.
In this article, we will go into detail what lies behind the term “disable overlay” when it is really necessary and when it is best to leave it as it is. You will learn how the feature is related to MIUI Optimization, why it is required to turn it off for some applications (for example, banking or games), and the risks of incorrect tampering with settings. We will also provide current instructions for the latest versions of MIUI 14 and MIUI 15, including ways to avoid errors such as “Detected overlay” when running programs.
What is Overlay in Xiaomi and Why You Need It
The term overlay in the context of Xiaomi refers to a mechanism that allows systems and applications to “overlay” visual elements on top of the main interface.
- 🎨 Design themes – changing the color scheme, icons or fonts without deep intervention in the system.
- 📱 System notifications – pop-ups (for example, chat heads in messengers or alert banners).
- 🔧 Accessibility features – increasing interface elements for people with vision problems.
- 🛡️ Security layers – for example, darkening the screen when banking applications work (to protect against screenshots).
In MIUI, overlays are implemented through miui.overlay, which is closely integrated with the MIUI Optimization subsystem, which is responsible for smooth animations, optimize battery consumption and adapt the interface to different smartphone models, which is why disabling overlays can affect not only the visual part, but also the performance of the device.
But there is a downside: some applications (especially banking or cheat games) perceive overlays as a potential security threat, blocking startups by producing an error like “Detected overlay” in which case it becomes necessary to disable the function.
When to turn off the overlay in Xiaomi
Disable overlays only in specific cases when they interfere with the operation of applications or systems.
- 🏦 Banking applications (Sberbank, Tinkoff, VTB, etc.) refuse to run with an error about the imposition of the.
- 🎮 Anticheat games (PUBG Mobile, Free Fire, Genshin Impact block entry due to 'suspicious activity».
- 🔄 Update failures MIUI — The system warns of a conflict of overlap.
- 📱 Interface glitches: controls disappear, gestures or animations don’t work.
It is not recommended to disable the "just in case" overlays, which can lead to:
- 🖼️ Distortion of design themes (colors, icons, fonts will be reset to standard ones).
- ⚡ Increase battery consumption without optimization MIUI Some processes will work less efficiently.
- 🚫 Inoperability of system functions, such as reading mode or adaptive brightness.
💡
If the error "Detected overlay" appears in only one application, try restarting it first or clearing the cache.
How to disable the overlay in Xiaomi: step-by-step instructions
The process of disabling overlays depends on the version of MIUI and the model of the smartphone. Below is a universal method that works on most Xiaomi, Redmi and POCO devices with MIUI 12-15.
Activate Developer Mode (click 7 times on "Version") MIUI» on the telephone»)
Backup of important data
Charge your phone at least 50%
Close all background applications-->
Method 1: Through the Developer's Settings
- Open the Settings. → About the phone and tap 7 times on the item "Version" MIUI», activate the developer mode.
- Return to the main settings menu and select Additional → For Developers (or Advanced Settings → For Developers in new versions).
- Find the option “Disable the Overlay” MIUI» (or "disable" MIUI Optimization, Force Disable Overlays.
- Reset the device.
Method 2: ADB (for experienced users)
If there is no option in the settings, you can disable overlays through the ADB command:
adb shell settings put global hidden_api_policy 1After you complete the command, restart your phone. Use:
adb shell settings put global hidden_api_policy 0What to do if the topics are missing after disabling the overlays?
Mistakes when disabling overlays and how to fix them
Incorrectly disabling overlays can lead to unstable operation of the system. Let's consider typical problems and their solutions:
| Mistake. | Reason. | Decision |
|---|---|---|
| The phone will not turn on after restarting. | Conflict with the core of the system or incompatibility with the firmware | Download to Fastboot and run the stock firmware through the Mi Flash Tool |
| Missing notification panel | Failure in SystemUI service | Clear the System UI application cache in the settings or reset the settings |
| Apps crumbling at launch | Lack of compatibility with disabling overlays | Include overlays back or update problematic apps |
| Navigation gestures do not work | Failure in the service miui.overlay, responsible for touch processing | Return gesture settings to standard in Settings → Display → Gestures |
⚠️ Warning: If the phone starts to warm up or discharge quickly after the overlays are turned off, immediately return the settings to their original state. MIUI.
How to get the overlays back
If you have problems after disabling the overlays, you can return everything back in two ways:
- Through the developer settings: find the same option “Disable MIUI overlay” and deactivate it, then restart the device.
- Through ADB (If you use the command method: adb shell settings put global hidden_api_policy 0
After returning the settings, check the system functions:
- 🎨 Make sure that the design topics are applied correctly.
- 📱 Test gestures and interface animations.
- 🔋 Watch your battery consumption throughout the day.
💡
Disabling overlays is a temporary solution for specific tasks. Keeping the function off is not recommended at all times, as this impairs the user experience and stability of MIUI.
Alternative ways to avoid the error "Detected overlay"
If you do not want to disable overlays, you can try other methods of solving the problem with blocking applications:
- 🔄 Restart the application: sometimes the error disappears after closing the program from multitasking and reopening.
- 🧹 Cache cleaning: go to Settings → Annexes → [Title of the programme] → Warehouse → Clear the cache.
- 🛡️ Adding exceptions: Some applications (e.g. Greenify) allow you to add programs to the whitelist without overlays.
- 📱 Use of the second space: c MIUI There is a “Second Space” function where you can run applications with other security settings.
For banking applications, it also helps:
- 📱 Install the official version from Google Play (not APK).
- 🔒 Disable permission to display over other windows for suspicious applications (such as launchers or optimizers).
⚠️ Note: Some Google Play “optimizers” promise to “disable one-tap overlays” but actually install malware.