15 Things Xiaomi Developer Should Disable in Settings

Developers working with Xiaomi devices based on MIUI or HyperOS face unique challenges: aggressive battery optimization kills background processes, pre-installed services interfere with debugging, and system restrictions block access to critical APIs. This article is not about β€œaccelerating a smartphone for games” – here are specific recommendations for developers who want to gain full control of the device, disable interfering functions and set up an environment for testing, debugging or customization.

We'll look at not only the obvious things like MIUI Optimization, but the hidden settings that Xiaomi's documentation doesn't mention, like why disabling mipush can save your adb logcat from lag, or how to properly deactivate Game Turbo so it doesn't interfere with performance benchmarks. All of the instructions are tested on devices with HyperOS 1.0+ and MIUI 14/13, but most of them are valid for older versions as well.

Warning: Some changes will require unlocking the bootloader or root rights. If you are not ready, skip the relevant sections. Also remember that disabling system services can disrupt branded features (for example, Quick Apps or Xiaomi Cloud).

1. Battery Optimization: Why Your App Dies in the Background

The battery optimization system in MIUI/HyperOS is the developer's main enemy: it aggressively closes the background, blocks WorkManager, kills services through doze-mode, and ignores Foreground Service. Even if you set up AndroidManifest.xml correctly, Xiaomi can ignore your flags.

To disable optimization for a particular application:

  1. Go to Settings β†’ Applications β†’ Application Management.
  2. Select your application β†’ Battery Limits.
  3. Set up a No Limits mode.
  4. Enable AutoRun and Block in the background (yes, it’s against logic, but that’s how MIUI works).

For global optimisation disabling (ADB required):

adb shell dumpsys deviceidle force-idle


adb shell settings put global hidden_api_policy 1

⚠️ Warning: After the global optimisation shutdown, the battery will run down 15 to 30 percent faster. Use this method only on test devices.

πŸ’‘

If your app is still getting killed, check the adb shell dumpsys activity processes log. Often the problem lies in the limitations of AppOps, which are not visible in the standard interface.

2.Mipush and msa services: hidden resource eaters

Two system services, com.xiaomi.mipush.sdk and com.miui.msa.global, are constantly in memory, sending analytics and preventing debugging: One is responsible for push notifications (including spam from Mi Browser), the other is for telemetry collection, and both can block network requests from your application if they consider them β€œsuspicious.”

You can turn them off in two ways:

  • πŸ”§ Through ADB (no root): adb shell pm disable-user --user 0 com.xiaomi.mipush.sdk adb shell pm disable-user --user 0 com.miui.msa.global
  • πŸ› οΈ Through Magisk (with root): Use the DisableMIUI module or remove APK via Root Explorer.

After the shutdown:

  • βœ… Notifications from Xiaomi (advertising, updates) will stop coming.
  • βœ… Logcat lags will disappear due to mipush background activity.
  • ⚠️ Some Mi Account features (e.g., device search) will stop working.
How to check if the services are actually disabled?
Run adb shell ps -A | grep -E 'mipush|msa'. If there are no processes in the output, it's done correctly.

Game Turbo and Acceleration of Games: Why They Are Getting In the Way of Benchmarks

Game Turbo is not just a β€œmode for games”, but a whole range of optimizations that:

  • Blocks background processes (including your test services).
  • Limits the clock speed of the CPU/GPU if it considers the application to be β€œnon-game”.
  • It replaces the screen resolution (even if you explicitly set 1080p in the settings).

To turn off Game Turbo:

  1. Go to Settings β†’ Special features β†’ Game Turbo.
  2. Turn off the game speed slider.
  3. Remove all games from the list of β€œOptimized Apps”.
  4. Through ADB, execute: adb shell pm uninstall --user 0 com.miui.gameturbo

For complete removal (root required):

su


mount -o rw,remount /system




rm -rf /system/priv-app/GameTurbo




rm -rf /system/app/GameTurbo




mount -o ro,remount /system

πŸ“Š Do you turn off Game Turbo on your devices?
Yeah, always.
Only on test devices.
No, he's useful.
I don't know what it is.

4. pre-installed applications: what can be safely removed

Xiaomi is clogging devices with unnecessary apps that:

  • They're in /system.
  • They consume battery and traffic in the background.
  • They may conflict with your test builds (e.g., Mi Browser intercepts WebView).

List of safe applications to remove (via ADB):

PackageAnnexEffects of removal
com.miui.browserMi BrowserYou lose your browser by default, but WebView will stay.
com.miui.analyticsMIUI AnalyticsData on the use of the device will cease to be sent.
com.xiaomi.midropMi DropYou will not be able to use proprietary file transfer.
com.miui.videoplayerVideo playerWe'll have to use a third-party player.
com.miui.notesNotesYou will lose sync with Mi Cloud.

Remove the command (replace [package] with the desired package):

adb shell pm uninstall --user 0 [package]

