How to properly run the application in the background on Xiaomi: unlock MIUI

Xiaomiโ€™s MIUI-based smartphones are known for aggressive power optimization, which often leads to forced application closure in the background, creating problems for instant messengers (no notifications come), fitness trackers (activity recording is interrupted), music players (playback stops) and even navigation services. In this article, weโ€™ll discuss 5 proven ways to get apps to work in the background on any model from the Redmi Note 10 to Xiaomi 13 Ultra.

The problem is compounded by the fact that with each new version of MIUI (especially 13 and 14), optimization algorithms get tougher and the settings are hidden deeper. We tested all methods on current firmware and identified those that work consistently. Importantly, some parameters may differ depending on the regional version of the software (global, Chinese, European) - we will warn about this separately.

Before you start settings, check the version of MIUI in the Settings menu โ†’ About Phone โ†’ MIUI version. If you have MIUI 12.5 or older, some menu items may be called differently โ€“ use the search by settings (the magnifier icon in the upper right corner).

Why Xiaomi is blocking the background of applications?

Background closure is not a bug, it's a system-level feature of MIUI.

  • ๐Ÿ”‹ Battery savings. Algorithms. MIUI Analyze the activity of applications and force them to close those that are not currently in use, according to Xiaomi, this increases battery life by 15-20%.
  • โšก Performance optimization: Background processes consume RAM, which can lead to slowdowns on budget models (e.g. Redmi). 9A or POCO M3).
  • ๐Ÿ›ก๏ธ Malware protection: Some viruses disguise themselves as legitimate apps and work in the background, sending spam or mining cryptocurrency. MIUI Blocks suspicious activity.
  • ๐Ÿ“ฑ Adaptation to the Chinese market: China is a popular place for "super-apps" like WeChat, which manage the background processes themselves. MIUI non-critical.

The problem is that the system does not distinguish between really unnecessary processes (such as a closed browser) and critical ones (messengers, navigators), as a result of which users are faced with:

  • ๐Ÿ“ต Missed WhatsApp or Telegram calls (notifications are delayed or not coming at all).
  • ๐ŸŽต Interrupted music playback in Spotify or Yandex Music when the screen is locked.
  • ๐Ÿšถ Stop recording a workout in Strava or Google Fit in 5-10 minutes.
  • ๐Ÿ“ Loss of connection with the navigator (Yandex Navigator, Google Maps) in the background.

โš ๏ธ Warning: Disabling optimization for all applications in a row can reduce battery life by 30-40.

Method 1: Allowing Auto-Run of the Application

The most basic method is to add an app to the autorun list, which will allow it to start automatically after the phone has restarted and run in the background without any additional restrictions.

Instructions:

  1. Open Settings โ†’ Applications โ†’ Application Management.
  2. Select the application you want (such as Telegram).
  3. Slip on Autostart and turn on the switch.
  4. Go back and go to Permissions โ†’ Additional โ†’ Auto Run to make sure the app is added to the list.

On MIUI 14, the path may be different:

Settings โ†’ Applications โ†’ Permissions โ†’ Autorun

After turning on auto-start, check the application:

Reboot the phone.

Open the app and roll it up.

Wait 5-10 minutes.

Check if it has closed in the background (via the menu of recent apps)-->

