You run an app on Xiaomi, you get distracted for a few minutes, and it's closed. Messengers don't send notifications, music is interrupted, and games are taken out at the most critical moment. The blame is on the aggressive memory optimization in MIUI, which kills background processes to save charge. But this "feature" can be bypassed.
The problem is relevant for all devices based on MIUI — from the budget Redmi Note to the flagship Xiaomi 14 and gaming Black Shark. Even on POCO with “clean” Android under the hood often works the same logic of memory management. In this article, we will discuss 7 working ways to make the system not unload the desired applications — from standard settings to hidden commands for power users.
Why Xiaomi is killing background apps
It’s all about MIUI optimization algorithms that work on three levels:
- 🔋 Battery savings: the system shuts down unnecessary processes to reduce power consumption, especially when the charge is low (less than 15%).
- 🧠 RAM management: Xiaomi uses aggressive LMK (Low Memory Killer is a mechanism that forcibly completes tasks when there is a shortage of RAM. The trigger threshold is lower than in the stock Android.
- 📱 «Smart" multitasking: MIUI It analyzes which apps you use more often, and it just keeps them in your memory, killing the rest.
For example, if you rarely open Telegram but use WhatsApp often, the system may decide that the first messenger is “not important” and close it at the first load, the same goes for games, music players and even navigators — in MIUI 14 and later algorithms have become even stricter due to the integration with HyperOS.
In addition, some models (such as the Redmi Note 12 Pro+ or POCO F5) run a dynamic RAM allocation: the system can “take” memory from background applications to give it to an active process (such as a game), which leads to sudden unloading.
Method 1: Disabling Auto-Optimization in Battery Settings
The easiest and safest method is to eliminate an application from battery optimization, which doesn't guarantee 100% offload protection, but it greatly increases the chances that it will remain in memory.
- Open Settings → Applications → Application Management.
- Select the app you want (like VK Music or Google Maps).
- Go to the Battery Consumption section.
- Activate the No Limits switch (or No Limits on new MIUI versions).
On some firmware (e.g. MIUI 13 for Redmi Note 10 Pro), the path may differ: Settings → Battery and Performance → Application Selection → [application name] → No restrictions.
Make sure the energy saving mode is off.|Check that the app is not on the “Deep Optimization” list"|Reboot your phone after the changes|Repeat the steps for all critical applications-->
⚠️ Note: On HyperOS devices (e.g. Xiaomi 14 or Redmi) K70) This method may not work because of the changed process logic, so you can move to method 3 or 4.
Method 2: Prohibit optimization through “Special Permits”
MIUI 12-14 has a hidden partition that allows you to completely disable optimization for individual applications, a method that is more effective than simply removing battery constraints.
- Go to Settings → Applications → Application Management.
- Select the application you want (such as Spotify or 2GIS).
- Slip on the three dots in the upper right corner and select Special Permits.
- Activate the option to Stop Battery Optimization (or Ignore Optimization).
- Also enable AutoRun and Secondary Running (if any).
On POCO and some versions of Redmi, this section may be called AutoRun Permits or Additional Settings, and if it doesn't, your firmware doesn't support it.
| Xiaomi model | Does the “Special Permits” Support | An alternative path |
|---|---|---|
| Redmi Note 11/12 | Yes. | Settings → Battery → Selection of applications |
| POCO F4/F5 | Yes (in global firmware) | Settings → Applications → Permissions → Autorun |
| Xiaomi 13T/14 | No (replaced with HyperOS Battery) | Use Method 4 (ADB) |
| Black Shark 5/6 | Partially. | Settings → Game space → Optimization |
💡
If after changing the settings, the application is still unloaded, try temporarily disabling the power saving mode (Settings → Battery → Power saving mode) and check the result.
Method 3: Using ADB for deep optimization
If standard settings don’t work, you’ll need to connect to your phone via ADB (Android Debug Bridge), a method that allows you to completely disable optimization for selected applications at the system level.
You'll need:
- 🖥️ Computer with installed ADB Tools.
- 📱 Included debugging by USB on the phone (Settings) → The phone. → Version. MIUI — Tap 7 times, then go back to Settings → Additionally. → For developers → Debugging by USB).
- 🔌 Cable USB (preferably original).
Instructions:
- Connect the phone to the PC and confirm the debugging permission.
- Open the command line (Windows) or terminal (macOS/Linux) in the adb folder.
- Enter the command to check the connection: Adb devices must appear serial number of your device.
- Run the command to disable optimization (replace com.example.app with your application’s batch name, such as com.whatsapp): adb shell dumpsys deviceidle whitelist +com.example.app
- Adb shell dumpsys battery unplug adb shell dumpsys battery set level 100 adb shell dumpsys battery reset
To find the batch name of the application, use the command:
adb shell pm list packages | grep "appendix name"For example, for Telegram, it will be org.telegram.messenger.
How to find a packet name without ADB?
⚠️ Note: After restarting the phone or updating MIUI team ADB To keep the changes constant, you need to write them into an auto-run script (for example, through Tasker or MacroDroid).
Method 4: Setup “AutoStart Permissions” for background processes
Many applications (such as messengers or fitness trackers) need to auto-run to run in the background, and if this setting is disabled, the system will kill them at the earliest opportunity.
How to turn on:
- Go to Settings → Applications → Application Management.
- Select the desired application (for example, SberBank Online).
- Click AutoRun Permits (or AutoRun).
- Activate the Autostart Switch.
- Go back and turn on the Secondary Start (if any).
On HyperOS (like Xiaomi 14 or Redmi K70), the path is different: Settings → Battery → Battery Optimization → App Selection → [name] → Allow background activity.
For some applications (e.g. Google Play Services or Mi Push), the autorun option may be hidden, in which case only ADB (method 3) or manual config editing (method 6) will help.
💡
Autostart and secondary run are two different permissions: the first allows the application to start when the phone is turned on, and the second allows the application to restart after a forced shutdown.
Method 5: Using “Game Mode” for Non-Game Applications
Xiaomi has a hidden feature called forcing Game Mode on any application, which allocates more memory and doesn’t kill the process until you’re actively using it.
How to activate:
- Open Settings → Special Opportunities → Game Space.
- Turn on the switch to the game space.
- Return to Settings → Applications, select the desired application (for example, Yandex Navigator).
- Slip the Game Acceleration and activate the option.
This method is particularly useful for:
- 🎵 Music Players (Spotify, VK Music)
- 🗺️ Navigators (Google Maps, 2GIS)
- 💬 Messengers with voice chats (Discord, Telegram)
On Black Shark, this mode is called Shark Space and has additional settings for the allocation of RAM. To enable it: Settings → Shark Space → Add the app.
Method 6: Manual editing of configs (for advanced)
If none of these methods work, you have to manually edit the system files, which requires root rights or Magisk, but gives you maximum control over optimization.
You'll need:
- 📱 Phone with unlocked bootloader and Magisk.
- 🛠️ File Manager with root access (e.g. Solid Explorer or Solid Explorer) FX File Explorer).
- 📝 Backup of the system (in case of errors).
Instructions:
- Open the file. /system/etc/sysconfig/miui_optimize_prop.conf.
- Find the lines: ro.miui.optimize_props=true ro.miui.standby_bucket_mode=enabled and replaced by: ro.miui.optimize_props=false ro.miui.standby_bucket_mode=disabled
- Save the file and restart the phone.
- To shut down LMK (process killers edit the file /vendor/build.prop, line: ro.config.low_ram=false
These changes will completely disable MIUI optimization, but may result in:
- ⚠️ Increase battery consumption by 10-20%.
- ⚠️ Slowing down the system when multitasking.
- ⚠️ Possible lags in games due to memory shortage.
⚠️ Warning: Editing system files without a backup can lead to a bootloop (a looped reboot).If you are not confident in your abilities, use safer methods (1-5).
Method 7: Alternative solutions (if nothing helps)
If all of the above methods fail, try:
- 🔄 Resetting Optimization Settings: Go to Settings → Battery. → Resetting your optimization settings and confirming action will bring all battery settings back to factory settings, but there will be exceptions for applications you added manually.
- 📥 Installation of alternative firmware: firmware on the basis AOSP (LineageOS or Pixel Experience don’t have aggressive optimizations from Xiaomi. MIUI (Second Space or Game Turbo).
- 🤖 Use of the Tasker/MacroDroid: Create a task that will be every single one of you. 5–10 The “Wake Up” of the Application: Am Start -n com.example.app/.MainActivity (Replace com.example.app with a batch name).
- 🔋 Disconnecting the power saving mode: C Settings → Battery shutdown Power Saving Mode and Super Energy Saving, which will increase battery consumption, but reduce the aggressiveness of optimization.
For owners of POCO and Redmi with global firmware, there is another life hack: switching the region to India. In the Indian versions of MIUI, memory optimization is less aggressive. You can do this through Settings → Additional → Region (reboot will be required).