How to add an application to the exceptions of antivirus on Xiaomi: 5 proven ways

Antivirus systems on Xiaomi smartphones are a two-way sword, on the one hand, they protect the device from malware, phishing and data leaks, on the other hand, they sometimes block legitimate programs: modified software. APK, emulators, developer tools, or even official applications that the antivirus mistakenly considers a threat.If you are faced with the fact that the application is removed automatically, does not start or runs with errors due to the Security App (embedded antivirus). MIUI), It needs to be added to the exceptions.

In this article, weโ€™ll look at all the possible ways to disable scanning for specific programs, from standard MIUI settings to bypassing locks through ADB. The instructions are relevant for Xiaomi, Redmi, POCO and Black Shark devices based on MIUI 12/13/14 (including global and Chinese firmware versions). If you use a third-party antivirus (for example, Avast, Kaspersky or 360 Security), there are separate solutions for them too.

Before you start, consider adding an application to the antivirus exceptions, which reduces the level of protection of the device, and do this only for proven programs, the source of which you completely trust.

1. Method: Exceptions in the built-in Security App antivirus

The standard MIUI antivirus is the Security application (in Russian firmware it can be called โ€œSecurityโ€ or โ€œProtectionโ€), which is responsible for scanning files, blocking APK installation from unknown sources and automatically removing โ€œsuspiciousโ€ programs, to add the application to exceptions:

  1. Open the Security app (the shield icon on the desktop or menu).
  2. Go to the Antivirus section (or Virus Scan in English).
  3. Click on the three dots in the upper right corner and select Settings.
  4. Slip on the Exceptions or Whitelist.
  5. Click Add App and select the one you want from the list.

If the application has already been removed by the antivirus, install it again first, then add to the exceptions. In some versions of MIUI (for example, MIUI 14 for Xiaomi 13 Pro), the path may be slightly different:

  • ๐Ÿ”น Security โ†’ Scanning. โ†’ Settings โ†’ Ignored applications
  • ๐Ÿ”น Security โ†’ Virus Scan โ†’ Gear icon โ†’ Exceptions

Once added to the exception, the antivirus will stop scanning the application files and will not block it. However, this does not cancel the check during installation - you need to separately allow the installation of APK from unknown sources (more about this in the next section).

๐Ÿ“Š What antivirus is used on Xiaomi?
Only the built-in Security App
Third-party (Avast, Kaspersky, etc.)
Disable the antivirus completely
I don't know what I've got.

Method: Allowing APK installation from unknown sources

Even if the application is added to the antivirus exceptions, MIUI can block its installation due to Android security policy.

  1. Go to Settings โ†’ Applications โ†’ Application Management.
  2. Click on the three dots in the top right corner and select Special Access.
  3. Slip on the item Install unknown applications.
  4. In the list, find the application you install APK through (such as Files, Chrome, or SAI for split-APK).
  5. Activate the switch Allow installation from this source.

If you install an APK via ADB (e.g., the adb install command), this step can be skipped. Also note that in MIUI 14 on Xiaomi 13/13T/14, the path may look like this:

  • ๐Ÿ”น Settings โ†’ Memory. โ†’ More. โ†’ Special access โ†’ Installation of unknown applications
  • ๐Ÿ”น Settings โ†’ Apps โ†’ Manage apps โ†’ Menu (โ‹ฎ) โ†’ Special access โ†’ Install unknown apps

After that, you can install it. APK-But if the antivirus has already removed the application, you'll have to download it and install it again.

Install the app (if it has been removed)

Check out the MIUI version (Settings โ†’ About the phone)

Open the Security App and clear the cache (Settings โ†’ Clean)

Connect to stable Wi-Fi (for downloading security updates)-->

Method 3: Disabling Automatic Scanning in Security App

If the antivirus automatically deletes applications without your knowledge, you can turn off the background scan, and this will not add the program to the exception, but will prevent it from being deleted:

  1. Open Security and go to Antivirus.
  2. Click on the gear (Settings) in the upper right corner.
  3. Turn off the options: ๐Ÿ”ธ Automatic scanning (Auto-scan) ๐Ÿ”ธ Scan when installing apps (Scan when installing apps) ๐Ÿ”ธ Delete malicious files automatically (Auto-clean viruses)

After that, the antivirus will not delete the applications without your confirmation, but manual scanning can still detect threats. To completely exclude the program from the check, use the first method (addition to exceptions).

โš ๏ธ Warning: Turning off automatic scanning increases the risk of infection of the device, and it is recommended to turn it on periodically (every 1-2 weeks) to check the system.

