Xiaomiβs MIUI-based smartphones are known for aggressive power optimization, which often leads to forced closure of background apps. This annoys users when messengers stop receiving notifications, music is interrupted, and navigators lose connection. The problem is relevant for all models from the budget Redmi Note to the flagship Xiaomi 14.
In this article, weβll look at all the ways you can disable automatic application closure, from standard MIUI settings to hidden developer settings to third-party utilities. Youβll learn how to set up autostart, disable battery optimization for specific applications, and even manually manage processes through ADB. Particular attention is paid to solutions for the latest versions of MIUI 14/15 and HyperOS, where optimization algorithms have become even stricter.
It's important to understand that completely disabling all restrictions can increase battery consumption by 15 to 30 percent -- that's a normal price for keeping background tasks running smoothly -- but with the right settings, you'll find a balance between autonomy and functionality.
Why Xiaomi is closing its background apps?
MIUI firmware uses several mechanisms to save charge, which directly affect the operation of applications:
- π Battery optimization β the system automatically suspends apps that are not actively used, even if they should be running in the background (e.g. Telegram or Google Maps).
- β‘ Aggressive energy saving mode β is activated at low charge (usually below 15%) and kills all background processes except system processes.
- π« Autorun Limitation β By default, many applications cannot start automatically after restarting or closing.
- π± Cleanup RAM β into MIUI There is a built-in "Memory Cleanup" function that kills all background tasks when pressed.
In addition, recent versions of MIUI have introduced AI for process control (MIUI Intelligence), which analyzes user habits and further restricts "unnecessary" applications, for example, if you rarely open Viber, the system will consider it unimportant and will close at the earliest opportunity.
β οΈ Note: On HyperOS devices (e.g. Xiaomi 14 or Redmi) K70) part of the settings moved to the Settings section β Annexes β Special access. If you don't find the usual menu items, check this tab.
Method 1: Disabling Battery Optimization for Individual Applications
The easiest and safest method is to eliminate the right applications from battery optimization, which won't disable all the restrictions, but will significantly increase their running time in the background.
Instructions for MIUI 12/13/14 and HyperOS:
- Open Settings β Applications β Application Management.
- Select the desired application (for example, WhatsApp or Yandex.Navigator).
- Go to Battery Optimization (in some versions - Energy saving).
- Choose the No Limits option or Allow background activity.
For Android 12+, the path may be different:
Settings β Applications β [Select App] β Battery β Background Activity Management β Without LimitationsAfter this, the application will be able to work in the background longer, but can still close if there is a lack of RAM.
Appendix added to battery exceptions
Auto-start is allowed (see next section)
Disabled function "Clean RAM" in the curtain notifications
Checked notifications (Section "Special access")-->
Method 2: Setup autostart and background activity
Even if you have disabled battery optimization, the application may not start automatically after restarting or closing, and you need to manually allow auto-start and background activity.
How to do this:
- Go to Settings β Applications β Application Management.
- Click on the three dots in the top right corner and select Special Access (or Permissions in older versions).
- Open AutoRun and turn on the switch for the desired applications.
- Go back and select Background Activity (or Background Limitations) β let the critical programs work here too.
On HyperOS, the path is a bit different:
Settings β Applications β Special Access β Autorun
Settings β Applications β Special access β Background activityNote that some system applications (like Google Play Services) donβt have these settings β theyβre regulated at the Android level.
Messengers (WhatsApp, Telegram)
Navigators (Google Maps, Yandex.Navigator)
Music services (Spotify, YouTube Music)
Social media (VK, Instagram)
Other-->
Method 3: Disable RAM Cleaning in the Notification Curtain
MIUI has a Memory Cleanup feature that kills all background processes at a single click, and MΓͺme, if you don't use it consciously, can run it automatically when you lock your screen or when you have a low battery charge.
How to turn it off:
- Unwrap the notification curtain and find the Cleanup icon (usually looks like a broomstick or cross in a circle).
- Press and hold this icon and the settings will open.
- Turn off the Auto Clean and Clean option when you lock.
- In some versions of MIUI, you also need to go to Settings β About Phone β Memory and turn off Auto Clean.
If the cleaning icon is not in the curtain, check:
Settings β Notifications and Status bar β Control Panel β Setting up the panel β Find βCleanupβ and turn it offβ οΈ Warning: On devices with 4GB of RAM or less, complete clean-up shutdown RAM In this case, leave the auto-clean on, but increase the interval of its operation (if you have such an option in your version). MIUI).
Method 4: Using Developer Mode to Fine-Tune
For advanced users, you can turn off restrictions through the developer menu, and this gives you access to hidden parameters that you can't change with standard tools.
First, turn on the developer mode:
Settings β About Phone β MIUI version (click 7 times in a row)After that, a new section for developers will appear, and here we are interested in the following settings:
- π οΈ Do not disable active applications β prevents the system from killing applications that are not currently visible on the screen but perform tasks (for example, downloading files).
- π Background Process Limit β Set a Standard Limit or No Limits (on some devices, this can increase battery consumption).
- π Background Limitation β Disable this option for critical applications.
- πΆ Debugging by USB β will be required for the following method of ADB.
On HyperOS, some of these parameters can be hidden. To see them, do this:
Settings β For developers β Enable βShow hidden settingsβπ‘
If after changing the developer settings, the phone began to slow down, return the background process limit parameter to the Standard Limit value and restart the device.
Method 5: ADB commands to completely disable optimization
If standard methods don't work, you can use the ADB tool for deep tuning, which requires connecting the phone to your computer, but gives you maximum control.
Step-by-step:
- Download and install Platform Tools from the official Android website.
- Enable USB Debugging in the Developer menu (see previous section).
- Connect the phone to your computer and type in the command line: Adb devices Make sure the device is defined.
- Follow the commands to disable optimization (replace com.example.app with your application package, for example com.whatsapp): adb shell dumpsys deviceidle whitelist +com.example.app adb shell cmd appops set com.example.app RUN_ANY_IN_BACKGROUND allow adb shell cmd appops set com.example.app RUN_IN_BACKGROUND allow
To find the application package, use the command:
adb shell pm list packages | grep "appendix name"For example, for Telegram it will be org.telegram.messenger, for Google Maps it will be com.google.android.apps.maps.
| Annex | Packet name | Team for ADB |
|---|---|---|
| com.whatsapp | adb shell dumpsys deviceidle whitelist +com.whatsapp | |
| Telegram | org.telegram.messenger | adb shell cmd appops set org.telegram.messenger RUN_IN_BACKGROUND allow |
| Google Maps | com.google.android.apps.maps | adb shell dumpsys deviceidle whitelist +com.google.android.apps.maps |
| Spotify | com.spotify.music | adb shell cmd appops set com.spotify.music RUN_ANY_IN_BACKGROUND allow |
β οΈ Attention: Teams ADB They reset after you reset your phone to the factory settings. MIUI Restrictions may be returned, in which case the procedure will have to be repeated.
How to find the name of the application package without ADB?
Method 6: Third-party utilities for managing background processes
If you don't want to mess with the settings manually, you can use specialized applications that automate the process and often offer additional features.
The best tools for Xiaomi:
- π§ Greenify allows you to freeze unwanted applications, freeing up resources for important ones.
- β‘ Battery Optimizer (MIUI) β A utility specifically for Xiaomi that simplifies setting up battery exceptions and auto-runs.
- π‘οΈ Shizuku + AppOps is an advanced tool for managing application permissions without root. It allows you to manually turn on background activity.
- π MIUI Hidden Settings β Opens access to hidden settings MIUI, including process management.
Example of setting up Greenify:
- Install the app from Google Play.
- Provide access to special features (Settings β Special features β Greenify).
- Add apps that should not be closed to the list of exceptions.
- Turn on the Boost option and select Aggressive mode to prioritize.
Shizuku will require additional customization via ADB, but this gives you almost complete control over background processes without root rights.
π‘
Third-party utilities can conflict with MIUI system optimizations. Once installed, check the stability of the phone for 1-2 days.
Additional Tips for Maximum Stability
Even after all the settings, some applications may be closed due to a lack of RAM or features of their work.
- π Reboot your phone every 2-3 days β this clears the cache and resets βhangβ processes that can interfere with the work of background applications.
- π΅ Turn off traffic savings in Settings β SIM-maps and mobile networks β Traffic savings β it can block background data transfer.
- π Use the original charger β unstable power can cause CPU failures and application closures.
- π² Update apps β developers often optimize background work in new versions (especially relevant for Google Maps and instant messengers).
If youβre using Xiaomi with 6GB of RAM or less, consider turning off animations to save resources:
Settings β For developers β The scale of the animation window (Disable)
Settings β For developers β The scale of the animation transition (Disable)This does not directly affect background processes, but reduces system load, which indirectly helps applications stay active longer.