我的Android进阶之旅------>如何获取系统中定义了那些权限

在Window控制台中输入如下命令可以看到Android系统中列出的所有权限(如果自定义权限注册成功,在这里也会找到这些自定义的权限)

adb shell pm list permissions

C:\Users\Administrator>adb shell pm list permissions
All Permissions:

permission:android.permission.INTERNAL_SYSTEM_WINDOW
permission:android.permission.MOVE_PACKAGE
permission:android.permission.CONTROL_WIFI_DISPLAY
permission:android.permission.READ_INPUT_STATE
permission:android.permission.GET_TOP_ACTIVITY_INFO
permission:android.permission.REBOOT
permission:android.permission.FILTER_EVENTS
permission:android.permission.STATUS_BAR
permission:android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
permission:android.permission.STOP_APP_SWITCHES
permission:android.permission.BIND_VPN_SERVICE
permission:android.permission.SET_KEYBOARD_LAYOUT
permission:android.permission.MANAGE_APP_TOKENS
permission:android.permission.RETRIEVE_WINDOW_INFO
permission:android.permission.BIND_PACKAGE_VERIFIER
permission:android.permission.ACCESS_KEYGUARD_SECURE_STORAGE
permission:android.permission.COPY_PROTECTED_DATA
permission:com.android.email.permission.ACCESS_PROVIDER
permission:android.permission.MASTER_CLEAR
permission:android.permission.MODIFY_NETWORK_ACCOUNTING
permission:android.permission.READ_NETWORK_USAGE_HISTORY
permission:android.permission.UPDATE_APP_OPS_STATS
permission:android.permission.INJECT_EVENTS
permission:android.permission.INSTALL_LOCATION_PROVIDER
permission:android.permission.UPDATE_LOCK
permission:android.permission.CONFIRM_FULL_BACKUP
permission:android.permission.PACKAGE_USAGE_STATS
permission:android.permission.ACCESS_SURFACE_FLINGER
permission:android.permission.CONTROL_KEYGUARD
permission:android.permission.PACKAGE_VERIFICATION_AGENT
permission:android.permission.MMS_SEND_OUTBOX_MSG
permission:android.intent.category.MASTER_CLEAR.permission.C2D_MESSAGE
permission:android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK
permission:android.permission.BIND_TEXT_SERVICE
permission:android.permission.MARK_NETWORK_SOCKET
permission:android.permission.GRANT_REVOKE_PERMISSIONS
permission:android.permission.READ_FRAME_BUFFER
permission:android.permission.UPDATE_DEVICE_STATS
permission:android.permission.FORCE_BACK
permission:android.permission.CAPTURE_SECURE_VIDEO_OUTPUT
permission:android.permission.SET_ORIENTATION
permission:com.android.certinstaller.INSTALL_AS_USER
permission:android.permission.FACTORY_TEST
permission:android.permission.MAGNIFY_DISPLAY
permission:android.permission.BIND_DEVICE_ADMIN
permission:android.permission.CLEAR_APP_USER_DATA
permission:android.permission.SHUTDOWN
permission:android.permission.MEDIA_CONTENT_CONTROL
permission:android.permission.BIND_INPUT_METHOD
permission:android.permission.BIND_ACCESSIBILITY_SERVICE
permission:android.permission.DOWNLOAD_CACHE_NON_PURGEABLE
permission:android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS
permission:com.android.printspooler.permission.ACCESS_ALL_PRINT_JOBS
permission:android.permission.SERIAL_PORT
permission:android.permission.CONFIGURE_WIFI_DISPLAY
permission:android.permission.CAPTURE_AUDIO_OUTPUT
permission:android.permission.ACCESS_CHECKIN_PROPERTIES
permission:android.permission.CRYPT_KEEPER
permission:android.permission.DEVICE_POWER
permission:android.permission.DELETE_PACKAGES
permission:android.permission.ACCESS_CACHE_FILESYSTEM
permission:android.permission.START_PRINT_SERVICE_CONFIG_ACTIVITY
permission:android.permission.BIND_NFC_SERVICE
permission:android.permission.ACCESS_ALL_DOWNLOADS
permission:android.permission.ACCESS_DOWNLOAD_MANAGER
permission:android.permission.CONTROL_LOCATION_UPDATES
permission:android.permission.DELETE_CACHE_FILES
permission:android.permission.CAPTURE_VIDEO_OUTPUT
permission:android.permission.ACCESS_NETWORK_CONDITIONS
permission:android.permission.INVOKE_CARRIER_SETUP
permission:android.permission.ACCESS_NOTIFICATIONS
permission:android.permission.BRICK
permission:android.permission.SET_ACTIVITY_WATCHER
permission:android.permission.BACKUP
permission:android.permission.SET_TIME
permission:android.permission.STATUS_BAR_SERVICE
permission:android.permission.MANAGE_DEVICE_ADMINS
permission:android.permission.PERFORM_CDMA_PROVISIONING
permission:android.permission.CAPTURE_AUDIO_HOTWORD
permission:android.permission.INSTALL_PACKAGES
permission:android.permission.BIND_NOTIFICATION_LISTENER_SERVICE
permission:com.android.browser.permission.PRELOAD
permission:android.permission.SET_POINTER_SPEED
permission:android.permission.CALL_PRIVILEGED
permission:android.permission.CHANGE_COMPONENT_ENABLED_STATE
permission:android.permission.BIND_PRINT_SPOOLER_SERVICE
permission:android.permission.BIND_PRINT_SERVICE
permission:android.permission.MANAGE_CA_CERTIFICATES
permission:android.permission.MANAGE_NETWORK_POLICY
permission:android.permission.WRITE_GSERVICES
permission:android.permission.FREEZE_SCREEN
permission:android.permission.BIND_WALLPAPER
permission:android.permission.BIND_REMOTEVIEWS
permission:android.permission.TEMPORARY_ENABLE_ACCESSIBILITY
permission:android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY

