Mi 9 - "adb install" disable popup dialog "Install via USB"


mariusz102102

Members
Aug 23, 2020
1
3
Hi,

My problem is with developing a mobile application on Xiaomi devices
Each time when I install me developed application by command
"$ adb install app/build/outputs/apk/release/studio-arm64-v8a-release.apk"

Popup dialog is shown (please see the attached picture) and I have to unlock my phone and press the Install button.
If I will not press in 10 seconds "Install" button installation fails with error message:
"$ adb install app/build/outputs/apk/release/studio-arm64-v8a-release.apk
Performing Streamed Install
adb: failed to install app/build/outputs/apk/release/studio-arm64-v8a-release.apk: Failure [INSTALL_FAILED_USER_RESTRICTED: Install canceled by user]
}
"

Question is how to get rid (disable) popup dialog from the attached image after each "adb install app/build/outputs/apk/release/studio-arm64-v8a-release.apk"?

p.s.
1. On the dialog, there is option "Remember my choice" - but it does not work
2. turn off “Turn on MIUI optimization” in developer options remove this dialog but it changes many thinks in MIUI

Regards,
Mariusz
31647