How to completely remove advertising on Xiaomi, if the phone is blocked: from system settings to ADB-team

Xiaomi, Redmi and Poco smartphone owners regularly encounter one of the most annoying features of MIUI firmware β€” intrusive ads that appear even on a locked screen. The problem is compounded by the fact that standard ways to turn it off (via Mi Account settings) often don’t work due to regional restrictions or device locks. In this article, we’ll look at 5 proven methods to help remove ads on any Xiaomi device β€” from the budget Redmi Note 12 to the flagship Mi 14 Ultra β€” even if the phone is locked with a password, pattern lock or account.

It’s important to understand that MIUI ads are built into system applications (com.miui.systemAdSolution, com.xiaomi.midrop) and services (msa, analytics). Simply disabling Personalized Recommendations in settings often fails β€” banner ads continue to appear in Security, Weather, Themes, and even on the lock screen. Below you’ll find solutions of varying degrees of complexity, from basic settings to manually editing configuration files via ADB.

1. Disable advertising through hidden MIUI settings (no root)

The first method is suitable for devices that have access to the main settings menu, but the standard options to disable advertising do not work. In MIUI 14/15 (current for models 2023-2026), some ad modules can be deactivated through hidden settings:

  1. Go to Settings β†’ About Phone and 7 times click on the MIUI version to activate Developer Mode.
  2. Go back to the main settings menu and open a new section for developers.
  3. Find the USB Debugging option and turn it on. Confirm permission if you request it.
  4. Connect your phone to your PC and execute the command in ADB (instructions below in Section 3).

If you don’t have access to settings because of locking, skip this step and go to the method from Fastboot or Recovery.

List of apps that most often show ads on a locked screen:

  • πŸ“± Launcher (com.miui.home) - banners at the bottom of the screen.
  • πŸ”’ Lock screen (com.android.keyguard) – Advertising when unlocking.
  • 🌦️ Weather (com.miui.weather2) β€” banner-widget.
  • πŸ›‘οΈ Security (com.miui.securitycenter) – Advertising in notices.
πŸ“Š Which advertisements annoy you the most?
On the lock screen
System applications (Weather, Themes)
Notifications.
During the calls
other

2. Reset advertising ID through Engineering Mode (for advanced users)

One little-known way to reduce the amount of ads displayed is to reset the Advertising ID that Xiaomi uses to target banners, a method that does not require root rights, but requires the input of an engineering code:

  1. Open the Phone app and type the combination: ##6484## (or #64663## for new models).
  2. In the menu that appears, select Advertising ID (or Advertising ID).
  3. Press Reset Advertising ID and confirm the action.
  4. Reboot the device – this will lead to resetting targeted ads.

Limitation: It doesn't remove ads completely, it just resets personalized settings, and in 1-2 weeks, banners can reappear again, but in smaller numbers.

What to do if the engineering menu is not opened?
On some models (e.g. Poco) F5 or Redmi K60) In this case, try an alternative way: install the application. MTK Engineering Mode from Google Play (only for MediaTek-based devices) or use ADB-Command: Adb shell am start -n com.miui.engineermode/.EngineerMode

⚠️ Warning: Do not change other options in the engineering menu unless you are sure of their purpose. Incorrect settings can lead to network loss or sensor failure.

3. Removal of ads via ADB (without unlocking the bootloader)

If your phone is locked, but you have access to debugging USB (For example, through Fastboot or Recovery mode, you can remove advertising packages using the ADB-This method works on all Xiaomi devices with MIUI 12–15, including 2026 models (Redmi Note 13 Pro)+, Poco X6 Pro and others.).

Step-by-step:

  1. Install ADB and Fastboot Tools on PC.
  2. Connect your phone to your computer and confirm debugging permission (if the screen is unlocked). If the device is locked, turn it into Fastboot mode (press Power + Vol Down).
  3. Open the command line (Windows) or terminal (macOS/Linux) and type:
adb devices

(Your device should appear on the list.)

adb shell pm uninstall --user 0 com.miui.systemAdSolution


adb shell pm uninstall --user 0 com.xiaomi.midrop




adb shell pm uninstall --user 0 com.miui.analytics




adb shell pm disable-user --user 0 com.miui.bugreport




adb shell pm disable-user --user 0 com.miui.hybrid

These commands remove the main MIUI ad modules. If you want to return them back, replace uninstall with install-existing.

Install Xiaomi drivers on PC|

Enable debugging over USB in the developer settings |

Connect the phone with the original cable |

Check the visibility of the device by the team `adb devices`|-->

For locked-screen devices: If USB debugging was enabled before locking, you can try to execute blind-mode commands. More on this in the next section.

4. editing the hosts file to block ad servers

