Xiaomiโs MIUI-based smartphones are known for aggressive power optimization, which often leads to apps being shut down spontaneously in the background, especially messengers (Telegram, WhatsApp), navigators (Yandex.Maps, Google Maps), and tracking services (Strava, Nike Run Club), all of which are experiencing missed notifications, music breaks, or interrupted routes, all because the system forcibly freezes background processes.
In this article, weโll look at all the available ways to fix apps in the background on Xiaomi, Redmi and POCO devices (relevant to MIUI 12-15 and HyperOS). Youโll learn how to turn off battery optimization, set up auto-start, use hidden developer features, and even bypass restrictions through ADB. Importantly, some methods require administrator rights or a PC connection โ weโll detail each step.
Why is Xiaomi closing apps in the background?
The reason is because of the MIUI Security Center algorithms, which are built-in antivirus and power manager, and it analyzes the activity of applications and forcibly stops those that:
- ๐ Consume more than 5% of battery per hour in the background.
- ๐ฑ Do not use push notifications through Google or Mi Push.
- โณ Not opened by the user within 24-48 hours.
- ๐ซ They are on the blacklistยป MIUI (For example, some Chinese applications).
Xiaomi is also actively using Deep Optimization, which blocks background processes to save charge, especially on low-end models (Redmi 9A, POCO M3), but even flagships (Xiaomi 13 Ultra, MIX Fold 3) are not immune to problems unless the settings are turned off.
Method 1: Disabling Battery Optimization for an Application
The easiest and safest method is to remove the application from optimization mode, so that it can work in the background without forced closure.
- Open Settings โ Applications โ Application Management.
- Select the application you want (such as Telegram).
- Go to the section Saving battery power.
- Choose the option without restrictions.
For MIUI 14/15, the path may be different: Settings โ Battery and Performance โ Application Selection โ [Application Name] โ Charge Savings โ No Limits.
App selected from list | Battery optimization disabled |Rebooted smartphone (recommended) | Checked after 12 hours (app not closed)
-->
โ ๏ธ Note: On some models (Redmi Note 11, POCO X4 Pro after updating to MIUI 15 this parameter may reset. Check the settings every 1-2 weeks.
Method 2: Setup autostart and background activity
Even after the battery optimization is turned off, the application can close if it does not have autostart and background activity rights.
- Go to Settings โ Applications โ Application Management โ [Select App].
- Press Permissions โ Autostart and turn on the switch.
- Back up and activate Background Activity (or Background Work in MIUI 15).
For Android 13+ (MIUI 14/15), another item has been added: Settings โ Privacy โ Special Access โ Access to Notifications โ you need to enable permission for the application so that it can show notifications in the background.
| Setting up | MIUI 12/13 | MIUI 14/15 | HyperOS |
|---|---|---|---|
| Auto-start | Settings โ Permissions โ Autostart | Settings โ Applications โ Auto Launch | Settings โ Applications โ Management โ Auto-Run |
| Background activity | Settings โ Battery โ Selection of applications | Settings โ Battery โ Background activity | Settings โ Battery โ Without restrictions |
| Push notifications | Settings โ Notifications โ Application settings | Settings โ Notifications โ Notification channels | Settings โ Notifications โ Permissions |
๐ก
If the autorun list doesnโt have the right app, try running it manually first โ sometimes MIUI adds programs to the list only after opening it for the first time.
Method 3: Secure the application through โRecently usedโ
MIUI has a feature to lock apps into the multitasking menu, which prevents them from closing when cleaning the RAM. This is a temporary solution, but useful for navigators or players:
- Open the application that needs to be fixed.
- Click the recently used button (square at the bottom of the screen).
- Click on the app icon and select Secure (pin icon).
Limitations of the method:
- ๐ It only works until the smartphone is rebooted.
- ๐ต Does not protect against forced closure of the system in case of lack of RAM.
- ๐ข You can fix no more than 3-5 applications at the same time (depending on the model).
How to remove the limit on the number of fixed applications?
Method 4: Using Developer Mode (for experienced)
If standard methods don't work, you can activate the developer's hidden settings and manually disable MIUI restrictions.
- Go to Settings. โ The phone.
- Click the MIUI version 7 times in a row until you get a message: You are a developer!
- Back to Settings โ Additionally. โ For developers.
Key options are now available:
- ๐ ๏ธ Do not disable background processes โ disables forced closure.
- ๐ Limit background processes โ Choose Without Limitations.
- ๐ฑ Not optimize MIUI (firmware).
โ ๏ธ Warning: Activating the Do Not Disable Background Processes mode can increase battery consumption by 10-15%. Use this method only for mission-critical applications (e.g., medical monitors or security trackers).
๐ก
The Do Not Disable Background Setting is reset after resetting or updating MIUI. Always check it after updates!
Method 5: ADB-commands to completely disable optimization
For advanced users, there is a way to disable optimization via ADB (Android Debug Bridge) which is guaranteed to work on all versions of MIUI, but requires a PC connection.
Instructions:
- Install ADB Tools on your computer.
- Enable USB debugging in the developer settings.
- Connect your smartphone to your PC and perform at the terminal:
adb shell dumpsys deviceidle whitelist +com.example.app
adb shell cmd appops set com.example.app RUN_ANY_IN_BACKGROUND allow
adb shell settings put global hidden_api_policy 1Replace com.example.app with your applicationโs batch name (e.g. org.telegram.messenger for Telegram). You can find out the batch name through the App Inspector app or Google Play site (in the address bar after id=).
List of packet names of popular applications
Method 6: Alternative solutions (if nothing helps)
If all of the above methods have not worked, consider alternative options:
- ๐ Custom firmware: Install Xiaomi.eu, LineageOS or Pixel Experience โ they are devoid of aggressive optimization MIUI. Cons: loss of warranty and risk of โbrickingยป.
- ๐ฑ Second smartphone: Use an old Xiaomi (like Redmi) 4X) exclusively for background tasks (navigator, tracker).
- โก Automation: Set up MacroDroid or Tasker to restart the application periodically (e.g., every 30 minutes).
- ๐ Constant charging: Connect your smartphone to a power source โ MIUI less often closes applications with a charged battery (>80%).
Critical information for POCO F5 and Xiaomi 13T owners: on these models, MIUI 15 added a hidden โSuper-Saving Modeโ that blocks background processes even for applications with disabled optimization. To deactivate it, enter the dial code ##4636## โ select โBattery Informationโ โ turn off โUltra-Economic Modeโ.