How to completely ban the installation of applications from unknown sources on Xiaomi

Downloading applications from unknown sources is one of the main channels of malware penetration on Xiaomi smartphones. MIUI It blocks these installations by default, but users often turn off the protection without understanding the risks. APK From third-party sources, set exceptions for trusted apps and why itโ€™s critical for security.

The manufacturer has integrated several layers of protection into the firmware, but their effectiveness depends on the correct configuration. MIUI 14 and later, there was a separate section for managing installation sources, and in older versions, settings are scattered across different menus. We will look at universal methods for all models โ€“ from the Redmi Note 10 to the flagship Xiaomi 14 Ultra, and also explain how to circumvent restrictions if they interfere with the work of the company.

Why itโ€™s important to block unknown sources on Xiaomi

The main danger of installation APK Unverified sources: malware that can:

  • ๐Ÿ” Stealing data: logins, passwords, bank information through keyloggers or phishing windows.
  • ๐Ÿ“ฑ Spying on the user: access to the camera, microphone, geolocation without your knowledge.
  • ๐Ÿ’ธ Signing for paid services: hidden SMS-mailings or automatic payments.
  • ๐Ÿ”‹ Destroy the battery: background processes, cryptocurrency miners that discharge the battery in a few hours.

According to Kaspersky, in 2023, 38% of all mobile threats were spread through fake ones. APK-files masquerading as popular games (such as Free Fire or Genshin Impact) or modified versions of messengers (WhatsApp Plus, Telegram X). Even if you download a file from a โ€œreliableโ€ site, it could be swapped on the server or infected during transfer.

The second risk is incompatibility with MIUI. Third-party APK Often optimized for โ€œpureโ€ Android, and Xiaomi can conflict with system services, causing a problem:

  • โš ๏ธ Interface freezes or spontaneous reboots.
  • ๐Ÿ“ต Loss of communication (problems with mobile network or Wi-Fi).
  • ๐Ÿ”• Failures in the operation of sensors (gyroscope, NFC, printer).

โš ๏ธ Warning: On bootloader devices, malware can gain super-user rights and infiltrate system files, in which case even resetting to factory settings wonโ€™t help.

How to check current security settings on Xiaomi

Before you make changes, make sure that your device is not disabled.

  1. Open Settings โ†’ Applications โ†’ Application Management.
  2. Tap it on three points (โ‹ฎ) in the upper right corner and select Special Access.
  3. Scroll down and find Install Unknown Apps.

Here you will see a list of all applications that are allowed to install. APK. If you see browsers (Chrome, Mi Browser), file managers (File Manager) in the list, ES Explorer or messengers (Telegram, WhatsApp) are a potential threat, and ideally, the list should be empty or contain only trusted sources (for example, F-Droid for open source software).

AnnexRiskRecommendation
Chrome, FirefoxHigh-pitchedProhibit installation APK browser-wise
Telegram, WhatsAppMedium.Only leave if you share frequently APK friend
File Manager, Total CommanderLow.Allow, but only for local files (not from the Internet)
F-Droid, Aurora StoreMinimumYou can leave it if you use open source software.

If there are apps you don't know on the list, it's a warning sign that they may have been installed without your knowledge.

Remove Unknown Programs through Settings โ†’ Annexes

Check your device with an antivirus (such as Dr.Web or Kaspersky Mobile)

Disable installation from unknown sources for all applications

Reset the security settings to factory (in Settings) โ†’ System system โ†’ Resetting settings)

-->

Step-by-step: how to completely prohibit the installation of APK

To permanently block installation from unknown sources, follow the following steps. MIUI (12 to 16), including the shells for POCO redmi.

Method 1: Through basic security settings

  1. Go to Settings โ†’ Applications โ†’ Application Management.
  2. Press three points (โ‹ฎ) in the upper right corner and select Special Access.
  3. Select Install Unknown Applications.
  4. For each application in the list, move the slider to the Prohibit position.

