Xiaomiโs MIUI-based smartphones are known for aggressive background optimization and automatic cache cleaning, which helps save battery power, but often leads to unexpected problems: apps stop sending notifications, background processes break down, and data sync with delay, especially for instant messengers, fitness trackers and banking applications.
In this article, weโll look at how to add a cleanup application to Xiaomi, from basic settings to hidden MIUI features. Youโll learn what methods work on different firmware versions (including MIUI 14 and HyperOS), how to check current settings, and what to do if the application is closed anyway.
Important: Xiaomiโs optimization algorithms are regularly updated, so some menu items may vary depending on the model (Redmi Note 12, POCO X5, Xiaomi 13T) regional firmware (global, Chinese, EEA). If you do not find the desired section, use the search by settings (โ๏ธ โ Search).
Why does Xiaomi automatically clean apps?
The MIUI system uses several mechanisms to extend battery life:
- ๐ Background activity restriction โ applications are suspended 5โ30 minutes after clotting.
- ๐งน Cache Autocleaning โ Delete temporary files when memory is scarce or on schedule.
- โก Adaptive optimization โ AI analyzes user habits and closes โunnecessaryโ processes.
- ๐ก๏ธ Virus protection โ some applications are blocked as โsuspiciousโ (especially from unofficial sources).
The problem is that Xiaomi defaults to โbackgroundโ services like WhatsApp, Google Play Services, Mi Fit. For example, if you use POCO F5 to track your jog, the Strava app can be suspended after 10 minutes and the route data will disappear.
The manufacturer claims itโs a feature, not a bug, but users often experience unpredictable behavior: the same app can run for a week and then start shutting down for no reason, because of training an AI optimizer that adapts to your habits.
Method 1: Addition to exceptions via "Battery and performance"
The most reliable method is to explicitly tell the system which applications cannot be optimized.
- Open Settings โ Battery and Performance.
- Select Battery Management (or Battery Optimization in older versions).
- Select applications (can be called Applications without restrictions).
- In the list, find the desired application (for example, Viber) and turn on the switch without restrictions.
If you donโt have a battery management option, try an alternative route:
Settings โ Applications โ Application Management โ [Select App] โ Battery โ Without LimitationsOn MIUI 14 and newer, the interface may be different: instead of โNo Limitsโ there will be the option to โNo Optimizeโ or โAllow Background Activity.โ In HyperOS (firmware for Xiaomi 14), this section is moved to Settings โ Applications โ Special Permissions โ Battery Optimization.
Find the application in the list "Battery Management"
Establish a โno restrictionsโ regime
Reboot your phone to apply changes
Check background work with adb shell dumpsys battery unplug (for advanced)
-->
โ ๏ธ Note: On some firmware (e.g. Chinese) the option No restrictions may be hidden. 3 (through MIUI Optimization or set up a global/EEA-version MIUI.
Method 2: Disabling Auto-Memory Cleanup (RAM)
Xiaomi actively clears RAM, even if 50%+ resources are free.
- Go to Settings. โ The phone.
- Tap 7-10 times on the MIUI version to activate the developer mode.
- Back to Settings โ Additionally. โ For developers.
- Find the option Limit Processes in the background and select No Limits.
- Turn off MIUI Optimization (if any) and Auto Clean Memory.
| Parameter | Recommended value | Effects of consequences |
|---|---|---|
| Limitation of processes | No restrictions. | Apps hang in the background longer, but the battery goes down faster |
| Optimization of MIUI | Disconnected. | Notifications come in more stable, but lags are possible |
| Auto-cleaning of memory | Disconnected. | Less random closures, but more CPU load |
| Background data transmission | Included for critical applications | Real-time synchronization (e.g., mail) |
After these changes, restart your phone. Note: on the POCO M5 and other budget models, disabling MIUI Optimization can overheat over long loads. If the phone gets hot, return the settings back and use Method 4 (Manual Blocking in Multitasking).
๐ก
If your phone starts to slow down after optimizing, try turning on Light Animation mode in Settings โ Special features โ System settings. This will reduce the load on the processor without losing functionality.
Method 3: Hidden MIUI Optimization Settings (for Advanced)
MIUI has a hidden system component called com.miui.powerkeeper that controls optimization, to turn it off:
- Install ADB on your computer (instruction: official documentation).
- Connect your phone via USB and allow debugging (Settings โ Developers โ USB debugging).
- Enter in the command line: adb shell pm disable-user --user 0 com.miui.powerkeeper
- Reset the device.
This command completely disables battery and memory optimization.
- โ Apps no longer close in the background.
- โ Notifications come in instantly.
- โ No need to add every application to the exceptions.
Disadvantages:
- โ ๏ธ Battery goes down 15-30% faster.
- โ ๏ธ The phone can warm up with heavy use.
- โ ๏ธ On some firmware (MIUI 13 for Redmi 9) this leads to bugs with autobrightness.
To get it all back, do this:
adb shell pm enable com.miui.powerkeeperWhat if the ADB does not recognize the device?
Method 4: Blocking an application in multitasking
If you need to temporarily secure an app (e.g. Google Maps while navigating), use a lock in multitasking:
- Open the app and roll it up.
- Put it on the icon. โโโ (multitasking).
- Find the card of the desired application and make a long press.
- Select Lock (or Lock in English firmware).
The attached application will not be closed when the memory is cleared, but:
- ๐ It only works until the phone restarts.
- ๐ You can fix no more than 3-5 applications (depending on the model).
- ๐ Does not protect against Doze Mode (energy saving inactivity).
On HyperOS, the fixing function can be hidden, so that it can be returned:
adb shell settings put global enable_freeform_support 1Method 5: Using third-party utilities (without root)
If system settings donโt help, try the background management apps:
| Annex | Functions | Reference |
|---|---|---|
| Greenify | Hybernation of unnecessary applications, exceptions for important applications | Google Play |
| AutoStart | Managing Auto Startup After Rebooting | Google Play |
| Battery Optimizer | Massive addition to battery exclusions | Google Play |
Example of setting up Greenify:
- Install the application and provide access to Special Features.
- Add the required applications to the Exclusions list.
- Activate the option of Working in the background for them.
- Enable Aggressive Hibernation for other applications.
โ ๏ธ Note: Some utilities (e.g. Don't Kill My App) require ADB-Be careful with apps that request Accessibility Service, which can collect data about your activities.
๐ก
Third-party utilities do not replace system settings, but supplement them. For maximum stability, combine Method 1 (battery exclusion) + Method 5 (Greenify).
Frequent problems and solutions
Problem 1: The app is still closed, despite exceptions.
Decision:
- ๐ Check if the settings have reset after the update MIUI.
- ๐ Turn off the Adaptive Battery in Settings โ Battery โ Battery settings.
- ๐ Remove the application from the list of Optimized in Settings โ Annexes โ [Name of the annex] โ Battery.
Problem 2: There is no โNo Limitsโ item in the battery settings.
Solution: This is typical of Chinese firmware. Install a global version. MIUI via Fastboot or use it ADB-Teams from Method 3.
Problem 3: After upgrading to HyperOS, the old methods stopped working.
Solution: In HyperOS, the path to settings has changed:
Settings โ Applications โ Application Management โ [Application] โ Battery โ Background Activity โ Always AllowAlso check the new Settings โ Battery โ Battery Modes and select Performance.