Install app via usb: The device is temporarily restricted

kyo picture kyo · Sep 3, 2017 · Viewed 82.8k times · Source

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......

Answer

Vineet Ravi picture Vineet Ravi · Dec 10, 2017

"Install via USB" wont work if your Xiaomi phone is running MIUI 8 or above. Looks like when you try to Enable this option, your phone trys to connect to some chinese server and fails.

I got a work around and it worked for me. Idea is to connect to Chinese-Shanghai server through VPN. Try the following:

  1. Install PlexVPN from Playstore and login into it. You will get a 24 hr free VPN service.
  2. Select China-Shanghai server and connect.
  3. From developer option in your Xiaomi phone, Enable "Install via USB".
  4. You can then disconnect the VPN and logout from PlexVPN.

Enjoy!!