Unable to install app Xiaomi devices

I have been trying to pick up Appium using some sample apps from the PlayStore.
I have a Xiaomi Note device.

I have created a few tests but whenever I am trying to run these tests the first screen that shows is the Permissions Manager which asks for confirmation to install the app. Since this is not part of my app, how can I handle this in Appium (or if this needs to be handled in Appium at all).

I noticed another interesting issue.

When I installed the app (either using ADB or using Appium), the first time around it asks for permission but once installed it does not ask for permission again. Must be the permissions are getting cached.

Any help here would be great.

Go to Developer option in settings and disable the “verify app over USB”.

I did that pr4bh4sh. But no luck.

I think Appium sits on top of ADB for installing applications. In addition to disabling the “verify app over USB” setting in the developer options, also make sure to turn on the setting “Allow installation of apps from unknown sources” under “Security” in Settings.