โš ๏ธ Note: On some models (Redmi Note 11, POCO X3 Pro after updating to MIUI 13 autostart may not be available. In this case, use Method 3 (battery settings).

Method 2: Disabling Battery Optimization

The MIUI system by default limits background activity to all applications except system applications.

Steps:

  1. Go to Settings โ†’ Battery and Performance โ†’ Battery Consumption Management by Apps.
  2. Select the No Limits mode for the desired application.
  3. If there is no such item, tap on the three-point menu (โ‹ฎ) in the upper right corner and select Battery Settings, then turn off optimization for a specific application.

On MIUI 14 (Global Version), the path looks like this:

Settings โ†’ Battery โ†’ Application Selection โ†’ [application name] โ†’ Without restrictions

For maximum effect, combine this method with Method 1 (autostart).

  • ๐Ÿ”„ Turn on auto-start.
  • โšก Turn off battery optimization.
  • ๐Ÿ“ Prevent the system from closing the application when the screen is locked (see Method 4).
Xiaomi modelThe Way to Battery SettingsNotes
Redmi Note 10/11Settings โ†’ Battery โ†’ Selection of applicationsIn Chinese firmware, the item is called App battery saver.
POCO F3/F4Settings โ†’ Battery โ†’ Battery managementReboot is required after changes
Xiaomi 12/13Settings โ†’ Battery and Performance โ†’ Battery OptimizationMIUI 14 is available in the โ€œAdaptive Batteryโ€ mode โ€“ it must be turned off
Redmi 9/9ASettings โ†’ Battery โ†’ Battery settingsNo restrictions may be available โ€“ use High Performance

๐Ÿ’ก

If the application is closed after optimizing, check the charge saving settings in the application itself. For example, in Telegram you need to go to Settings โ†’ Data and memory โ†’ Saving battery power and disabling it.

Method 3: Prohibits the application from closing when the screen is locked

By default, MIUI closes the background apps 5-10 minutes after the screen locks.

For MIUI 12-13:

  1. Open Settings โ†’ Lock screen โ†’ Sleep mode.
  2. Select Never for Closing Background Apps.

For MIUI 14:

  1. Go to Settings โ†’ Display โ†’ Lock screen.
  2. Slip on the additional settings โ†’ Sleep mode.
  3. Turn off the option of background processes cleaning when blocking.

On some models (POCO X4 Pro, Redmi K50) this item may be hidden.

  1. Activate Developer Mode (7 times tap the MIUI version in your phone settings).
  2. Back to Settings โ†’ Additionally. โ†’ For developers.
  3. Find the item Do not turn off background processes and turn it on.

โš ๏ธ Warning: Disabling background cleaning can lead to 10-15% increased battery consumption and rare slowdowns with prolonged use of the phone without rebooting.

Redmi Note 10/11/12

POCO F3/F4/F5

Xiaomi 12/13/14

Redmi 9/9A/9C

Another model-->

Method 4: Using App Pinning (App Pinning)

Application Protection (or App Pinning) allows you to attach an application to memory, preventing the system from closing it, which works even after the screen is locked.

How to turn on:

  1. Open Settings โ†’ Applications โ†’ Application Protection (on some models, the path: Settings โ†’ Additional โ†’ Application Protection).
  2. Add the desired app to the list by dragging it or clicking on the + icon.
  3. Activate the Block in Memory Switch.

Features of the method:

  • ๐Ÿ”’ The application will not close even if there is a lack of RAM (the system will start to close other processes).
  • ๐Ÿ“ต It only works for applications added manually โ€“ nothing is automatically protected.
  • ๐Ÿ”„ After restarting the phone, the protection must be turned on again (on some firmware).

On MIUI 14 for Xiaomi 13 and POCO F5, the feature is called App Lock in Memory and is located here:

Settings โ†’ Applications โ†’ Application Management โ†’ [select application] โ†’ Block in memory
What to do if there is no Application Protection?
On Chinese firmware (China ROM), this item is often hidden. To unlock it: 1. Set regional settings for India (Settings โ†’ Additional โ†’ Region). 2. Reboot your phone. 3. Application protection should appear in the Settings โ†’ Applications menu. After setting up, return the region back.

Method 5: ADB commands for deep tuning (for advanced)

If standard methods do not help, you can use them. ADB-Android Debug Bridge is the most reliable way to force optimization to go, but it requires a computer connection.

Step-by-step:

  1. Download and install Platform Tools (includes adb.exe).
  2. Enable USB debugging on your phone: Settings โ†’ About Phone โ†’ MIUI Version (Tap 7 times) Settings โ†’ Additional โ†’ For Developers โ†’ Debugging on USB
  3. Connect the phone to the PC and confirm the debugging permission.
  4. Open the command line (Win + R โ†’ cmd) and type:
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

Replace com.example.app with a real application package (e.g. org.telegram.messenger for Telegram). You can find out the package using the App Inspector app or command:

adb shell pm list packages | grep "keyword"

For mass optimisation disabling for all applications (not recommended!):

adb shell settings put global hidden_api_policy 1

โš ๏ธ Attention: Misuse of the right ADB-If you have the commands, restart the phone or the changes won't take effect. Also note that after you reset or update. MIUI repeat the procedure.

๐Ÿ’ก

ADB-commands are the most powerful tool, but you need to be careful, use them only if other methods have not worked, and follow the instructions exactly.

Additional Tips for Stable Work

Even after setting up the background, applications can be closed due to other MIUI limitations.

  • ๐Ÿ“ถ Turn off the "Adaptive Battery": Settings โ†’ Battery โ†’ Battery settings โ†’ Adaptive battery (disable) This feature dynamically limits background processes depending on the level of charge.
  • ๐Ÿ”„ Add the app to the traffic saving exceptions: Settings โ†’ Connections and sharing โ†’ Saving traffic โ†’ Exceptions are relevant for messengers and navigators that actively use the Internet.
  • ๐Ÿ›ก๏ธ Turn off Optimization. MIUI" (only MIUI 12.5+): Settings โ†’ The phone. โ†’ Version. MIUI (Tap 10 times) Settings โ†’ Additionally. โ†’ Optimization MIUI (Disable) Attention: this item is hidden and appears only after multiple taps according to firmware.
  • ๐Ÿ”‹ Use "High Performance" in Battery Settings: Settings โ†’ Battery โ†’ Performance mode โ†’ High performance This will reduce the aggressiveness of optimization, but reduce battery life.

For owners. POCO-smartphone (POCO F3, POCO X4 Pro) has an additional setting:

Settings โ†’ POCO Launcher โ†’ Launcher settings โ†’ Memory โ†’ Disable Memory Cleanup

FAQ: Frequent questions about background work on Xiaomi

Why do applications close in the background again after the MIUI update?
Large updates (e.g. with the MIUI 13 on MIUI 14) some optimization settings are reset. After the update: Check auto-start and battery settings again. ADB-commands, repeat them. On Chinese firmware (China) ROM) After the update, you may need to change the region to India to access the settings.
How to check if the application works in the background?
There are a number of ways: ๐Ÿ” Using the recent app menu: Crash the app and see if it stays there in 10-15 minutes. ๐Ÿ“Š Through battery settings: Settings โ†’ Battery โ†’ Battery utilization โ†’ [Application name] If the "Background use" is 0%, the application is closed. ๐Ÿ› ๏ธ With help. ADB: adb shell dumpsys meminfo | grep "com.example.app" If the output has a line TOTAL: XXXX, appendix active in memory.
Can I turn off optimization for all applications at once?
Technically, yes, but it's highly discouraged: โšก Reduce battery life on 30โ€“50%. ๐Ÿข Slowing down the system due to background overload. ๐Ÿ”ฅ Overheating of the device (especially on models with Snapdragon) 7xx or Dimensity 700/800). If you want to take a risk, use it. ADB-Adb shell settings put global hidden_api_policy 1 It is better to set up each application separately.
Why does the navigator (Yandex Maps, Google Maps) turn off in the background?
For navigation applications, you need to: Enable Autostart and disable battery optimization (see Method 1 and Method 2). Add traffic saving exceptions: Settings โ†’ Connections โ†’ Traffic Savings โ†’ Exceptions In the application itself (for example, Yandex Navigator) go to the settings and turn on: Settings โ†’ Battery Saving Mode โ†’ Disable For Google Maps additionally: Settings โ†’ Navigation โ†’ Sound settings โ†’ Do not turn off the screen If the problem remains, try using the developer mode to disable background process restriction (see Method 3).
How to return standard optimization settings?
If after the experiments the phone began to discharge too quickly, reset the settings: For auto-run and application protection: Settings โ†’ Annexes โ†’ Application management โ†’ [select] โ†’ Reset settings To optimize the battery: Settings โ†’ Battery โ†’ Battery settings โ†’ Reset the settings if used ADB-Adb shell dumpsys deviceidle whitelist -com.example.app adb shell cmd appops set com.example.app RUN_ANY_IN_BACKGROUND Default After Resetting the Phone.