How to completely remove the ad virus from Android on Xiaomi: 7 proven ways

Xiaomi smartphone owners often face aggressive advertising that suddenly appears in the browser, desktop or even system menus. In most cases, this is not just a feature of MIUI firmware, but a consequence of infection with an ad virus - malware that replaces ad units, redirects search queries and collects user data.

Unlike standard MIUI banners, which are turned off in settings, ad viruses disguise themselves as system processes, create hidden device administrators and block removal attempts. This article will help identify the source of infection, remove the virus without losing data (if possible), and protect the smartphone from repeated attacks. We will look at both software methods (via ADB, antiviruses) and radical reset to factory settings, bypassing the virus locks.

Warning: Some viruses (such as HiddenAds or Shuanet) can recover from a reboot if their root files are not deleted, so it is important to act systematically, from simple to complex.

Signs of infection with an advertising virus on Xiaomi

The first step is to confirm that the problem is caused by a virus, not by MIUI settings or legitimate apps.

  • πŸ“± Pop-up ads appear on top of all windows, even when the screen is locked, often containing porn banners, lotteries, or "win an iPhone" offers.
  • πŸ” Browser Redirect: When you open Google or Yandex, you are taken to unknown sites with suspicious domains (e.g. xvideos[random characters].com).
  • πŸ“¦ Unknown applications are listed as installed (often with names such as System Update, Flash Player, or Cyrillic characters).
  • πŸ”‹ Increased battery consumption and device heating for no apparent reason – a virus can mine cryptocurrency in the background.
  • 🚫 Settings Lock: When you try to disable administrator rights or remove an application, an error appears: Delete is prohibited by device policy.

If at least 2-3 points match, your Xiaomi is almost certainly infected, and it is especially dangerous if ads appear in applications where they should not be (for example, in Camera or Phone), this is a sign of a deep penetration of the virus into system processes.

⚠️ Warning: Some viruses mimic system notifications from MIUI, such as, "Your device is infected! Click to scan." Clicking on such notification exacerbates infection. Check the source of notifications by swiping your finger to the left and looking at the name of the application.

πŸ“Š What type of ad virus have you encountered?
Pop-up banners
Redirection in the browser
Hidden applications
Mining cryptocurrency
I don't know, but I suspect a virus.

Step 1: Manually remove suspicious applications

Start with the obvious, checking the installed list. Viruses are often disguised as harmless utilities, so pay attention to:

  • πŸ“Œ Applications with Cyrillic characters in the title (e.g., "Battery Optimizer").
  • πŸ“Œ Programs with standard service icons (Google Play, MIUI Security), but with typos in the title.
  • πŸ“Œ Utility that you have not installed (e.g. Flash Player, HTML Viewer).

To remove them:

  1. Go to Settings β†’ Applications β†’ Application Management.
  2. Sort the list by installation date (the latter are often viruses).
  3. Click on the suspicious app β†’ Delete.

If the Delete button is inactive or if the error "Delete is forbidden by the administrator of the device" appears, then the virus has received administrator rights.

  1. Go to Settings β†’ Passwords and Security β†’ Device Administrators.
  2. Uncheck the boxes from unknown applications (e.g. Device Admin, Security Service).
  3. Repeat the removal attempt.

β˜‘οΈ Checklist before virus removal

Done: 0 / 5

⚠️ Warning: Some viruses (e.g. Android.Triada) are able to repair themselves after deleting, unless the cache and system application data are cleared. Once a suspicious program is removed, be sure to restart your smartphone and check for ads.

Step 2: Cleaning through Safe Mode

If the virus blocks the removal of applications or redirects you to advertising sites when you try to open settings, use Safe Mode, which only downloads system applications, and turns off third-party applications (including viruses).

To log in to Safe Mode on Xiaomi:

  1. Press the power button before the turn off menu appears.
  2. Press the option to turn off and hold for 3-5 seconds.
  3. Confirm the transition to safe mode (the inscription β€œSafe mode” will appear at the bottom of the screen).

