While doing Android development you need to install app using USB but Xiaomi Note 4 will not allow you to do unless you enable installing from USB option. Follow below steps to enable it:
A) First you need to enable Developer Options. If you are already enable it, you can skip to step “B” directly.
1. Go to “Setting”.
2. Look for “About Phone” and click on it.
3. click “MIUI version” 7 times to enable “Developer option”.
You will see toast message “now you are developer”.
Now you need to enable few options in “Developer option” like “Developer options” (first in the list), “Stay awake” and “USB Debugging”.
B) Update “Install via USB”
1. Go to Settings > Additional settings > Developer options.
2. Enable “Install via USB” you may get error like “the device is tempeorarily restricted.
3. To resolve above error you need to make WIFI off and make mobile data on and then enable the option “Install via USB”. it will work for you.
If you are working on older version MIUI (below 8)
Install via USB option can be enable as below:
1. Go to “Security” and click on “options” at the top right corner of the screen.
2. Look for “Feature Settings” block and click on “Permissions”
3. Now you can toggle the “Install via USB”
Note: I am working on Xiaomi Note 4 with MIUI 8.5 version.
Hope it will help someone!!!