When I toggle on the install via USB in developer mode:
For me, on Redmi 3s prime with MIUI 9.2, enabling MIUI optimisation on developer menu worked. It caused phone to restart.
i had same problem with MI Redmi 4a i solved it by ->
first become a developer by clicking on
setting->About phone->MIUI version (7-8 times)
then, setting->additional setting->developer options->USB debugging
Turn on your usb debugging, then in developer options go for last item name is 'Turn on MIUI optimization', turn off this option it will ask for reboot , then reboot device by clicking Turn off & reboot button
after reboot go to Setting->Permissions click on top right menu button Turn on install via USB option
thats it !
I had this issue on my Redmi Note 4 with MIUI 9. For me the procedure is very simple.
1. Go to Settings -> Permissions -> Gear icon at top right corner.
2. Give the required permission for Install via USB.
3. Goto Developer Options and try using Install via USB. It will work now.
This process is for one time. I hope you have resolved this issue too.
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.
I have tried every method mentioned here but unfortunately none were worked for MI 5A . Finally i have succeeded by connected to open china VPN
settings->VPN->add new VPN-> Name:Give some name , Type:L2TP/IPSec PSK , Server address: vpn601519347.opengw.net , IPSec preshared key :vpn , User name :vpn , Password :vpn .
Press OK, Enable VPN once the connection is successful go to developer option and enable install via USB option.
You can also try different server address like china088.opengw.net , vpn959922015.opengw.net
"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:
Enjoy!!