Search code examples
androidandroid-studioadbxiaomi

Android studio fails to install apk into Xiaomi Note5A (Redmi) (Installation failed with message INSTALL_FAILED_USER_RESTRICTED:)


Installation failed with message INSTALL_FAILED_USER_RESTRICTED: Install canceled by user. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?

Cannot install APK from Android studio to this device. It prompt an error at the last moment telling me to Uninstall the App First then Install (Existing app may refusing) wheres the app is not installed yet.

Developer Option On USB Debugging On

What else can I Do?


Solution

  • Here is the 100% working solution for this issue. It works in every xiaomi device and its tested -

    Go to Settings -> Permissions -> Install via USB: Uncheck your App if it's listed. Go to Settings -> Additional Settings -> Privacy: Check the Unknown Sources option. Go to Settings -> Additional Settings -> Developer options: Check the Install via USB option. Go to Settings -> Additional Settings -> Developer options:Enable view attribute inspection Finally Go to Settings -> Additional Settings -> Developer options:Turn off MIUI optimization. And then restart your device and whoooaaaa it will work i guaranteee..