How to ban the installation of applications from unknown sources on Xiaomi: the complete guide

Downloading apps from unknown sources is one of the most common causes of Xiaomi smartphones getting infected with viruses, spyware, and adware. APK-manual files, some programs (such as launchers or file managers) can automatically allow installation from unreliable sources, opening loopholes for malicious code. MIUI โ€” from the old versions to the last MIUI 14.

Compounding the problem, the manufacturer often changes the location of security settings in new firmware.What worked on the Redmi Note 8 may not work on the Xiaomi 13 Ultra.We have compiled the current ways for all modern models, including devices under the brands. POCO Black Shark and also considered the nuances for corporate phones with preinstalled MDM-If legitimate applications (such as F-Droid or Aurora Store) have stopped working after blocking, there is a section at the end of the article on how to add exceptions without risking security.

Why you should disable the installation from unknown sources

The main danger is not in themselves. APK-The files, and the distribution mechanism, are often masked by malicious software as malware:

  • ๐ŸŽฎ Mods for games (endless lives, cheats in) PUBG Mobile or Genshin Impact)
  • ๐Ÿ“บ Pirate versions of streaming services (hacked by Netflix, Disney)+)
  • ๐Ÿ’ฐ Financial applications (fake cryptocurrency wallets, clones of banking applications)
  • ๐Ÿ”“ Hacked versions of paid programs (for example, Adobe Photoshop or AutoCAD for Android)

In 2023, Kasperskyโ€™s lab recorded that 38% of infections of mobile devices on Android occurred through the installation of APK from third-party sources, and 12% of cases occurred on Xiaomi smartphones with MIUI firmware. At the same time, the standard Google Play Protect does not scan files downloaded manually โ€“ their verification lies on antivirus solutions from the manufacturer, which are often disabled by default in MIUI.

Another trap: some legitimate applications (such as APKMirror Installer or SAI) request permission to install from unknown sources, but are not malicious in themselves, creating an illusion of security for users who agree to permission without understanding the risks.

๐Ÿ“Š Have you ever installed APK from unknown sources on Xiaomi?
Yeah, regularly.
Yeah, but only verified files.
No, never.
I don't know what that is.

Where is the configuration on different versions of MIUI

The location of the option has changed in almost every major firmware version, and the following are the current paths for popular versions:

MIUI versionThe path to adjustmentNotes
MIUI 12 / 12.5Settings โ†’ Applications โ†’ Application Management โ†’ Application settings โ†’ Installation of unknown applicationsAll applications that have ever requested this permission are displayed
MIUI 13Settings โ†’ Privacy โ†’ Special Permits โ†’ Installation of Unknown ApplicationsCategory grouping (e.g., File Managers)
MIUI 14 (Global/EU)Settings โ†’ Applications โ†’ Permissions โ†’ Special Access โ†’ Installation of Unknown ApplicationsIn some regions, the option is hidden โ€“ you need to enable Show system applications
POCO LauncherSettings โ†’ System and device โ†’ Additional โ†’ Privacy โ†’ Installation of unknown applicationsThe path may differ on custom firmware

On devices with corporate profiles (e.g., those released for companies), this section may be blocked by the administrator, in which case when you try to change the notification will appear: This setting is managed by your organization. IT-company department or complete device reset (but this will delete all data!).

๐Ÿ’ก

If you do not find the option in the settings, try to enter the phrase โ€œunknown sourcesโ€ in the search menu โ€“ the system will tell you the current path.

Step-by-step instruction for disconnection

The locking process consists of two steps: global disabling of permission and checking individual applications that may have received it before.

  1. Open security settings Go to Settings โ†’ Privacy โ†’ Special permissions (for MIUI 13/14) or Settings โ†’ Applications โ†’ Application management (for MIUI 12).
  2. In some versions, it may be called Installation from Unknown Sources or Unknown Sources.
  3. Disable permission for all applications Before you will appear a list of programs that are allowed to install APK. Turn off the sliders opposite each point, including system utilities like Files or Browser.
  4. Check hidden permissions Click on the three dots in the top right corner and select Show System to see all applications, including service ones.

โ˜‘๏ธ Checking the blocking of unknown sources

Done: 0 / 4

After completing the steps, try downloading any APK-file (e.g. from APKMirror) and Attempt to install it. The system must show a notification: To protect your device, the installation is blocked.

โš ๏ธ Note: Some apps (e.g. Xiaomi Community or Mi Video) may automatically enable this resolution after an update.

What to do if the setting is not saved

Sometimes, after shutdown, the sliders themselves return to the "On" position after a few hours.

  • ๐Ÿ”„ Automatic resetting of settings (for example, after rebooting or updating) MIUI)
  • ๐Ÿ“ฑ Background Services (some Xiaomi system applications force permissions to be enabled)
  • ๐Ÿ› ๏ธ Firmware errors (especially relevant for beta versions) MIUI)

