How to permanently remove advertising in the gallery Xiaomi: from system settings to ADB-team

Advertising in the standard Xiaomi gallery is one of the most annoying features of MIUI firmware. Even after buying a smartphone, users encounter intrusive banners in the app, where only personal photos should be available. The problem affects all the brand’s devices, from the budget Redmi Note 12 to the flagship Xiaomi 14 Ultra. In this article, we will analyze all the working methods of removing ads, from simple settings to technical solutions using ADB.

It's important to understand that MIUI integrates ad units at the system level, so standard ad-cutting in settings often works incompletely. Some ways require superuser rights or a computer connection, but the result is worth it: a clean gallery without the banners "Mi Video", "GetApps" and other services. If you're willing to spend 10-15 minutes, follow the instructions below - and the ads disappear forever.

The reason lies in Xiaomi's business model: the company monetizes its firmware through integrated advertising, even in Europe, where data protection regulations are stricter, banners in the gallery remain.

  • πŸ“± Gallery System App (com.miui.gallery) – shows banners at the bottom of the screen when viewing a photo.
  • 🎬 Mi Video service - embeds advertising in miniatures of video files.
  • πŸ›’ GetApps – Xiaomi app store that puts up banners β€œRecommended apps".
  • πŸ”„ Mi Cloud – sometimes adds promo banners when synchronized.

Fun fact: there's even more advertising on devices for the Chinese market, because there's different monetization rules, and in global versions of firmware, banners are less intrusive, but they're still there, and after MIUI updates, ads can come back, so it's important not only to remove them, but also to block the sources.

πŸ“Š How often do you see ads in the Xiaomi Gallery?
Always, every time you open.
Sometimes, once every few days.
There are no ads, but other banners in MIUI are hindering.
Didn't notice the commercials.

Method 1: Disabling Advertising in MIUI Settings (without root)

The easiest method is to use the built-in MIUI settings. It is suitable for most users and does not require technical skills, but does not work on all firmware versions (in MIUI 14 and later, some options can be hidden).

Instructions:

  1. Open Settings β†’ Password and Security β†’ Authorization and Locking.
  2. Find the option β€œPersonalized Ads” (or Personalized Ads in English) and turn it off.
  3. Return to the main settings menu and go to Settings β†’ Additional β†’ Special features.
  4. Activate the option β€œDelete Advertising in System Applications” (if available).
  5. Reboot your smartphone.

If these are not available, try an alternative route:

  • πŸ” Open the Settings. β†’ About the phone and tap 7 times according to the version MIUI, activate the developer mode.
  • πŸ”§ Back to Settings β†’ Additionally. β†’ For developers and find "Debugging by" USB" (Turn it on).
  • πŸ“± Now in the settings of the gallery (Open gallery) β†’ Three points. β†’ Settings) may appear hidden option "Advertising" - disable it.

β˜‘οΈ Preparing for the Advertising Disconnection

Done: 0 / 4

Method limitations: On some devices (e.g., POCO X5 Pro or Redmi K60), these settings may be missing or reset after the update.

Method 2: Using ADB to Deeply Disable Advertising