⚠️ Warning: Do not delete com.android.vending (Google Play) or com.google.android.gsf, this will result in loss of functionality of Google Services.

5. AppOps Limitations: Why Your App Doesn't Get Permissions

Even if the user has given all permissions manually, MIUI/HyperOS can block them through the hidden AppOps manager.

  • Your app has requested ACCESS_FINE_LOCATION, but no coordinates are coming.
  • The camera works, but does not save the photo to the gallery.
  • NotificationListener does not catch notifications.

To check and reset the restrictions:

  1. Install AppOps from Rikka.
  2. Find your app and check the resolution status (e.g. Android:location should be ALLOWED).
  3. If IGNORED or DENIED status, reset via ADB: adb shell cmd appops reset [package]

For global reset (caution!):

adb shell cmd appops set [package] android:location ALLOW


adb shell cmd appops set [package] android:read_external_storage ALLOW

Install AppOps Explorer | Find your application package | Check the status of critical resolutions (location, camera, storage) |Reset restrictions through ADB (if necessary)

-->

6.MIUI Optimization: The Hidden Performance Killer

MIUI Optimization (called System Optimization) is responsible for:

  • Limiting background processes (even for root applications)
  • Switching animations and transitions (interfering with UI testing).
  • Block changes to /system (for example, if you are trying to replace build.prop).

It is only disabled via ADB:

adb shell settings put global miui_optimization 0

After the shutdown:

  • βœ… The limit of background processes will increase (from 4-8 to 16+).
  • βœ… Developer settings will stop resetting after the reboot.
  • ⚠️ Lags may appear in a standard launcher (MIUI Launcher is not optimized to operate without this feature).

πŸ’‘

Disabling MIUI Optimization is a must if you are working with Xposed, Magisk or modifying system files.

7 Developer settings: what to enable and what to disable

The Settings β†’ About Phone β†’ MIUI version (7 taps to unlock) has hidden options critical to development, but some of them are better off to avoid problems:

  • 🚫 Do not turn off the screen when charging interferes with testing sleep patterns.
  • 🚫 Enable the HCI Bluetooth log β€” clogs memory with logs.
  • βœ… Debugging according to USB (safe) is mandatory for ADB.
  • βœ… Do not turn off Wi-Fi when sleeping - you need to test background tasks.
  • 🚫 Accelerated animation (0.5x) β€” distorts the actual response time UI.

It is also useful to include:

adb shell settings put global development_settings_enabled 1


adb shell settings put global stay_on_while_plugged_in 0

This will open up access to hidden options, such as:

  • Force GPU Rendering – for graphics testing.
  • Disable HW Overlays – if you debug SurfaceView
  • Show CPU Usage – for load monitoring.

8. Knockoff and other security features that interfere with debugging

Xiaomi adds undocumented security mechanisms to the firmware that:

  • Block ADBs through certain ports.
  • Interrupt the ADB Wi-Fi connection after 5 minutes of inactivity.
  • You can not install APK via adb install if the file is not downloaded from Google Play.

To circumvent these restrictions:

  1. Disable Knockoff (Unauthorized Access Protection Mechanism): adb shell settings put global knockoff_feature_enabled 0
  2. Wi-Fi ADB: adb shell settings put global adb_wifi_auto_disable 0
  3. Allow installation from any source: adb shell settings put global install_non_market_apps 1

⚠️ Warning: Disabling Knockoff reduces protection against attacks via ADB. Use only on test devices not connected to public networks.

How to check if Knockoff is active?
Run adb shell dumpsys activity service com.miui.knockoff. If the output has the enabled=true string, the mechanism is enabled.

FAQ: Frequent Developer Questions

Can I turn off MIUI Optimization without ADB?
No, the standard interface doesn't have this option. The only way is to use ADB or Magisk modules (e.g. MIUI Optimizations Disabler).
Why did Telegram stop sending notifications after the MIPush shutdown?
Telegram on MIUI uses mipush to deliver notifications in power saving mode. Solution: either return mipush or turn off battery optimization for Telegram manually.
How to remove HyperOS completely and install a clean Android?
To do this, you need to: Unlock the bootloader through the Mi Unlock Tool. Install custom recovery (TWRP or OrangeFox). Sweep GSI- image (Generic System Image) with XDA. Warning: this voids the warranty and may lead to a brick device.
Why does the adb logcat lag or break?
Causes: Background activity mipush or msa (disable them as described above); Logcat restriction in MIUI (solved by adb shell setprop log.redaction false); Lack of memory (close all applications or use adb logcat --buffer-size=16M).
What settings should I return before selling the device?
Demand: Turn back MIUI Optimization. Remove all ADB- keys (adb shell pm clear com.android.shell). Reset the developer settings (Settings β†’ Additional β†’ Resets). Return the mipush and msa if you deleted. If you sell a device with an unlocked bootloader, fastboot oem lock, otherwise the new owner will not be able to update the firmware.