How to completely disable advertising on Xiaomi Mi 5: all ways from simple to radical

Xiaomi Mi 5 owners often face intrusive advertising in system applications, notifications and even on the lock screen.The manufacturer has integrated advertising modules into MIUI firmware for monetization, but users can legally or technically remove these elements. It is important to understand that some methods require deep changes in the system, which can affect the stability of the device.

This article covers all the current methods, from standard settings to modification of system files. We will analyze each option in detail, specify its pros/cons and give checklists for safe execution. Particular attention will be paid to the unique feature of the Mi 5: on this model, disabling advertising through ADB works unstable due to the specifics of the version of MIUI 8/9, which requires alternative solutions.

Why Xiaomi Mi 5 is getting ads and where it comes from

Advertising blocks in the Mi 5 are built into the MIUI firmware level and appear in several key locations:

  • πŸ“± System applications: "Security", "Themes", "Music", "Weather"
  • πŸ”” Push notifications: Advertising in the curtain and on the lock screen
  • πŸ” Search recommendations: when entering a query in system search
  • πŸ“Š Widgets: for example, in the widget "Calendar" or "News"

The advertising source is msa (Miui System Ads), which downloads content from Xiaomi servers, and on the Mi 5 (released in 2016), this mechanism works through:

  • πŸ“¦ Pre-installed applications with SDK advertising (e.g., com.miui.weather2)
  • πŸ”„ Updates MIUI: Advertising modules were added in later firmware versions
  • πŸ“‘ Google Services: If you use the GMS- firmware version

⚠️ Warning: On the Mi 5 with the MIUI Global Stable firmware, ads appear even when personalized recommendations are disabled, due to the tight binding of advertising identifiers to the Mi Account.

Type of advertisementCause of the occurrenceCan I turn it off without a root right?
Notifications in the curtainThe service mipush and the application "Security"Yeah, through the settings.
Banners in system applicationsBuilt-in SDK advertising in APK- filesPartially (ADB required)
Advertising on the lock screenWidget "Recommendations" in the lock settingsYeah, through the settings.
Recommendations in search of MIUIService com.miui.searchNo (root required)

Method 1: Disabling personalized advertising in MIUI settings

The most secure method that works on all versions of MIUI without risk to the system is suitable for removing the bulk of ads in notifications and some system applications.

Instructions:

  1. Open Settings β†’ Mi Account and log in (if not authorized).
  2. Go to Settings β†’ Additional β†’ Advertising Personalization.
  3. Turn off the "Personalized Recommendations" slider.
  4. Go back to Settings β†’ Applications β†’ Application Management.
  5. Find the β€œMsa” app (or com.xiaomi.msa.global), open its settings and click β€œDisable”.

This way will remove:

  • πŸ“’ Advertising push notifications from Xiaomi
  • πŸ” Recommendations in System Search (partially)
  • 🎨 Banners in the Topics app

⚠️ Warning: On Mi 5 with MIUI 8/9, some features of the Mi Account (e.g., synchronizing notes) may stop working after disabling msa, in which case, return the settings back and use alternative methods.

Backup of important data

Record the current settings of the Mi Account

Check out the MIUI version in About Phone

Disable automatic update of system applications-->

Method 2: Using ADB to Deeply Disable Advertising

The Android Debug Bridge (ADB) method allows you to disable advertising services at the system level without root rights. On the Mi 5, this method works unstable due to the features of the firmware, but can remove up to 70% of ad units.

Procedure:

  1. Activate Developer Mode: Go to Settings β†’ About Phone and click on MIUI Version 7 times.
  2. Return to Settings β†’ Additional β†’ For developers and enable β€œDebugging by USB”.
  3. Connect your phone to your PC, install ADB- Drivers and execute the commands:
adb shell pm hide com.miui.weather2


adb shell pm hide com.xiaomi.msa.global




adb shell pm hide com.miui.systemAdSolution




adb shell pm hide com.miui.analytics

After completing the commands, restart the device. The ads should disappear from:

  • 🌦️ Weather annexes
  • πŸ”’ Lock screen (widgets)
  • πŸ“Š System Notifications
What if the ADB doesn’t work on the Mi 5?
On the Mi 5 with MIUI 8/9, pm hide may not work due to shell limitations. Alternatively, use the adb shell pm disable-user --user 0 PAKET APPS command. For example: adb shell pm disable-user --user 0 com.xiaomi.msa.global After that, check the system functions β€” on some firmware this may cause errors in Google services.

⚠️ Warning: On the Mi 5 with MIUI Global 9.6 and below, disabling com.miui.analytics may cause theme store to malfunction. In this case, use only the first two commands from the list.

Just settings. MIUI|ADB-team|Root and modification of system files|I've tried nothing.|Another way.-->

Method 3: Removing ads through root rights (for power users)

If previous methods failed, the radical solution is to obtain root rights and manually remove ad modules, which is suitable for the Mi 5 with an unlocked bootloader and requires the installation of a custom recavator (for example, TWRP).

Step-by-step:

  1. Unlock the bootloader through the official Xiaomi tool (requires a Mi Account with a phone number tied).
  2. Install TWRP Recovery for Mi 5 (the version must match the gemini model).
  3. Download and stitch through Magisk Recavers for root rights.
  4. Install a file manager with root support (such as Root Explorer).
  5. Remove or freeze the following packages via Titanium Backup: com.xiaomi.msa.global (main advertising service), com.miui.systemAdSolution (advertising in system applications), com.miui.analytics (statistics collection) com.miui.hybrid (hybrid services with advertising)

Advantages of the method:

  • βœ… Removes 100% of ads (including hidden banners)
  • βœ… It works on all versions. MIUI
  • βœ… Allows you to block updates to ad modules