In Safe Mode:

  • πŸ” Check the list of applications (Settings β†’ Apps) and remove anything suspicious.
  • 🧹 Clear the cache of system applications: Settings β†’ Memory β†’ Clear the cache.
  • πŸ”„ Reboot the device to normal mode and check if the ads are still there.

If the virus comes back after you left Safe Mode, it's embedded in the system files.

πŸ’‘

If the Turn off button does not respond to a long press, try an alternative way: turn off the smartphone, then turn it on, holding the Power + Volume buttons up until booting in Safe Mode.

Step 3: Using ADB to remove systemic viruses

Some ad viruses (such as Android.HiddenAds) are installed as system applications and are not removed by standard methods, in which case Android Debug Bridge (ADB) – a tool for debugging Android through a computer – will help.

You'll need:

  • πŸ–₯️ Computer with Windows/macOS/Linux.
  • πŸ”Œ USB-cable (preferably original).
  • πŸ“₯ The ADB Tools utility (download and unpack to folder).

Instructions:

  1. Enable USB debugging on Xiaomi: Settings β†’ About Phone β†’ MIUI Version (click 7 times until β€œYou’re a developer”) Settings β†’ Additional β†’ Developers β†’ Debugging on USB (enable)
  2. Connect your smartphone to your computer and confirm your trust in the device.
  3. Open the command prompt (cmd) in the folder with ADB and enter: adb devices (should appear serial number of your device).
  4. Get a list of all packages: adb shell pm list packages -f Look for suspicious names (e.g., containing ad, push, offer).
  5. Delete the virus packet (example for com.example.malware): adb shell pm uninstall -k --user 0 com.example.malware

If the command returns the error "Failure [DELETE_FAILED_INTERNAL_ERROR]", the virus is protected.

  • πŸ”§ Disable it via adb shell pm disable-user --user 0 com.example.malware.
  • πŸ”„ Reboot the device and repeat the deletion.
List of well-known virus packages for Xiaomi
Among the most common virus packages on Xiaomi: com.android.system.push (fake push notification service), com.sec.android.app.launcher (fake launcher), com.google.play.update (fake Play Market update), com.qualcomm.telephony (virus masquerading as a system process).

Step 4: Scanning with antivirus (which works for Xiaomi)

Standard antiviruses (such as Avast or Dr.Web) often don’t detect ad viruses on Xiaomi, because they masquerade as system processes.

AntivirusEffectiveness against HiddenAdsFree versionFeatures
Malwarebytes⭐⭐⭐⭐⭐Yes (14 days)It specializes in adware, even removes deeply embedded viruses.
Kaspersky Mobile⭐⭐⭐⭐Yes (with limitations)It detects mining viruses well, but it can conflict with MIUI.
Bitdefender Mobile⭐⭐⭐Yes.Lightweight, does not load the system, but weakly finds HiddenAds.
MIUI Security (built-in)⭐⭐Yes.It is practically useless against modern viruses.

Scanning recommendations:

  • πŸ›‘οΈ Install Malwarebytes or Kaspersky from Google Play (not from third-party sites!).
  • πŸ” Run a full scan (not fast!).
  • 🚫 If the antivirus finds the virus but cannot remove it, write down the name of the packet and delete it via ADB (see Step 3).

⚠️ Warning: Some viruses block the installation of antiviruses by giving an error "Application not installed." In this case, download the.apk file of the antivirus to your computer and install it via ADB: adb install malwarebytes.apk

Step 5: Reset to factory settings (if nothing worked)

If the virus is not removed by any of the above methods, then a hard reset will be left, which will remove all data from the device, including the virus, but requires preparation:

