How to add an app to eliminate cleaning on Xiaomi: the complete guide

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.

๐Ÿ“Š What Xiaomi model do you use?
Redmi Note 10/11/12
POCO X3/X4/X5
Xiaomi 11/12/13 series
Another model

Method 1: Addition to exceptions via "Battery and performance"

The most reliable method is to explicitly tell the system which applications cannot be optimized.

  1. Open Settings โ†’ Battery and Performance.
  2. Select Battery Management (or Battery Optimization in older versions).
  3. Select applications (can be called Applications without restrictions).
  4. 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 Limitations

On 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.

  1. Go to Settings. โ†’ The phone.
  2. Tap 7-10 times on the MIUI version to activate the developer mode.
  3. Back to Settings โ†’ Additionally. โ†’ For developers.
  4. Find the option Limit Processes in the background and select No Limits.
  5. Turn off MIUI Optimization (if any) and Auto Clean Memory.
ParameterRecommended valueEffects of consequences
Limitation of processesNo restrictions.Apps hang in the background longer, but the battery goes down faster
Optimization of MIUIDisconnected.Notifications come in more stable, but lags are possible
Auto-cleaning of memoryDisconnected.Less random closures, but more CPU load
Background data transmissionIncluded for critical applicationsReal-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:

  1. Install ADB on your computer (instruction: official documentation).
  2. Connect your phone via USB and allow debugging (Settings โ†’ Developers โ†’ USB debugging).
  3. Enter in the command line: adb shell pm disable-user --user 0 com.miui.powerkeeper
  4. 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.powerkeeper
What if the ADB does not recognize the device?
1.Install Xiaomi drivers USB Drivers from the official website. 2. Enable debugging by the developer settings USB (Safe mode. 3. Try another one. USB-cable (preferably original). 4. Switch the connection mode from Charging to File Transfer in the notification curtain.

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:

  1. Open the app and roll it up.
  2. Put it on the icon. โ—โ—โ— (multitasking).
  3. Find the card of the desired application and make a long press.
  4. 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 1

Method 5: Using third-party utilities (without root)

If system settings donโ€™t help, try the background management apps:

AnnexFunctionsReference
GreenifyHybernation of unnecessary applications, exceptions for important applicationsGoogle Play
AutoStartManaging Auto Startup After RebootingGoogle Play
Battery OptimizerMassive addition to battery exclusionsGoogle Play

Example of setting up Greenify:

  1. Install the application and provide access to Special Features.
  2. Add the required applications to the Exclusions list.
  3. Activate the option of Working in the background for them.
  4. 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 Allow

Also check the new Settings โ†’ Battery โ†’ Battery Modes and select Performance.

๐Ÿ“Š What kind of way did you work?
Addition to battery exclusions
Disconnecting RAM Autocleaning
ADB-team
Blocking in Multitasking
Third-party utilities
Can I add system applications (e.g. Google Play Services) to the exceptions?
Yes, but it can lead to unstable phone operation, system services are optimized for background work, and forced "unlocking" sometimes causes: ๐Ÿ”„ Increased battery consumption (up to 20%). ๐Ÿ”„ Interface freezes. ๐Ÿ”„ Problems with syncing your Google account. If you want Google Play Services to work consistently, just add it to the battery exceptions (Method 1) and donโ€™t turn off Optimization. MIUI fully.
Why are apps optimized again after the phone is restarted?
This is a feature of MIUI: when you reboot, some background processes are reset. To avoid this: Use Method 4 (lock in multitasking) before rebooting. Install AutoStart and add apps to autostart. Disable Optimization when charging in Settings โ†’ Battery โ†’ Battery settings.
How to check if the application is optimized?
There are a number of ways: ๐Ÿ” Use it. ADB-command: adb shell dumpsys deviceidle whitelist (will show a list of applications excluded from optimization). ๐Ÿ” Install Battery Historian and analyze the battery log. ๐Ÿ” Include Battery Log in Settings โ†’ Battery โ†’ โš™๏ธ โ†’ Battery usage and check if the process is suspended.
Will this method work on POCO, Black Shark, or Redmi?
Yes, all of the above methods are relevant for all devices based on MIUI/HyperOS, including: ๐Ÿ“ฑ POCO F4/F5/X5 (firmware MIUI for POCO). ๐ŸŽฎ Black Shark 5/6 (base-shell MIUI). ๐Ÿ“ฑ Redmi Note 11/12/13, Redmi K50/K60. ๐Ÿ“ฑ Xiaomi 12T/13/13T/14 (Exception: Black Shark may not have Battery Optimization, but instead uses Game Space. โ†’ Battery settings.
Can I turn off optimization without losing my warranty?
Yes, all of the methods described (except unlocking the bootloader and getting root) do not violate the warranty: โœ… Change the battery settings. โœ… Use of the ADB (unless the loader is unlocked). โœ… Install applications from Google Play. However, if you run an adb shell pm disable-user com.miui.powerkeeper, it can be detected at a service center, in which case, before you hand over your phone for repair, return the settings to the factory settings: adb shell pm enable com.miui.powerkeeper