How to permanently remove ads on Xiaomi Redmi 5: from simple settings to deep cleaning

Xiaomi Redmi 5 is one of the most popular budget smartphones, but its owners often face annoying advertising in MIUI. Advertising banners appear in the settings menu, on the lock screen, in system applications and even in notification panels. The reason lies in the policy of monetization of the brand shell: Xiaomi integrates advertising into the firmware to compensate for the low price of the device.

The good news is that most ads can be removed without root rights using hidden MIUI settings. Bad β€” some banners (for example, Security or Themes) require radical measures. In this article, we will analyze all the working methods: from official methods to modification of system files. Importantly, on Redmi 5 with MIUI 12+, some methods may not work due to the tightening of Xiaomi policy β€” for such cases there are workarounds.

1. disable personalized advertising in MIUI settings

The safest and fastest way is to deactivate targeted ads through the privacy menu, which won't remove all ads, but will reduce the number of ads by a few minutes. 40-60%. The instructions are relevant to MIUI 9–14:

  1. Open Settings β†’ Memory β†’ Clean (or Settings β†’ Applications β†’ Managing Applications in New Versions).
  2. Slap the icon. βš™οΈ In the upper right corner and select Advertising Preferences.
  3. Turn off the sliders: πŸ”Ή Personalized recommendations πŸ”Ή Showing interest-based advertising

Settings β†’ Google β†’ Advertising

Personalized advertising

This method works at the device ID level (GAID and MIUI ID), but does not block ads in system applications like Security or Weather.

πŸ’‘

After disabling advertising preferences, restart your smartphone – this will reset the cache of advertising services and accelerate the application of changes.

2. Manual disabling of advertising in system applications

MIUI is embedding advertising modules into standard tools: Security, Themes, Weather, Music, and even Calendar, to turn them off:

AnnexThe path to settingsWhat to turn off
SecuritySettings β†’ About the program β†’ Version (shap 5 times)There will be a hidden menu – turn off the recommendations
TopicsProfile β†’ Settings β†’ Advertising preferencesAll sliders in the Personalized Content section
Weather.Settings β†’ About the program β†’ Version (shap 7 times)Hidden Developer Mode – Turn off Show Ads
Music.Settings β†’ Additional β†’ AdvertisingItem Show banners on the main screen

⚠️ Attention: B MIUI 12+ The path to hidden settings in Security may be different. If after 5 taps, according to the version, nothing happens, try it:

  1. Install the App Cloner.
  2. Cloning the Security app.
  3. In the cloned version, tap on version 10 times – the Debug Settings menu will open.

How to set up:

  1. Go to Settings. β†’ Wi-Fi (or Mobile Network).
  2. Hold your finger on your network β†’ Change the network β†’ Additional β†’ IP settings.
  3. Select Static and type DNS 1 and DNS 2 (like AdGuard).
  4. Save and reconnect to the network.

To check your health, open your browser and go to the DNS Leak Test. If the results show your selected DNS, the filtering works.

What if the DNS does not block ads?
After the shift DNS The advertising is still there, the problem may be: 1. Cash. DNS β€” Clean it up through Settings. β†’ Annexes β†’ Application management β†’ Chrome/browser β†’ Clear the cache. 2. VPN-Overdefinition - turn off VPN, If it is active (some of the VPN ignore user-generated DNS). 3. Bypass IPv6 β€” in the network settings, turn off IPv6 (if available). 4. Local advertising modules – some of the advertising (for example, in Topics) is downloaded through system services, not the Internet. 4).

4. Removal of Advertising via ADB (without root but with PC)

If previous methods did not help, you can disable advertising packages through Android Debug Bridge (ADB). This does not require superuser rights, but a computer and USB-The method works on the cable. MIUI 9–14, but newer versions may need to be re-executed after updates.

