How to completely disable installation from unknown sources in MIUI 12: protection against viruses and unwanted APKs

Installing apps from unknown sources is one of the most common causes of malware infection in Xiaomi smartphones. APK-Intentional (or intentional) installation of a dangerous application bypassing the protection of Google Play Protect. MIUI 12 security is different than standard Android, so standard locking methods don’t always work here.

In this article, you’ll find a complete guide to disabling installations from unknown sources at all levels, from global security settings to limitations for individual browsers and file manager. We will also discuss how to avoid common errors (for example, when settings are reset after an update) and what to do if the virus has already entered the system. MIUI 12 β€” The version of the shell that is still used on millions of devices, including the Redmi Note. 9/10, Poco X3 mi 10/11.

Why can’t MIUI 12 just turn off Unknown Sources?

Unlike pure Android, where you just need to transfer one switch to the security menu, MIUI 12 will split the APK installation permissions into individual applications.

  • πŸ”Ή Mi Browser browser may have its own installation permission APK.
  • πŸ”Ή File Manager – File Manager – your own.
  • πŸ”Ή Telegram or WhatsApp could theoretically request such rights.

This makes it difficult to control, but it allows you to configure access flexibly, but for most users, this becomes a loophole for viruses, especially if the device is used by several people, for example, a child may accidentally allow the installation from an advertising banner in the browser, and the parent will not even know about it.

Another feature of MIUI 12 is that it automatically resets some resolutions after you upgrade, which means that even if you once banned installation from unknown sources, you can still reset to factory settings after upgrading to a new firmware version.

πŸ“Š Have you ever encountered a virus on Xiaomi?
Yes, after installing APK from the Internet
Yeah, but I don't know where.
No, but I'm afraid of the possibility.
No, and I don't see it as a risk.

Step-by-step: How to disable APK installation at all levels

To completely block the ability to install applications from unknown sources, you need to go through four key sections of the MIUI 12 settings. Skipping at least one item will leave a loophole for malware.

1. Global security settings

Start with the basic security menu:

  1. Open Settings β†’ Applications β†’ Application Management β†’ Settings (cog icon).
  2. Select the Special Access item β†’ Installation of unknown applications.
  3. You will see a list of all applications that are allowed to install APK. Disable the switches opposite each point (browsers, file managers, instant messengers).

Note that in MIUI 12, some system applications (such as Mi Browser) may not appear on this list.

2. Blocking in the Mi Browser browser

Mi Browser is the standard browser on Xiaomi devices, and it is often used to download APK. To prevent installation through it:

  1. Open Mi Browser.
  2. Go to the menu (three dots) β†’ Settings β†’ More
  3. Find Install applications from unknown sources and disable it.

If you don't have a point, you're already locked at the system level (see previous step), but some versions of MIUI 12 (like the Redmi Note 9 Pro) duplicate this setting.

β˜‘οΈ Checking the locking of the installation APK

Done: 0 / 4

3. File Manager and Download folder

Even if the installation is blocked, APK-files can stay in the memory of the device:

  1. Open File Manager (or any other file manager)
  2. Go to the Download (or Download) folder.
  3. Find all files with the.apk extension and delete them.
  4. Go back to File Manager and check if there is an Install Unknown Applications option (similar to the browser).

If the Download folder is crowded, use sorting by file type to quickly find the APK. In MIUI 12, click on the three dots in the top right corner and select Sort β†’ Type.

4. Additional protection: password for the installation of applications

If your smartphone is used by other people (children, colleagues), one disablement of permissions may not be enough. MIUI 12 has a function to block the installation of applications with a password:

  1. Go to Settings β†’ Password and Security β†’ Block applications.
  2. Turn on the function and install it. PIN-code.
  3. In the list, select Package Installer (or Package Installer in English).

Now, every time you try to install an APK (even if permission is enabled), the system will require a password, which adds an additional layer of protection, but does not replace the basic security settings.

πŸ’‘

If you frequently install APKs to work (e.g., beta applications), create a separate user profile in Settings β†’ System β†’ Multiplayer. In the main profile, leave all locks on, and in the second, allow installation only for the desired applications.

What to do if settings are reset after the MIUI update?

One of the most frustrating things about MIUI 12 is that it automatically resets some resolutions after a firmware update, which is because it restores factory security settings for individual components to avoid this:

  • πŸ”„ Before updating, take screenshots of all security settings (Special Access section).
  • πŸ”„ After the update, first check the installation permits APK.
  • πŸ”„ If your smartphone is automatically updated (at night), turn off this feature in Settings. β†’ The phone. β†’ Updating the system β†’ Settings (cogs) β†’ Auto-update.

On some devices (like the Poco F2 Pro with MIUI 12.5), a rollback to an older firmware version via Fastboot helps, but this is an extreme measure.

  1. Go to Settings β†’ Notifications β†’ Notifications Management.
  2. Find Security and turn on all the tumblers.

The system will now send alerts if any permissions have been changed (including after the update).

How to check if the settings have reset after the update?
Open Settings β†’ Applications β†’ App Management β†’ Settings β†’ Special Access β†’ Install unknown applications. If at least one switch is turned on, the settings are reset. Also check if new apps are on the list (for example, Chrome or Firefox can be added after the update).

