I try to install app via adb and get a error:
$ ./adb -d install /Users/dimon/Projects/one-place/myprogram/platforms/android/build/outputs/apk/android-debug.
If your switch Install by USB on and you are getting "the device is temporarily restricted" error, then apply any of the default mobile themes. If any other developer theme is applied then it will not Allow you to switch Install by USB on. This works for me.
1 Settings
2 Additional Settings
3 Developer Options
4 Developer options: Check the Install via USB option.
I had the same problem before. Here was my solution:
For Mi or Xiaomi Device
1) Setting
2) Additional Setting
3) Developer option
4) Install via USB: Toggle On
It is working fine for me.
Note: Not working then try following options also
1) Sign to MI account (Not applicable to all devices)
2) Also Disable Turn on MIUI optimization: Setting -> Additional Setting -> Developer Option, near bottom we will get this option.
3) Developer option must be enabled and Link for enabling developer option: Description here
Still not working?
-> signed out from Mi Account and then created new account and enable USB Debugging.
Thanks
In addition, any app lock password should be removed by SETTINGS>APP LOCK ,enter the set password and remove the lock. This worked for me on REDMI 4A
Sometimes the application is bad generated: bad signed or bad aligned and report a mistake.
Check your jarsigner and zipaligned commands.