Xiaomi's MIUI-based smartphones are known for their aggressive optimization policies: it automatically closes background processes, limits application auto-starts and reduces performance to save charge. For most users, it's a plus - the battery lasts longer and the phone doesn't slow down. But what if you want maximum performance? For example, for games, background tasks (like trackers or instant messengers), or work with resource-intensive applications?
In this article, weโll break down all the ways to disable optimization on Xiaomi, from basic settings in the menu to hidden options through ADB and engineering menus.
- ๐ง Disable auto-cleaning memory and background restrictions
- โก Remove Performance Limits for Games and Applications
- ๐ฑ Set up exceptions for individual programs
- ๐ ๏ธ Use it. ADB deep-optimize
Some methods require developer rights or even unlock the bootloader. If you're a beginner, start with simple methods and then move on to advanced ones.
1. Basic optimization settings in MIUI
To start with, the standard options on Xiaomiโs menu that donโt require additional rights are available on all devices with MIUI 12 and up (including Redmi, POCO and Black Shark).
Go to Settings โ Battery and Performance โ Battery Optimization. Here you will see three key sections:
- ๐ Auto-cleaning memory โ automatically closes background applications when you lock the screen.
- ๐ Background restriction โ blocking applications in the background. For instant messengers (like Telegram or WhatsApp), this is critical.
- โก Performance mode โ switch to High Performance for maximum performance (but the battery will run out faster).
Note that on some models (such as the POCO F5 or Xiaomi 13), these items may be called differently or hidden in the sub-menu "Additional battery settings". If you do not find them, search by settings (the magnifying icon at the top of the screen).
๐ก
After turning off the auto-clean memory, monitor the free RAM manually. If the phone starts to slow down, restart it or close unnecessary applications through the latest task menu.
2. Set up auto-run and background activity for individual applications
Even if you have disabled global optimization, MIUI may restrict individual programs, such as Viber or Google Maps, to not update in the background.
- Open Settings โ Applications โ Application Management.
- Select the app you want (like YouTube Music).
- Go to "Permissions" โ "Autostart" and turn it on.
- Go back and type "Background Limitation" โ "No Limitations".
- In the "Battery" section, select "No restrictions".
For convenience, you can use group setting:
- ๐ฎ For games: Settings โ Special permits โ Turbo-playing mode โ Add the game to the list and disable the restrictions.
- ๐ฑ For instant messengers: in the same menu "Special permissions" find "Stop" and turn it on for Telegram, WhatsApp and others.
โ๏ธ Set up an application to work in the background
Important: After these changes, restart your phone to make the settings work. Some firmware (e.g. MIUI Global) may need to re-enable options after the system update.
3. Hidden settings via the engineering menu (#4636##)
If standard options aren't enough, you can get into the engineering menu, which allows you to turn off deep limitations that you wouldn't see in normal settings. Attention: wrong actions here can cause your phone to crash!
To open the menu:
- Open the phone application (caller).
- Enter the code ##4636##.
- Select "Battery Information" or "Usage Statistics" (name depends on MIUI version).
In this menu, pay attention to:
- ๐ Battery information โ you can reset battery usage statistics here (sometimes helps with incorrect optimization).
- โ๏ธ App use control โ allows you to manually configure system process constraints (caution!).
What happens if you reset the battery statistics?
On some models (such as the Xiaomi 12 Pro or Redmi Note 11), the engineering menu may be blocked, in which case you will need permission to debug over USB (about this in the next section).
4. Disable optimization through ADB (for advanced)
If youโre ready to go further, use Android Debug Bridge (ADB), a technique that disables all MIUI limitations, including those not visible in the interface, and is suitable for Xiaomi, POCO, and Redmi on any version of MIUI (including MIUI 14).
What you need:
- ๐ฅ๏ธ A computer with installed Xiaomi drivers and ADB (You can download from the official Google website).
- ๐ฑ Included "Debugging by" USB" on the phone (Settings) โ The phone. โ Version. MIUI โ 7 times tap the build number, then return to "Additional settings" โ "For developers" โ set up).
- ๐ USB-Type C Cable (preferably original).
Now run the following commands in ADB (in order):
adb shell
pm uninstall -k --user 0 com.miui.powerkeeper # Removes the battery optimization module
settings put global hidden_api_policy 1 # Unlocks hidden API
cmd appops set com.miui.securitycenter RUN_ANY_IN_BACKGROUND allow
cmd appops set com.miui.securitycenter RUN_IN_BACKGROUND allowAfter you execute the commands, restart the phone.
- โ Background optimization is completely shut down MIUI.
- โ Applications stop spontaneously closing.
- โ ๏ธ The battery will go down faster (15-30% depending on the model).
๐ก
ADB commands disable optimization at the system level, but after resetting or updating MIUI, they will have to be performed again.
If after these manipulations the phone began to overheat or brake, return the settings back with the command:
adb shell pm install-existing com.miui.powerkeeper5. Alternative methods: Magisk and custom firmware
If you need to completely remove optimization without the possibility of returning to standard settings, consider:
- Install Magisk with Disable MIUI Optimization module, which patches system files and disables all MIUI restrictions, including:
Transition to custom firmware
LineageOS
Pixel Experience
MIUI
drop all the data on the phone
Cons of these methods:
| Method | Pluses | Cons |
|---|---|---|
| Magisk + module | No data resets, works on any MIUI | Need root rights, possible bugs with updates |
| Custom firmware | Full control of the system, no MIUI optimization | Data reset, loss of warranty, possible camera/communication problems |
| ADB (from the previous section) | No need to root, reversible. | Resets after MIUI update |
If you are a beginner, start with ADB or basic settings. Magisk and custom firmware will only be suitable for advanced users ready for possible problems.
Frequent problems and their solutions
After optimizing you may encounter the following issues:
- ๐ฅ Phone overheats โ Install a temperature control app (for example, CPU Monitor) and limit the maximum frequency of the processor through ADB: adb shell settings put global cpu_max_freq 1804800 (The value in hertz depends on the model).
- ๐ Battery goes down in 3-4 hours โ Return Battery Optimization settings for individual applications (see Section 2) or use Power Saving Mode selectively.
- ๐ซ Apps are still closing down. โ Check if the security is blocking them. MIUI" (Settings โ Security โ Auto-start).
๐ก
If after optimizing the phone has become braked, try clearing the cache in Recovery mode. To do this, turn off the device, then press Power + Volume up and select "Wipe cache partition".
On some models (e.g. POCO X3 Pro or Redmi K40) after updating MIUI, optimization settings are reset. To avoid this, back up through Settings โ System โ Backup (but it is not always possible to restore optimization settings from the backup).
7. Comparison of methods: which to choose?
Depending on your goal, choose the right way:
| Purpose | Recommended method | Difficulty |
|---|---|---|
| Messengers work in the background | Auto-start setup (Section 2) | โญ |
| Improve FPS in Games | ADB + turbo game mode | โญโญ |
| Remove the MIUI restrictions completely | Magisk + Disable MIUI Optimization Module | โญโญโญ |
| Performance experiments | Engineering menu (#4636###) | โญโญ |
If you are not sure, start with the basic settings (section 1โ2) and then move on to ADB or Magisk.
๐ก
On most Xiaomi smartphones, it is enough to turn off auto-cleaning memory and set up auto-run for critical applications. Advanced methods (ADB, Magisk) are only needed for specific tasks.