Issue with granting permission in Android 10/API 29 with ADB

I was working on a test scenario where some permissions needed to be changed. The test was checking the flow of app when we deny the persmission with ‘Don’t ask again’ option when the permission popup is displayed. After we have denied the permission, few steps later we enable the denied permission with ADB command as below

1
adb shell pm shell pm grant <package_name> <permission_name>

While the above ADB command doesn’t throw any error, the state of the permission is not grannted when checking in permission of the app in the application info. This is likely to be a bug only in API level 29.

If you have faced this issue, share your solution/progress/investigations in comment. I’ll update this post when I find a solution.

UPDATE: Issue has been reported and fixed. However the fix won’t be available for Android 10.

https://issuetracker.google.com/issues/157840295


Issue with granting permission in Android 10/API 29 with ADB
https://automationlog.in/issue-with-granting-permissions-in-android-10-api29-with-adb-command.html
Author
Prabhash Singh
Posted on
June 1, 2020
Licensed under