When I toggle on the install via USB in developer mode:
- it will pop the toast message said that the device is temporarily restricted
- then toggle off the settings.
Is there any solution for this?
I searched through all the way like turning off MIUI optimization but still does not work. I cannot debug my application by Android Studio in this way......
In my case when i updated MIUI version to the new available version, resolved the issue. So check if there is any update available for your device, go to
Note: Turn your Mobile data before enabling install via USB.
The Best what I found devices without mobile data in device is to SIGN_OUT from MI_Account in the device and Login Again -> Try to enable USB_Debugging(Security Setting)-> enable INSTALL_VIA_USB
Try this
Solution with NO VPNing that worked for me:
Settings->Accounts->MiAccount->AccountSecurity->Devices
I assume not everyone will have a Redmi device listed there, maybe some will have a different device, maybe some will even have the correct device(this is not something I can test by myself), but it makes sense to me that correcting any wrong devices from that list (or maybe deleting all devices like I did) might fix the problem.
if you have root you can force it with adb shell
adb shell su setprop persist.security.adbinput 1
I'm on MIUI Global 9.6 | Stable [9.6.1.0 (NCFMIFD)].
Problem for me was that wifi was not connected. As mentioned in some answers, apparently device tries to connect to server.
It works for without mobile data.