INSTALL_FAILED_USER_RESTRICTED : android studio using redmi 4 device
Solution 1
Steps for MIUI 9 and Above:
Settings -> Additional Settings -> Developer options ->
-
Turn off "MIUI optimization" and Restart
-
Turn On "USB Debugging"
-
Turn On "Install via USB"
MTP(Media Transfer Protocol) is the default mode.
Works even in MTP in some cases -
Set USB Configuration to Charging
Solution 2
In your mobile device,make sure you have enabled the following buttons.
Settings > Additional Settings > Developer options
- Install via USB
- USB Debugging (Security settings)
Solution 3
The device is temporarily restricted
error appears in MIUI 8.5
. To resolve the error you need to make WIFI off and make mobile data on and then enable the option “Install via USB” under "Developer Options" in "Settings". it will work for you.
Solution 4
For me none of the above solutions worked. Instead i do following steps that solved the issue :
- Developer Options > Mi Unlock Status > Add account and device. (A success message will appear)
- Turn on USB Debugging.
- Turn on Install via USB.
Note : This is checked on Redmi MIUI Global 8.5 version.
This solution will specifically solve the issue if you have recently logged out of Mi account & again logged in.
Hope it may help someone.
Solution 5
For MIUI 9.6 works:
1. Become a developer: Settings >> About phone >> MIUI version tap 7 times.
2. Again Settings >> Additional settings >> Developer options (turn on) >> USB debugging (turn on) >> Install via USB (turn on).
3. You will be asked for permission through your MI account. Confirm permission.
4. Note: During the installation of the application, your device will give you 7 seconds to confirm the installation. Don't miss it!
Related videos on Youtube
brainLoop
Updated on July 08, 2022Comments
-
brainLoop almost 2 years
Got this freaky error
Installation failed with message Failed to finalize session : 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?
When trying to run the
apk
in my redmi 4MIUI 8.5.4.0
OEM unlocking enabled
Solution Tried
- MIUI optimization turned off
- USB debugging turned on
- Verify apps over USB turned on
NOTE: while turning on install via USB a pop up saying The device is temporarily restricted
-
GoRoS over 6 yearsPossible duplicate of Android Studio: Failure [INSTALL_FAILED_USER_RESTRICTED]
-
Spikatrix about 5 yearsWhen I get this error, I press 'Cancel' and re-upload the APK. It always works the second time
-
Gabriel Espinoza almost 6 yearsfor those who can't enable "Install via USB", turn off your wifi, enable your celular data transfer and try again
-
Henning almost 6 yearsThis solution worked for me after I did these two steps beforehand: 1. Insert a SIM-Card. 2. Turn off Mock SD-Card optimization
-
Mr. Suryaa Jha almost 6 yearsIt works But Set USB Configuration to MTP ( Media Transfer Protocol ) otherwise your Device will not be there in the Select Device to run menu
-
AnswerDroid over 5 yearsEnsure that you've SIM card inserted. they don't work on wifi only.
-
akshay bhange over 5 yearsIs there any way to remove/bypass that confirmation msg every time I install app?
-
SportAtomDroid over 5 yearsDid you ask about point 4? I did not check it but I think it is MIUI extra security. I have not tried to change it.
-
m0skit0 over 5 years* then enable the option "Install via USB"* But where is this option
-
Vicky Salunkhe over 5 yearsInstall via USB option is present under developer options
-
Ricardo Dias Morais about 5 yearsWorks on Redmi Note 7, i only needed to turn of MIUI Optimization, if i do all of those steps, i can turn on the optimization again?
-
Cuong Vo about 5 yearsThis is actually work in-case for some reason the app is on the rejected-list.
-
ascripter almost 5 yearsThis should rather be a comment than an answer
-
Ehsan Sajjad almost 5 yearsall worked except charging for last one, i set it to MTP to work
-
Bibaswann Bandyopadhyay almost 5 yearsStep 1 is most important
-
Mehmet Katircioglu almost 5 yearsyou saved my day, thanks. I denied installing the app by mistake, and selected remember my choice.
-
Shivani Rastogi almost 5 yearsCan you please mention what error you are getting from Google play?
-
Ajay Pandya almost 5 yearsINSTALL_FAILED_USER_RESTRICTED & my OS is MIUI 10 global ,device redmi 7s, app play.google.com/store/apps/…
-
CoolMind over 4 yearsThanks for
Install via USB
. Permission confirmation was not asked (Xiaomi Mi 8). -
Mickäel A. over 4 yearsLIFE SAVER! I did the same mistake and ticked the "Do not ask again" checkbox... Thanks.
-
mochadwi over 4 yearsstep 1, turn off MIUI optimization was enough to debug our apps. "install via usb" now requires Mi Account, which is I never create one :D
-
lunesco over 4 yearsFor me, turning on "Install via USB" was enough :)
-
Billy about 4 yearsMi 9T Pro Just Turn on "USB Debugging" and "Install via USB"
-
Christian Blanco about 4 yearsThe first step and the restart of the device was enough. Thanks a lot.
-
Stephen Hosking almost 4 yearsNew to Xiami, with Redmi 7A and Android 9.0. I already had
Developer Options
.USB Debugging
andInstall via USB
enabled, as normal pre-requisites. Then when I tried to install with AndroidStudio I got the Xiami (?) message "INSTALL_FAILED_USER_RESTRICTED". As instructed by this answer I un-clicked "Turn on MIUI optimisation" (at the bottom of developer settings), but did NOT restart. My apk then installed and ran. Thankyou! CAVEAT: My device is already unlocked, as per @Shivani Rastogi's answer below. Maybe this was also necessary? -
OhhhThatVarun over 3 yearsThis is not even a solution, this is a dirty and inefficient trick
-
Hamed Rahimvand almost 3 yearsDon't turn off MIUI optimization, instead check this stackoverflow.com/a/52328849/10085274 this works for me
-
Krishna Shetty over 2 yearsSettings->Additional Settings->Privacy->Unknown Sources -- was helpful
-
KHAN about 2 yearsIf you denied the app installation by mistake for the first time, this is the way to go! Thanks.
-
CoolMind about 2 yearsOn Redmi Note 4(x) I had to create MI account on step 3.