Step-by-step:

  1. Turn on Debugging. USB on the phone: Settings β†’ The phone. β†’ Version. MIUI (Tap 7 times until the message "You became a developer" appears. β†’ Additionally. β†’ For developers β†’ Debugging by USB.
  2. Download ADB Tools on PC and unpack it into the C:\adb folder.
  3. Connect Redmi 5 to your PC, open the command line in the adb folder and execute: adb devices (a device with a serial number should appear).
  4. Enter the commands in turn: adb shell pm hide com.miui.systemAdSolution adb shell pm hide com.android.browser adb shell pm hide com.miui.weather2 adb shell settings put global captive_portal_detection_enabled 0

These teams:

  • πŸ”§ Disable the system advertising module com.miui.systemAdSolution.
  • 🌐 Blocking the standard browser MIUI (main source of banners).
  • ☁️ Remove ads in the weather widget.
  • πŸ“‘ Deactivate the portal check (elimines pop-ups when connecting to Wi-Fi).

Make sure that:

βœ… Debugging is on. USB

βœ… Installed drivers Xiaomi on PC

βœ… Phone unlocked (no screen locking)

βœ… Cable USB Supports data transfer (not just charging)

-->

⚠️ Attention: After update MIUI Some packets may be activated again. To avoid this, create a script with these commands and run it after each update. ADB β€” This can lead to bootloop (locked phone turn on).

5 Radical methods: root and modification of system files

If you are willing to take the risk, getting root rights and editing hosts or build.prop files will remove 100% of the ads, including hidden banners in the settings.

  • 🚨 Cancels the guarantee.
  • πŸ”“ Requires unlocking the bootloader (the official method from Xiaomi takes 7-30 days).
  • πŸ› οΈ It can cause unstable system operation in case of errors.

Method 1: Editing the hosts file

  1. Get root through Mi Unlock and install Magisk.
  2. Download Hosts Editor from Play Market.
  3. Add the following lines to /system/etc/hosts: 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 track.ad.xiaomi.com
  4. Save it, reboot the phone.

Method 2: Modification of build.prop

Open /system/build.prop file via Root Explorer and add at the end:

ro.miui.has_real_bl=1


ro.miui.sf.fake_touch=0




persist.sys.use_fifteen_qs=1

These lines disable firmware authentication and block some of the advertising triggers.

πŸ’‘

Root methods are guaranteed to remove all advertising, but require technical skills. If you are a beginner, use methods 1-4 or consult a specialist.

6.Alternative firmware: transition to custom MIUI or AOSP

If nothing has worked, the last option is to install custom firmware. Redmi 5 (codename rosy) is available:

FirmwareTypePlusesCons
Xiaomi.EUMIUI (modified)No ads, weekly updates, full localizationI need to unlock the bootloader, possible bugs
LineageOSAOSP (Pure Android)No advertising, high performance, long-term supportThere are no MIUI branded chips (for example, camera modes)
Havoc OSAOSP (castomizable)Maximum interface setting, no advertisingCan brake on the weak iron Redmi 5

How to determine:

  1. Unlock the bootloader through the Mi Unlock Tool.
  2. Install TWRP Recovery for rosy.
  3. Download the firmware (e.g. Xiaomi.EU) and transfer it to your phone.
  4. In TWRP, run Wipe β†’ Format Data, then Install and select the firmware file.

⚠️ Attention: Installing custom firmware erases all data from internal memory. Pre-backup through Settings β†’ Additionally. β†’ Titanium Backup (requires root).

FAQ: Frequent questions about removing ads on Redmi 5

Can I remove the ads on the lock screen?
Yes, but it requires a combination of methods: Turn off Advertising Notices in Settings β†’ Lock screen β†’ Install a third-party launcher (like Lawnchair) and turn off the system. If the adverts are left, use it. ADB-Adb shell settings put global lock_screen_show_notifications 0
Why did the MIUI update reappear?
Xiaomi returns ad modules when updating firmware to avoid this: πŸ“΅ Turn off automatic updates in Settings β†’ The phone. β†’ Updating the system β†’ βš™οΈ β†’ Auto-update. πŸ”„ After manual update, re-execute method 4 (ADB). πŸ›‘οΈ Install App Detector – It notifies you of new ad packages.
Is it safe to use root to remove ads?
Root gives full control of the system, but has risks: βœ… Removal of all advertising, including hidden advertising. βœ… The ability to fine-tune performance. Cons: ❌ Loss of warranty (if the bootloader is unlocked). ❌ Risk of β€œbricking” when errors in build.prop or hosts. ❌ Some banking applications (Sberbank, Tinkoff) stop working. Recommendation: if you are a beginner, use method 3 (DNS) method 4 (ADB) β€” They have an 80-90% effect without risk.
How to return the standard settings if after the changes the phone began to brake?
If you have edited the system files or ADB-Commands appeared lags: Reset settings through Settings β†’ Additionally. β†’ Recovery and discharge β†’ Reset settings (data will not be deleted). If it doesn't work, do hard reset: Turn off the phone. Press Volume up. + Power before the Mi logo appears. In the recovery menu, select Wipe Data β†’ Wipe All Data. When bootlooping, run your phone through the Mi Flash Tool (instructions here).
Is there a legal way to ask Xiaomi to remove ads?
Xiaomi does not officially provide the option of completely disabling advertising, but it is possible to: πŸ“§ Write in support through the official website (response through the 3–7 days). πŸ’³ Buy Redmi. 5 in regions where advertising is disabled by default (EU, India – firmware) EEA and IN). πŸ”„ Update to MIUI 13/14 β€” In newer versions, there are fewer ads, but they are in Topics and Security. Alternative: install a non-ad launcher (like Nova Launcher) and disable the system shell in Settings β†’ Home screen.