Xiaomiโs MIUI-based smartphones are actively optimizing background processes to save battery life. However, this โcareโ often causes the right apps to suddenly shut down or restart, especially for instant messengers (Telegram, WhatsApp), navigators (Yandex.Maps, Google Maps), and games (Genshin Impact, PUBG Mobile), where interruption can cost a missed message or a lost match.
In this article, we will discuss all the available ways to fix applications in memory, from standard MIUI functions to hidden settings through ADB and engineering menus. You will learn how to turn off aggressive battery optimization, set up autoboot and even manually lock processes in RAM. Importantly, not all methods are equally effective on different versions of MIUI (12-15) and models (Redmi, POCO, Xiaomi), so we will point out the nuances for each.
If you're tired of Spotify constantly rebooting when you lock your screen, or if Viber doesn't send notifications without an open app, this is the guide for you. But remember, too much attachment of apps to memory can increase battery consumption and slow down the system.
1. Standard method: fixing the application in the multitasking menu
The easiest and safest method is to secure the app right in the MIUI interface.It works on all modern Xiaomi smartphones (from Redmi Note 10 to Xiaomi 14) and does not require superuser rights.
How to do this:
- Open the application you want to secure (e.g. Telegram).
- Press the button "Multi-tasking" (square or swipe up with pause).
- Find the card of the desired application and hold it with your finger for 1-2 seconds.
- In the menu that appears, select "Secure" (icon with a pin).
After that, the application will remain in memory even after cleaning the RAM through the "Close everything" button, but the method has limitations:
- ๐น It works for only one application at a time (on some firmware - up to 3).
- ๐น After restarting the smartphone, the fixation is reset.
- ๐น Does not protect against closing the system in case of memory shortage.
โ ๏ธ Attention: POCO F5 Xiaomi 13T s MIUI 14 The "Secure" option may not be in the multitasking menu, in which case use the alternative methods in the following sections.
2. disable battery optimization for selected applications
MIUI aggressively closes the background processes to save charge. To avoid this, you need to manually exclude the application from optimization. This method works on all versions of MIUI (including MIUI 15 on Xiaomi 14 Ultra).
Instructions:
- Go to Settings โ Applications โ Application Management.
- Select the app you want (such as WhatsApp).
- Slip "Battery Optimization" (or "Battery Consumption" on older versions).
- Select โNo Limitsโ (or โOpt out Optimizationโ).
For maximum effect, also turn off Auto Start (if it is on) and allow Background Activity in the same menu, which will prevent the application from closing when the screen is locked.
Battery optimization for the application is disabled |
Background activity allowed |
Auto-start disabled (if not needed) |
High priority notifications included-->
On some models (Redmi Note 12 Pro+, POCO X5 Pro) the path to settings may be different: Settings โ Battery and Performance โ Application Selection โ [app] โ Battery Optimization.
โ ๏ธ Attention: After update MIUI Battery optimization settings may be reset, check them after each major update (e.g., when switching from a battery to a battery). MIUI 13 on MIUI 14).
3. Set up the autoload of applications
Autoboot allows apps to run automatically when a smartphone is turned on or after cleaning the RAM.This doesnโt lock them into memory permanently, but increases the chances that they wonโt shut down unexpectedly.
How to set up:
- Open Settings โ Applications โ Application Management.
- Slip on "Outload" (or "Outrun" on MIUI 12).
- Find the desired application in the list and turn on the switch.
On newer versions of MIUI (14-15), the path may be different: Settings โ Applications โ Permissions โ AutoRun.
What apps should be added to the autoload:
- ๐ฌ Messengers: Telegram, WhatsApp, Viber (for instant notifications).
- ๐บ๏ธ Navigators: Yandex.Maps, Google Maps (so that you do not lose data about the route).
- ๐ต Music services: Spotify, Yandex Music (for playback in the background).
- ๐ฎ Games with a permanent online connection: Genshin Impact, Honor of Kings.
Why does autoboot not guarantee 100% performance in the background?
4. Hidden settings: blocking processes through the engineering menu
For advanced users, there is a way to force the application process in memory through an engineering menu, which works on most Xiaomi devices, but requires caution โ wrong actions can lead to crashes.
Instructions:
- Open the dialer and enter the code ##4636## (some models may not work โ see the alternative below).
- In the menu that opens, select "Battery Information" (or "Usage Statistics").
- Slip on Menu (three dots in the upper right corner) and select Process Statistics.
- Find the desired application in the list and click on it.
- In the "Lock" (or "Blocking") section, set a tick.
If #4636### is not working, try an alternative method:
- Install the Activity Launcher app from Google Play.
- Open it and find "Engineering Mode" or "Testing".
- Run Process Stats and repeat steps 4-5 from the instructions above.
โ ๏ธ Attention: Blocking processes through an engineering menu can increase battery consumption by 10-15% and cause lags when multitasking.
adb shell am start -n com.android.settings/.DevelopmentSettingsBut this method requires an unlocked bootloader and enabled debugging on USB.-->
5. Advanced method: fixation through ADB (no root)
The most reliable way to store an application in memory is to use ADB commands. This method does not require root rights, but you need to:
- ๐ฅ๏ธ A computer with installed Xiaomi drivers and ADB.
- ๐ฑ Included debugging by USB smartphone.
- ๐ USB-Type C Cable (preferably original).
Step-by-step:
- Connect the smartphone to the PC and allow debugging (a request will appear on the screen).
- Open the command prompt (cmd) and type: Adb devices Make sure the device is defined.
- Enter the command to disable optimization (replace com.example.app with your application package, for example, org.telegram.messenger): adb shell dumpsys deviceidle whitelist +com.example.app
- Then lock the app in memory: adb shell am set-inactive com.example.app false
How do I find out the application package?
- Install App Inspector from Google Play.
- Open the application and find it in the list โ the package will be listed in the format com.company.app.
Once the commands are executed, the application will be protected from closing by the system even when the RAM is cleared through the "Close Everything" button, but after the smartphone is restarted, the effect will reset - you will have to repeat the procedure.
| Annex | Package name (package name) | Team for ADB |
|---|---|---|
| Telegram | org.telegram.messenger | adb shell dumpsys deviceidle whitelist +org.telegram.messenger |
| com.whatsapp | adb shell dumpsys deviceidle whitelist +com.whatsapp | |
| Yandex.Maps. | ru.yandex.yandexmaps | adb shell dumpsys deviceidle whitelist +ru.yandex.yandexmaps |
| Spotify | com.spotify.music | adb shell dumpsys deviceidle whitelist +com.spotify.music |
๐ก
ADB commands are the most powerful tool for fixing applications, but require re-execution after each reboot.
6.Alternative solutions: third-party utilities and root-methods
If the standard methods don't work, you can use third-party tools, but they require an unlocked bootloader or super-user rights.
Popular utilities:
- ๐ ๏ธ Greenify allows you to freeze unnecessary processes, freeing up memory for important applications.
How to use Greenify without root:
- Install Greenify from Google Play.
- Launch and provide access to special features (Settings โ Special features โ Greenify).
- Add to the list of โfreezeโ apps those that are not needed in the background (for example, Facebook, TikTok).
- Enable the option "Aggressive Hibernation".
โ ๏ธ Attention: Root methods can take away warranty and lead to unstable smartphone operation. On Xiaomi, with the unlocked bootloader, Google Pay, Mi Pay and some banking applications also stop working.