Decisions:

  1. Reset permissions Go to Settings โ†’ Applications โ†’ Application Management โ†’ Three points โ†’ Reset application permissions. This will return all permissions to factory settings.
  2. Turn off Auto Optimization In Settings โ†’ Battery & Performance โ†’ Battery Optimization Find applications that can change settings (like Security or Cleaner) and turn off optimization for them.
  3. Manual lock through ADB (Connect your phone to your PC and execute the command: adb shell settings put global install_non_market_apps 0 This will force the installation from unknown sources at the system level to be blocked.
List of Xiaomi system applications that may include resolution
Security (com.miui.securitycenter) Cleaner (com.miui.cleanmaster) Download Manager (com.android.providers.downloads) File Explorer (com.android.fileexplorer) Mi Browser (com.android.browser) Package Installer (com.android.packageinstaller)

How to Add Exceptions to Trusted Applications

If you use alternative stores like F-Droid or Aurora Store, it is inconvenient to block APK installation completely, in which case you can create a whitelist of trusted sources:

  1. Enable permission only for a specific application (such as F-Droid) in the Install Unknown Applications menu.
  2. Install an APK-checked antivirus (such as Malwarebytes or Bitdefender) that will scan files before installing.
  3. Use a sandbox (like the Shelter or Island app) to isolate the installation of unreliable APKs in a separate profile.

An example of a secure setting for F-Droid:

  1. Open Settings โ†’ Privacy โ†’ Special Permits โ†’ Install Unknown Applications.
  2. Find the F-Droid list and turn on the slider.
  3. In the F-Droid app itself, go to Settings โ†’ Expert Mode and turn on the option to Check App Signatures.

โš ๏ธ Warning: Even trusted stores have fake apps. Always check: ๐Ÿ” Number of downloads and rating ๐Ÿ‘ค Developer data (official website, contacts) ๐Ÿ“‹ Hash amount of the file (can be compared on the VirusTotal website)

Additional security measures

Disabling the installation from unknown sources is only the first step.

Mera.How to turn it onThe effect
Blocking installation via USB (ADB)Settings โ†’ Additional โ†’ For developers โ†’ Debugging by USB (disable)Protection against installation of software through a computer
Scanner of malicious filesSecurity โ†’ Viral scanner โ†’ Autoscanning (include)Checking downloaded APKs before installation
Prohibition of changing system settingsSettings โ†’ Accounts and synchronization โ†’ Delete unnecessary accountsPreventing Remote Settings Management

Pay special attention to the setting of Google Play Protect:

  1. Open the Google Play Store.
  2. Click on the profile icon โ†’ Play Protect.
  3. Enable the options to Scan your device for threats and improve malware detection.

๐Ÿ’ก

Even with the installation disabled from unknown sources, malware can penetrate vulnerabilities in the browser or messengers. Regularly update firmware and applications!

Frequent mistakes and their solutions

When setting up a lock, users often face the following problems:

  • ๐Ÿ”ง "Setup unavailable" (blocked in gray) Reason: Enterprise profile or parental controls are active.Solution: Delete profile in Settings โ†’ Accounts or contact the administrator.
  • ๐Ÿ”„ The resolution is activated after the reboot Reason: Failure of the service com.miui.securitycenter.Solution: Clear the cache of the Security application in the settings.
  • ๐Ÿ“ฑ Reason: Unofficial builds (like LineageOS or Pixel Experience) may lack a source verification module. Solution: Install a third-party firewall like NetGuard.

If you canโ€™t install a critical application after blocking (such as the Mi Unlock Tool to unlock the bootloader), temporarily turn on the permission, install the program, and then turn it off again. Donโ€™t leave the setting active for longer than 5-10 minutes!

Can I completely remove the โ€œInstall Unknown Appsโ€ section from my settings?
No, it's a system component. MIUI. However, you can hide it with the help of ADB-commands: adb shell pm hide com.android.packageinstaller Attention: This will also hide the standard installer APK, It will make it uncomfortable to use.
Will updates for apps installed from APK work after blocking?
Yes, but only if: Update downloads via Google Play (even for third-party APKs).The app has an auto-update mechanism built in (e.g. F-Droid or Aurora Store).Manual installation of new APK versions will be blocked.
How to check if my Xiaomi malware is installed?
Follow the steps: Run scanning in Security โ†’ Viral scanner. Check the list of installed applications in Settings โ†’ Apps for suspicious names. Use Malwarebytes for deep check. View active processes through Settings โ†’ Phone โ†’ System status โ†’ Processes. Pay attention to apps with Administrator or Accessibility rights โ€“ they are often used by viruses.
Can you only ban APKs for certain users (such as a child)?
Yes, if your device has multiplayer set up: Go to Settings โ†’ System โ†’ Multiplayer. Create a new profile (like "Child"). In the profile settings, disable Install Unknown Apps and block Google Play through parental control. You can also use apps like Kids Place or Google Family Link for additional restrictions.
Why did the MIUI update give APK permission again?
This is a well-known firmware problem for Xiaomi. There are two reasons: Reset security settings โ€” MIUI resets some resolutions to default values after major updates. System applications like Mi Browser or Download Manager can automatically request permission for downloaded files. Solution: After each update, check the Install Unknown Apps section and disable sliders again if necessary. You can also disable the browser and file manager auto-update in Settings โ†’ Apps โ†’ Auto Update.