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

Install applications from unknown sources (sideloading) on Xiaomi, Redmi or smartphones POCO It can pose a serious security risk, even if you knowingly turned on this option to install it. APK-files outside of Google Play, it is recommended to return the settings to factory settings to minimize the risk of virus infection or data leakage. In this article, we will discuss how to completely disable downloads from unknown sources on shell devices. MIUI — from the old versions to the last MIUI 14/15.

It is important to understand that blocking unknown sources works on two levels: global (for all applications) and individual (permissions for specific programs, such as browsers or file managers). APK-If you've previously allowed external installations to save traffic or access pirated content, now is the time to rethink these settings.

This article is relevant for all modern Xiaomi devices, including the Redmi Note 12/13, POCO X5/F5, Xiaomi 13/14 and older Android 10–14 gadgets. Instructions are adapted to the latest versions of MIUI, but we will also point out the differences for outdated firmware.

Why do I need to shut down the installation from unknown sources?

The main danger of unknown sources is the risk of installing malware that can:

  • 🔍 Stealing personal data: passwords, bank details, correspondence from messengers.
  • 📱 Show hidden ads or redirect to phishing sites.
  • 🔋 Discharge the battery and load the processor with background tasks.
  • 🚫 Block access to system functions (redemption for unlocking).

Even if you download APKs from a “trusted” site, there is no guarantee that the file has not been modified. For example, popular apps like WhatsApp or Telegram are often replaced by scammers with fake versions with embedded spyware. In 2023, Kaspersky’s lab recorded a 37 percent increase in such attacks among Android users, with 40 percent of cases occurring on devices with an authorized installation from unknown sources.

Also, some apps (like Fortnite or Genshin Impact) are distributed through their own installers, but even they don’t guarantee complete security. Xiaomi blocks such installations by default, and it’s not just a manufacturer’s whim – it’s a security measure.

⚠️ Note: If you have previously installed applications from.apk files, check your device for viruses using Google Play Protect or Malwarebytes before disabling unknown sources.

How to check if unknown sources are included on Xiaomi

Before you turn off the option, make sure it's actually active. In MIUI, there are two ways to do this:

  1. Through security settings: Go to Settings → Applications → Application Management → Settings (cog in the upper right) → Special access → Install unknown applications. This will show a list of programs that are allowed to install APK. If at least one application is allowed, the function is active.
  2. Attempt to install APK: Download any secure APK (for example, from the official APKMirror website) and try installing it. If the warning "Installation is blocked", then the global lock is already working. If the installation begins, unknown sources are turned on.

Some devices (especially those with MIUI 12 and older) may display a separate switch in Settings → Memory → Installation from unknown sources. If not, use the first method.

📊 Have you ever installed APK source?
Yeah, often.
Yeah, but rarely.
No, never.
I don't know what it is.

Step-by-step: how to disable unknown sources on Xiaomi

The process of disabling depends on the version of MIUI. Below is a universal algorithm that is suitable for most devices:

Method 1: Global Shutdown (for all applications)

  1. Open Settings (the gear icon on the main screen).
  2. Go to the Appendix section → Application management.
  3. Click on the icon. ⚙️ Settings (upper right corner).
  4. Select Special Access → Install Unknown Applications.
  5. In the list of applications, find those with the status of “Allowed” (most often it is the Browser, File Manager or Chrome).
  6. Click on the application and translate the slider to the position "Prohibit".
  7. Repeat step 6 for all applications on the list.

After that, no application will be able to install APK-If you try to open a file like this, the system will show an error: "Installation is blocked by the security settings».

Method 2: Disable via security settings (for older versions of MIUI)

On devices with MIUI 10–11 (e.g., Redmi Note 8 or Xiaomi Mi 9), the path may be different:

  1. Open the Settings → Memory.
  2. Scroll down and select Installation from unknown sources.
  3. Turn off the slider at the top of the screen.

If this item is not available, use Method 1 – it works on all versions.

Special access settings are open|All applications have the status of "Prohibit"|Attempted installation APK lock-in|No safety warnings in the notification curtain-->

Method 3: Reset all permissions (if the option is not disabled)

If you still have APK installation after completing the steps above, try resetting the permissions:

  1. Go to Settings. → Annexes → Application management → ⚙️ Settings → Resetting of application permits.
  2. Confirm the reset (this will not delete data, but will disable all special accesses, including APK installation).

⚠️ Note: After resetting permissions, some applications (such as instant messengers or banking programs) may request access to contacts, camera or location again.

How to prevent APK installation for specific applications

