How to make sure the app doesnโ€™t close in the background on Xiaomi: The Complete Guide 2026

Xiaomiโ€™s MIUI-based smartphones are known for aggressively optimizing background processes. The system automatically pauses or closes apps to save battery power and RAM. For most users, this is convenient, but if you need messengers (Telegram, WhatsApp), navigators (Yandex.Maps, Google Maps) or fitness trackers (Strava, Nike Run Club) to work in the background without interruptions, you will have to manually adjust the exceptions.

Compounding the problem, MIUI 14 and newer are even stricter on background processes than previous versions. Even after manually configuring some applications, some applications can close after 5-10 minutes of inactivity. In this article, we present current ways to disable automatic app closure on Xiaomi in 2026, including hidden developer settings and bypassing restrictions through ADB.

Why is Xiaomi closing apps in the background?

The reasons for aggressive optimization of background processes in MIUI lie in the firmware architecture:

  • ๐Ÿ”‹ Battery savings โ€“ the system forcibly stops applications that are not actively used to reduce charge consumption, especially on models with a battery up to 4000 mAh (for example, Redmi Note 10 or the Redmi Note). POCO X3 Pro).
  • ๐Ÿง  RAM management โ€“ on devices with 4-6 GB of RAM MIUI It removes background processes to free up resources for active tasks, even flagships like the Xiaomi 13 Ultra.
  • ๐Ÿค– Android policy โ€“ starting with Android 8.0 Oreo, Google has tightened the rules for background services. MIUI further tighten these restrictions.
  • ๐Ÿ“ฑ Performance โ€“ by default, the system believes that the user is more important than the speed of opening new applications than the stable operation of the background.

It's important to understand that MIUI doesn't just kill apps -- it uses a Doze Mode mechanism that pauses background processes when the screen is off, and even if you add an app to the exceptions, it can slow down, but it doesn't shut down completely.

๐Ÿ“Š What kind of Xiaomi model do you have?
Redmi (Note/Pro series)
POCO (F/X/M)
Xiaomi (number series)
Black Shark
other

Method 1: Setup autostart and background activity

The easiest method is to allow the app to auto-start and run in the background through standard MIUI settings, which works on all models, including the Redmi 12, POCO F5 and Xiaomi 14.

  1. Open Settings โ†’ Applications โ†’ Application Management.
  2. Select the application you want (such as Telegram or Google Maps).
  3. Slip on Autostart and turn on the switch.
  4. Go back and select Permissions โ†’ Additional โ†’ Background activity.
  5. Set the value without limits.

After these steps, the application will be able to work in the background, but it is not guaranteed that it will not be suspended after a few hours. For reliability, use this method together with method 2 (block battery optimization).

Auto-start on.|Background activity without restrictions|Notifications permitted|Battery optimization is disabled (see method 2)-->

Method 2: Disabling Battery Optimization for an Application

MIUI has a separate battery optimization mechanism that can block background processes even when auto-start is allowed, to turn it off:

  1. Go to Settings โ†’ Battery and Performance โ†’ Battery Optimization.
  2. In the top corner, press three dots (โ‹ฎ) and select All Apps.
  3. Find the desired application in the list and tap it.
  4. Choose No Limits.

On some models (e.g. POCO X5 Pro), the path may be different: Settings โ†’ Battery โ†’ Battery settings โ†’ Battery Optimization.

โš ๏ธ Warning: Disabling battery optimization for too many applications can lead to a 10-20% increase in charge consumption, and it is recommended to use this method only for mission-critical programs (navigators, messengers, health trackers).

๐Ÿ’ก

If the Battery Optimization list doesnโ€™t have the right app, try running it at least once first โ€“ after that, it will appear in the settings.

Method 3: Blocking an application in multitasking

