How to disable โ€œUnknown sourcesโ€ on Xiaomi Redmi 9: full instructions

Installing apps from unknown sources on Xiaomi Redmi 9 can pose a serious threat to the security of your device. Viruses, Trojans and spyware often penetrate smartphones through the use of a new device. APK-Even if you are sure of the source, random resolution of this option for all applications opens the door to potential attacks.

In this article, weโ€™ll discuss how to completely disable installations from unknown sources on Redmi 9, including hidden MIUI settings that are often overlooked. Youโ€™ll also learn why some apps (like banking) require this option and how to safely manage exceptions. If your smartphone is already infected or suspicious, thereโ€™s an emergency checklist at the end of this article.

Why You Should Turn Off Unknown Sources on Xiaomi

MIUI blocks APK installation from outside of Google Play by default, but many Redmi 9 users include this option to:

  • ๐Ÿ“ฑ Install applications not available in the region (e.g. some Chinese services).
  • ๐ŸŽฎ Downloads of modified games or hacked versions (which violates the Terms of Use).
  • ๐Ÿ”ง Testing beta versions of software from developers.

But even a single permission for an unverified APK could lead to a backdoor that would steal bank card details or passwords. According to Kaspersky, in 2023, 38% of mobile viruses were spread through manual file installation. On Redmi 9, with its popularity among users, this is especially true โ€“ scammers often disguise malware as โ€œoptimizersโ€ or โ€œgaming hacks.โ€

โš ๏ธ Note: If you have previously installed applications from unknown sources, check the device with an antivirus (such as Malwarebytes or built-in software). MIUI Security Scan: Some viruses may re-enable this option after rebooting.

Method 1: Disconnection through basic security settings

The easiest method is to use the standard MIUI menu.

  1. Open Settings (the gear icon on the main screen).
  2. Go to the Appendix section โ†’ Application management.
  3. Click on the three dots in the top right corner and select Special Access.
  4. Slip on the item Install unknown applications.

Here you will see a list of all the applications that are allowed to install APK.

  • ๐Ÿ”ด If status is allowed โ€“ click on the application and translate the slider to the position Prohibit.
  • ๐ŸŸข System applications (such as Files or Browser) may require password confirmation.

Once all points are disabled, the system will block APK installation from any source other than Google Play. However, some apps (such as Mi Browser) may request this permission again - read about this in the next section.

All applications in the list "Install unknown applications" are disabled |

Suspicious APKs removed from Downloads folder |

Updated virus signatures in antivirus |

Verified permissions for applications with access to files-->

Method 2: Block through developer settings (for experienced)

If the standard method doesnโ€™t work (for example, after rooting or installing custom firmware), use developer mode. This method requires caution โ€“ wrong actions can disrupt the system.

First, activate the developer mode:

  1. Go to Settings. โ†’ The phone.
  2. Tap 7 times on the MIUI version (you will be notified "You became a developer").
  3. Return to the main settings menu and open a new section โ†’ For developers.

Now, follow the following steps:

  • ๐Ÿ” Find the debugging option by USB and disable it (this prevents the installation of software through ADB).
  • ๐Ÿ”ง Scroll down to the Installation Block through USB and ban her.
  • ๐Ÿ›ก๏ธ In the Security section, find App Checker and turn it on (this will add an extra layer of protection).

โš ๏ธ Note: If you have previously installed firmware through Fastboot or TWRP, Disabling these options may prevent future updates, in which case use method 3 (below).

Yes, regularly |Yes, but only 1-2 times |No, never |I don't know what it-->

Method 3: Using MIUI Security for deep cleaning

The built-in MIUI Security app can not only scan for viruses, but also block the installation of suspicious files.

  1. Open the Security app (shield icon).
  2. Go to the Scanner tab and start a full check.
  3. After you finish, click Optimization โ†’ Threats.
  4. Enable the option to block the installation of malicious APKs.

MIUI Security uses Xiaomi's cloud database, which is updated daily. If you try to install an APK that is blacklisted, the system will automatically block the process and prompt you to delete the file. However, this method does not replace completely disabling "unknown sources" - it only adds an additional filter.

For maximum protection:

  • ๐Ÿ”„ Update the virus database manually (in settings) MIUI Security).
  • ๐Ÿ“Š Check scan reports โ€“ if an app is marked as โ€œsuspiciousโ€, delete it immediately.
  • ๐Ÿšซ Add packets of known viruses to the blacklist (Blocking section).
What to do if MIUI Security is not updated?
If the Security app doesn't update databases, try: 1. Clear the app cache in Settings โ†’ Apps โ†’ App management โ†’ Security โ†’ Clear the cache. 2. Reinstall the update via Google Play (if available). 3. Reset the network settings in Settings โ†’ Connections โ†’ Network reset. If the problem persists, this could indicate a modified firmware or virus blocking updates.

Exceptions: When "Unknown Sources" are needed

Some legitimate applications require permission to install APKs, such as:

