Android Studio
INSTALL_FAILED_USER_RESTRICTED
Redmi 4
Debugging
App Installation Issues

INSTALL_FAILED_USER_RESTRICTED in Android Studio on a Redmi 4 device

Codemia Knowledge Hub ·

INSTALL_FAILED_USER_RESTRICTED on a Redmi 4 means MIUI's security settings blocked the app install that Android Studio started over ADB. Fix it in Developer options: turn on USB debugging and Install via USB, or disable MIUI optimization, and allow installs from unknown sources.

What the error means

The error appears when you install an application via ADB (Android Debug Bridge) and the device's user restrictions or settings prohibit the install. It is common on MIUI devices such as the Redmi 4 because of MIUI's strict security measures.

Why MIUI blocks the install

The error is usually caused by one of these:

  1. MIUI optimization: MIUI (MI User Interface) is Xiaomi's Android-based firmware for phones and tablets. Its enhanced security settings can restrict installations from unknown sources.
  2. Developer options: some developer options may be misconfigured, which blocks installing applications over USB.
  3. Security settings: MIUI often restricts installations that do not come from official app stores unless the user explicitly allows them.

Fix 1: Adjust Developer options

  • Go to Settings.
  • Navigate to Additional settings > Developer options.
  • Scroll down to the MIUI Optimization toggle and disable it.
  • Ensure that Developer options is enabled.
  • Make sure that USB Debugging is switched on.
  • Verify that Install via USB is enabled if the option is available.

Fix 2: Allow unknown sources

  • Go to Settings.
  • Navigate to Security > Install apps from unknown sources.
  • Enable the option to allow installation from unknown sources.

If the install still fails

  • If the physical device is cumbersome, use an emulator in Android Studio for preliminary testing.
  • Regular updates: keep the device firmware and Android Studio up to date, which may resolve compatibility issues.
  • Device-specific differences: different Redmi models may lay out these settings differently, so check the documentation for your specific device.

Free course
Beginner
7 lessons
2 hours
Tackling System Design Interview Problems

A short course that equips you with the skills to approach system design interviews methodically.

Start the free course
Basis Lab
No course covers this one yet

Basis Lab writes one for you from a sentence about what you want to be able to do, then teaches it and checks you understood. Your first course is free.

Build my course
Data Structures & Algorithms practice on Codemia

Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.

Practice algorithms