How to permanently remove ads from the Xiaomi gallery: from blackout to deep cleaning

Advertising in the standard Xiaomi gallery is one of the most annoying features of MIUI firmware. Even after buying a premium smartphone Redmi, POCO or Mi, users encounter intrusive banners in the app, where personal photos are stored. The manufacturer has integrated advertising modules so deeply that simply disconnecting through settings often does not help. In this article, we will analyze all the working methods from basic to advanced, including methods for devices with an unlocked bootloader.

It's important to understand that Xiaomi's advertising is not accidental. It monetizes its firmware through partner integrations, and in some regions (like India or China), banners can be more aggressive. But even in the global versions of MIUI 12/13/14, the ads are still there. We tested all the methods on current models, from the Redmi Note 12 to the Xiaomi 13 Ultra, so you can choose the best option without risking damage to the system.

The Gallery app in MIUI uses two types of advertising:

  • πŸ“Œ Contextual banners – appear when viewing a photo or video (for example, offers of cloud storage Mi Cloud).
  • πŸ“Œ Recommended Cards – Displayed in the β€œFor You” or β€œRecommended” section (often masquerading as β€œhelpful tipsΒ»).
  • πŸ“Œ Pop-ups are rare, but may appear when you open an application (usually in regional firmware).

Technically, the ads are embedded in the system application com.miui.gallery, which in older versions of MIUI (up to 12.5) could be disabled through hidden settings of the developer, but now the manufacturer blocked this method.

⚠️ Note: Some methods require disabling system applications or superuser rights.This can lead to unstable smartphone operation or loss of warranty. β†’ The phone. β†’ Backup.

The most reliable way is to install an alternative gallery (like Google Photos or Simple Gallery), but it is not suitable for users who want to use a standard application.

πŸ“Š What gallery do you use on Xiaomi?
Standard MIUI
Google Photo
Simple Gallery
Another.
I don't know.

Method 1: Disabling personalized advertising in MIUI settings

This is the safest method, but it doesn’t work on all firmware: personalized advertising in MIUI is based on collecting data about your actions, and turning it off can reduce the number of banners (but not completely remove them).

Instructions:

  1. Open Settings β†’ Google β†’ Advertising.
  2. Click Disable Personalized Ads and Confirm the Action.
  3. Go back to the basic settings and go to Settings β†’ Applications β†’ Application Management.
  4. Find the Gallery, open its settings and turn off the permission to Show over other windows.

After these actions, the gallery ads should decrease, but banners from Mi Cloud or Recommended can remain. If the method does not work, move on to the next method.

πŸ’‘

To check if the personalized ad shutdown is working, restart your smartphone and open the gallery in 10-15 minutes.

Sometimes ads are created because of app failures or accumulated cache.Cleaning up gallery data can temporarily remove banners, but they will return after an app update.However, this method is worth trying before drastic measures.

Step-by-step:

β˜‘οΈ Cleaning up Xiaomi Gallery

Done: 0 / 5

If the ad disappears after cleaning, but returns after a few days, it is downloaded from Xiaomi servers when you update the application, in which case only blocking updates or removing system components (see methods 4 and 5) will help.

⚠️ Warning: Cleaning up gallery data will delete all albums and sorting settings, but will not affect the photos and videos themselves (they are stored in a folder). DCIM). However, if you have used the Hidden Albums feature, their content will become visible.

Method 3: Using ADB to disable advertising modules

If previous methods have failed, you can use ADB (Android Debug Bridge) debugging, which does not require root rights, but will result in some system functions being disabled. On models with MIUI 14 and later, this method may not work due to changes in Xiaomi’s security policy.

What you need:

  • πŸ–₯️ Computer with installed Xiaomi drivers and tool ADB.
  • πŸ“± Included debugging by USB on a smartphone (Settings) β†’ The phone. β†’ Version. MIUI β€” Press 7 times, then return to Settings β†’ Additionally. β†’ For developers β†’ Debugging by USB).
  • πŸ”Œ Cable USB (preferably original).

The following are the commands for entering ADB Shell:

adb shell pm hide com.miui.systemAdSolution


adb shell pm hide com.xiaomi.midrop




adb shell pm hide com.miui.analytics

These commands are off:

  • πŸ›‘ The main advertising module MIUI.
  • πŸ›‘ Mi Drop (often displays ads when transferring files).
  • πŸ›‘ Analytics system that collects data for targeted advertising.

After completing the commands, restart your smartphone. If the adverts in the gallery have disappeared, but errors have appeared in other applications (for example, the themes have stopped working), return the changes with the command:

adb shell pm unhide com.miui.systemAdSolution
What if the ADB does not recognize the device?
Make sure USB debugging is enabled and drivers are installed. On Windows, try installing the driver via the Mi Flash Tool. On macOS/Linux, you may need to add the udev rule for Xiaomi devices.

If you don't really want to use the standard Xiaomi gallery, the easiest way to get rid of ads is to install a third-party app. We tested a few options and picked the best ones:

