HarmonyOS 权限 介绍

权限说明

权限等级

根据权限对于不同等级应用有不同的开放范围,权限类型对应分为以下三种,等级依次提高。

  • normal权限

    normal 权限允许应用访问超出默认规则外的普通系统资源。

    这些系统资源的开放(包括数据和功能)对用户隐私以及其他应用带来的风险很小。

    该类型的权限仅向APL等级为normal及以上的应用开放。

  • system_basic权限

    system_basic权限允许应用访问操作系统基础服务相关的资源。

    这部分系统基础服务属于系统提供或者预置的基础功能,比如系统设置、身份认证等。这些系统资源的开放对用户隐私以及其他应用带来的风险较大。

    该类型的权限仅向APL等级为system_basic及以上的应用开放。

  • system_core权限

    system_core权限涉及到开放操作系统核心资源的访问操作。

    这部分系统资源是系统最核心的底层服务,如果遭受破坏,操作系统将无法正常运行。

    鉴于该类型权限对系统的影响程度非常大,目前暂不向任何三方应用开放

权限类型

根据授权方式的不同,权限类型可分为system_grant(系统授权)和user_grant(用户授权)

  • system_grant

    system_grant指的是系统授权类型,在该类型的权限许可下,应用被允许访问的数据不会涉及到用户或设备的敏感信息,应用被允许执行的操作不会对系统或者其他应用产生大的不利影响。

    如果在应用中申请了system_grant权限,那么系统会在用户安装应用时,自动把相应权限授予给应用。应用需要在应用商店的详情页面,向用户展示所申请的system_grant权限列表。

  • user_grant

    user_grant指的是用户授权类型,在该类型的权限许可下,应用被允许访问的数据将会涉及到用户或设备的敏感信息,应用被允许执行的操作可能对系统或者其他应用产生严重的影响。

    该类型权限不仅需要在安装包中申请权限,还需要在应用动态运行时,通过发送弹窗的方式请求用户授权。在用户手动允许授权后,应用才会真正获取相应权限,从而成功访问操作目标对象。

    应用需要在应用商店的详情页面,向用户展示所申请的user_grant权限列表。

应用权限列表

* 标记"ACL使能:TRUE"可通过应用市场(AGC)申请权限