Errors and Solutions: Why is the lockdown not working?

Sometimes users find that, despite all the prohibitions, APK installation is still possible, and let's look at the typical reasons and ways to eliminate them:

Problem.Possible causeDecision
APK is installed via Telegram or WhatsAppMessengers have a separate installation permitTurn off permission for messengers in Special Access
After resetting, the settings are reset.System cache error or virusClear the cache to Settings β†’ Applications β†’ Application Management β†’ Three Points β†’ Show System β†’ Package Installer β†’ Clear the cache
You can not turn off the switchboard in Installation of unknown applicationsSuperuser rights or root accessCheck for root rights in Settings β†’ About Phone β†’ MIUI version (5 times tap). If you have, delete the root.
APK is installed via ADBUSB debugging enabledTurn off Settings β†’ About Phone β†’ MIUI Version (7 times tap) β†’ Additional β†’ For developers β†’ Debugging over USB

If none of these methods worked, there may be malware already installed on the device that blocks the settings change.

  1. Run the check through Google Play Protect (Play Store β†’ Menu β†’ Play Protect).
  2. Install an antivirus (such as Dr.Web or Kaspersky) and scan the system.
  3. If the virus is detected but not removed, reset to factory settings (Settings β†’ About Phone β†’ Reset settings).

πŸ’‘

If your smartphone is infected with a virus that blocks access to settings, try logging into Safe Mode (hold the off button β†’ long tap on "Stop" β†’ "Reboot in Safe Mode"). In Safe Mode, the malware does not work and you can change your settings.

How to prevent the installation of APKs for individual users (parental controls)

If your Xiaomi is used by children or other family members, one permissions turn off is not enough. MIUI 12 has built-in parental controls, but it works only limitedly.

  1. Create a separate user profile: Settings β†’ System β†’ Multiplayer Mode β†’ Add User Set a password to your main profile.
  2. In the new profile, disable the installation from unknown sources (as described above).
  3. Install Google Family Link for additional control: πŸ“± Download the application to your smartphone and to the child’s device. πŸ“± Set limits on the installation of applications. πŸ“± Enable the option to block unknown sources.

Important: MIUI 12 doesn’t have multiplayer on all devices, such as Redmi 9A, which may not be available, leaving only Google Family Link or third-party parental control apps like Kaspersky Safe Kids.

⚠️ Note: If you use Google Family Link, please note that your child can bypass the lock by simply logging out of their Google account. To avoid this, turn on the deletion ban in the security settings.

What to do if the virus is already installed?

If you find a suspicious application on your device that is not removed by standard methods, follow the algorithm:

  1. Check Application Rights: Settings β†’ Applications β†’ Application Management β†’ Find a suspicious application β†’ Rights If it has administrator rights – untie them in Settings β†’ Password and Security β†’ Device Administrators.
  2. Remove via ADB (if standard removal does not work): adb uninstall com.example.virus (replace com.example.virus with the real name of the package, which can be found through App Inspector).
  3. Perform factory reset: Settings β†’ About Phone β†’ Settings Reset β†’ Delete all data Before reset, save important data (photos, contacts) to the cloud or computer.

⚠️ Attention: Some viruses disguise themselves as system applications (e.g. com.android.system) and manually remove them is dangerous, which can cause the smartphone to fail.

FAQ: Frequent questions about blocking unknown sources MIUI 12

Can you completely remove the ability to install APK, even for yourself?
Yes, but it would require disabling all installation permissions (including File Manager and browsers) and blocking Package Installer with a password, but it would make it impossible to install even legitimate APKs (for example, for testing applications), the alternative is to use Google Play or Mi App Store for all installations.
After upgrading to MIUI 12.5, the security settings reset.
In MIUI 12.5, the menu structure changed a little. To get back the lock: Go to Settings β†’ Applications β†’ Application Management β†’ Settings (cog) β†’ Special Access. Enable Show System mode (three dots at the top). Find Install Unknown Apps and disable all Toggles. If there is no point, upgrade the firmware to the latest version or reset.
My kid's bypassing the lock on Chrome. How do I stop it?
Google Chrome has its own settings for installing APK. To disable: Open Chrome and type in the address bar: chrome://flags. Find the #enable-web-contents-install flag and disable it. Return to Settings β†’ Apps β†’ Chrome β†’ Special Access and disable Install Unknown Apps. Install Google Family Link and block the installation of apps for your child account.
Can I block APK installation via Telegram?
Yes, but Telegram doesn't have direct permission to install it -- it just downloads files. To prevent installation from downloaded files: Open Settings β†’ Apps β†’ Telegram β†’ Special Access. Disable Unknown Application Installation (if there is one). Delete all APKs from the Download/Telegram folder. In Telegram settings, disable Autoupload files (Settings β†’ Data and Memory β†’ Media Autoupload).
What if the virus has already received administrator rights?
If a malicious application has designated itself as a device administrator, it cannot be removed in the standard way. β†’ Password and security β†’ Device administrators. Uncheck the suspicious app. If it's inactive, reboot to Safe Mode and try again. Once you've removed the administrator's permission, uninstall the app through Settings. β†’ Applications: If the virus blocks access to settings, reset via Power Restore. + Vol Up when downloading).