To grant permissions to an application in android use this from adb shell:
>pm grant package.com android.permission.CAMERA
To view a list of optional permissions, run this from adb shell:
pm list permissions
Some permissions cannot be set this way, so we can bring the user to the application permissions page by running:
am start -a android.settings.MANAGE_APP_ALL_FILES_ACCESS_PERMISSION -d package:somepackage.com
Tags
android