使用adb授予/撤消权限 [英] grant/revoke permission with adb

查看:1502
本文介绍了使用adb授予/撤消权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android文档包含对adb grant和adb吊销命令的以下描述.

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

使用adb工具从命令行管理权限:列表 权限和状态(按组):$ adb shell pm list permissions -d -g 授予或撤消一个或多个权限:$ adb shell pm [grant|revoke] <permission-name> ...分析您的应用程序以使用哪些服务 权限.

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

如果我打开设置->应用程序-> myapp->权限. 我看不到任何变化...

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

我怎么知道我的adb命令是否有效?为什么应用程序的设置没有任何变化?

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

推荐答案

您正在执行以下操作:

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

对于 Android调试桥,它应该为 adb .即

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

这篇关于使用adb授予/撤消权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