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

Install applications from unknown sources (APK-The Xiaomi Redmi Note 9 can pose a serious security threat, and viruses, spyware, or unstable builds are often spread through such files. This is especially true for parents who want to restrict their children’s access to unwanted content, or for corporate devices that require strict control over software.

Redmi Note 9

MIUI

Xiaomi

It's important to understand that simply turning off the tick in your security settings isn't always enough. Attackers can bypass these restrictions through ADBs, third-party launchers, or even firmware vulnerabilities. So we'll look at a comprehensive approach, from basic constraints to full lockdown through developer mode and administrator password.

If you're handing the phone to a child or colleague, it's not enough to just say, "Don't install anything extra," and you have to technically rule it out. Then you have step-by-step instructions based on the features of MIUI 12/13/14 (depending on the firmware version of your Redmi Note 9).

Why can’t you just turn off Unknown Sources in your settings?

On most Android devices, just go to Settings β†’ Security and deactivate the β€œInstall from unknown sources” option, but on Xiaomi, this mechanism works differently:

  • πŸ”„ Application control: B MIUI installation permit APK It's not issued globally, but for each application separately (for example, for File Manager or Browser.
  • πŸ”“ Passage ADB: Even if you block all known sources, installing through ADB (debugging USB) remain possible.
  • πŸ“± Branded launchers: Some versions MIUI set up APK Directly from the desktop, bypassing standard restrictions.

Also, after resetting or updating the firmware, these resolutions can be reset to default values, so a combination of several methods is required to securely lock.

⚠️ Note: If malicious applications are already installed on the phone, they can independently issue installation rights. APK. Before setting up the lock, check the device with an antivirus (for example, Dr.Web or Kaspersky).

Method 1: Disabling permissions for all applications

This is a basic method that will limit APK installation through standard MIUI applications.It will not protect against ADB or rooted methods, but will close 90% of the "holes" for ordinary users.

Steps:

  1. Open Settings β†’ Applications β†’ Application Management.
  2. Click on the three dots in the top right corner and select "Special Access".
  3. Slip on the item "Install unknown applications".
  4. In the list, select each application in turn (e.g., Browser, File Manager, Google Chrome) and translate the slider to the position "Disallow".

After that, installing APKs through these applications will become impossible.

  • πŸ”„ New applications (e.g., after installation) may automatically receive this permission.
  • πŸ“ Some file managers (such as Solid Explorer) bypass this limitation.

Is the blackout verified for the Browser?

Is the disabling for the File Manager checked?

Is the shutdown checked for Google Chrome?

Is the blackout verified for Mi Browser?

Have previously issued permissions for third-party applications been removed?

-->

Method 2: Blocking through Developer Mode

If basic settings are not enough, you can use hidden options in the developer mode, which is more reliable, but requires caution - wrong actions can disrupt the system.

How to turn on the developer mode:

  1. Go to Settings. β†’ The phone.
  2. Tap 7 times on the item "Version" MIUI" (A notice will appear saying, β€œYou have become a developer!").
  3. Return to the main settings menu and open a new section for developers.

Now one of two solutions can be applied:

MethodAction.EfficiencyRisks.
Shutdown USB-debuggingIn For Developers, disable "Debugging by USB" and "Installation by USB".Blocks installation via ADB and Fastboot.It may prevent legal firmware updates.
Blocking OEM-unlockingTurn off "OEM Unlock" in the developer settings.Prevents unlocking the loader and installing custom firmware.It is not possible to use the password of your Mi Account.
Background prohibitionTurn off "Installation from unknown sources" in the section For developers β†’ Security.Blocks automatic APK installation without user confirmation.Some system applications may ignore this.

⚠️ Attention: Disconnection OEM-unlocking binds the device to the Mi Account. If you forget the password, unlock the phone after reset will be impossible without the official service center Xiaomi.

Yes, regularly | Yes, but very rarely | No, never | I don't know what it is-->

Method 3: Use MIUI control (for parents)

If you're setting up a phone for a child, the best option is to activate parental controls in MIUI, which allows you not only to block APK installation, but also to limit your use time, access to games and purchases.

How to set up:

  1. Open Settings β†’ Xiaomi Account β†’ Family Control (or Digital Well-Being in the new MIUI versions)
  2. Create a profile of your child by linking them to your Mi Account (or without linking them if you don’t have an account).
  3. In the "Limits" section, select "Install applications" and set a ban.
  4. Set the administrator password (not the same as unlocking the screen!).

Advantages of this method:

  • πŸ”’ The lock is at the system level, it is impossible to bypass it without a password.
  • πŸ“Š You can set up notifications about installation attempts.
  • πŸ•’ Additional time of use of the device is limited.

Disadvantages:

  • πŸ”„ Requires regular updates MIUI (In older versions, the function is unstable).
  • πŸ“± Do not block the installation through ADB or after resetting.

