0

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?

Shannah
  • 39
  • 4

1 Answers1

0

I used

    adb shell appops set <app> WRITE_SETTINGS allow

that fixed it for me

Shannah
  • 39
  • 4