grant/revoke permission with adb

橙三吉。 提交于 2019-12-24 00:55:56

问题


The Android documentation contains the following description of the adb grant and adb revoke commands.

Use the adb tool to manage permissions from the command line: List permissions and status by group: $ adb shell pm list permissions -d -g Grant or revoke one or more permissions: $ adb shell pm [grant|revoke] <permission-name> ...Analyze your app for services that use permissions.

i run this command, without any error message:

abd shell pm [grant|revoke] com.my.app android.permission.ACCESS_FINE_LOCATION

If i open settings -> apps -> myapp -> Permissions. i dont see any changes...

How i know if my adb command works? Why there is no any change in the settings of app?


回答1:


You're executing the following:

abd shell pm [grant|revoke] com.my.app android.permission.ACCESS_FINE_LOCATION

It should be adb, for Android Debug Bridge. i.e.

adb shell pm [grant|revoke] com.my.app android.permission.ACCESS_FINE_LOCATION


来源:https://stackoverflow.com/questions/37675774/grant-revoke-permission-with-adb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!