If you want to leave the option of installing an APK for one or two applications (like F-Droid) but block it for others, do the following:

  1. Follow the path from Method 1 to the Install Unknown Applications section.
  2. In the list, find the application you want to leave permission for (for example, F-Droid).
  3. Click on it and move the slider to the "Allow" position.
  4. For all other applications, set “Disallow”.

Thus, APK-The only way to install files is through the app you select, which is a compromise for users who sometimes need sideloading but want to minimize the risks.

AnnexRecommended actionReason.
Browser/ChromeBannedFrequently source malicious APKs through advertising
File managerBannedCan automatically offer the installation of downloaded files
TelegramBannedIt is often used to distribute pirated software.
F-DroidAllow (optional)Official open source catalog with verified builds

What if unknown sources are not turned off?

In rare cases, security settings may be blocked due to:

  • 🔒 Administrator rights issued to malware.
  • 🛠️ Custom firmware (such as LineageOS or Pixel Experience).
  • 📱 Device policies (if the smartphone is linked to a corporate account).

Solutions for each case:

1. Malware with Administrator Rights

If the virus has received the device administrator privilege, it can block the change of settings.

  1. Go to Settings → Passwords and Security → Device Administrators.
  2. Uncheck any suspicious apps (if you don’t know what to disable, uncheck everything except Google Play Services and Mi Account).
  3. Try to turn off unknown sources again.

2. Custom firmware

On informal firmware (e.g. Xiaomi.eu), security settings may differ.

  • Update the firmware to the latest version.
  • Use the Magisk module to manage permissions (power users only).

3. Corporate policy

If the device is managed via Android Enterprise or Mi Work, some settings may be blocked by the administrator.

  • Contact the IT-service of your organization.
  • Use your personal smartphone to install unofficial APKs.
What if, after disabling unknown sources, APKs are still installed?
This may be due to: 1. An outdated version of MIUI (update firmware via Settings → About Phone → System Update). 2. a rooted device (superuser rights bypass Android restrictions). In this case, use Magisk or SuperSU to manually block APK installation via adb shell pm install --block. 3. System errors (try resetting to factory settings via Settings → About Phone → Reset, but back up data first).

Additional security measures after disabling unknown sources

Disabling the installation from unknown sources is only the first step. To protect the device as much as possible, follow the following steps:

  • 🛡️ Turn on Google Play Protect: Go to Google Play → Menus (☰) → Play Protect → Settings and activate “Device scanning for threats».
  • 🔄 Update. MIUI and applications: Outdated versions of software contain vulnerabilities. Update the system through Settings → The phone. → Updating the system.

💡

If you frequently install an APK for testing, create a separate user profile on Android (Settings → System → Multiple users).

Frequent Mistakes and How to Avoid Them

When disabling unknown sources, users often face the following problems:

Mistake.Reason.Decision
"Settings are not saved."System cache or MIUI errorClear the cache in Settings → Annexes → All applications → Settings (⚙️) → Clear the cache
“Not the ‘Installation of Unknown Applications’ clause”Obsolete version of MIUI or regional firmwareUpdate the software or use global search in the settings for “unknown sources”
«APK set up ADB»USB debugging enabledTurn off Settings → About Phone → MIUI Version (7 times) → Developer Mode → Debugging by USB

If you encounter another bug, check if it’s root rights or modified firmware, and in such cases, the standard security settings may not work.

💡

Even after disabling unknown sources, there is a risk of installing malware through vulnerabilities in your browser or messengers, regularly update applications and do not follow suspicious links.

FAQ: Answers to Frequent Questions

Can I temporarily turn on unknown sources and then turn off?
Yes, you can turn on an option for a particular application (like F-Droid), install the APK you want, and then disable the installation again, but remember that even a short-term turn on increases the risk of infection if the file was downloaded from an unreliable source.
Why did the MIUI update change the settings?
For major upgrades (e.g., from MIUI 13 to MIUI 14), some permissions are reset to factory ones. After the upgrade, check the security settings and, if necessary, re-ban installation from unknown sources.
Can I install APK without including unknown sources?
No, Android blocks APK installation without explicit permission, the only exception being apps installed via ADB (for developers), but this requires USB debugging and carries risks as well.
How to check if my Xiaomi malware is installed?
Use a combination of methods: Run a scan in Google Play Protect. Install Malwarebytes and scan the device. Check the list of device administrators (Settings → Passwords and Security → Device Administrators) for suspicious applications. Notice unusual behaviors: fast battery drain, advertising in unexpected places, overheating.
What should I do if I accidentally plant a virus?
If you suspect an infection: Turn off the Internet (plane mode). Delete the suspicious application through Settings → Apps. Reset the network settings (Settings → Connections → Reset the Wi-Fi, mobile network and Bluetooth settings). If the virus does not remove, reset to factory settings (be sure to back up important data!).