AnnexPlusesConsAdvertising
Google PhotosAutomatic backup, facial recognition, cloud storageRequires a Google account, free storage limit (15GB)No.
Simple GalleryEasy, no ads, support for hidden folders, open sourceFewer features than Google PhotosNo (in Pro version)
A+ GalleryMinimalist design, themes support, fast workRare bugs with some formatsNo.
QuickPicFast browsing, GIF support, cloud servicesNot updated since 2018No.

To make an alternative gallery the default app:

  1. Install the selected application from Google Play.
  2. Open any photo through the file manager.
  3. In the window that appears, select the desired gallery and click Always.
  4. Disable notifications from the standard gallery in Settings β†’ Apps β†’ Gallery β†’ Notifications.

If you’re worried about privacy, Simple Gallery is the best choice: it doesn’t require internet access or collect data. Google Photos is the best option for automatic backups, but keep in mind that high-resolution photos take up space in the cloud.

πŸ’‘

Installing an alternative gallery is the only way to remove ads forever without risking the system, but the standard MIUI gallery will still be updated and can display banners again when opened accidentally.

Method 5: Radical methods (for advanced users)

If you are willing to go to extreme lengths, you can remove the system components responsible for advertising, which requires an unlocked bootloader and root rights (or use Magisk), on devices with MIUI 14 and later, these methods can lead to the blocking of certain features, such as contactless payments.

Options:

  • πŸ”§ Remove from Magisk: Install the module Disable_MIUI_Ads Or Xiaomi Debloater from Magisk repository, which automatically blocks ad services.
  • πŸ”§ Manual removal of system APK: with the help of Root Explorer or ADB delete files: /system/priv-app/SystemAdSolution /system/priv-app/AnalyticsCore
  • πŸ”§ Replacement of gallery with custom gallery: Install a modified version of gallery without advertising (for example, MIUI Gallery Mod from Telegram Developers Channels).

Warnings:

  • ⚠️ After removal of the system APK Mi Account, themes and other Xiaomi services may stop working.
  • ⚠️ In some models (for example, POCO F5 Xiaomi 13T) This may cause an error com.android.systemui.
  • ⚠️ Before removing, make a backup section /system through TWRP.

If you are not sure about your skills, it is better to focus on method 4 (alternative gallery) or method 3 (ADB).

More tips: how to reduce the amount of advertising in MIUI

Even if you remove the ad from the gallery, it can appear elsewhere, in Settings, Browser or Music, and to minimize its impact, follow these tips:

  • πŸ“΅ Turn off Mi Cloud: Go to Settings β†’ Accounts. β†’ Mi Cloud and disable photo syncing, which will reduce the number of banners with cloud storage offers.
  • πŸ“΅ Block Advertising Domains: In File /etc/hosts (root required) add lines: 127.0.0.1 ad.mi.com 127.0.0.1 tracking.miui.com
  • πŸ“΅ Update the firmware to the European version: In firmware MIUI EU (Xiaomi.eu has no advertising at all, but they require an unlocked bootloader.
  • πŸ“΅ Use it. DNS-Filtering: Set in Wi-Fi or mobile network settings DNS-server 1.1.1.3 (Cloudflare Family) or 94.140.14.14 (AdGuard) DNS).

Also, check app permissions regularly. For example, GetApps (Xiaomi app store) often requests storage access and displays ads based on your files. Turn off unnecessary permissions in Settings β†’ Apps β†’ GetApps β†’ Permissions.

Can I remove ads without root and ADB?
Yes, but not completely. The most effective methods without root: Turning off personalized ads in settings (mode 1). Clearing gallery cache (mode 2); Installing an alternative gallery (mode 4). However, banners from Mi Cloud can remain. To completely remove you need superuser rights.
Why did the MIUI update come back?
When you update your firmware, system applications (including Gallery) return to standard. To avoid this: Turn off automatic app updates in Google Play for Gallery. Use Magisk to block system updates APK (App Systemizer module. Install an alternative gallery and make it the default app.
Is it safe to remove system APKs through root?
Deleting system files is always risky. The consequences can be different: 🟒 Secure: Uninstall SystemAdSolution or AnalyticsCore (usually does not break the system). 🟑 Dangerous: Removing MiuiSystemUI or Framework (may result in bootloop). πŸ”΄ Critical: Remove MiuiHome (slider disappears, phone becomes unusable).Before deleting always make a backup through TWRP Check the reviews about a specific APK in forums (for example, 4PDA or XDA-Developers).
Is there an official way to turn off ads in Xiaomi?
No. Xiaomi does not provide an official way to disable ads in system applications, as this is one of the company’s sources of revenue.The only β€œlegal” option is to buy a device with MIUI EU firmware (without advertising), but it requires manual installation and an unlocked bootloader. In some regions (for example, in Europe), advertising is less due to local data protection laws, but it does not disappear completely.
How to return a standard gallery if it stopped working after the changes?
If the gallery is dyeing or not opening after manipulation: Reinstall the app via ADB: adb shell cmd package install-existing com.miui.gallery Reset the app settings to Settings β†’ Apps β†’ Gallery β†’ Reset. If the gallery is removed, download the original APK from the APKMirror site (select the version for your model and firmware). At the very least, reset the phone (Settings β†’ Additional Setting Resets β†’ β†’ β†’ β†’