Risks:

  • ❌ Loss of warranty (if the device is warranty)
  • ❌ Possible malfunctions in system applications
  • ❌ Risk of "brika" in case of incorrect firmware

πŸ’‘

Before removing system packets through the root, back up the /system partition to TWRP. This will restore the phone to work if errors occur.

Method 4: Install custom firmware without advertising

The most reliable, but also the most time-consuming way is to run an alternative firmware version of the MIUI or AOSP- firmware (for example, LineageOS or Pixel Experience).

  • πŸ“± MIUI EU (European ad-free assembly)
  • πŸ€– LineageOS 16/17.1 (Pure Android)
  • πŸ“² Pixel Experience (Firmware with Pixel interface)
  • πŸ”§ Xiaomi.eu (modified MIUI)

Firmware instructions:

  1. Unlock the bootloader (as in method 3).
  2. Install TWRP Recovery for Mi 5 (version 3.5.2 or later).
  3. Download the firmware from the official website (e.g. xiaomi.eu for MIUI EU).
  4. Transfer the ZIP- firmware file to your phone.
  5. Download to TWRP, make Wipe β†’ Advanced Wipe (mark Dalvik, Cache, System, Data).
  6. Fix the firmware through Install.
FirmwarePlusesCons
MIUI EUKeeps the corporate interface, no advertising, regular updatesRequires unlocking the bootloader, possible bugs
LineageOSClean Android, high performance, no advertisingNo MIUI chips, there may be problems with the camera
Pixel ExperienceGoogle Pixel interface optimized for Mi 5Fewer updates, possible sensor bugs

⚠️ Warning: The Mi 5 with LineageOS 16+ firmware may not be running at full capacity (due to lack of Sony drivers IMX298).

πŸ’‘

The firmware custom MIUI EU is the best option for the Mi 5: retains all the functions of the phone, removes advertising and adds useful features (for example, advanced camera settings).

Method 5: Blocking Advertising via DNS and Host File

An alternative method without root rights is to block Xiaomi ad servers at the network level, which will not remove ads completely, but will reduce the number of ads by 40-50%, works on any version of MIUI, including the Mi 5.

Option 1: Modification of the DNS

  1. Go to β†’ Wi-Fi (or "Mobile Network") settings.
  2. Click on your network β†’ β€œChange the network” β†’ β€œMore”.
  3. In the field "DNS 1" enter 176.103.130.130 (AdGuard DNS).
  4. In the DNS 2 field, enter 176.103.130.131.
  5. Save the settings and restart the phone.

Option 2: Editing the host file (requires root)

  1. Install the Hosts Editor app from Google Play.
  2. Open the file /system/etc/hosts.
  3. Add the following lines to the end of the file: 127.0.0.1 ad.mi.com 127.0.0.1 globalapi.ad.xiaomi.com 127.0.0.1 sdkconfig.ad.xiaomi.com 127.0.0.1 tracking.miui.com
  4. Save the changes and restart the device.

This method blocks:

  • πŸ“Ά Advertising banners in the browser and some applications
  • πŸ“± Push notifications from Xiaomi servers
  • πŸ”„ Updates to Advertising Modules
How to check if DNS- is blocked?
Open your browser and go to AdGuard DNS Test. If the lock works, you'll see a green tick opposite "Ad Blocking."

What to do if the ad returns after the MIUI update

After the firmware update on the Mi 5, the ad modules may reappear, as Xiaomi restores the standard settings of system applications to prevent the ad from returning:

  • πŸ”„ Turn off automatic update MIUI: go to Settings β†’ About Phone β†’ System Update and turn off the option.
  • πŸ“¦ Freeze system applications via Titanium Backup or App Quarantine (requires root).
  • πŸ›‘οΈ Use Magisk modules to block ads (e.g., Xiaomi Debloater).
  • πŸ”§ Install a patch to disable the msa service via Magisk (module Disable_Miui_Ads).

If the advert returns after the update:

  1. Repeat the steps from Method 1 (disable personalization).
  2. Execute ADB commands again (from Method 2).
  3. If you use root, check the integrity of the modified system files.

⚠️ Warning: The Mi 5 with MIUI 10+ firmware may reset root rights status after the upgrade, in which case you need to flash Magisk again through TWRP.

FAQ: Frequent questions about disabling ads on Xiaomi Mi 5

❓ Can I turn off ads on Mi 5 without root rights and ADB?
Yes, but only partially. MIUI (Ad Personalization) removes ~30% of ads (notifications and banners in some apps) and you can't completely remove ads without technical manipulation, it's a firmware restriction.
❓ Why did the themes and wallpaper stop working after the msa shutdown?
On Mi 5, the service com.xiaomi.msa.global is linked to the theme store. If the wallpaper is gone after the shutdown, return the settings back and use alternative methods (for example, blocking through DNS or a host file).
❓ How to return ads if system functions stop working after the shutdown?
If you have disabled advertising services through ADB or root and there are failures, follow the commands: adb shell pm enable com.xiaomi.msa.global adb shell pm enable com.miui.systemAdSolution For root users: restore deleted packets from a backup to TWRP or reflash the system.
❓ Which firmware is better for Mi 5 β€” MIUI EU or LineageOS?
Depending on the purpose: MIUI EU – if you want to keep the brand interface and all the camera features. LineageOS – if you want maximum performance and clean Android (but there are possible problems with the camera). On the Mi 5, you better test the MIUI EU 10/11 – it is optimized for this model.
❓Legal How to legally remove ads without violating Xiaomi rules?
Xiaomi officially allows you to disable personalized advertising through settings (Settings β†’ Ad Personalization). All other methods (ADB, root, custom firmware) violate the user agreement and can lead to a loss of warranty. The legal way is to buy a device in a region where the ads are disabled by default (for example, MIUI for the EU).