如果正在使用多个Android设备,可以添加-d命令行参数,只列出通过USB数据线连接的Android设备中的权限列表,或使用-s命令行参数,指定要列出哪一个USB Android设备或模拟器中的权限列表

列出USB Android设备中的权限列表

adb -d shell pm list permissions

列出指定 Android设备中的权限列表

adb -s emulator-5554 shell pm list permissions

C:\Users\Administrator>adb -s emulator-5554 shell pm list permissions
All Permissions:

permission:android.permission.INTERNAL_SYSTEM_WINDOW
permission:android.permission.MOVE_PACKAGE
permission:android.permission.CONTROL_WIFI_DISPLAY
permission:android.permission.READ_INPUT_STATE
permission:android.permission.GET_TOP_ACTIVITY_INFO
permission:android.permission.REBOOT
permission:android.permission.FILTER_EVENTS
permission:android.permission.STATUS_BAR
permission:android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
permission:android.permission.STOP_APP_SWITCHES
permission:android.permission.BIND_VPN_SERVICE
permission:android.permission.SET_KEYBOARD_LAYOUT
permission:android.permission.MANAGE_APP_TOKENS
permission:android.permission.RETRIEVE_WINDOW_INFO
permission:android.permission.BIND_PACKAGE_VERIFIER
permission:android.permission.ACCESS_KEYGUARD_SECURE_STORAGE
permission:android.permission.COPY_PROTECTED_DATA
permission:com.android.email.permission.ACCESS_PROVIDER
permission:android.permission.MASTER_CLEAR
permission:android.permission.MODIFY_NETWORK_ACCOUNTING
permission:android.permission.READ_NETWORK_USAGE_HISTORY
permission:android.permission.UPDATE_APP_OPS_STATS
permission:android.permission.INJECT_EVENTS
permission:android.permission.INSTALL_LOCATION_PROVIDER
permission:android.permission.UPDATE_LOCK
permission:android.permission.CONFIRM_FULL_BACKUP
permission:android.permission.PACKAGE_USAGE_STATS
permission:android.permission.ACCESS_SURFACE_FLINGER
permission:android.permission.CONTROL_KEYGUARD
permission:android.permission.PACKAGE_VERIFICATION_AGENT
permission:android.permission.MMS_SEND_OUTBOX_MSG
permission:android.intent.category.MASTER_CLEAR.permission.C2D_MESSAGE
permission:android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK
permission:android.permission.BIND_TEXT_SERVICE
permission:android.permission.MARK_NETWORK_SOCKET
permission:android.permission.GRANT_REVOKE_PERMISSIONS
permission:android.permission.READ_FRAME_BUFFER
permission:android.permission.UPDATE_DEVICE_STATS
permission:android.permission.FORCE_BACK
permission:android.permission.CAPTURE_SECURE_VIDEO_OUTPUT
permission:android.permission.SET_ORIENTATION
permission:com.android.certinstaller.INSTALL_AS_USER
permission:android.permission.FACTORY_TEST
permission:android.permission.MAGNIFY_DISPLAY
permission:android.permission.BIND_DEVICE_ADMIN
permission:android.permission.CLEAR_APP_USER_DATA
permission:android.permission.SHUTDOWN
permission:android.permission.MEDIA_CONTENT_CONTROL
permission:android.permission.BIND_INPUT_METHOD
permission:android.permission.BIND_ACCESSIBILITY_SERVICE
permission:android.permission.DOWNLOAD_CACHE_NON_PURGEABLE
permission:android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS
permission:com.android.printspooler.permission.ACCESS_ALL_PRINT_JOBS
permission:android.permission.SERIAL_PORT
permission:android.permission.CONFIGURE_WIFI_DISPLAY
permission:android.permission.CAPTURE_AUDIO_OUTPUT
permission:android.permission.ACCESS_CHECKIN_PROPERTIES
permission:android.permission.CRYPT_KEEPER
permission:android.permission.DEVICE_POWER
permission:android.permission.DELETE_PACKAGES
permission:android.permission.ACCESS_CACHE_FILESYSTEM
permission:android.permission.START_PRINT_SERVICE_CONFIG_ACTIVITY
permission:android.permission.BIND_NFC_SERVICE
permission:android.permission.ACCESS_ALL_DOWNLOADS
permission:android.permission.ACCESS_DOWNLOAD_MANAGER
permission:android.permission.CONTROL_LOCATION_UPDATES
permission:android.permission.DELETE_CACHE_FILES
permission:android.permission.CAPTURE_VIDEO_OUTPUT
permission:android.permission.ACCESS_NETWORK_CONDITIONS
permission:android.permission.INVOKE_CARRIER_SETUP
permission:android.permission.ACCESS_NOTIFICATIONS
permission:android.permission.BRICK
permission:android.permission.SET_ACTIVITY_WATCHER
permission:android.permission.BACKUP
permission:android.permission.SET_TIME
permission:android.permission.STATUS_BAR_SERVICE
permission:android.permission.MANAGE_DEVICE_ADMINS
permission:android.permission.PERFORM_CDMA_PROVISIONING
permission:android.permission.CAPTURE_AUDIO_HOTWORD
permission:android.permission.INSTALL_PACKAGES
permission:android.permission.BIND_NOTIFICATION_LISTENER_SERVICE
permission:com.android.browser.permission.PRELOAD
permission:android.permission.SET_POINTER_SPEED
permission:android.permission.CALL_PRIVILEGED
permission:android.permission.CHANGE_COMPONENT_ENABLED_STATE
permission:android.permission.BIND_PRINT_SPOOLER_SERVICE
permission:android.permission.BIND_PRINT_SERVICE
permission:android.permission.MANAGE_CA_CERTIFICATES
permission:android.permission.MANAGE_NETWORK_POLICY
permission:android.permission.WRITE_GSERVICES
permission:android.permission.FREEZE_SCREEN
permission:android.permission.BIND_WALLPAPER
permission:android.permission.BIND_REMOTEVIEWS
permission:android.permission.TEMPORARY_ENABLE_ACCESSIBILITY
permission:android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY

adb shell pm list permission-groups

C:\Users\Administrator>adb shell pm list permission-groups
permission group:android.permission-group.DEVELOPMENT_TOOLS
permission group:android.permission-group.CALENDAR
permission group:android.permission-group.AFFECTS_BATTERY
permission group:android.permission-group.STATUS_BAR
permission group:android.permission-group.DISPLAY
permission group:android.permission-group.CAMERA
permission group:android.permission-group.COST_MONEY
permission group:android.permission-group.NETWORK
permission group:android.permission-group.MICROPHONE
permission group:android.permission-group.SCREENLOCK
permission group:android.permission-group.AUDIO_SETTINGS
permission group:android.permission-group.VOICEMAIL
permission group:android.permission-group.SYNC_SETTINGS
permission group:android.permission-group.APP_INFO
permission group:android.permission-group.SOCIAL_INFO
permission group:android.permission-group.LOCATION
permission group:android.permission-group.DEVICE_ALARMS
permission group:android.permission-group.PHONE_CALLS
permission group:android.permission-group.SYSTEM_TOOLS
permission group:android.permission-group.USER_DICTIONARY
permission group:android.permission-group.BLUETOOTH_NETWORK
permission group:android.permission-group.SYSTEM_CLOCK
permission group:android.permission-group.MESSAGES
permission group:android.permission-group.STORAGE
permission group:android.permission-group.ACCESSIBILITY_FEATURES
permission group:android.permission-group.WRITE_USER_DICTIONARY
permission group:android.permission-group.PERSONAL_INFO
permission group:android.permission-group.WALLPAPER
permission group:android.permission-group.BOOKMARKS
permission group:android.permission-group.ACCOUNTS
permission group:android.permission-group.HARDWARE_CONTROLS

PS:《我的Android进阶之旅------>Android权限参考大全》 

地址:http://blog.csdn.net/ouyang_peng/article/details/8885855

==================================================================================================

  作者:欧阳鹏  欢迎转载,与人分享是进步的源泉!

  转载请保留原文地址:http://blog.csdn.net/ouyang_peng

==================================================================================================

版权声明:本文为博主原创文章,未经博主允许不得转载。

