Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearing package data also revokes development permissions on API < 23 #2181

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

consp1racy
Copy link

This matches the behavior on API 23 and newer.

Background

We have a custom androidTestUtil APK that backports UiConnection.executeShellCommand to Kitkat. It's AOSP-signed so it works in AVD, which has to be enough.
We use it to grant a library under test android.permission.WRITE_SECURE_SETTINGS. We also need to clean that up in the test.
Given that the instrumentation package and target package are the same, removing permission kills our instrumentation process. The solution is to revoke permissions from the orchestrator when testInstrumentationRunnerArguments["clearPackageData"] = "true".

This matches the behavior on API 23 and newer.
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