How to fasten the application on top of all windows on Xiaomi: from standard settings to ADB-team

Why do you need apps on top of all windows?

The feature of displaying applications over all windows (English Picture-in-Picture or Overlay) on Xiaomi smartphones allows you to keep messengers, navigators or multimedia players at hand without interrupting work in other programs. For example, you can simultaneously follow the route in Yandex.Navigator and chat in Telegram, or watch videos on YouTube, while reading comments in the browser.

However, in MIUI (Xiaomi shell), this feature is often hidden or limited – especially on newer firmware versions (MIUI 14/15). In some cases, the system blocks the overlay of windows for individual applications, citing security or performance optimization. Today, we will examine all working ways to circumvent these restrictions, from standard settings to manual editing of system parameters.

Importantly, not all methods are universal. For example, on the POCO F5 or Redmi Note 12 Pro+ with MIUI 15, you may need ADB, whereas on older models like the Redmi 9A, you will also have built-in options.

Method 1: Standard MIUI settings (without root)

To start with, the simplest is the built-in shell tools, which work on most Xiaomi, Redmi, and POCO devices with MIUI 12-15, but may not be available on some custom firmware.

Instructions:

  1. Open Settings β†’ Applications β†’ Application Management.
  2. Select the app you want (like Google Maps or VLC).
  3. Select the option for additional settings (or advanced).
  4. Find the option to display on top of other windows and turn it on.

If you don't have a paragraph, it means that the application doesn't support this default mode, so move on to the following ways.

β˜‘οΈ Preparation for overlay setup

Done: 0 / 4

⚠️ Note: Some models (e.g. Xiaomi 13 Ultra) may have a notification of increased battery consumption after the overlay is turned on.This is normal – the system warns that the application will work in the background.

Method 2: Permission through "Special Access"

If the standard path didn’t work, try an alternative route through special permissions, a technique that is suitable for applications that technically support overlays, but MIUI blocks them out of the box.

Algorithm of action:

  1. Go to Settings β†’ Applications β†’ Special Accesses β†’ Display on top of other applications.
  2. Find your target app in the list (use search if the list is long).
  3. Activate the switch next to its name.
  4. Confirm the action in the dialog box (if it appears).

Example of applications that often require manual permission:

  • πŸ“ Yandex.Navigator or Google Maps (to display the route over other windows)
  • 🎡 Spotify or YouTube Music (mini player)
  • πŸ’¬ Telegram or WhatsApp (floating notifications about messages)
  • πŸ“Š Tasker or MacroDroid (for automatic scripts)

πŸ’‘

If the app is not on the Special Access list, try running it first and giving all the permissions you want (camera, microphone, geolocation) sometimes unlocking the overlay option.

⚠️ Attention: POCO X5 Pro and other devices with MIUI 14+ After enabling the overlay for messengers (for example, Viber) may stop coming push notifications. The solution is to manually add the application to the Autorun list (in the same "Special Accesses»).

Method 3: Use of ADB (for power users)

If previous methods didn’t work, you’d have to plug in USB debugging and use the Android Debug Bridge (ADB), a universal approach that requires a computer and minimal technical skills.

Step-by-step:

  1. Turn on Developer Mode on your phone: Go to Settings β†’ About Phone. Tap 7 times on MIUI Version. Go back to Settings β†’ Additional β†’ Developer. Activate USB Debugging.

File transfer

ADB Tools

cmd

adb devices

(Your device name should appear. If not, check the drivers.)

adb shell pm grant PAKET APPLATIONS android.permission.SYSTEM_ALERT_WINDOW

Replace the Applications with a real identifier (e.g. com.whatsapp for WhatsApp) and you can find the package through the App Inspector app or Google Play.

Example for Telegram:

adb shell pm grant org.telegram.messenger android.permission.SYSTEM_ALERT_WINDOW

Once you've completed the command, restart the phone. Overlay should be working.

What if the ADB can’t see the device?
1. Install drivers for your Xiaomi model (you can download it on the website) MIUI Downloads). 2. Try another one. USB-cable (preferably original). 3. Enable the option to Cancel Authorization in the developer settings USB-Debug, then connect again. 4. On Windows, run cmd on behalf of the administrator.

Xiaomi modelSupport ADB-teamFeatures
Redmi Note 11/12Yes.Permission confirmation on the phone is required when you first connect.
POCO F4/F5Yes.MIUI 14+ can block commands for system applications.
Xiaomi 13/14Yes.You need to disable MIUI Optimization in the developer settings.
Black Shark 5Partially.Some teams are demanding root.

Method 4: Launcher applications with overlay support