If previous methods failed, you can block Xiaomi’s ad servers at the system level by editing the hosts file.This requires root rights or access to Recovery with ADB Sideload support.

List of servers that need to be blocked:

domainAppointmentNote
sdkconfig.ad.xiaomi.comThe main server of targeted advertisingBlocks banners in system applications
tracker.ai.xiaomi.comCollecting user analyticsReduces the number of personalized ads
ad.mi.comDisplaying ads in MIUIResponsible for banners on the lock screen
data.mistat.xiaomi.comUsage statisticsIt does not directly affect advertising, but reduces targeting.

How to edit hosts:

  1. Download a modified hosts file (for example, from here) or create your own.
  2. Connect your phone to your PC and do:
adb push hosts /sdcard/


adb shell su -c "mount -o rw,remount /system"




adb shell su -c "cp /sdcard/hosts /system/etc/hosts"




adb shell su -c "chmod 644 /system/etc/hosts"

⚠️ Attention: Incorrect editing of the hosts file can lead to loss of Internet access.Before making changes, make a backup of the original file with the command: adb pull /system/etc/hosts hosts_backup

5. Complete removal MIUI-service TWRP (loader)

If your Xiaomi device has an unlocked bootloader and custom Recovery (TWRP) installed, you can remove ad modules at the system file level, a method that offers a 100% guarantee of removing ads, but requires technical skills.

Step-by-step:

  1. Download. TWRP For your model (for example, for Redmi Note) 12 Pro. twrp-3.7.0_12-vayu.img).
  2. Download to TWRP (press Power + Vol Up when you turn on).
  3. Connect your phone to your PC and do:
adb shell


mount /system




rm -rf /system/priv-app/SystemAdSolution




rm -rf /system/app/Analytics




rm -rf /system/app/MiDrop




rm -rf /system/app/HybridPlatform




rm -rf /system/app/MiuiDaemon

After removal:

  • πŸ”„ Reset the device.
  • πŸ“± Check the absence of advertising in Settings β†’ Applications (SystemAdSolution and Analytics must disappear).
  • πŸ”’ If the screen is locked, reset the pattern lock through TWRP β†’ Advanced β†’ File Manager (delete the file) /data/system/gesture.key).

πŸ’‘

If after removing system applications, the phone stopped booting, restore them through a backup in the TWRP or re-follow MIUI via Fastboot with option clean_all.

6.Alternative firmware: switching to AOSP or LineageOS

If none of the above methods worked, the radical solution is to install custom firmware based on AOSP (for example, LineageOS, Pixel Experience or ArrowOS), these firmware are completely devoid of advertising and pre-installed Xiaomi services, but have their own nuances:

Pros:

  • βœ… Total lack of advertising and surveillance.
  • βœ… It’s a smoother experience (especially on older models like the Redmi Note 9 Pro).
  • βœ… Regular security updates.

Cons:

  • ❌ Loss of function MIUI (Second Space, Game Turbo, and the Game Turbo).
  • ❌ Possible bugs with camera or sensors (on some models).
  • ❌ Requires an unlocked bootloader and experience with Fastboot.

How to install custom firmware:

  1. Unlock the bootloader via the Mi Unlock Tool (can take up to 7 days to wait).
  2. Install TWRP for your model.
  3. Download firmware (for example, LineageOS from lineageos.org).
  4. Fly through TWRP with full Wipe (Wipe β†’ Format Data).

πŸ’‘

Installing custom firmware will void Xiaomi's warranty. Before the procedure, save all data, as it will be erased.

FAQ: Frequent questions about removing ads on Xiaomi

Can you remove ads on Xiaomi without root and ADB?
Yes, but not completely.In the settings of the Mi Account β†’ Personalized recommendations can be turned off some of the ads, but banners on the lock screen and in system applications (Weather, Topics) will remain. ADB.
Why does the advertising ID return after resetting?
Xiaomi uses multiple ad display mechanisms, including server settings. even after an Advertising reset ID The system can restore targeting in 1-2 weeks. For a permanent effect, you need to combine methods (for example, ADB + editing).
Will the ADB work if the phone is locked?
Yes, but only if the USB debugging was enabled before locking, in which case you can connect the device to the PC and execute commands in blind mode, if the debugging was not activated, you will need to unlock through Fastboot or Recovery.
Which Xiaomi models are the hardest to clean from advertising?
The most problematic devices are the Poco M5s, Redmi 10A and other budget models on MIUI Global Stable, which often lock engineering codes and contain the maximum number of advertising modules, and for such devices, it is recommended to immediately switch to the method with ADB or TWRP.
Can I return standard applications after they are removed through ADB?
Yes, you can do that by following the command: adb shell cmd package install-existing com.miui.systemAdSolution, but the adverts will come back. MIUI via Fastboot with option clean_all.