I tried different things but I'm not able to find a solution yet. My App wants the user to change the birghtness of the screen. A system dialog pops up, that this needs a special permission and I than have allow the App in System Settings to allow that.
Because I want to run instrumented tests on my device, I'm looking for a solution using the command line to grant that permission automativally. All other permission are finde if I use:
"adb -s " +device+ " install -g " +version
But this does not allow the brightness settings. I tried:
adb shell settings put secure enabled_accessibility_services screen_brightness
and
adb shell appops set +app+ SCREEN_BRIGHTNESS allow
but this does not help.
Any suggestions?