Installed apps cannot access notifications and Accessibility APIs on Android 13+

  • Device OS and version: Android 13
  • Device model/manufacturer: several
  • F-Droid version (in the About screen): 1.17.0
  • F-Droid privileged extension version (if installed): Not installed

What did you do? (clear steps if possible)

  1. Installed Gadgetbridge via F-Droid application.
  2. Tried to Allow Notification Access for Gadgetbridge via Android settings.

What did you expect to see?

Expected to be able to Allow Notification Access.

What did you see instead?

  1. In Android settings "Allow Notification Access" was grayed out for Gadgetbridge installed from F-Droid.
  2. The setting become available after running the following command line in adb shell session from a computer:
cmd appops set nodomain.freeyourgadget.gadgetbridge ACCESS_RESTRICTED_SETTINGS allow

More info

This affects also other applications and only if they are installed from F-Droid. E.g. On Android 13 device (without running the command-line mentioned above) it is possible to Allow Notification Access for Bangle.js Gadgetbridge installed from Google Play, but not for Bangle.js Gadgetbridge installed from F-Droid.

Technical info

Android 13+ doesn't allow access to notifications and Accessibility APIs for sideloaded apps.

More technical info here and here. The second link mentions "When an app with an accessibility service is sideloaded by an app that uses the session-based package installation API, this restriction does not apply and the user can enable the accessibility service.".

Could it be possible to implement use of the session-based package installation API in F-Droid?