Disable new Android permission system I really like the new permission system in Android from the end users point of view as I like to have control over what my phone does but I am really struggeling with it at work, here is why:

We are developing apps and I am responsible for the QA and we recently introduced automated tests. During the testing process, we install our app on an Android Emulator (Visual Studio Emulator for Android).
As our app needs access to location services, Android asks the user for permission. Since the user is "the king", the permission dialog is not exposed to our testing framework so we can't respond to it automatically and because the tests run at night, there is nobody to respond to that dialog manually.

So here is my question:

Is there any setting in Android to disable the new permission system? There is no need to set this setting automatically, I can set this one setting once by hand, the only thing I can't do is to respond to that permission dialog every time the app is installed.

Thanks for your help,
vat
adb install -g package.apk
I had a similar issue in automated testing: when launching the app the permission dialog popped up. The adb shell pm grant … command did not help but there is the  -g option of adb install to grant all permissions upon install. This solved the problem for me.
From adb --help:

Android Debug Bridge version 1.0.41
Version 30.0.5-6877874
[…]
app installation (see also `adb shell cmd package help`):
 install [-lrtsdg] [--instant] PACKAGE
     push a single package to the device and install it
[…]
    -g: grant all runtime permissions
[…]