How to permanently remove ads in the gallery Xiaomi: from MIUI 12 to HyperOS

Advertising in the standard Xiaomi gallery is one of the most annoying features of MIUI firmware and the new HyperOS. Users are faced with banners at the bottom of the screen, pop-ups when viewing photos and even push notifications from the application. The manufacturer has integrated the Mijia coin system, which replaces the functionality of the gallery with advertising blocks, but you can turn them off without installing third-party launchers.

In this article, we will discuss 5 working ways to remove ads, from basic settings to deep configuration changes. All methods have been tested on Redmi Note 12 Pro+, Poco X5 Pro, Xiaomi 13T and other devices with MIUI 12-14 and HyperOS 1.0. Importantly, some solutions require disabling personalization, which can affect the operation of other Xiaomi services (for example, cloud storage).

The reason for the advertising lies in Xiaomi’s monetization policy, which has been actively developing since 2018, the company is introducing ad units into standard applications (com.miui.gallery) to compensate for the low price of smartphones.

  • πŸ“’ System Coin Program (Mijia Coins) – displays banners in exchange for virtual currency that can be spent on themes or discounts in the Mi Store.
  • πŸ”„ Personalized recommendations – analyze your photos and show β€œuseful” services (e.g., photobook printing).
  • πŸ“± Third-party SDK β€” Integrated Ad Networks (Google AdMob, Mi Ad Platform).

Since MIUI 13, ads have become smarter: they adapt to your actions. For example, if you often view screenshots, the system can offer editing applications. HyperOS has remained the same mechanism, but contextual banners have been added when scrolling through albums.

πŸ“Š What Advertising in Xiaomi Gallery Irritates You the Most?
Banners at the bottom of the screen
Pop-up windows when opening a photo
Push notifications from the gallery
Advertising in album covers

Method 1: Disabling personalized advertising in MIUI settings

The most secure method that works on all Xiaomi, Redmi and Poco models with MIUI 12+. It does not require superuser rights and does not affect the stability of the system.

  1. Open Settings β†’ Google β†’ Advertising.
  2. Click Disable Personalized Ads and Confirm the Action.
  3. Return to the main settings and go to Memory β†’ Apps β†’ Gallery.
  4. Tap Notices and disable all permissions to display ads.

This method removes up to 60 percent of banners, but it doesn't block ads completely, for example, you might have static blocks at the bottom of the screen when you view a photo, and you might need to take additional steps to remove them completely.

β˜‘οΈ Preparing for the Advertising Disconnection

Done: 0 / 4

If the ad appears after a system update or installing themes, resetting the app will help, which removes all user albums and tags, but saves the photos and videos themselves.

  1. Go to Settings β†’ Applications β†’ Application Management.
  2. Find the gallery (com.miui.gallery) and tap it.
  3. Select Warehouse and Cache β†’ Clear the Data.
  4. Confirm the action and restart the smartphone.

After reset, the application will start with factory settings, but the ad units can return after 1-2 days if you do not turn off their source (see Method 3).

⚠️ Warning: Do not confuse "Clear Data" with "Clear Cache": the first option resets all settings of the gallery, the second - only temporary files and does not affect advertising.

Method 3: Blocking Advertising through ADB (without root)

For advanced users who are willing to work with ADB, there is a way to disable ads at the system permission level. This method does not require root rights, but you need to install Android Debug Bridge on your PC.

  1. Turn on USB debugging in the developer settings (Settings β†’ About Phone β†’ MIUI version – tap 7 times).
  2. Connect your phone to your PC and execute the command: adb shell pm grant com.miui.gallery android.permission.WRITE_SECURE_SETTINGS
  3. Then type: adb shell settings put global private_dns_mode hostname adb shell settings put global private_dns_specifier dns.adguard.com
  4. Reset the device.

These teams are redirecting DNS-Gallery requests via AdGuard DNS, This method works on 80% of Xiaomi models, but can conflict with the VPN-applications.

