Xiaomiβs MIUI-based smartphones are known for aggressive battery optimization, which often blocks application backgrounds, which causes instant messengers to stop showing notifications, activity trackers to record steps, and music players to play tracks after locking the screen.
In this article, weβll look at all the ways you can enable autoruns on Xiaomi, Redmi and POCO devices, from standard MIUI settings to hidden features and circumventing restrictions through ADB. Weβll focus on the differences between shell versions (MIUI 12/13/14) and HyperOS models, and explain why some apps may still not work in the background.
Important: Autorun configurations may vary depending on the regional firmware (Global, China, EEA) and Android version. If your device is running Android 13+, some menu items may be hidden β you will need to activate Developer Mode to display them.
1. Standard method: setup autorun via MIUI menu
The easiest method is to use built-in optimization tools, which is suitable for most applications (messengers, social networks, fitness trackers) and works on all versions of MIUI starting from the 10th.
Instructions:
- π± Open the Settings. β Annexes β Application management.
- π Find the desired app in the list (such as Telegram or WhatsApp) and tap it.
- βοΈ Select AutoStart (in some firmwares it may be called Start in the background).
- π Switch the slider to the On position..
- π Go back and activate the No Limits option in the Background Limitation section.
After this, the app can start automatically when you reboot your device and run in the background, but for some services (such as Google Play Services or system utilities), this may not work β you will need additional manipulation.
Is AutoRun Activated in Application Settings | Background Restrictions Disable |Access to Notifications |Accessed post-Reboot Behavior Checked-->
β οΈ Attention: On devices with MIUI 14 and HyperOS AutoRun can be hidden behind an additional menu. If it is not in the main settings, try the path: Settings β Annexes β Permits β Auto-start.
2. Background activity resolution and optimization blocking
Even if auto-run is enabled, MIUI can force applications to close to save power, and to avoid this, you need to turn off battery optimization for a particular software.
How to do this:
- Go to Settings β Battery and Performance β Battery Consumption Management.
- Select No Limits mode for critical applications (like Viber or Spotify).
- Return to the Application Management menu (see Section 1) and disable the option of MIUI Optimization for the selected software.
For Android 12+, it is also recommended to:
- π Disable Adaptive Battery in Settings β Battery β Additionally.
- π΅ Remove the application from the list of Deep Optimization (path: Settings) β Annexes β Special access β Optimizing the battery).
| MIUI version | The path to auto-start settings | Features |
|---|---|---|
| MIUI 12 | Settings β Applications β Management β Auto-Run | The item is visible immediately, without additional action. |
| MIUI 13 | Settings β Applications β Permissions β Autorun | You may need to turn on system processes. |
| MIUI 14 / HyperOS | Settings β Applications β Application Management β [Select App] β Auto Run | Some models (Xiaomi 13, Redmi Note 12) require that background activity be allowed first. |
On devices with HyperOS (for example, Xiaomi 14, Redmi) K70) A standard auto-run may not work for system applications. ADB-teams (see section 5).
3. Set up notifications and exceptions for auto-run
Often, auto-run issues are not related to the application itself, but to blocking its notifications. MIUI aggressively filters background processes if the program does not have permission to display alerts.
To ensure stable operation:
- Go to Settings β Notifications and Status bar β Notification management.
- Find the right app and enable all types of notifications (pop-ups, icons, sounds).
- Activate the Priority Notifications option (if available).
- Return to the app menu and turn off Notification Limitation in the background.
For instant messengers (WhatsApp, Telegram, Viber) it is also recommended:
- π Secure notifications on the lock screen (Settings) β Lock screen β Notifications).
- π Enable the sound of notifications even in the mode Do not disturb.
- π Disable Notification Grouping for Instant Message Display.
No notifications from messengers |Apps close in the background |Activity trackers don't count steps |Music players stop |Another problem-->
β οΈ Attention: Xiaomi with Android 13+ The system can ignore notification settings for applications using Foreground Service (e.g. Google Maps or Yandex Navi), in which case only manual addition of exceptions to the Foreground Service will help. ADB.
4.Use of "Security" to unlock auto-run
MIUI firmware has a hidden Security section that allows you to manage the autorun of system and user applications, a method that is particularly useful for HyperOS devices where standard settings may be limited.
Step-by-step:
- Open the Security app (the shield icon).
- Move to Acceleration. β Frozen annexes.
- Find the desired application in the list and uncheck it (this will defrost it).
- Return to the main Security menu and select AutoRun.
- Add the application to the list of allowed for autorun.
For MIUI 14 and HyperOS, the path may be different:
- π‘οΈ Security β Privileges β Auto-start.
- π§ Security β Settings (βοΈ) β Auto-launching applications.
If the app is not on the AutoRun list, try:
- Remove it from the Closed Applications (in the same Security menu).
- Clear the cache of the Security application through Settings β Apps.
- Reset the device.
What to do if there is no βSecurityβ section?
5. ADB-commands for forced auto-run (for experienced users)
If standard methods donβt work (especially on Android 12+), you can use ADB, the Android debugging tool, which allows you to bypass the limitations of MIUI and force the application to be added to exceptions.
What you need:
- π₯οΈ Computer with installed ADB-Drivers (you can download from the official Android website).
- π± Included Developer Mode and Debugging by USB smartphone.
- π USB-cable (preferably original).
Step-by-step:
- Connect your smartphone to your PC and confirm the debugging permission.
- Open the command line (cmd) in the folder with the platform-tools.
- Enter the command to check the connection: Adb devices should appear the name of your device.
- Run the command to disable battery optimization: adb shell dumpsys deviceidle whitelist +{application package} For example, for WhatsApp: adb shell dumpsys deviceidle whitelist +com.whatsapp
- Then add the application to the autorun exceptions: adb shell cmd appops set {application package applications package} RUN_ANY_IN_BACKGROUND allow
List of popular application packages:
- π¬ Telegram: org.telegram.messenger
- π± WhatsApp: com.whatsapp
- π΅ Spotify: com.spotify.music
- π Google Fit: com.google.android.apps.fitness
- πΊοΈ Yandex Navi: ru.yandex.yandexnavi
π‘
Before use ADB Backup the data. Incorrect commands can disrupt the stability of the system. If the device becomes braking after the changes, follow the command adb shell cmd appops set} RUN_ANY_IN_BACKGROUND default to reset the settings.
β οΈ Note: On Xiaomi with HyperOS (e.g. Xiaomi) 14, Redmi K70) standard ADB-In this case, you will need to use the extended rights: adb shell pm grant {application package applications} android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS For example, for Viber: adb shell pm grant com.viber.voip android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
6.Alternative methods: third-party utilities and circumvention of restrictions
If none of these things worked, you can use third-party tools, which are especially useful for HyperOS devices, where MIUI limits background activity to the maximum.
Popular solutions:
- π§ AutoStart (an app from Google Play) - automatically configures autorun for selected programs. MIUI, requires ROOT fully functional.
- π οΈ MIUI Optimizer is a module for Magisk that disables aggressive battery optimization.
- π MacroDroid β allows you to create automatic rules to run applications on an event (for example, when connecting to Wi-Fi or charging).
- π± Shizuku + AppOps β a combination for managing permissions without ROOT. Requires settings through ADB.
For devices with ROOT-rights are available:
- File editing /system/build.prop (line-up ro.miui.optimization_control=0).
- Remove the system applications com.miui.powerkeeper and com.miui.securitycenter (not recommended for beginners!).
Warning: Using third-party utilities can disrupt system stability and lead to a ban of warranty. Before installing them, back up your data through Settings β Additional β Backup and Reset.
π‘
On devices with HyperOS (Xiaomi 14, Redmi) K70) And the standard autorun settings often don't work, and in this case, the most reliable way is to use the autorun. ADB-commands or modules for Magisk (if available) ROOT).
7. Frequent problems and their solutions
Even after setting up autoruns correctly, applications can behave incorrectly, so let's look at typical situations and how to fix them.
| Problem. | Possible cause | Decision |
|---|---|---|
| The app closes after 5-10 minutes in the background | Active function of RAM cleaning in safety | Turn off Auto Cleanup to Security β Acceleration β Settings (βοΈ) |
| Notifications are delayed (after 10-30 minutes) | MIUI uses Xiaomi Push service instead of Google | Turn off Mi Push in Settings β Memory β Autorun β System applications |
| Auto-Run Resets After MIUI Update | Resetting optimization settings when updating | Reconfigure autostart and execute ADB-teams (section 5) |
| The application does not start after restarting | There is no permit for BOOT_COMPLETED | Execute the command: adb shell pm grant {package} android.permission.RECEIVE_BOOT_COMPLETED |
If the problem persists, check:
- π Is Traffic Savings Mode (Settings) Included β Connections β Saving traffic).
- π΅ Has the application been added to the Blacklist (Security) β Lockdown).
- π Is Super Battery Mode Activated (Settings) β Battery β Battery modes).
Diagnostics can also be used ADB-team to check the current permissions of the application:
adb shell dumpsys package {annext package}Look for the lines with the output RUN_ANY_IN_BACKGROUND and IGNORE_BATTERY_OPTIMIZATION.