Installing apps from unknown sources on Xiaomi smartphones is a feature that can be useful for power users, but also poses a serious security threat. Viruses, spyware and fraudulent programs are often spread through the very same network. APK-If you want to protect your device from the accidental installation of malicious content or restrict access to this feature for other users of the phone (for example, children), it is important to know how to properly disable this permission.
In this article, we will go into detail about all the ways to block installations from unknown sources on different versions of MIUI, from the old to the newest. You will learn how to completely disable APK installation, how to configure exceptions for individual applications, and what to do if the option is not displayed in the menu.
Why you should disable the installation from unknown sources
The main danger of allowing APK installation from third-party sources is the risk of infection of the device. Even if you are confident in the security of the file being downloaded, there are several hidden threats:
- π¦ Malware: Many APK contain Trojans, cryptocurrency miners or ransomware that are activated after installation.
- π΅οΈ Spyware modules: Some applications collect data about your activity, contacts, or location without your knowledge.
- πΈ Fraudulent schemes: Fake applications of banks or payment systems can steal logins and passwords.
- π Automatic installation: Some viruses download and install additional software on their own, which leads to clogging of the system.
In addition, installation from unknown sources may violate the warranty of Xiaomi if the device was damaged due to malware.In some countries (for example, in the EU), the manufacturer can refuse service if it is proved that the problem arose due to unauthorized manipulation of the system.
β οΈ Attention: On devices with MIUI for the Chinese market (China) ROM) Installation from unknown sources is blocked by default at the system level, and attempts to circumvent this restriction can lead to the blocking of Mi Account or loss of access to branded services.
Method 1: Disconnection through basic security settings
The easiest method is to use a standard settings menu, which works on most Xiaomi devices with MIUI 12 and later, including the Redmi Note 10/11/12, POCO X3/X4/X5, Mi 11/12/13 and others.
- Open the Settings app (cog icon).
- Go to the Appendix section β Application management.
- Click on the three dots in the top right corner and select Special Access.
- Slip on the item Install unknown applications.
- Select an application (such as the Browser, File Manager, or Google Chrome) for which you want to disallow the installation.
- Switch the slider Allow installation from this source to the off position.
Repeat the steps for all applications that are authorized to install APK. Please note that some system utilities (such as Package Installer) may not appear in this list - their settings change in other ways (see the next section).
βοΈ Verification of the deactivation of the installation APK
Method 2: Blocking through developer settings (for power users)
If the standard method didn't work, or if you want to block APK installation at the system level, you can use the developer menu, which requires you to pre-enable the developer mode:
- Go to Settings. β The phone.
- Find the MIUI version line and tap it 7 times in a row until you become a developer!
- Return to the main settings menu and open a new section β For developers.
- Scroll down and find the USB Debugging option (no need to turn it on, just find it for a guide).
- Below is the Installation via USB - disable it.
- Also find the option to Check the installation via ADB and set the value to Disable.
These settings will block APK installation not only through file managers, but also through ADB (Android Debug Bridge), which adds an additional layer of protection.
β οΈ Attention: On some firmware MIUI For the Chinese market, check installation through ADB In this case, try to upgrade to the latest version or use alternative methods (see the section on Mi Security).
Method 3: Use of the Mi Security App
The proprietary Mi Security app (or Security in Russian firmware) offers additional tools to control application installation, a method that is especially useful if you want to not just ban installation, but completely block access to the app. APK-Instructions:
- Open the Security app (shield icon).
- Go to the Scanner or Protection tab (depending on version).
- Slip the gear icon in the upper right corner to open the settings.
- Find the Virus Protection or Application Security section.
- Activate the option to block installation from unknown sources.
- Also enable APK scanning before installation if this option is available.
Mi Security will automatically block attempts to install APKs from any source other than Google Play, and you will receive a one-time permission notification (if you need to install a trusted app).
| Locking method | Level of protection | Root rights required | It works for China ROM. |
|---|---|---|---|
| Standard settings | Medium. | No. | Partially. |
| Developer settings | High-pitched | No. | No. |
| Mi Security | High-pitched | No. | Yes. |
| ADB-team | Maximum | No. | Partially. |
Method 4: Blocking through ADB (for advanced users)
If previous methods have failed or you want to guarantee that you will disable the APK installation at the system level, you can use ADB commands. This method does not require root rights, but requires connecting the phone to the computer.
- Download and install Platform Tools on your computer.
- Enable USB debugging in the developer settings (see previous section).
- Connect your phone to your PC and open the command prompt (cmd) in the adb folder.
- Enter the command to check the connection: Adb devices should appear the name of your device.
- Execute the command to block the installation from unknown sources: adb shell settings put global install_non_market_apps 0
- Reset the device.
This command completely disables the ability to install APKs from any source other than Google Play at the system level. To return the installation option, use the same command by replacing 0 with 1.
β οΈ Note: On some devices with MIUI For the Chinese market, this command may not work due to manufacturer restrictions, in which case, try an alternative method using pm: adb shell pm disable-user. --user 0 However, this will disable all app installations, including updates from Google Play.
What if the ADB does not recognize the device?
Frequent problems and their solutions
When you turn off the installation from unknown sources, users often face difficulties, and consider the most common situations and ways to solve them:
- π Option not available in settings: On some firmware MIUI The item may be hidden. Try to update the system or use it. ADB. Also check if there is a custom firmware installed (such as LineageOS) where the settings may differ.
- π Settings reset after rebooting: This is typical for devices with China ROM. The solution is to use Mi Security or ADB-team.
- π You canβt turn off system applications: Some applications (for example, Package Installer) do not allow you to change the settings. ADB root.
- π± The device requests a password when trying to change settings: This means that the phone has Mi Account protection enabled. Enter the password from your Xiaomi account.
If none of these methods worked, check if you have a rights management application (such as App Ops or Shizuku) installed on your device, which can override system settings.
π‘
If you frequently install APKs but want to minimize risks, use a virtual machine (like VMOS or Shelter) to test unknown applications in an isolated environment without compromising the host system.
Additional security measures
Disabling the installation from unknown sources is only part of the comprehensive protection of the device. To maximize the security of your Xiaomi, we recommend you to follow the following steps:
- π‘οΈ Install a reliable antivirus: Apps like Malwarebytes or Bitdefender can help you detect threats, even if they have penetrated the device in another way.
- π Enable two-factor authentication for your Mi and Google account, which will prevent unauthorized access to your data.
- π¦ Regularly check the installed applications in Settings β Remove suspicious programs and clear the cache.
- π Update. MIUI Google Play Services, which regularly releases security patches that close vulnerabilities.
- π΅ Disable installation from unknown browser sources, even if you don't use them. APK.
Also, check out the settings of Google Play Protect, Android's built-in security system, to activate it:
- Open the Google Play Store.
- Slip the profile icon in the upper right corner.
- Choose Play Protect β Settings.
- Enable the device scan for threats.
π‘
Even if you have completely disabled the installation from unknown sources, regularly check the device for viruses.