MIUI has a feature to "pin" applications in the multitasking menu, which prevents them from closing when you clear the memory, which works temporarily until the device restarts.

  1. Open the application that you want to leave in the background (for example, Spotify or Yandex.Music).
  2. Click the recent apps button (square or swipe up with pause).
  3. Find the app card and swipe down (don't delete!) a lock icon will appear. โค๏ธ.
  4. Slip on the lock icon to secure the app.

Now the app won't close even if you click Clear Everything in the Multitasking Menu.

  • ๐Ÿ”’ The attached application doesnโ€™t update in the background โ€“ it just doesnโ€™t close when you clear the memory.
  • ๐Ÿ”„ After rebooting the smartphone, the lock is reset.
  • ๐Ÿ“Œ You can only attach one application (on some models - up to 3).

Method 4: Developer settings (hidden parameters)

For advanced users, MIUI offers hidden settings that allow more flexibility in managing background processes.

  1. Go to Settings. โ†’ The phone.
  2. Find the MIUI version and tap it 7 times in a row. You will be notified of becoming a developer!
  3. Go back to the main settings menu and open a new section for developers.

The following parameters can now be configured:

ParameterRecommended valueThe effect
Limitation of background processesStandard Limitation or No LimitationsIncreases the number of processes that can work in the background at the same time.
Not to keep up the actionDisconnected.Prevents automatic closing of applications when the screen is blocked.
Limitation for background processes4 processes (maximum)It allows you to keep more applications in memory.
Windows animation and transition animationDisabled (0x)Speeds up switching between applications, reducing the chance of closing backgrounds.

โš ๏ธ Warning: Changing the Do Not Save Action setting can lead to memory leaks and unstable system operation. Use it only if other methods have not helped.

What to do if there is no โ€œDevelopersโ€ item?
If after 7 clicks on "Version" MIUI" section did not appear, try: 1. Reboot the phone. 2. Check if the section is hidden in the search for settings (enter "developer"). 3. On some firmware (for example, global for POCO) You may need to first enable "Developer Mode" in Settings โ†’ Additionally.

Method 5: ADB commands to completely disable optimization

If standard methods don't work, you can use ADB (Android Debug Bridge) to deep-tube the system, which requires a connection to a computer, but gives you maximum control over the background processes.

Instructions:

  1. Download and install Platform Tools (includes ADB).
  2. Enable USB debugging in the developer settings (see Method 4).
  3. Connect your smartphone to your PC and type in the command line: Adb devices Make sure the device is defined.
  4. Run the command to disable battery optimization: adb shell dumpsys deviceidle whitelist +com.example.app Replace com.example.app with your application's batch name (e.g. org.telegram.messenger for Telegram).
  5. To disable Doze Mode, use: adb shell dumpsys battery unplug adb shell dumpsys deviceidle force-idle Attention! This command simulates charging connection, which can increase battery consumption.

To find the batch name of the application, use the command:

adb shell pm list packages | grep "appendix name"

For example, for WhatsApp:

adb shell pm list packages | grep whatsapp

๐Ÿ’ก

ADB commands are reset after the reboot. To make the changes permanent, use a script or task in Tasker.

Method 6: Use of third-party utilities (without root)

If you don't want to mess with ADB, you can use specialized apps from Google Play that automate setting up background processes.

  • ๐Ÿ› ๏ธ Donโ€™t Kill My App! โ€“ Shows the exact instructions for your Xiaomi model and version MIUI. Reference: Google Play.
  • ๐Ÿ”„ AutoStart - manages autorun and background activity for all applications. MIUI 12โ€“14.
  • โšก Greenify allows you to manually choose which apps you don't optimize, requires customization, but is effective.
  • ๐Ÿ“ฑ MIUI Optimization Tweaks โ€“ a utility for fine firmware configuration (requires) ADB, but simplifies the process).

The advantage of these apps is that they are tailored to specific models (such as the Redmi Note 11 Pro+ or Xiaomi 12T) and MIUI versions. However, beware โ€“ some utilities may contain ads or request unnecessary permissions.

Method 7: Alternative solutions (if nothing helps)

If all of the above methods have failed, try the following options:

  • ๐Ÿ”„ Update MIUI โ€” in new versions of the firmware (for example, MIUI 14.0.5+) Sometimes they fix background process bugs. Check for updates in Settings โ†’ The phone. โ†’ Updating the system.
  • ๐Ÿ“ฑ Resetting โ€“ if the problem appears after the update, try resetting to factory settings (Settings) โ†’ The phone. โ†’ Reset settings. Don't forget to make a backup!
  • ๐Ÿ”ง Install custom firmware โ€“ firmware like LineageOS or Pixel Experience do not have aggressive optimization MIUI. Disadvantages - loss of warranty and possible bugs.
  • โšก Using the second device โ€“ for critical tasks (for example, jogging tracking), you can use a separate cheap smartphone or smart watch (Xiaomi Watch 2 Pro).

Some models (such as Black Shark 5) have a game mode that can be adapted to the background of applications. To enable: Settings โ†’ Special Features โ†’ Game Mode.

FAQ: Frequent questions about background processes on Xiaomi

Why did the MIUI update start shutting down apps again?
Reset the autostart and battery optimization settings (see Method 1 and Method 2). After major updates (e.g., from MIUI 13 to MIUI 14), all exceptions are reset.
How do I know if the app is closing in the background?
Use the Process Checker (Google Play) application or enter the command in ADB: adb shell dumpsys meminfo <packet name> If the output has the TOTAL line: 0 - the application is closed.
Can I turn off optimization for all applications at once?
Technically, yes, through ADB: adb shell settings put global hidden_api_policy 1 But this is not recommended - the phone will start to brake and discharge quickly.
Why Navigator (Yandex.Maps)/Google Maps) closed during the trip?
The problem is typical for MIUI because of Doze Mode. Solution: Turn off battery optimization (see Method 2). In the navigation settings, turn on Traffic Saving Mode (this paradoxically reduces the chance of closing). Connect the phone to charging - in this case, MIUI less likely to kill background processes.
Will VPN or Tor work in the background after these settings?
Yes, but with reservations: For Orbot (Tor) additionally turn on Mode VPN in its settings. โ†’ The Internet and the Internet โ†’ VPN Add the app to the exceptions. Use it. ADB-command to disable optimization (see Method 5: MIUI It can block traffic VPN In this case, only root or custom firmware will help.