If the list is empty, you already have maximum protection on your device, but this does not guarantee 100% security: some applications (for example, for example, for example, the most secure devices are already on the device, ADB Fastboot can bypass these restrictions.

Method 2: Developer settings (for advanced users)

This method blocks the installation APK System level, but requires activation of the developer mode:

  1. Activate Developer Mode: Go to Settings โ†’ About Phone and tap the MIUI version 7 times.
  2. Back to Settings โ†’ Additionally. โ†’ For developers.
  3. Find the Debugging Point on USB and disable it (this prevents installation through ADB).
  4. Scroll down and turn off the Installation through USB.

โš ๏ธ Attention: If you are using ADB for debugging or firmware, after performing these actions, you will not be able to install APK To temporarily unlock the function, turn on Debugging. USB only during installation, then turn it off again.

Method 3: Blocking through MIUI Security (for China and global firmware)

In some regional versions MIUI (For example, for China, there is an additional layer of protection โ€“ the Security app):

  1. Open the Security app (shield icon).
  2. Go to the Scanner or Protection section.
  3. Select the Protection Settings โ†’ Installation of applications.
  4. Activate the option to block installation from unknown sources.

In global firmware, this section may be called App Lock or Permission Manager, and if you don't find a paragraph, update the Security app via Google Play.

MIUI 12

MIUI 13

MIUI 14

MIUI 15/16 (new)

I don't know my version.

-->

How to Set Up Exemptions for Trusted Sources

Total ban on installation APK It can be a inconvenience if you regularly use applications from alternative sources (for example, F-Droid for open source or Aurora Store for downloading paid applications for free.

Adding the annex to the whitelist

If you only need to allow installation through one application (such as F-Droid), do the following:

  1. Download and install the desired application from the official store (Google Play or Mi App Store).
  2. Go to Settings โ†’ Applications โ†’ Special Access โ†’ Install unknown applications.
  3. Find your app (like F-Droid) in the list and let it install. APK.
  4. For all other applications, leave a ban.

Now you can install it. APK Only through F-Droid, and installation attempts from other sources (browser, messengers) will be blocked.

Using Aurora Store without risk

Aurora Store is a popular alternative to Google Play, but it requires permission to install APK. Minimize the risks:

  • ๐Ÿ”’ Install the Aurora Store only from the official repository (auroraoss.com).
  • ๐Ÿ›ก๏ธ In the Aurora Store settings, disable Anonymous Login and use your Google account (this will prevent file swapping).
  • ๐Ÿ“ฅ Enable hash-sum verification in download settings.
  • ๐Ÿ”„ Regularly update the Aurora Store app itself.

โš ๏ธ Note: Even the Aurora Store can get modified APK. Always check the file size and hash amount with the official data on the developerโ€™s website.

Creating a separate profile for testing APK

If you frequently test unofficial apps (like beta or game mods), create a separate user profile on Android:

  1. Go to Settings โ†’ System โ†’ Multiplayer mode.
  2. Add a new user (e.g., Test User).
  3. In this profile, allow installation from unknown sources only for the desired applications.
  4. After testing, delete the profile along with all the installed ones. APK.

This approach isolates potential threats from the main profile where your personal data is stored.

๐Ÿ’ก

If you often install APK from a single source (for example, from a forum) 4PDA), Create a separate folder in cloud storage (Mi Cloud or Google Drive) and upload the files there. Then install them through File Manager, previously allowing installation only for this application.

What to do if your security settings reset after the update

After major updates MIUI (For example, version 13 to version 14, installation permissions are sometimes reset. APK. It's because of this:

  • ๐Ÿ”„ Changes in Xiaomiโ€™s security policy.
  • ๐Ÿ“ฆ Conflicts with the cache of system applications.
  • ๐Ÿ”ง Resetting default settings for new features.

To restore protection:

  1. Check the list of allowed applications in Settings โ†’ Annexes โ†’ Special access โ†’ Installation of unknown applications.
  2. If new items appear there (for example, after installing the update for Mi Browser), forbid them from installing them. APK.
  3. Update the Security app via Google Play โ€“ sometimes newer versions recover lost settings.

If the problem repeats after each update, try:

  • ๐Ÿ“Œ Secure security settings with the help of ADB (requires PC and enabled debugging USB).
  • ๐Ÿ”„ Reverse the firmware update to stable version (via Fastboot or Mi Flash Tool).
  • ๐Ÿ“ง Report the bug to Mi Community (Xiaomi forum) by attaching screenshots.
How to fix the settings through ADB
Connect your phone to your PC and execute the command: adb shell settings put global install_non_market_apps 0 This will permanently ban installations from unknown sources at the system level. 0 on 1.

How to get around the block if it interferes with work

In some cases, the prohibition of installation APK It can cause problems, like:

  • ๐ŸŽฎ You want to install a mod for the game (e.g. Genshin Impact with improved graphics).
  • ๐Ÿ”ง You need to test custom software (like LineageOS or Pixel Experience).
  • ๐Ÿ“ฑ You develop your own app and test it on your device.

In these cases, you can temporarily disable the lock, but with the observance of precautions.

Temporary resolution for a single file

If you need to install one APK:

  1. Download the file to the device (do not open it right away!).
  2. Go to Settings โ†’ Applications โ†’ Special Access โ†’ Install unknown applications.
  3. Allow installation for File Manager (or other application you open the file through).
  4. Install. APK, then immediately disable installation for this application.

Use of the ADB single-use

If you are afraid to change the settings, install APK through ADB without permission from unknown sources:

  1. Connect your phone to your PC and activate Debugging via USB.
  2. Download Platform Tools from the Android Developers website.
  3. Place it. APK-file in a folder with platform-tools.
  4. Execute the command: adb install name file.apk
  5. After installation, turn off the debugging by USB.

This method bypasses the limitations MIUI, As the installation takes place through the system interface ADB, Not through a graphical interface.

โš ๏ธ Note: If, after installation, through ADB The application requests additional permissions (for example, access to the SMS or geolocation, this could be a sign of malware. Remove such an application and check the device with antivirus.

Additional security measures for Xiaomi

The prohibition of installation from unknown sources is only part of the protection, so as to ensure that the device is as secure as possible:

  • ๐Ÿ” Turn on bootloader lock: this will prevent custom firmware with malicious code from being installed.
  • ๐Ÿ›ก๏ธ Activate Mi Protect: Xiaomi's service for remotely locking your device when you steal. โ†’ Xiaomi account โ†’ Mi Protect.

For root-enabled devices, the risks are many times greater, and if you use them, install Magisk and activate the SafetyNet Fix module to hide root status from banking applications.

  • ๐Ÿ”ง Use XPrivacyLua to control application permissions.
  • ๐Ÿ“‹ Regularly check logs of system events through Logcat.
  • ๐Ÿ”’ Block suspicious domains via AdGuard or Blokada.

๐Ÿ’ก

Even with blocked unknown sources, there is a risk of installing malware through vulnerabilities in the browser or messengers. Always check links before you click and do not open files from unknown senders.

Frequent Mistakes and How to Avoid Them

When setting up security, users often make mistakes that negate all efforts.

Mistake.Effects of consequencesHow to fix it
Installation permission for Chrome or Mi BrowserMalicious sites can be automatically downloaded and installed APKDisable installation for all browsers in special access settings
Use of third-party File Manager (e.g, ES Explorer)Some file managers have vulnerabilities that can bypass restrictions.Install the official Mi File Manager and remove third-party analogues
Google Play Protect is now offlineThe system will not scan applications for virusesEnable Play Protect in Google Play Settings
Ignoring updates MIUI SecurityOlder version does not protect against new threatsUpdate the Security app via Google Play
Installation APK via Telegram or WhatsAppAttackers can send malicious files in chat roomsDisable the installation for messengers or check files with antivirus before opening

Another common mistake is the use of APK from unverified sources, such as:

  • ๐Ÿšซ Sites like apkpure.com, apkmirror.com (even they sometimes distribute modified files).
  • ๐Ÿšซ Telegram channels with hacked versions of games or programs.
  • ๐Ÿšซ Forums where users post โ€œoptimizedโ€ firmware.

If you need to download APK, Do this only from official sources:

  • โœ… Official Developer Sites (e.g. Signal.org).
  • โœ… GitHub (check the number of stars and the activity of the repository).
  • โœ… APKMirror (but only if the file is signed with the original certificate).

FAQ: Answers to Frequent Questions

Can I establish APK, If you completely ban unknown sources?
Yes, but only through ADB (See the instructions above or temporarily permit installation for a specific application (e.g. File Manager.
Why After Updating MIUI Re-installation from unknown sources?
It's a bug of some versions. MIUI. After major updates (e.g. 13 to 14) some security settings are reset. โ†’ Annexes โ†’ Special access and prohibit unnecessary access.
How do I check if my firmware is hacked?
Signs of hacked firmware: Unknown applications in the installed list. Strange processes in Settings โ†’ Battery โ†’ Battery usage. Unexpected root rights requests (if you don't have root rights); Advertising in system applications (e.g. Settings); To verify firmware integrity, compare the hash amount of your version MIUI Officially on Xiaomi's website.
Can I prohibit installation? APK only for certain folders?
No, in MIUI There is no folder lock, but you can: Disable installation for all applications except File Manager. APK in an encrypted container (e.g., via Cryptomator) using a separate user profile to test files.
What to do if the virus has already entered the device?
Act on the algorithm: Shut down the Internet and mobile network. Delete suspicious applications through Settings โ†’ Apps. Check the device with an antivirus (Dr.Web or Malwarebytes). If the virus does not remove, reset to factory settings (Settings) โ†’ System system โ†’ Reset settings. After reset, do not restore data from the backup copy - it may contain malicious code.