Drawing on top of other apps on Xiaomi: how to enable and configure

The drawing feature on top of other apps (or overlay mode) allows programs to display interface elements on top of any open windows โ€” whether games, instant messengers or system utilities. On Xiaomi smartphones running MIUI, this option is often blocked by default due to security policies, but it can be activated manually. Without it, many useful tools, from screenshot editors to gaming overlays, will not work.

The problem is that MIUI (especially in versions 12-14) actively restricts application background activity by citing battery optimization, and as a result, even after allowing permission in the settings, some programs may automatically lose access to the overlay after restarting or updating the system. In this article, we will discuss not only the standard activation method, but also workarounds for stubborn applications, and explain why the function can suddenly stop working.

What is โ€œdrawing on top of other appsโ€ and why you need it

Overlay mode allows an application to display its elements (windows, buttons, notifications) over the interface of other programs.

  • ๐ŸŽฎ Gaming overlays: display FPS, temperature CPU Control panels in games (e.g. Game Tools or Octopus).
  • โœ๏ธ Screenshot editors: Quickly crop or blur part of the screen without closing the current app (as in Markup Hero or Screen Master).
  • ๐Ÿ”” Notifications and chat bubbles: floating windows of messengers (Facebook Messenger, Telegram X) or system alerts.
  • ๐Ÿ“Š System monitoring: widgets with data on battery charge, usage RAM Internet speed (for example, CPU Monitor).

Without that permission, apps will either not be able to show their elements over other windows, or they will be forced to fold, for example, if you try to run Game Tools to record gameplay, but the record button doesn't appear, most likely the problem is that you don't have the right to overlay.

โš ๏ธ Note: Some banking applications (e.g., SberBank Online or Tinkoff) block work when an active overlay is detected. This is a security measure against keyloggers. If you need to use such programs, temporarily disable unnecessary overlays.

Standard way to enable through MIUI settings

On most Xiaomi smartphones (including the Redmi Note 12, POCO X5, Mi 11 and newer models) the path to setup is the same, but may vary slightly depending on the version of MIUI.

  1. Open Settings โ†’ Applications โ†’ Application Management.
  2. In the upper right corner, press three dots (โ‹ฎ) and select Special Accesses (or Application Permissions in older versions).
  3. Scroll down and find Draw on top of other apps (or Display over other apps in English firmware).
  4. In the list, select the desired application and switch the slider to the Allow position.

If the app is not listed, it has not requested permission.

  • ๐Ÿ”„ Restart the program โ€“ sometimes the request appears only at the first start.
  • ๐Ÿ“ฅ Update the app to the latest version via Google Play.
  • ๐Ÿ› ๏ธ Clear the app's cache in Settings โ†’ Annexes โ†’ [Title of the programme] โ†’ Warehouse.

โ˜‘๏ธ Preparation for the inclusion of overlay

Done: 0 / 4

On some firmware (e.g. MIUI 13 for the global version), the item may be called Appearance on top or hidden in the Additional section. If you don't find it, try searching by settings (the magnifier icon in the upper right corner).

Why the function may not work even after it is turned on

Even if you've given permission, the overlay may not show up. Here are the most common reasons and solutions.

Problem.Possible causeDecision
Permission resets after rebootingOptimizing MIUI for battery savingAdd the app to No restrictions in battery settings
Overlay doesn't appear in gamesThe game blocks overlays (e.g. PUBG Mobile or Genshin Impact)Turn on Debugging. USB and use ADB-team (see below)
Overlay buttons are inactiveThe app is not compatible with the Android versionInstall an older version of the program or update the firmware
Permission is not on the listThe application does not declare the use SYSTEM_ALERT_WINDOWContact the developer or use an alternative.

Especially often problems arise with games that actively fight cheat overlays, PUBG Mobile or Free Fire can block display FPS-And even if you've given permission, you can use the counters or the control panels. ADB-Team (we will discuss it in the next section).

๐Ÿ“Š What app are you trying to run in overlay mode?
Game Tools (Octopus, Game Tools)
Screenshot editor
Messenger (floating chats)
System monitoring (CPU, battery)
Other

โš ๏ธ Attention: On devices with MIUI 14 and later, the overlay function may conflict with Privacy Protection. If nothing happens after enabling permission, check if the system blocks access to Sensitive permissions in Settings. โ†’ Confidentiality.

ADB-command

If the standard method didn't work (e.g., the resolution is reset or the game blocks the overlay), you can use USB debugging (ADB), which is suitable for advanced users and requires a computer.

  1. Turn on Developer Mode: Go to Settings โ†’ About Phone. Click 7 times on MIUI until you become a developer!
  2. Activate USB Debugging: Return to Settings โ†’ Additional โ†’ Developer. Enable USB Debugging Slider.
adb shell pm grant PAKET APPLATIONS android.permission.SYSTEM_ALERT_WINDOW

Replace the Applications with a real identifier (e.g. com.miui.screenrecorder for Game Tools) and you can find it through the App Inspector or the APKMirror website.

After you execute the command, restart the device. If the overlay still doesn't work, try the additional command to disable battery optimization:

adb shell dumpsys deviceidle whitelist +Applications package

๐Ÿ’ก

