How to permanently remove ads in the Xiaomi gallery: a step-by-step guide

Advertising in the standard Xiaomi gallery has become one of the most annoying features of MIUI firmware for many users. Even after buying premium models like the Xiaomi 13 Ultra or Redmi Note 12 Pro+, owners encounter intrusive banners in an app that should just show photos. The problem is compounded by the fact that with each update MIUI 12β†’13β†’14, the ad blocks become more aggressive: they appear not only on the main screen of the gallery, but also when viewing albums, and sometimes even on top of the shots themselves.

In this article, we’ll look at all the current ways to remove ads, from official settings to radical methods using ADB and modified firmware. It’s important to understand that some methods may require unlocking the bootloader or root rights, which makes it impossible to guarantee. So we’ll start with the safest options and gradually move on to more complex ones.

Xiaomi has officially stated that advertising in branded applications (including a gallery, music player and browser) is part of a business model that keeps smartphone prices affordable. According to the company, up to 30% of profits come from targeted advertising in MIUI services.

  • πŸ“± Advertising appears even in premium models (e.g. Xiaomi) 12S Ultra or MIX Fold 3s that cost more than 1,000$.
  • πŸ”„ After the updates MIUI Advertising blocks are returned even if they have been disabled before.
  • πŸ“Š Data collection for targeted advertising occurs without the explicit consent of the user (unlike Google or Apple, where it is more strictly regulated).

Xiaomi is legally in compliance with the law: MIUI’s user agreement states that the company can display β€œpersonalized content,” but in the European Union and some Asian countries (e.g. India), Xiaomi has been forced to add a full-stop ad option following legal action.

⚠️ Note: Some of the methods in this article (e.g., disabling services through the ADB or installing modified firmware) may result in loss of warranty.Before making any changes, back up your data via Settings β†’ Xiaomi Cloud β†’ Backup.

Method 1: Disabling personalized advertising in MIUI settings

The easiest and safest method is to use built-in settings. MIUI. It won't remove the ads completely, but it will reduce the number of ads significantly. MIUI 12, 13 and 14:

  1. Open Settings β†’ Google β†’ Advertising.
  2. Click Reset Advertising ID and confirm the action.
  3. Go back to the basic settings and go to Settings β†’ Applications β†’ Application Management.
  4. Find the Gallery app, open its settings and turn off the permission to Show over other windows.
  5. Then go to Settings β†’ Accounts and Sync β†’ Mi Account β†’ Sync and disable Advertising and Recommendations.

This method works on 60-70% of devices, but it doesn't guarantee that ads will disappear completely. If banners keep popping up, move on to the next one.

Check the version of MIUI in Settings β†’ About the phone

Back up your photos (for example, in Google Photos)

Write down the username / password from the Mi Account (required for recovery)

Disable automatic gallery updates in the Play Store

-->

Method 2: Using ADB to Deeply Disable Advertising

If standard settings don’t work, you can use Android Debug Bridge (ADB), a debugging tool that allows you to disable system services, which does not require root rights, but requires connecting your smartphone to your computer.

Step-by-step:

  1. Download and install ADB Tools on your computer.
  2. On your smartphone, activate Developer Mode: go to Settings β†’ About Phone and 7 times click on the MIUI version.
  3. Return to Settings β†’ Additional β†’ For developers and enable USB debugging.
  4. Connect your phone to your PC, open the command prompt (Windows) or terminal (macOS/Linux) and type:
adb devices

(Your device name should appear. If not, install Xiaomi drivers.)

adb shell pm hide com.miui.gallery/ad/com.miui.gallery.ad.AdActivity
adb shell pm hide com.miui.systemAdSolution

These commands disable the main ad modules in the gallery, and after the device is rebooted, the ad should disappear. If not, try the additional commands:

adb shell settings put global hidden_api_policy 1
adb shell pm uninstall --user 0 com.miui.analytics