If you want more than one specific application, but flexible window management, consider third-party launchers, which allow you to create floating panels, mini windows and even divide the screen into several parts.

Top.-3 launcher for Xiaomi:

  • πŸ”Ή Nova Launcher supports gestures and floating widgets. Overlay requires the Nova Pop-Up Widgets plugin.
  • πŸ”Ή Microsoft Launcher - built-in Continue on PC allows you to fix the windows of messengers.
  • πŸ”Ή Taskbar – Emulates Windows desktop with floating windows (requires) ADB full-time).

Example of settings in Nova Launcher:

  1. Install the launcher and make it the main one.
  2. Download the Nova Pop-Up Widgets plugin.
  3. Add the Pop-Up Actions widget to the home screen.
  4. Set up a gesture (such as swipe up) to open the application in a floating window.

⚠️ Note: Xiaomi Pad 6 and other tablets with MIUI Launchers may conflict with built-in multitasking. Make a data backup before installing!

πŸ“Š What kind of launcher are you using on Xiaomi?
Nova Launcher
Microsoft Launcher
Standard MIUI
Other
I don't use launchers.

Method 5: Root access and edit system files

If neither method worked, the last option is root rights and manual editing of configuration files, which is risky (may result in loss of warranty or device brik), but gives you complete control over the overlay.

What will be required:

  • πŸ“± Unlocked bootloader (Bootloader).
  • πŸ”§ Installed by Magisk or SuperSU.
  • πŸ“ System file editor (e.g., Mixplorer with Root Add-On module).

Instructions:

  1. Get root access (see instructions for your model on XDA Developers).
  2. Open Mixplorer and go to /system/etc/permissions.
  3. Find the platform.xml file and open it in the text editor.
  4. Add a line: <permission name="android.permission.SYSTEM_ALERT_WINDOW" /> sectionally <permissions>.
  5. Save the file, restart the device.

⚠️ Attention: On Xiaomi 13T and other new editing models platform.xml This can cause a cyclical reboot. Before you change it, back up the file!

πŸ’‘

Root access cancels official MIUI over-the-air (OTA) updates, and you'll have to manually stitch the device through Fastboot or Recovery to upgrade.

Solving the problem: Overlay is not working

If you have enabled the display over windows but the function is not working, check the following points:

πŸ” Checklist of diagnostics:

  • πŸ“΅ Make sure that Do Not Disturb mode is not turned on (it blocks notifications and overlays).
  • πŸ”„ Restart your phone - sometimes MIUI Resets permissions after updating.
  • πŸ› οΈ Check if the optimization option is disabled MIUI in the developer settings (it can interfere with third-party overlays).
  • πŸ“₯ Update the app to the latest version – in older versions there could be a bug with the overlay of windows.

πŸ“Œ Specific errors and decisions:

Problem.Reason.Decision
Overlay appears, but disappears immediately.Conflict with the Lean RegimeTurn it off in Settings β†’ Battery
The application does not appear in the list of β€œSpecial Accesses”MIUI Limitation for System ApplicationsUse ADB (Method 3)
Overlay works, but without sound.Limitation of audio focusTurn on Keep the sound in the background in the application settings

If the problem persists, check the system logs through ADB Logcat (adb logcat | grep -i "overlay"), which will help to identify the exact cause of the failure.

FAQ: Frequent questions

❓ Can you make an overlay for games (e.g., show a Discord chat over Genshin Impact)?
Technically, yes, but on Xiaomi, it requires root or special utilities like Octopus (to emulate the keyboard/mouse). Games often block overlays because of anticheats. Black Shark has a built-in Game Dock for this.
❓ Why After Updating MIUI overlaid?
Xiaomi regularly tightens security policies. After upgrading to MIUI 14/15, you may need to: Reissue permission in Special Accesses, disable MIUI Optimization (in the developer settings), use ADB to reassign permission.
❓ How to remove a floating window if it is getting stuck?
If the overlay does not close in the standard way: Restart the phone (hold the power button for 10 seconds). or execute a command via ADB: adb shell am force-stop PAKET Applications
❓ Does the overlay work in split screen mode?
Yes, but with limitations. On Xiaomi, you can: Secure one app in an overlay and open the other in a separate mode. Use the Taskbar launcher to create real floating windows (like on a PC). However, the standard MIUI split screen does not support the overlay of a third window.
❓ Can you make an overlay for system applications (e.g. Calls or Camera)?
For system applications Xiaomi requires: Root access + editing platform.xml. Or installing a modified firmware (e.g., Xiaomi.eu). ⚠️ Risk: Incorrect changes can result in loss of functionality (e.g., the camera will stop working).