Method: Using ADB to Forced Addition to Exceptions

On some firmware (especially Chinese or modified), the standard Security App settings can be blocked, in which case the team will help via ADB. This method requires connecting the phone to a PC and enabling Debugging over USB.

Instructions:

  1. Activate Developer Mode: Go to Settings โ†’ About Phone. Tap 7 times on MIUI Version. Go back to Settings โ†’ Additional โ†’ Developer. Turn on USB Debugging.
adb shell pm hide com.miui.securitycenter/com.miui.permcenter.autostart.AutoStartActivity

(This command disables automatic locking for all applications, but may not work on newer versions of MIUI.)

adb shell cmd package set-excluded-pkg <package_name>

(Find out. package_name App Inspector or Adb shell pm list packages | grep "name of annex".)

This method is not official and may not work on all devices. After the MIUI update, the settings may reset.

What if the ADB does not recognize the device?
Make sure that you have Xiaomi drivers installed for your model (you can download it on the official website in the Support section). USB-debugging (security settings) and giving permission to connect to the PC at the first request.

5. Method: Set up exceptions in third-party antiviruses

If you use a third-party antivirus (e.g., Avast, Kaspersky, 360 Security or Bitdefender), the process of adding an exception will be different.

AntivirusThe path to exceptionsFeatures
Avast Mobile SecurityMenu (โ‹ฎ) โ†’ Settings โ†’ Exceptions โ†’ Add an annexRequires a premium version for some functions
Kaspersky Internet SecuritySettings โ†’ Protection โ†’ Exceptions โ†’ ApplicationsYou can add both applications and folders
360 SecurityI โ†’ Settings โ†’ Antivirus โ†’ IgnoreOften blocks Chinese apps by default
BitdefenderMenu โ†’ Settings โ†’ Exclusions โ†’ AddSupports exceptions to file signatures

If your antivirus isnโ€™t in the table, look for a section with names like Whitelist, Exclusions, or Ignored Apps. In some cases (like McAfee), you may need to turn off real-time protection for a particular application.

โš ๏ธ Note: Some antiviruses (e.g. 360 Security) may conflict with Xiaomiโ€™s built-in Security App. If the app is blocked after adding the exception, try disabling one of the antiviruses.

๐Ÿ’ก

Before adding an app to an exception, check its reputation on VirusTotal. APK-Make sure that it is not detected by more than 2-3 antiviruses (false positives are available in Baidu and Tencent).

6. Method: Bypassing the lock through Safe Mode (if the antivirus does not allow anything to be done)

If the antivirus blocks the exception setting itself (for example, prevents you from opening the Security App or resets the settings), you can try temporarily disabling it through Safe Mode.

Instructions:

  1. Turn off the phone.
  2. Press the Power button and when the MI logo appears, hold the Volume button down until Safe Mode loads (the bottom left corner will have an inscription).
  3. In Safe Mode, go to Settings โ†’ Applications, find the antivirus (Security or third-party) and click Disable.
  4. Install the application you want and add it to exceptions (methods 1โ€“3).
  5. Restart your phone in normal mode.

If none of these methods worked, it is possible that the lock is at the Google Play Protect level.

  1. Open Google Play.
  2. Slip on the profile avatar โ†’ Play Protect โ†’ Cog (Settings).
  3. Turn off scanning your device for threats.
Can I add a system application to the exceptions?
No, built-in MIUI applications (such as Camera, Gallery, or Settings) cannot be added to the antivirus exceptions. If they don't work properly, try resetting through Settings โ†’ Apps โ†’ Select App โ†’ Storage โ†’ Clear the data.
After the MIUI update, the exceptions were reset.
Update firmware often resets the Security App settings. You need to re-add applications to the exceptions (method 1). If the antivirus has deleted programs, install them again from the backup or download the APK again.
How to check if the application is added to the exceptions?
Open Security โ†’ Antivirus โ†’ Settings โ†’ Exceptions and make sure the app is on the list. You can also try running it โ€” if the antivirus doesnโ€™t give warnings, everything is set up correctly.
Is it safe to disable antivirus on Xiaomi?
Disabling the antivirus completely is not recommended, as MIUI is vulnerable to specific threats (such as malicious APKs distributed through Chinese stores), it is better to add only proven applications to the exceptions and periodically run manual scans.
Can I add a folder or file to the exceptions?
The built-in Security App allows you to add only applications to exceptions, but not individual files or folders. This will require a third-party antivirus (for example, Kaspersky or Avast), where this feature is available.