If you donโ€™t have a PC, you can use it. ADB-Install the application from F-Droid, enter pkg install android-tools, then execute the same commands but without the adb shell (start immediately with pm grant...).

This method is guaranteed to work on all versions of MIUI, but has risks: incorrect use of ADB can disrupt the stability of the system. If you are not sure about your actions, it is better to contact the XDA Developers or 4PDA forums for help.

MIUI Limitations: Why Overlays Can Be Blocked

Xiaomi is actively implementing privacy protection features that sometimes conflict with overlays, and here are the key limitations to be aware of:

  • ๐Ÿ”’ Protection against keyloggers: MIUI Blocks overlays in banking applications and payment systems (e.g. when entering) PIN-code in Google Pay).
  • ๐ŸŽฎ Call of Duty Mobile, Honor of Kings can force overlays to close even if they are not related to cheating.
  • ๐Ÿ”‹ Optimizing the battery: MIUI automatically suspends background activity of applications unless added to the No Limits.
  • ๐Ÿ›ก๏ธ Safe Mode: When Safe Mode is activated (via the power button), all overlays are turned off.

For example, if you try to use Game Tools to record a screen in Genshin Impact, the game may display an โ€œunacceptable overlayโ€ warning and block access, leaving you to either play without an overlay or use external recording devices (e.g., capture video from a PC).

How to get around the overlay lock in games?
Some games (e.g. PUBG Mobile) block Unity/Unreal engine-level overlays, which can only be avoided by modifying APKs or using Magisk modules (e.g. Hide My Applist), but this is a game-breaking feature that can lead to account bans.

Another nuance: on devices with MIUI for China (China Stable firmware), the restrictions may be tougher than on global versions. If you use custom firmware (e.g. xiaomi.eu), check the settings in Security โ†’ Permissions โ†’ Special access โ€“ there may be additional options.

Alternatives: If nothing helps

If the standard methods didnโ€™t work, try these workarounds:

  1. Using Mode Multi-Window: Some apps (like Telegram X) support Floating Window. Open Recent apps, click on the program icon, and select Open in a floating window. This is not a full-fledged overlay, but can be a temporary solution.
  2. Launcher replacement: Install an alternative launcher (like Nova Launcher or Hyperion) some of which have built-in tools for managing overlays.
  3. Magisk-modules: For rooted devices, the App Systemizer module is suitable, which allows you to assign system rights to applications, including: SYSTEM_ALERT_WINDOW.
  4. Firmware rollback: If the problem has occurred after the MIUI update, try rolling back to the previous version via Fastboot or MI Flash Tool.

For example, users of POCO F3 reported that after upgrading to MIUI 13.0.6 overlays in Game Tools stopped working. rollback to MIUI 13.0.4 solved the problem. However, remember that rolling back the firmware can lead to data loss, so pre-back up through Settings โ†’ Additional โ†’ Backup.

๐Ÿ’ก

If you use custom firmware (like LineageOS or Pixel Experience), the problem may be the lack of proprietary Xiaomi libraries, in which case only installing an official MIUI or finding an alternative solution (like Shizuku for permission management) will help.

Frequent mistakes and their solutions

Letโ€™s take a look at the typical situations that Xiaomi users face when setting up overlays:

โš ๏ธ Note: If after the overlay is turned on, the screen begins to flicker or artifacts appear, this may indicate a conflict with the GPU-Try to turn off hardware acceleration in the developer settings (Disable hardware overlays).

Mistake.Reason.Decision
โ€œI couldnโ€™t see it over the other windows.โ€The app is not authorized SYSTEM_ALERT_WINDOWCheck the resolution in the settings or use ADB
Overlay disappears in 5 secondsMIUI kills background processesAdd the app to No restrictions in battery settings
โ€œThis app is not optimized.โ€Conflict with Android Compatibility ModeTurn off MIUI optimization for this application
Overlay works, but no buttons are displayedProblem with transparency or themeChange the theme to standard in Settings โ†’ Screen โ†’ Theme

If you see a message saying โ€œThis overlay may collect personal data,โ€ this is a standard warning. MIUI portable SYSTEM_ALERT_WINDOW. You can ignore it if you trust the software, but if you have a notification for an unknown app, you can check your phone for viruses through Malwarebytes or Dr.Web.

Can I turn on overlays without ADB?
Yes, in most cases, standard MIUI settings are sufficient. However, some applications (especially gaming assistants) may require ADBs unless they request permission on their own.
Why did the overlays stop working after the MIUI update?
Xiaomi often tightens security policies in new firmware versions. MIUI 14 added an extra layer of verification for overlays. Try: Clear the app cache. Re-issue permission in the settings. Use ADB-team (see above).
How to find out the batch name of the application for ADB?
Install App Inspector from Google Play or use the command: adb shell pm list packages | grep "keyword word" For example, for Game Tools it is com.miui.screenrecorder.
Is it safe to give apps access to the overlay?
In theory, an attacker could use overlays to intercept clicks (such as fake password windows).However, if you install apps only from Google Play or official sources, the risk is minimal. Always check reviews and permissions before installing.
Can I turn on the overlay on the locked screen?
No, for security reasons, MIUI blocks the display of overlays on the lock screen, except for system notifications (for example, an alarm clock or an incoming call).