If the system settings don't work, it's time to connect to the computer. ADB (Android Debug Bridge allows you to disable advertising modules at the system level without obtaining root rights.

What you need:

  • πŸ–₯️ Computer with Windows/macOS/Linux.
  • πŸ”Œ USB-cable (preferably original).
  • πŸ“₯ Utility. ADB Tools (download and unpack in any folder).
  • πŸ“± Included debugging by USB on a smartphone (see previous section).

Step-by-step:

  1. Connect your smartphone to your computer and select File Transfer Mode (not Charge).
  2. Open the command prompt (Windows) or terminal (macOS/Linux) in the folder with ADB.
  3. Enter the command to check the connection: adb devices If the device is displayed – you can continue.
  4. Follow the commands one by one (after each press Enter): adb shell pm hide com.miui.systemAdSolution adb shell pm hide com.xiaomi.midrop adb shell pm hide com.miui.analytics adb shell settings put global hidden_api_policy 1
  5. Reboot your smartphone.

Important: After the MIUI update, the ads may return, in which case repeat the procedure or use the method with the blocking through hosts (see the next section).

What if the ADB can’t see the device?
1. Make sure that the debugging is enabled by USB (Settings β†’ 2. Install drivers for your Xiaomi model (you can download it on the official website). 3. Try another one. USB-4. enter adb kill-server in the command line, then adb start-server and reconnect.

Method 3: Blocking ads through hosts file (without root)

This method intercepts requests to Xiaomi’s ad servers at the network level, doesn’t require root rights, but requires a computer and a little patience, and is suitable for all models, including the POCO F5 and Redmi Note 13 Pro+.

Instructions:

  1. Download a modified hosts file for Xiaomi (e.g., from here).
  2. Connect your smartphone to your computer and copy the file to the root folder of internal memory.
  3. Install the Hosts Editor app from Google Play.
  4. Open the app, import the downloaded hosts file and apply the changes.
  5. Reset the device.

Alternative (via ADB):

adb shell "echo '127.0.0.1 ad.xiaomi.com' >> /system/etc/hosts"


adb shell "echo '127.0.0.1 sdkconfig.ad.xiaomi.com' >> /system/etc/hosts"




adb shell "echo '127.0.0.1 track.ad.xiaomi.com' >> /system/etc/hosts"

These commands will add entries to the system hosts, redirecting advertising requests to a non-existent address.

adb pull /system/etc/hosts hosts_backup.txt

If previous methods seem complicated, the easiest way out is to install a third-party gallery, which not only eliminates advertising, but also offers additional features: cloud backup, improved photo editor and no surveillance of your data.

The best alternatives to the standard Xiaomi gallery:

AnnexAdvantagesDeficienciesReference
Google PhotoFree cloud storage (15GB), automatic sorting, no advertisingRequires a Google account, free storage restrictionDownload
Simple GalleryOpen source, no advertising, support for dark themeFewer functions for photo editingDownload
A+ GalleryMinimalist design, gesture support, no surveillancePaid version for some functionsDownload
F-StopAdvanced tags and photo organization, support for RAWA complex interface for beginnersDownload

How to install and configure:

  1. Download the selected application from Google Play.
  2. Open it and give access to the storage.
  3. In the settings of the standard Xiaomi gallery, turn off auto-start (Settings β†’ Applications β†’ Gallery β†’ Auto-Start).
  4. Install the new gallery app by default (Settings β†’ Apps β†’ Default β†’ Gallery).

πŸ’‘

Third-party galleries not only remove ads, but also save battery life – the standard Xiaomi app often works in the background, consuming resources.

Method 5: Completely remove ads with Magisk (for advanced)

If you're ready to get root rights, this method is guaranteed to remove all ads in MIUI, including banners in the gallery, browser and even in the settings menu.

  • πŸ“± Unlocked bootloader (instructions from Xiaomi).
  • πŸ”§ Installed by Magisk (or other root manager).
  • βš™οΈ Disabler for Xiaomi or Xiaomi ADB Fastboot Tools.

Step-by-step:

  1. Unlock the bootloader via Mi Unlock Tool (can take up to 7 days to wait) SMS-code).
  2. Install Magisk through Custom Recovery (TWRP).
  3. In Magisk, install the Disabler for Xiaomi or Xiaomi Debloater module.
  4. Restart the device and check for no ads.

Advantages of the method:

  • βœ… Removes all ads in MIUI, not just in the gallery.
  • βœ… Blocks telemetry and analytics collection.
  • βœ… Allows you to remove unnecessary system applications (e.g. Mi Video, GetApps).

πŸ’‘

Before unlocking the bootloader, make a full data backup via Mi PC Suite or TWRP. The process will reset the device to factory settings!

⚠️ Note: Getting root rights voids Xiaomi warranty and may lead to update issues OTA. Also, some banking applications (like Sberbank Online) may stop working, and only use this method if you understand the risks.

What if the advertisements returned after the update?

MIUI is known for returning previously deleted ad units after updates, and to avoid this, follow these tips:

  • πŸ”„ Turn off automatic updates MIUI: Settings β†’ The phone. β†’ Updating the system β†’ Three points. β†’ Settings β†’ Deactivate "Car Update"
  • πŸ“₯ Install updates manually by pre-checking reviews on forums (for example, 4PDA).
  • πŸ”§ Repeat the ad blocking through ADB after each update.
  • πŸ›‘οΈ Use Magisk modules to permanently lock (e.g. Xiaomi Debloater).

If the advertisement appears again, check:

  1. Have you reset your hosts file (see Hosts Editor)?
  2. Have you been able to get back on the system services (com.miui.systemAdSolution)?
  3. Have you seen any new advertising modules (check out ADB: adb shell pm list packages | grep -i ad)?

⚠️ Note: On some devices (e.g. Xiaomi) 13T or Redmi K70) post-update MIUI 15 standard methods of blocking ads may stop working, in which case you only have to install an alternative gallery or roll back on the previous version of the firmware.

Can I remove ads in a gallery without a computer?
Yes, but not completely. You can: Turn off personalized ads in MIUI settings. Set up a third-party gallery (like Google Photos); use apps like Hosts Editor to block ad domains; however, you need ADB or root to completely remove ads at the system level.
Why did the ads come back after the reset?
Reset to factory settings restores all system files, including: hosts file (if you blocked ads through it). MIUI, Advertising-related system applications (com.miui.systemAdSolution, etc.) To avoid this, before reset: Save the modified hosts to your computer. Write down everything. ADB-The commands you used to lock you back up. TWRP (if there is root).
Is it safe to use ADB to remove ads?
Yes, as long as you follow the instructions and don't remove critical system components, the commands in this article only block ad modules and don't affect the core features. MIUI. Be careful, however: Do not delete packages that are not mentioned in the article. ADB-Before you experiment, do a backup of the data.
How to remove advertising in the gallery on POCO-telephones?
POCO devices (e.g., POCO X6 Pro or POCO F5) run on the same MIUI, so all the methods in the article apply. Features: There may be less advertising in the POCO Launcher firmware, but the gallery remains standard. POCO often has a default developer mode (don't need to tap on the MIUI version). POCO uses the same commands to block ads through ADB. If you have POCO with global firmware, there may be less advertising, but it will still be present in the gallery.
Can I return a standard gallery without advertising after installing an alternative?
Yes, but you need to: Remove the third-party gallery (if it was installed as a system application - you will need ADB: adb shell pm uninstall --user 0 com.google.android.apps.photos Return the standard gallery through settings: Settings β†’ Applications β†’ Default Gallery β†’ Select Gallery β†’ Re-block ads via ADB or hosts. If the standard gallery was disabled through Magisk, it must be activated again in the debloater module.