Xiaomi MIUI-based smartphones aggressively optimize background processes to save battery power, which causes instant messengers to stop receiving notifications, music players to break down, and activity trackers to lose data. In this article, weβll look at all the working ways to fix an app in the background, from standard settings to hidden engineering menu features.
The problem is relevant for all versions of MIUI (12 to 15), but the solutions differ depending on the model and firmware version. We tested the methods on the Redmi Note 12 Pro+, POCO F5 and Xiaomi 13T β all methods work, but some require ADB rights or root access. If you use custom firmware (for example, LineageOS), some of the instructions may not work.
Important: After the MIUI update, some settings are reset. Check the status of background applications after each major update - the battery optimizer can block them again.
Why is Xiaomi closing apps in the background?
The MIUI system uses three mechanisms to control background processes:
- π Battery Optimization β Automatically suspends applications that arenβt actively used, works even if you manually authorized auto-runs.
- β‘ Autocleaning RAM - closes "extra" processes when there is a lack of RAM. Triggers: opening heavy games or multitasking.
- π‘οΈ Privacy protection β blocks access to geolocation, microphone and other sensors in the background (relevant to the MIUI 14+).
For example, Telegram may not show notifications because of an Internet problem, but because the system killed its process 10 minutes after it was curtailed, and Google Maps will stop tracking the route if MIUI decides that you haven't interacted with the screen for too long.
The manufacturer claims that this increases battery life by 15-20%, but for users who depend on background services (tax drivers, couriers, traders), this βoptimizationβ becomes a problem.
Method 1: Allow the auto-start of the application
The easiest way is to add an app to the autorun list, which allows it to run when the phone is turned on and run in the background without any restrictions.
Instructions:
- Open Settings β Applications β Application Management.
- Select the desired application (for example, WhatsApp or Yandex.Navigator).
- Slip on Autostart and switch on the switch.
- Go back and click Permissions β Autostart to confirm the action.
β οΈ Attention: B MIUI 14+ The path may be different. On some models, Redmi. 10C, POCO M5) The autostart option is hidden behind the extra menu. If you don't find an option, try it:
- π In the search for settings, enter "autostart".
- π± Click on the three dots in the upper right corner of the app screen and select "Stop Starting".
βοΈ Auto-start check
Method 2: Disable battery optimization
Even with autorun enabled, MIUI can pause applications through the battery optimizer to avoid this:
Steps:
- Go to Settings β Battery and Performance β Battery Management.
- Select Application Selection (or Battery Optimization in older versions).
- Find the right application and set a No Limits mode for it.
For MIUI 15, the algorithm has changed.
- π Go to Settings. β Annexes β Permits β Special access β Optimizing the battery.
- π Select All Apps and Turn Off Optimization for the Right Services.
β οΈ Attention: Disabling optimization for 10+ Applications can reduce battery life by 8-12%, and we recommend using this method only for mission-critical services (navigators, messengers for work, fitness trackers).
| MIUI version | The path to settings | Max: Number of applications without optimization |
|---|---|---|
| MIUI 12 | Settings β Battery β Battery Optimization | Unlimitedly |
| MIUI 13 | Settings β Battery β Battery Management β Applications Selection | 15 |
| MIUI 14 | Settings β Applications β Special access β Battery optimization | 20 |
| MIUI 15 | Settings β Applications β Permissions β Battery Optimization | Unlimited* |
In MIUI 15, the system can automatically return optimization for applications that have not been used for more than 3 days.
Method 3: Fixing through "Blocking in Memory"
The function Lock in memory (or "Secure") prevents the application from closing when cleaning the RAM. This is useful for navigators (Google Maps, Yandex.Navigator) and music players.
How to turn on:
- Open the application you want.
- Turn it into multitasking (recent button or gesture).
- Click on the app icon in the preview and select Lock (or icon) π).
π Limitations:
- π« It only works for 1-2 applications at a time (depending on the model).
- π After restarting the phone, the fixation is reset.
- β οΈ Nana POCO F4 redmi K50 The function may not be present in some firmware.
π‘
If the "Secure" option does not appear, try to enable it through the engineering menu: type in the dial ##4636##, select "Battery Information" and turn on the "Do not limit background processes" option.
Method 4: ADB-teams in full control
If standard methods don't work, you can use ADB (Android Debug Bridge) to disable all restrictions, which requires a computer and enabled USB debugging.
Step-by-step:
- Turn on Developer Mode (7 times click on the MIUI version in Settings β About Phone).
- Activate Debugging by USB in Settings β Additional β For developers.
- Connect your phone to your PC and run ADB's adb shell dumpsys deviceidle whitelist +com.example.app (replace com.example.app with your application's batch name, such as com.whatsapp).
- To disable battery optimization, do: adb shell dumpsys battery unplug
π§ Packet names of popular applications:
- π± Telegram: org.telegram.messenger
- π¬ WhatsApp: com.whatsapp
- π΅ Spotify: com.spotify.music
- πΊοΈ Google Maps: com.google.android.apps.maps
β οΈ Attention: After update MIUI or resetting the team settings ADB To fix the changes permanently, use the script to automatically execute commands when you connect to a PC (requires Tasker or analogues).
How to find out the package name of the application?
Method 5: Engineering menu and hidden settings
For power users, there is the option to disable restrictions through an engineering menu, a method that works on most Xiaomi devices, but can lead to unstable system performance.
Instructions:
- Open the dialer and type in: ##4636##
- Select Battery Information.
- Click on the three dots in the top right corner and select Battery Settings.
- Turn off MIUI Optimization (or Aggressive Optimization)
π οΈ Additional settings:
- π§ In the engineering menu (#36446337##) you can disable Background Process Limit (restriction of background processes).
- π Nana MIUI 14+ added force_adaptive_brightness β Disabling it can reduce background activity of the system.
β οΈ Note: Changes to the engineering menu may cause:
- π Increased battery consumption by 20-30%.
- π’ Slowing down the interface when multitasking.
- π Automatic resetting of settings after update.
π‘
The engineering menu is designed for testing and debugging, so don't change the settings that you don't know what you're going to do, because that could cause your phone to fail.
Frequent problems and solutions
Even after all the settings, applications can close, and let's look at typical scenarios and how to solve them:
| Problem. | Probable cause | Decision |
|---|---|---|
| The application closes in 5-10 minutes | Actively aggressive battery optimization | Turn off optimization via ADB or engineering menu |
| Notifications are coming with a delay | Restricted Internet access in the background | Turn on background data and Wi-Fi in sleep mode |
| Navigator loses GPS signal | Blocking access to geolocation | Allow Permanent access to geodata in the application settings |
| Music is interrupted when the screen is blocked | Limiting work in the background for media players | Add the player to the optimization exceptions and fix in memory |
π Diagnostics: To understand what exactly is closing your app, use ADB Logcat. Connect the phone to the PC and do it:
adb logcat | grep -i "kill|am_pause|am_stop"This team will show logs about forced closure of processes.