AnnexReason.Is it a safe source?
Sberbank OnlineUpdate via official APK (for example, for beta testers)Yes, if you download from the official website
Tinkoff InvestInstallation of an alternative version with extended schedulesYes, when checking digital signature
APKMirrorDownload applications removed from Google PlayConditionally (risk of file swapping)
F-DroidOpen source software installationYes, if signature verification is enabled

In such cases:

  1. Allow installation only for a specific application (such as Files or Browser).
  2. After installation, immediately disable the permission.
  3. Check the hash amount of the downloaded APK (for example, through Hash Droid).

If an app requests permanent permission, itโ€™s a cause for concern, such as messengers like Telegram or WhatsApp should not require installation from unknown sources for normal operation.

๐Ÿ’ก

Before you install an APK, check it on VirusTotal. Upload the file to your site and wait for 50+ antivirus analysis. If at least 2-3 of them show a threat, don't install the application.

What to do if the virus is already installed

If you suspect that Redmi 9 has been infiltrated by malware through unknown sources, follow the algorithm:

  1. Turn off the Internet (airplane mode) โ€“ this will prevent data leakage.
  2. Remove all recently installed apps in Settings โ†’ Apps.
  3. Run a deep scan in MIUI Security or Dr.Web Light.
  4. If the virus is not removed, reset to factory settings (Settings โ†’ About Phone โ†’ Reset settings).

After discharge:

  • ๐Ÿ”„ Do not restore data from a backup copy โ€“ it may contain a virus.
  • ๐Ÿ” Disable "unknown sources" immediately (see Method 1).
  • ๐Ÿ›ก๏ธ Install antivirus and update its database.

โš ๏ธ Note: Some viruses (such as Triada or Agent Smith) disguise themselves as system processes. If the problem persists after the reset, you need to flash it through Fastboot.

Additional protection measures for Xiaomi Redmi 9

Disabling "unknown sources" is only part of a comprehensive defense to minimize the risks of:

  • ๐Ÿ”’ Enable boot loader lock (Settings) โ†’ Additionally. โ†’ For developers โ†’ Unlocking OEM โ†’ This will prevent custom firmware with viruses from being installed.
  • ๐Ÿ“ฑ Install Google Play Protect (on automatically, but check in Settings) โ†’ Google โ†’ Security).
  • ๐Ÿ”„ Update regularly MIUI โ€” New versions close vulnerabilities used to bypass protection.
  • ๐Ÿšซ Prohibit the installation of applications from MIUI App Store if you do not use it (in the store settings).

For advanced users:

# ADB commands to block APK installation (developer rights required)


adb shell settings put global install_non_market_apps 0




adb shell pm disable-user --user 0 com.android.packageinstaller

These commands will block the package installer completely, but may disrupt some features (e.g., updates via MIUI Updater).

๐Ÿ’ก

Even with โ€œunknown sourcesโ€ disabled, viruses can penetrate vulnerabilities in the browser or messengers. Use comprehensive protection: antivirus + updated MIUI + caution when downloading files.

FAQ: Frequent Security Questions for Redmi 9

Can I permanently block APK installations other than Google Play?
Yes, but it will require: Disable all permissions in Install Unknown Applications (see Method 1). Delete or freeze (via ADB) the com.android.packageinstaller system installer. Use MIUI Security to block suspicious files. However, this may prevent legitimate updates (for example, for Mi Fit or Mi Home).
Why do some applications still install after disabling โ€œunknown sourcesโ€?
It's possible for three reasons: ๐Ÿ”น The app has superuser rights (root. ๐Ÿ”น Virus modified system files. Reflashing is required. ๐Ÿ”น You use a job profile (e.g. via Island or Shelter) where the security settings are different. For diagnostics, check the installation logs via adb logcat | grep "PackageManager".
How do I check if my MIUI is hacked?
Signs of hacked firmware: ๐Ÿ”ด B Settings โ†’ The phone is unofficially displayed. MIUI (For example, Xiaomi.eu instead of stable). ๐Ÿ”ด Updater app doesnโ€™t work or offers unofficial updates. ๐Ÿ”ด The list of applications includes Magisk Manager, SuperSU or other rooting tools. To check the integrity of the system, use the command: adb shell getprop ro.miui.region Must return your region (for example, "ru" for Russia)
Can I disable โ€œunknown sourcesโ€ for a specific user on Redmi 9?
Yes, if there are multiple users on the device (Settings) โ†’ System system โ†’ Multiple users: Installation permits APK They are set up separately for each profile: ๐Ÿ”น The owner (the owner) can change these settings for other users. ๐Ÿ”น In guest mode, installation from unknown sources is always blocked.
What are the alternatives to installing APK if you need to test applications?
Instead of installing APKs from unknown sources, consider these safer options: ๐Ÿ”น Google Play Beta Testing: Many applications, VK Yandex.Maps have open beta versions in Google Play. ๐Ÿ”น AppBundle (AAB): Download test builds via Google Play Console (for developers). ๐Ÿ”น Emulators: Test APK BlueStacks or Genymotion without risk to the main device. ๐Ÿ”น MIUI Testers Group: Official firmware testing program from Xiaomi (requires registration).