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:
- Open the Security app (the shield icon on the desktop or menu).
- Go to the Antivirus section (or Virus Scan in English).
- Click on the three dots in the upper right corner and select Settings.
- Slip on the Exceptions or Whitelist.
- 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).
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.
- Go to Settings โ Applications โ Application Management.
- Click on the three dots in the top right corner and select Special Access.
- Slip on the item Install unknown applications.
- In the list, find the application you install APK through (such as Files, Chrome, or SAI for split-APK).
- 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:
- Open Security and go to Antivirus.
- Click on the gear (Settings) in the upper right corner.
- 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:
- 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?
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.
| Antivirus | The path to exceptions | Features |
|---|---|---|
| Avast Mobile Security | Menu (โฎ) โ Settings โ Exceptions โ Add an annex | Requires a premium version for some functions |
| Kaspersky Internet Security | Settings โ Protection โ Exceptions โ Applications | You can add both applications and folders |
| 360 Security | I โ Settings โ Antivirus โ Ignore | Often blocks Chinese apps by default |
| Bitdefender | Menu โ Settings โ Exclusions โ Add | Supports 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:
- Turn off the phone.
- 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).
- In Safe Mode, go to Settings โ Applications, find the antivirus (Security or third-party) and click Disable.
- Install the application you want and add it to exceptions (methods 1โ3).
- 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.
- Open Google Play.
- Slip on the profile avatar โ Play Protect โ Cog (Settings).
- Turn off scanning your device for threats.