What to do before resetting:

  • πŸ“± Save important data: contacts (export to Google Account), photos (copy to PC), messages (use MIUI Backup).
  • πŸ” Make sure you know the username/password from your Mi Account – you will need confirmation after the reset.
  • πŸ“‹ Write IMEI (type *#06# in the dialer) β€” useful if after the reset the network disappears.

How to perform the reset:

  1. Go to Settings β†’ About Phone β†’ Resetting β†’ Erase all data.
  2. Select β€œErase Everything” and confirm the action.
  3. After the reboot, perform the initial setup without restoring data from the backup (the virus can come back!).

If the virus blocks access to reset settings, use Recovery Mode:

  1. Turn off your smartphone.
  2. Press Power + Volume up until the Mi logo appears.
  3. Select Wipe Data β†’ Wipe All Data (control – volume buttons, confirmation – power button).

πŸ’‘

After reset, DO NOT restore data from backups created before infection! the virus can hide in backup files and come back.

Step 6: Protecting Xiaomi from Re-Infection

Even after successful removal of the virus, the risk of re-infection remains.

  • πŸ”’ Disable installation from unknown sources: Settings β†’ Passwords and security β†’ Unknown sources (disable).
  • πŸ›‘οΈ Install a reliable antivirus (such as Malwarebytes) and scan your device regularly.
  • 🚫 Do not install pirated applications (especially modified games or hacked versions of paid programs).
  • πŸ”„ Update MIUI to the latest version β€” the new firmware has closed vulnerabilities that viruses exploit.
  • πŸ“₯ Download. APK only from trusted sources (e.g. APKMirror).

Additional measures for advanced users:

  • πŸ”§ Install Xiaomi ADB/Fastboot Tools and disable unnecessary system applications that may be vulnerable.
  • πŸ› οΈ Consider unlocking the bootloader and installing custom firmware (like LineageOS), but this will unwarrant you.

If you frequently install apps from third-party sources, create a separate user profile to test new programs:

  1. Go to Settings β†’ System β†’ Multiple users.
  2. Create a new user and install suspicious apps only on them.

What if the virus returned after resetting?

If the ad reappears even after a hard reset, the problem may be:

  1. Infected memory card: The virus may be hiding in files on the SD- card. Format it on another device.
  2. Recovered data: If you restored a backup from Mi Cloud or Google Drive, the virus could return with it.
  3. Firmware with a virus preinstalled: Rarely, but it happens that the virus is embedded in informal firmware (especially for older Xiaomi models).

Action:

  • πŸ” Check the SD- card on another device with an antivirus.
  • πŸ“¦ Don't restore data from old backups. Move files selectively.
  • πŸ”§ If you suspect firmware, reflash the device through Fastboot with the official firmware from the Xiaomi website.

In extreme cases, contact the service center Xiaomi – if the virus is implemented at the firmware level, you may need to solder memory (relevant to models Redmi Note 8/9 and similar, where viruses are sometimes sewn into the system partition).

πŸ’‘

If after all the manipulations, the ads appear only in the browser, the problem may not be in the virus, but in the infected extensions. Remove all extensions in Chrome or MIUI Browser and reset the browser settings to the factory.

FAQ: Frequent questions about removing ad viruses

Can the virus be removed without resetting to factory settings?
Yes, 80% of the time, the combination of manual application removal, ADB cleaning and Malwarebytes scanning helps, and resets are only required for deeply embedded viruses (such as Android.Triada) that modify system files.
Why does the virus come back to the public after it is removed?
This means that the virus has a self-repair mechanism, and common causes: Remaining residual files in the folders /data/app or /system/priv-app. The virus is hidden in another application (such as a launcher or keyboard), infected memory card or recovered data from the backup. Solution: repeat scanning the ADB, check the SD- card, and do not restore old backups.
How to protect Xiaomi from viruses in the future?
Key measures: Disable installation from unknown sources (Settings β†’ Passwords and security). Install Malwarebytes and scan the device once a week. Do not install pirated applications (especially modified games); Update MIUI to the latest version (new firmwares have closed vulnerabilities).
Does Fastboot Flashing Help with Viruses?
Yes, full Fastboot flashing deletes all data, including viruses, because it overwrites system, data and boot partitions. This is a radical method that is used if: The virus is embedded in the firmware (for example, through a vulnerability in MediaTek), resetting to factory settings did not help. The device is blocked by a virus (the system does not load).
Can a virus damage your smartphone’s iron?
The virus cannot directly damage iron (processor, memory) but indirectly affects: Battery: the constant operation of the virus in the background accelerates battery wear; Processor: mining viruses load the CPU, which leads to overheating; Memory: some viruses fill the internal storage with garbage files; prolonged infection may require replacing the battery or cleaning the system from debris.