Skip to content

Conversation

@timrid
Copy link
Contributor

@timrid timrid commented Jan 24, 2026

This PR adds the option --reset-permissions to reset all runtime permissions of an app on Android before it is launched.

I am currently working on porting the BLE library bleak for Android with briefcase and am also creating integration tests for this. In the integration tests, I create a virtual Bluetooth peripheral using bumble and connect it to the Android emulator (netsim, to be precise) to test the reading/writing of characteristics, etc. However, I also test the Bluetooth permissions by confirming the Bluetooth Permission dialog via uiautomator2.

However, when I test this locally and confirm the dialog once, it remains permanently stored in the emulator. The tests run because the permissions have already been granted, but the code coverage is worse. Therefore, I need the option --reset-permissions to have a reproducible starting point for the app.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

timrid added a commit to timrid/bleak that referenced this pull request Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant