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 advertisement | Cause of the occurrence | Can I turn it off without a root right? |
|---|---|---|
| Notifications in the curtain | The service mipush and the application "Security" | Yeah, through the settings. |
| Banners in system applications | Built-in SDK advertising in APK- files | Partially (ADB required) |
| Advertising on the lock screen | Widget "Recommendations" in the lock settings | Yeah, through the settings. |
| Recommendations in search of MIUI | Service com.miui.search | No (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:
- Open Settings β Mi Account and log in (if not authorized).
- Go to Settings β Additional β Advertising Personalization.
- Turn off the "Personalized Recommendations" slider.
- Go back to Settings β Applications β Application Management.
- 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:
- Activate Developer Mode: Go to Settings β About Phone and click on MIUI Version 7 times.
- Return to Settings β Additional β For developers and enable βDebugging by USBβ.
- 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.analyticsAfter 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?
β οΈ 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:
- Unlock the bootloader through the official Xiaomi tool (requires a Mi Account with a phone number tied).
- Install TWRP Recovery for Mi 5 (the version must match the gemini model).
- Download and stitch through Magisk Recavers for root rights.
- Install a file manager with root support (such as Root Explorer).
- 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:
- Unlock the bootloader (as in method 3).
- Install TWRP Recovery for Mi 5 (version 3.5.2 or later).
- Download the firmware from the official website (e.g. xiaomi.eu for MIUI EU).
- Transfer the ZIP- firmware file to your phone.
- Download to TWRP, make Wipe β Advanced Wipe (mark Dalvik, Cache, System, Data).
- Fix the firmware through Install.
| Firmware | Pluses | Cons |
|---|---|---|
| MIUI EU | Keeps the corporate interface, no advertising, regular updates | Requires unlocking the bootloader, possible bugs |
| LineageOS | Clean Android, high performance, no advertising | No MIUI chips, there may be problems with the camera |
| Pixel Experience | Google Pixel interface optimized for Mi 5 | Fewer 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
- Go to β Wi-Fi (or "Mobile Network") settings.
- Click on your network β βChange the networkβ β βMoreβ.
- In the field "DNS 1" enter 176.103.130.130 (AdGuard DNS).
- In the DNS 2 field, enter 176.103.130.131.
- Save the settings and restart the phone.
Option 2: Editing the host file (requires root)
- Install the Hosts Editor app from Google Play.
- Open the file /system/etc/hosts.
- 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
- 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?
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:
- Repeat the steps from Method 1 (disable personalization).
- Execute ADB commands again (from Method 2).
- 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.