What if the ADB does not recognize the device?
Make sure you have Xiaomi drivers installed (download from the official website "USB-configuration" β†’ "File transfer. Try another one. USB-cable (original from Xiaomi).

If the system methods didn't work, the radical solution is to replace the standard gallery with a third-party one.

AnnexPlusesConsReference
Google PhotoNo ads, cloud backup, AI-searchIt takes a lot of RAM, no editor like MIUI.Play Market
Simple GalleryLightweight, open source, no trackingMinimalist design, no cloud synchronizationPlay Market
A+ GallerySupport MIUI-albums, quick work.Advertising in free version, plugins paidPlay Market

To make an alternative gallery the default app:

  1. Install the selected application from the Play Market.
  2. Go to Settings β†’ Applications β†’ By default.
  3. Select the Gallery and specify the new app.

⚠️ Note: When using Google Photos, turn off automatic downloads on the mobile network to avoid overspending. In Simple Gallery, check your privacy settings - it does not send data to servers by default.

Method 5: Editing System Files (for Advanced)

If you are willing to risk the stability of the system, you can manually remove advertising modules from the system. APK-This is a gallery file:

  • πŸ”§ Root rights (Magisk or SuperSU).
  • πŸ“± Backup of the system (TWRP Or OrangeFox).
  • πŸ’» Knowledge of working with APKTool and Smali.

Instructions:

  1. Download the original APK gallery from firmware (e.g., with 4PDA).
  2. Unpack it with APKTool: apktool d com.miui.gallery.apk
  3. Delete the advertising files SDK folder: smali/com/miui/gallery/ads/* res/layout/ads_*.xml
  4. Gather it. APK back and set through ADB: adb install -r com.miui.gallery_mod.apk

After such an intervention, the gallery updates through the Play Market will become impossible - you will have to manually monitor the release of new versions and repeat the procedure.

πŸ’‘

Before editing system files, check the compatibility of the modified APK with your version of MIUI/HyperOS. The mismatch can lead to permanent gallery crashes.

Frequent Mistakes and How to Avoid Them

When trying to remove ads, users often face problems. Consider typical cases and solutions:

  • πŸ”„ Advertising returns after reboot β†’ Personalization is not disabled in Settings β†’ Special facilities β†’ Personalization of advertising.
  • 🚫 It's not working. ADB-team β†’ Check if the debugging is included USB And whether Xiaomi drivers are installed.
  • πŸ“± The gallery stopped opening. β†’ Remove the app cache or reinstall it through ADB: adb shell pm clear com.miui.gallery
  • πŸ”’ You can't turn off notifications. β†’ Use AppOps to Force Disable Permissions.

If none of the methods worked, check if the phone has viruses or fake apps that can show ads over the system windows. scan the device through Malwarebytes or Dr.Web.

Can I remove ads in the gallery without root and ADB?
Yes, but not completely. The combination of Method 1 (disable personalization) and Method 4 (installing an alternative gallery) works 90% of the time. The remaining 10% of ads are system banners that are blocked only through ADB or root.
Why did the MIUI update reappear?
Xiaomi regularly changes its ad-show mechanisms. After major updates (e.g., from MIUI 13 to MIUI 14), personalization settings are reset. Repeat Method 1 and Method 2 after each update.
Is it safe to use ADB to block ads?
Yes, if you follow the instructions and don't type in extraneous commands. ADB is Google's official Android debugging tool. The risks only arise when you edit system files without a backup.
Which Xiaomi models are most affected by gallery advertising?
The most aggressive advertising is observed on budget models: Redmi 10A, Redmi Note 11, Poco M4 Pro. On flagships (Xiaomi 13 Ultra, Mix Fold 3) advertising is less, but it is also present in the form of β€œrecommendations”.
Can I return a standard gallery after installing an alternative?
Yes. Go to Settings β†’ Applications β†’ By default, select the MIUI Gallery. If it is not listed, install the APK from the firmware via ADB: adb install com.miui.gallery.apk

πŸ’‘

The most reliable way to avoid root is to switch off personalization (Method 1) + Installation of Simple Gallery (Method 4) This provides 95% of the protection from advertising without risk to the system.