|-----------------------------------------------|------------------------------------------|--------------|--------------|-------|
| ohos.permission.xxx | 介绍 | 等级 | 类型 | ACL使能 |
| USE_BLUETOOTH | 允许应用查看蓝牙的配置 | normal | system_grant | TRUE |
| DISCOVER_BLUETOOTH | 允许应用配置本地蓝牙,查找远端设备且与之配对连接。 | normal | system_grant | TRUE |
| INTERNET | 允许使用Internet网络。 | normal | system_grant | TRUE |
| MODIFY_AUDIO_SETTINGS | 允许应用修改音频设置。 | normal | system_grant | TRUE |
| GET_NETWORK_INFO | 允许应用获取数据网络信息。 | normal | system_grant | TRUE |
| SET_NETWORK_INFO | 允许应用配置数据网络。 | normal | system_grant | TRUE |
| RUNNING_LOCK | 允许应用获取运行锁,保证应用在后台的持续运行。 | normal | system_grant | TRUE |
| COMMONEVENT_STICKY | 允许应用发布粘性公共事件。 | normal | system_grant | TRUE |
| VIBRATE | 允许应用控制马达振动。 | normal | system_grant | TRUE |
| SET_WALLPAPER | 允许应用设置静态壁纸。 | normal | system_grant | TRUE |
| CLEAN_BACKGROUND _PROCESSES | 允许应用根据包名清理相关后台进程。 | normal | system_grant | TRUE |
| KEEP_BACKGROUND_RUNNING | 允许Service Ability在后台持续运行。 | normal | system_grant | TRUE |
| GET_BUNDLE_INFO | 允许应用查询其他应用的信息。该权限仅适用于三方应用。 | normal | system_grant | TRUE |
| ACCELEROMETER | 允许应用读取加速度传感器的数据。 | normal | system_grant | TRUE |
| GYROSCOPE | 允许应用读取陀螺仪传感器的数据。 | normal | system_grant | TRUE |
| PUBLISH_AGENT_REMINDER | 允许该应用使用后台代理提醒。 | normal | system_grant | TRUE |
| ACCESS_BIOMETRIC | 允许应用使用生物特征识别能力进行身份认证。 | normal | system_grant | TRUE |
| GET_WIFI_INFO | 允许应用获取WLAN信息。 | normal | system_grant | TRUE |
| SET_WIFI_INFO | 允许应用配置WLAN设备。 | normal | system_grant | TRUE |
| NFC_TAG | 允许应用读取Tag卡片。 | normal | system_grant | FALSE |
| NFC_CARD_EMULATION | 允许应用实现卡模拟功能。 | normal | system_grant | FALSE |
| ACCESS_CERT_MANAGER | 允许应用进行私有凭据的相关操作、查询证书状态等操作。 | normal | system_grant | FALSE |
| READ_CALENDAR | 允许应用读取日历信息。 | normal | user_grant | TRUE |
| WRITE_CALENDAR | 允许应用添加、移除或更改日历活动。 | normal | user_grant | TRUE |
| MICROPHONE | 允许应用使用麦克风。 | normal | user_grant | TRUE |
| DISTRIBUTED_DATASYNC | 允许不同设备间的数据交换。 | normal | user_grant | TRUE |
| LOCATION | 允许应用获取设备位置信息。 | normal | user_grant | TRUE |
| MEDIA_LOCATION | 允许应用访问用户媒体文件中的地理位置信息。 | normal | user_grant | TRUE |
| CAMERA | 允许应用使用相机拍摄照片和录制视频。 | normal | user_grant | TRUE |
| READ_MEDIA | 允许应用读取用户外部存储中的媒体文件信息。 | normal | user_grant | TRUE |
| WRITE_MEDIA | 允许应用读写用户外部存储中的媒体文件信息。 | normal | user_grant | TRUE |
| ACTIVITY_MOTION | 允许应用读取用户当前的运动状态。 | normal | user_grant | TRUE |
| READ_HEALTH_DATA | 允许应用读取用户的健康数据。 | normal | user_grant | TRUE |
| APPROXIMATELY_LOCATION | 允许应用获取设备模糊位置信息。 | normal | user_grant | FALSE |
| ACCESS_CERT_MANAGER | 允许应用进行私有凭据的相关操作、查询证书状态等操作 | normal | user_grant | FALSE |
| MANAGE_BLUETOOTH | 允许应用配对蓝牙设备,并对设备的电话簿或消息进行访问。 | system_basic | system_grant | TRUE |
| GET_TELEPHONY_STATE | 允许应用读取电话信息。 | system_basic | system_grant | TRUE |
| REQUIRE_FORM | 允许应用获取Ability Form。 | system_basic | system_grant | TRUE |
| PLACE_CALL | 允许应用直接拨打电话。 | system_basic | system_grant | TRUE |
| REMOVE_CACHE_FILES | 允许清理指定应用的缓存。 | system_basic | system_grant | TRUE |
| REBOOT | 允许应用重启设备。 | system_basic | system_grant | TRUE |
| SET_TIME | 允许应用修改系统时间。 | system_basic | system_grant | TRUE |
| SET_TIME_ZONE | 允许应用修改系统时区。 | system_basic | system_grant | TRUE |
| SYSTEM_FLOAT_WINDOW | 允许应用使用悬浮窗的能力。 | system_basic | system_grant | TRUE |
| PRIVACY_WINDOW | 允许应用将窗口设置为隐私窗口,禁止截屏录屏。 | system_basic | system_grant | TRUE |
| REFRESH_USER_ACTION | 允许应用在收到用户事件时,重新计算超时时间。 | system_basic | system_grant | TRUE |
| POWER_OPTIMIZATION | 允许系统应用设置省电模式、获取省电模式的配置信息并接收配置变化的通知。 | system_basic | system_grant | TRUE |
| REBOOT_RECOVERY | 允许系统应用重启设备并进入恢复模式。 | system_basic | system_grant | TRUE |
| MANAGE_LOCAL_ACCOUNTS | 允许应用管理本地用户帐号。 | system_basic | system_grant | TRUE |
| INTERACT_ACROSS _LOCAL_ACCOUNTS | 允许多个系统帐号之间相互访问。 | system_basic | system_grant | TRUE |
| READ_SCREEN_SAVER | 允许应用查询屏保状态信息。 | system_basic | system_grant | TRUE |
| WRITE_SCREEN_SAVER | 允许应用修改屏保状态信息。 | system_basic | system_grant | TRUE |
| GET_WALLPAPER | 允许应用读取壁纸文件。 | system_basic | system_grant | TRUE |
| CHANGE_ABILITY _ENABLED_STATE | 允许改变应用或者组件的使能状态。 | system_basic | system_grant | TRUE |
| ACCESS_MISSIONS | 允许应用访问任务栈信息。 | system_basic | system_grant | TRUE |
| UPDATE_CONFIGURATION | 允许更新系统配置。 | system_basic | system_grant | TRUE |
| UPDATE_SYSTEM | 允许调用升级接口。 | system_basic | system_grant | TRUE |
| FACTORY_RESET | 允许调用恢复出厂接口。 | system_basic | system_grant | TRUE |
| LISTEN_BUNDLE_CHANGE | 允许应用监听其他应用安装、更新、卸载状态的变化。 | system_basic | system_grant | TRUE |
| GET_BUNDLE_INFO_PRIVILEGED | 允许应用查询其他应用的信息。该权限仅适用于特权应用、同签名应用。 | system_basic | system_grant | TRUE |
| SET_TELEPHONY_STATE | 允许应用修改telephone的状态。 | system_basic | system_grant | TRUE |
| START_ABILITIES _FROM_BACKGROUND | 允许应用在后台启动或者访问其他组件。 | system_basic | system_grant | TRUE |
| BUNDLE_ACTIVE_INFO | 允许系统应用查询其他应用在前台或后台的运行时间 | system_basic | system_grant | TRUE |
| ACCESS_UDID | 允许系统应用获取UDID。 | system_basic | system_grant | TRUE |
| LAUNCH_DATA _PRIVACY_CENTER | 允许应用从其隐私声明页面跳转至"数据与隐私"页面。 | system_basic | system_grant | TRUE |
| MANAGE_MEDIA_RESOURCES | 允许应用程序获取当前设备正在播放的媒体资源,并对其进行管理。 | system_basic | system_grant | TRUE |
| CONNECTIVITY_INTERNAL | 允许应用程序获取网络相关的信息或修改网络相关设置。 | system_basic | system_grant | TRUE |
| SET_ABILITY_CONTROLLER | 允许设置ability组件启动和停止控制权。 | system_basic | system_grant | TRUE |
| GET_RUNNING_INFO | 允许应用获取运行态信息。 | system_basic | system_grant | TRUE |
| CLEAN_APPLICATION_DATA | 允许应用清理应用数据 | system_basic | system_grant | TRUE |
| RUNNING_STATE_OBSERVER | 允许应用观察应用状态。 | system_basic | system_grant | TRUE |
| GET_WIFI_LOCAL_MAC | 允许应用获取本机WLAN或者蓝牙设备的MAC地址。 | system_basic | system_grant | TRUE |
| GET_WIFI_CONFIG | 允许应用获取WLAN配置信息。 | system_basic | system_grant | TRUE |
| MANAGE_SECURE_SETTINGS | 允许应用修改安全类系统设置。 | system_basic | system_grant | TRUE |
| SET_ENTERPRISE_INFO | 允许设备管理员应用设置企业信息。 | system_basic | system_grant | TRUE |
| ENTERPRISE_SUBSCRIBE _MANAGED_EVENT | 允许设备管理员应用订阅管理事件。 | system_basic | system_grant | TRUE |
| ENTERPRISE_SET_DATETIME | 允许设备管理员应用订阅管理事件。 | system_basic | system_grant | TRUE |
| ENTERPRISE_GET_DEVICE_INFO | 允许设备管理员读取设备信息。 | system_basic | system_grant | TRUE |
| PERMISSION_USED_STATS | 允许系统应用访问权限使用记录。 | system_basic | system_grant | TRUE |
| ACCESS_SYSTEM_SETTINGS | 允许应用接入或拉起系统设置界面。 | system_basic | system_grant | TRUE |
| ABILITY_BACKGROUND _COMMUNICATION | 允许应用上报风险数据至设备风险管理平台。 | system_basic | system_grant | TRUE |
| securityguard. REQUEST_SECURITY _MODEL_RESULT | 允许应用获取设备风险状态 | system_basic | system_grant | TRUE |
| ACCESS_PUSH_SERVICE | 允许应用访问推送服务的Ability。 | system_basic | system_grant | TRUE |
| STORAGE_MANAGER | 允许应用调用storage manager服务中对空间统计以及卷信息的查询接口。 | system_basic | system_grant | TRUE |
| BACKUP | 允许应用拥有备份恢复能力。 | system_basic | system_grant | TRUE |
| FILE_ACCESS_MANAGER | 允许文件管理类应用通过FAF框架访问公共数据文件。 | system_basic | system_grant | TRUE |
| MANAGE_AUDIO_CONFIG | 允许应用进行全局麦克风静音等操作。 | system_basic | system_grant | TRUE |
| MANAGE_DISTRIBUTED _ACCOUNTS | 允许应用管理系统分布式帐号信息。 | system_basic | system_grant | TRUE |
| GET_DISTRIBUTED_ACCOUNTS | 允许应用查询系统分布式帐号信息。 | system_basic | system_grant | TRUE |
| GET_LOCAL_ACCOUNTS | 允许应用查询系统本地帐号信息。 | system_basic | system_grant | TRUE |
| USE_USER_IDM | 允许应用访问系统身份凭据信息 | system_basic | system_grant | FALSE |
| MANAGE_USER_IDM | 允许应用使用系统身份凭据管理能力进行口令、人脸、指纹等录入、修改、删除等操作。 | system_basic | system_grant | FALSE |
| CCESS_USER_AUTH_INTERNAL | 允许应用使用系统身份认证能力进行用户身份认证或身份识别。 | system_basic | system_grant | FALSE |
| ACCESS_PIN_AUTH | 允许应用使用口令输入接口,用于系统应用完成口令输入框绘制场景。 | system_basic | system_grant | FALSE |
| READ_DFX_SYSEVENT | 允许应用访问系统事件打点数据。 | system_basic | system_grant | FALSE |
| DISTRIBUTED _SOFTBUS_CENTER | 允许不同设备之间进行组网处理。 | system_basic | system_grant | FALSE |
| securityguard .REPORT_SECURITY_INFO | 允许应用上报风险数据至设备风险管理平台。 | system_basic | system_grant | FALSE |
| READ_ACCESSIBILITY_CONFIG | 允许应用读取无障碍配置信息。 | system_basic | system_grant | FALSE |
| WRITE_ACCESSIBILITY_CONFIG | 允许应用设置无障碍配置信息。 | system_basic | system_grant | FALSE |
| ACCESS_CERT _MANAGER_INTERNAL | 允许应用进行证书及凭据的安装、卸载、启用、禁用等操作。 | system_basic | system_grant | FALSE |
| RECEIVER_STARTUP _COMPLETED | 允许应用订阅开机广播。 | system_basic | system_grant | FALSE |
| MANAGE_CAMERA_CONFIG | 允许应用进行全局相机开关等操作。 | system_basic | system_grant | FALSE |
| MOUNT_UNMOUNT_MANAGER | 允许应用对外卡进行挂载卸载操作。 | system_basic | system_grant | FALSE |
| MOUNT_FORMAT_MANAGER | 允许应用对外卡进行格式化操作。 | system_basic | system_grant | FALSE |
| ANSWER_CALL | 允许应用接听来电。 | system_basic | user_grant | TRUE |
| READ_CALL_LOG | 允许应用读取通话记录。 | system_basic | user_grant | TRUE |
| READ_CELL_MESSAGES | 允许应用读取设备收到的小区广播信息。 | system_basic | user_grant | TRUE |
| READ_CONTACTS | 允许应用读取联系人数据。 | system_basic | user_grant | TRUE |
| READ_MESSAGES | 允许应用读取短信息。 | system_basic | user_grant | TRUE |
| RECEIVE_SMS | 允许应用接收和处理短信。 | system_basic | user_grant | TRUE |
| RECEIVE_MMS | 允许应用接收和处理彩信。 | system_basic | user_grant | TRUE |
| RECEIVE_WAP_MESSAGES | 允许应用接收和处理WAP消息。 | system_basic | user_grant | TRUE |
| SEND_MESSAGES | 允许应用发送短信。 | system_basic | user_grant | TRUE |
| WRITE_CALL_LOG | 允许应用添加、移除或更改通话记录。 | system_basic | user_grant | TRUE |
| WRITE_CONTACTS | 允许应用添加、移除或更改联系人数据。 | system_basic | user_grant | TRUE |
| MANAGE_VOICEMAIL | 允许应用在语音信箱中留言。 | system_basic | user_grant | TRUE |
| READ_IMAGEVIDEO | 允许读取用户公共目录的图片或视频文件。 | system_basic | user_grant | TRUE |
| READ_AUDIO | 允许读取用户公共目录的音频文件。 | system_basic | user_grant | TRUE |
| READ_DOCUMENT | 允许读取用户公共目录的文档。 | system_basic | user_grant | TRUE |
| WRITE_IMAGEVIDEO | 允许修改用户公共目录的图片或视频文件。 | system_basic | user_grant | TRUE |
| WRITE_AUDIO | 允许修改用户公共目录的音频文件。 | system_basic | user_grant | TRUE |
| WRITE_WHOLE_CALENDAR | 允许应用添加、移除或更改所有的日历活动 | system_basic | user_grant | TRUE |
| READ_WHOLE_CALENDAR | 允许应用读取所有的日历信息。 | system_basic | user_grant | TRUE |
| READ_DOCUMENT | 允许读取用户公共目录的文档。 | system_basic | user_grant | TRUE |
[权限列表]

相关推荐
zhongcx9 小时前
鸿蒙应用示例:ArkTS UI框架中的文本缩进技巧
harmonyos
东林知识库11 小时前
鸿蒙NEXT开发-自定义构建函数(基于最新api12稳定版)
华为·harmonyos
裴云飞17 小时前
鸿蒙性能优化之布局优化
性能优化·harmonyos
zhongcx17 小时前
鸿蒙应用示例:ArkTS中设置颜色透明度与颜色渐变方案探讨
harmonyos
真正的醒悟18 小时前
华为资源分享
运维·服务器·华为
PlumCarefree1 天前
mp4(H.265编码)转为本地RTSP流
音视频·harmonyos·h.265
鸿蒙自习室1 天前
鸿蒙网络管理模块04——网络连接管理
华为·harmonyos·鸿蒙·媒体
小Q的编程笔记1 天前
HarmonyOS:AVPlayer 与 XComponent 联手打造定制化视频播放器
harmonyos
Yeats_Liao1 天前
华为开源自研AI框架昇思MindSpore应用案例:计算高效的卷积模型ShuffleNet
人工智能·深度学习·华为
cn_mengbei1 天前
HUAWEI New4.9G 与 2.6G 无法正常切换问题处理案例
网络·华为