时间: 2024-12-09 16:45:39

我的Android进阶之旅------>如何获取系统中定义了那些权限的相关文章

我的Android进阶之旅------>Android疯狂连连看游戏的实现之实现游戏逻辑(五)

在上一篇<我的Android进阶之旅------>Android疯狂连连看游戏的实现之加载界面图片和实现游戏Activity(四)>中提到的两个类: GameConf:负责管理游戏的初始化设置信息. GameService:负责游戏的逻辑实现. 其中GameConf的代码如下:cn\oyp\link\utils\GameConf.java package cn.oyp.link.utils; import android.content.Context; /** * 保存游戏配置的对象

我的Android进阶之旅------&gt; Android在TextView中显示图片方法

面试题:请说出Android SDK支持哪些方式显示富文本信息(不同颜色.大小.并包含图像的文本信息),并简要说明实现方法. 答案:Android SDK支持如下显示富文本信息的方式. 1.使用TextView组件可以显示富文本信息.在TextView组件中可以使用富文本标签来显示富文本信息,这种标签类似于HTML标签,但比HTML标签简单,支持有限的几种显示富文本的方式.如<font>标签用于设置字体和颜色,<b>用于设置粗体.包含这些标签的文本不能直接作为TextView.se

我的Android进阶之旅------&gt;Android利用Sensor(传感器)实现水平仪功能的小例

这里介绍的水平仪,指的是比较传统的气泡水平仪,在一个透明圆盘内充满液体,液体中留有一个气泡,当一端翘起时,该气泡就会浮向翘起的一端. 利用方向传感器返回的第一个参数,实现了一个指南针小应用. 我的Android进阶之旅------>Android利用Sensor(传感器)实现指南针功能 (地址:http://blog.csdn.net/ouyang_peng/article/details/8801204) 接下来,我们利用返回的第二.三个参数实现该水平仪.因为第二个参数,反映底部翘起的角度(当

我的Android进阶之旅------&gt;Java字符串格式化方法String.format()格式化float型时小数点变成逗号问题

今天接到一个波兰的客户说有个APP在英文状态下一切运行正常,但是当系统语言切换到波兰语言的时候,程序奔溃了.好吧,又是我来维护. 好吧,先把系统语言切换到波兰语,切换到波兰语的方法查看文章 我的Android进阶之旅------>Android[设置]-[语言和输入法]-[语言]列表中找到相应语言所对应的列表项 地址:http://blog.csdn.net/ouyang_peng/article/details/50209789 ================================

我的Android进阶之旅------&gt; Android为TextView组件中显示的文本添加背景色

通过上一篇文章 我的Android进阶之旅------> Android在TextView中显示图片方法 (地址:http://blog.csdn.net/ouyang_peng/article/details/46916963) 我们学会了在TextView中显示图片的方法,现在我们来学习如何为TextView组件中显示的文本添加背景色.要求完成的样子如图所示: 首先来学习使用BackgroundColorSpan对象设置文字背景色,代码如下: TextView textView=(TextV

我的Android进阶之旅------&amp;gt;怎样将Activity变为半透明的对话框?

我的Android进阶之旅------>怎样将Activity变为半透明的对话框?能够从两个方面来考虑:对话框和半透明. 在定义Activity时指定Theme.Dialog主题就能够将Activity设置为对话框风格. 通过改动Theme.Dialog主题的android:windowBackground属性值能够改变Activity的背景图像. 假设背景图像使用半透明的图像,则Activity就好变成半透明的对话框.为了改动android:windowBackground属性,能够定义一个新

我的Android进阶之旅------&gt;解决:Execution failed for task &#39;:app:transformResourcesWithMergeJavaResForDebug&#39;.

错误描述 今天在Android Studio项目中加入了jackson的开发包,编译运行时候,引发了如下的错误: Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'. > com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Du

我的Android进阶之旅------&gt;Android字符串资源中的单引号问题error: Apostrophe not preceded by 的解决办法

刚刚在string字符串资源文件中,写了一个单引号,报错了,错误代码如下 error: Apostrophe not preceded by \ (in OuyangPeng's blog ) 资源文件如下: <?xml version="1.0" encoding="utf-8"?> <resources> <string name="ouyang">OuyangPeng's blog </string

我的Android进阶之旅------&gt;如何将Activity变为半透明的对话框?

我的Android进阶之旅------>如何将Activity变为半透明的对话框?可以从两个方面来考虑:对话框和半透明. 在定义Activity时指定Theme.Dialog主题就可以将Activity设置为对话框风格. 通过修改Theme.Dialog主题的android:windowBackground属性值可以改变Activity的背景图像.如果背景图像使用半透明的图像,则Activity就好变成半透明的对话框.为了修改android:windowBackground属性,可以定义一个新的