πŸ’‘

If your child knows the password for your Mi Account, they can reset parental controls through Settings β†’ Xiaomi Account β†’ Delete account. Use a separate account for control!

Method 4: Complete lock through the administrator password (for experienced)

The most reliable, but also the most difficult, method is to use administrative rights and password protection, which is suitable for corporate devices or when you need to completely eliminate the installation of third-party software.

Instructions:

  1. Install a device management app like Hexnode MDM or Mi Admin (the official solution from Xiaomi for business).
  2. In the application settings, activate the option "Block APK installation".
  3. Please set the administrator password (other than the one used by the administrator) PIN-screen-code!).
  4. In Settings β†’ Security β†’ Device administrators check that the application has administrator rights.

After that, any attempt to install an APK will require an administrator password to be entered, and even through ADB or Fastboot, the system will request confirmation.

What's blocked:

  • πŸ“± Installation through any file managers.
  • πŸ”Œ Installation through ADB or Fastboot.
  • πŸ”„ Updating existing applications from unknown sources.

⚠️ Note: If you delete the administrator application without first removing its rights, the device may lock. To avoid this, first disable it in Settings β†’ Security β†’ Device administrators.

What to do if you forget the administrator password?
If you forget your administrator password, the only way to reset it is to reset the entire Wipe Data via Recovery Mode. To do this: Turn off your phone. Press the Power button + Volume up until the Mi logo appears. From the Recovery menu, select Wipe Data β†’ Wipe All Data. Confirm the action (all data will be deleted!). Once reset, the administrator password will reset, but all data on the device, including photos and applications, will be deleted.

Method 5: Alternative methods (for advanced users)

If standard methods do not work, more radical measures can be used, requiring technical knowledge and may result in a loss of warranty.

Option 1: Removal of system applications

Some MIUI system applications (e.g., Package Installer) are responsible for installing APKs, and can be disabled or removed via ADB:

adb shell pm uninstall -k --user 0 com.android.packageinstaller

After that, installing any APKs will become impossible, but legal updates may also stop working.

Option 2: Change access rights through Magisk

If the bootloader is unlocked and Magisk is installed, you can use modules like "App Systemizer" or "Disable Flags" to block APK installation at the kernel level.

Option 3: Custom Recovery firmware

Installing TWRP and modified firmware (like LineageOS) allows you to fully control access rights, but this cancels the warranty and requires unlocking the bootloader.

MethodRequired rightsEfficiencyRisks.
Removal of Package InstallerADB100% lockdownSystem malfunction
Magisk modulesRoot rightsSelective lockdownLoss of guarantee
Custom firmwareUnlocked loaderFull control.Risk of "bricking"

πŸ’‘

Any modifications to the system (root, custom firmware) are warranty-free and can cause the phone to run in an unstable manner, and only use them if you fully understand the risks!

What to do if the lock is not working?

If you still have the APK installed after all the settings, check the following points:

  • πŸ”„ Update of the firmware: In some versions MIUI (particularly MIUI 12.5 and below) there are bugs that allow you to bypass restrictions.
  • πŸ“± Resetting: If the phone was bought used, the previous owner could leave the back door for installation APK. Perform a complete reset (Settings) β†’ Additionally. β†’ Recovery and discharge).
  • πŸ”Œ Virus testing: Some Trojans (like FakeApp or Agent) can self-issue installation rights.
  • πŸ”’ Superuser rights: If root is activated on the phone, any lock is useless. check through the Root Checker app.

If the problem persists, it may be that the device has a modified firmware installed. Check this in Settings β†’ About Phone β†’ MIUI Version. Official firmware is marked "Stable" or "Developer" without postfixes like global or eea.

FAQ: Frequent questions

Can I block APK installation without an administrator password?
Yes, but it's less reliable. The basic MIUI settings don't require a password, but they can be bypassed through ADB or reset, and you have to lock it completely.
Will the lock be effective after the MIUI update?
Most of the time, yes, but some updates reset the permissions for applications. After major updates (e.g., from MIUI 13 to MIUI 14), check the settings again.
Can you block the installation of APKs only for certain users (e.g., a guest profile)?
The Redmi Note 9 doesn't have a full-fledged multiplayer system like tablets, but you can create a limited profile through Settings β†’ System β†’ Multiplayer (not available in all versions of MIUI). In guest mode, APK installation is prohibited by default.
What if the child resets and bypasses the lock?
If the phone is linked to a Mi Account, you'll need to reset your username and password from that account, without which the device won't activate (Mi Cloud Lock), and you can use apps like Find My Device to remotely lock.
Are there any applications to block APK installation?
Yes, for example: AppLock (blocks access to the APK installer), Norton App Lock (requires a password to install new applications), Mi Admin (the official solution from Xiaomi for enterprise devices), but they are less reliable than system methods, as they can be removed or bypassed.