⚠️ Attention: After update MIUI And then you can re-enter the ad modules, and then you can re-enter the process, and some people also say that after you use them, you can re-enter the ad modules. ADB push notifications from system applications (e.g. Mi Home) stop working. To return them, follow the command: adb shell pm uninstall --user 0 com.xiaomi.mipush.sdk Method 3: Installation of an alternative gallery (no root) If fighting advertising in the standard Xiaomi gallery seems too difficult, it is easier to install a third-party app. Best options: App Pros Cons Link Google Photos No Ads, Cloud Storage (15GB Free), Auto Sort Requires Google Account, High Battery Consumption Play Store Simple Gallery Open Source, No Ads, Dark Theme Support No Cloud Sync, Simple Design Play Market A+ Gallery Minimalist interface, gesture support, no advertising (β‰ˆ300 rubles.), no Russian language Play Store To make an alternative gallery application by default: Install the selected application from the Play Store. Go to Settings β†’ Annexes β†’ Application management β†’ Gallery.Click Open by default and select a new gallery. πŸ’‘If the photos are not displayed after installing the alternative gallery, give the application access to the storage in Settings. β†’ Annexes β†’ Permits β†’ Memory. Method 4: Disabling advertising through modified firmware (for advanced) If you are willing to take radical measures, you can install custom firmware without advertising modules: πŸ”§ Xiaomi.eu – modified version MIUI Advertising-free, Russian-language and weekly updates, suitable for most models Xiaomi/Redmi/Poco. πŸ“± LineageOS β€” β€œclean” Android without branded services Xiaomi. requires manual installation of GApps (Google services). ⚑ Pixel Experience β€” Android One firmware with Google Pixel interface, completely removes all advertising modules MIUI. Step-by-step installation (on the example of Xiaomi.eu): Unlock the bootloader through the official Xiaomi tool (you will have to wait). 7-15 Download the firmware for your model from Xiaomi.eu. TWRP Recovery (instructions are available on the XDA Developers). Reboot to TWRP, Make a full backup (including the EFS Then, and then, you will be able to get the snag. ZIP-file. ⚠️ Attention: Installing custom firmware will void warranty and may result in a device blink (completely inoperable). XDA or 4PDA. Also note that after the firmware will not work: Official updates over the air (OTA). Some camera features (e.g. Pro Mode in Xiaomi 13 Pro), Mi Pay and Mi Cloud services (manual tuning required). What if the sensor doesn't work after the firmware is installed? If the touchscreen stopped working after installing the custom firmware, it was likely that a version incompatible with your hardware was stitched in.Try: 1. Return to stock firmware via Mi Flash Tool. 2. Install another version TWRP (For example, this build is suitable for the Redmi Note 10 Pro). 3. Check if Fastboot mode is enabled in the bootloader settings. 5: Another effective method is to edit the hosts file, which blocks access to Xiaomi ad servers. This does not require root rights, but you will need a computer. Instructions: Download the current hosts file (for example, from AdAway or Steven Black). Connect your smartphone to your PC and copy the file to your device memory. Install the Termux app from the Play Store. In Termux, run the commands: pkg update && pkg upgrade pkg install tsu termux-setup-storage tsu cp /sdcard/Download/hosts /system/etc/hosts chmod 644 /system/etc/hosts After the reboot, the ads in the gallery and other system applications should disappear. If not, check if the file has reset after the update. MIUI. Disconnection through settings MIUI|Use of the ADB|Installation of an alternative gallery|Custom firmware|I don't know, I need to think.--> What to do if the ad returns after the update MIUI? Many users are faced with the fact that after updating the firmware, the adverts in the gallery appear again, this is due to the fact that Xiaomi restores advertising modules through service packages (com.miui.systemAdSolution: πŸ›‘ Turn off automatic gallery updates in the Play Store (find the app, click on three dots) β†’ Turn off auto-update). πŸ”„ Freeze advertising services through ADB: adb shell pm disable-user --user 0 com.miui.systemAdSolution adb shell pm disable-user --user 0 com.xiaomi.midrop πŸ“΅ Use firewall applications like NetGuard to block the gallery from accessing the Internet. If you use custom firmware, check for updates regularly on the developer forum. For example, Xiaomi.eu releases patches for new versions. MIUI during 1-2 weeks after the official release. πŸ’‘The most reliable way to get rid of advertising forever is a combination ADB-commands and lock the hosts file, but after each major update MIUI repeat the procedure. FAQ: Frequent questions about advertising in the Xiaomi Gallery ❓ Why is Xiaomi advertising in Chinese even though the phone is bought in Russia? This is because your device is originally designed for the Chinese market (the so-called β€œglobal version” with firmware). CN). Even if you change the language of the system, the ad modules are loaded from Chinese servers. Solution: Check the firmware region in Settings β†’ The phone. β†’ Version. MIUI (must have RU or Global). If you should. CN, Refuse the device to the global version through the Mi Flash Tool. ❓ Can you remove ads in a gallery without a computer? Yes, but the choice of methods is limited: Use an alternative gallery (for example, Simple Gallery). 1). Install an ad blocker (e.g. Blokada), but it may conflict with system services. ADB editing hosts without PC is not possible. ❓ Will the way to work with ADB Xiaomi with a locked bootloader, ADB-The commands in this article do not require an unlocked bootloader, as they do not change system partitions, but only disable applications for the current user (--user 0). However: Some commands (e.g., pm hide) may not work on the MIUI 14 Because of the tightening of security, when you reset or update your firmware, it's gone. ❓ How do you get a standard gallery back if it stops working after the ad is turned off? ADB or hosts gallery paints or does not open, do: adb shell pm clear com.miui.gallery adb shell pm enable com.miui.gallery If it did not help, reinstall the application via APKMirror (download the version corresponding to your firmware). APK: APKMirror β†’ MIUI Gallery. ❓ Is it legal to use modified firmware to remove ads? Legally: βœ… Unlock the bootloader is allowed by Xiaomi (there is an official tool). ⚠️ Installation of custom firmware does not violate the law, but deprives of guarantees (under the terms of Xiaomi). ❌ Distribution of pirated versions MIUI (Remote License Checks are prohibited. In Russia and the EU, modification of firmware for personal use is not punishable by law, but can lead to problems with service centers.