跳到主要内容

pac.json5隐私清单文件

概述

若您开发App,您在AppGallery Connect上架应用时需要提供应用的隐私标签,建议您在项目工程中创建pac.json5配置文件,在文件中声明处理的个人数据类型、使用目的等信息。编译构建时,如您集成的HSP/HAR中的pac.json5同步声明了隐私保护信息,信息将自动汇总至此文件并随软件打包,上架时AppGallery Connect可基于此文件内容自动生成隐私标签。

若您开发HSP或HAR,为了下游集成使用软件的开发者快速、准确地了解HSP或HAR处理个人数据的情况,建议您在项目工程中创建pac.json5配置文件,在文件中声明处理的个人数据类型、使用目的等信息。文件在编译构建时会合入软件包,隐私保护信息将随软件包同步传递给下游的开发者。

支持版本:DevEco Studio 6.0.0 Beta2及以上版本。

创建pac.json5文件

  • 开发App情况下,选中AppScope目录新建pac.json5文件。

  • 开发HSP或HAR情况下,选中HSP或HAR模块目录新建pac.json5文件。

配置文件结构

pac.json5隐私清单文件整体的结构如下。

dataProcess
└── dataType
└── dataLabels
└── label
└── purposes
└── userLinked
└── tracking
specialAPIs
└── apiType
└── reasons

配置文件字段说明

pac.json5隐私清单配置文件包括以下字段。

表1 pac.json5隐私清单文件字段说明

字段名称可选/必选类型含义
dataProcess可选数组声明应用收集的个人数据。
specialAPIs可选数组声明应用调用的可用于生成设备指纹的API信息。

dataProcess和specialAPIs不能同时为空。

dataProcess

dataProcess是声明应用收集的个人数据,包括数据类型、数据项和使用目的。

表2 dataProcess

字段名称可选/必选类型含义
dataType必选字符串应用收集个人数据的类型。
dataLabels必选数组应用收集的个人数据项和目的。

表3 dataType

数据类型含义
Identifiers标识符
Financial information财务信息
Basic information基本资料
Transaction information交易信息
Contact information联系人信息
Special category data敏感信息
Device information设备信息
Location information位置信息
App information应用信息
User content用户内容
Fitness and health information运动健康信息
Other personal data其他个人数据

dataLabels

dataLabels是声明应用收集的个人数据项和目的。

表4 dataLabels

字段名称可选/必选类型含义
label必选字符串应用收集的个人数据项。
purposes必选数组应用收集个人数据的目的。
userLinked可选布尔应用收集的个人数据是否用于用户关联。
tracking可选布尔应用收集的个人数据是否用于用户追踪。

表5 label

个人数据项含义数据类型
ICCIDICCIDIdentifiers
IMEIIMEI
IMSIIMSI
MACMAC
MEIDMEID
OAIDOAID
SNSN
Chip IDChip ID
ODIDODID
SSIDSSID
BSSIDBSSID
Other device identifiers其他设备标识符
ID card身份证
Other identity information其他身份信息
User identifiers用户标识符
Bank account information银行账户信息Financial information
Other financial account information其他金融账户信息
Asset information资产信息
Other financial information其他账务信息
Name姓名Basic information
Gender性别
Age年龄
Date of birth出生日期
Account information账号信息
Education information教育信息
Work information工作信息
Home information家庭信息
Address地址
Phone number电话号码
Email address电子邮件地址
Calendar and schedule日历
Other personal information其他个人资料
Order information订单信息Transaction information
Transaction records交易记录
Package delivery information快递信息
Other transaction information其他交易信息
Contact list联系人列表Contact information
Social media accounts社交帐号
Other contact information其他联系人信息
Facial recognition features面部识别特征Special category data
Voiceprint information声纹
Other biometric features其他生物特征
Other special category data其他敏感信息
Magnetometer磁力计信息Device information
Light sensor光照传感器
Acceleration sensor加速器数据
Screen orientation sensor屏幕方向传感器
Barometer气压计
Gyroscope陀螺仪数据
Rotation vector sensor旋转矢量传感器信息
Gravity sensor重力传感器信息
OS information操作系统信息
Other hardware and software parameters/System settings其他软硬件参数/系统设置
Device status设备状态
IP addressIP地址
Wi-Fi parametersWiFi参数
Wi-Fi statusWiFi状态
Network type网络类型
Carrier运营商
Other device information其他设备信息
Network location网络位置Location information
Other approximate location information其他大致位置信息
GPS locationGPS位置
Other precise location information其他精确位置信息
Browsing history浏览记录App information
Favorites收藏记录
Basic app information应用基本信息
App settings应用设置信息
App running status应用运行状态
App run logs应用运行日志
App usage information其他使用应用的信息
SMS messages短信User content
Call logs通话记录
Other communication content其他通讯内容
Image or video图片或视频
Audio recording录音
Audio音频
Text information文字信息
Search keywords搜索词
Social interactions社交互动
Game statistics游戏数据
Customer service records客户支持
Pasteboard剪切板
Software installation list软件安装列表
Other user content其他用户内容
Heart rate心率Fitness and health information
Blood pressure血压
Other health information其他健康信息
Fitness information运动信息
Other personal data其他个人数据Other personal data

表6 purposes

个人数据收集的目的目的详细描述
App functionality应用提供基本功能、安全防护功能、确保应用正常运营以及客户支持。
Product personalization按照不同用户差异化呈现应用内容。
Analytics评估用户行为,了解现有产品功能的效果、进行服务改进。
Advertising and marketing用于在应用中显示广告或营销信息的数据。
Disclosure to third parties将数据共享至第三方运营主体,目的包括但不限于:共享至物流公司用于物品邮件、共享至第三方用于广告投放效果评估、共享至第三方进行数据展示、评测/评估、研究、合作双方对账、由第三方提供运营、运维服务、论坛、社交等服务中公开披露。
Cross-border transfer数据跨境传输。
Others用于未列出的其他用途。

specialAPIs

specialAPIs是声明应用调用的可用于生成设备指纹的API信息,包含API类型和调用原因。

表7 specialAPIs

字段名称可选/必选类型含义
apiType必选字符串API类型
reasons必选数组API调用原因

表8 apiType

API类型API介绍API列表
File timestamp APIs用于获取文件的创建、修改或访问时间戳,有助于管理文件和数据同步。ctime mtime fs.getxattr fs.getxattrSync fs.stat file.get fs.lstat cloudStorage.bucket().getMetadata
System boot time APIs提供系统启动时间信息,常用于计算系统运行时长或在系统重启后保持应用状态。systemDateTime.getUptime
Disk space APIs用于检测磁盘空间,有助于管理存储资源,例如在空间不足时提醒用户或优化数据存储。statvfs.getFreeSize statvfs.getTotalSize
Active keyboard APIs用于检测当前激活的键盘,常用于提供上下文相关的输入体验或支持多语言输入。inputDevice.getKeyboardType
User preferences APIs用于存储和检索用户首选项,如应用配置或最近使用的项目,有助于提高用户体验和应用的个性化。preferences.getPreferences sendablePreferences.getPreferences

表9 reasons

API调用原因目的详细描述API类型
Display to user on-device用于向用户显示文件的时间戳,如文件的创建、修改和访问时间。File timestamp APIs
Access file metadata in-app用于访问应用容器内或云存储(Cloud Foundation Kit)中文件的时间戳、大小或其他元数据。
Files provided to app by user用于访问用户授权文件或目录的时间戳、大小或其他元数据。
3rd-party SDK wrapper on-device用于应用调用第三方SDK提供的文件时间戳封装函数。
Measure time on-device用于计算应用内事件之间经过的时间,或通过时间计算实现定时器。System boot time APIs
Calculate timestamp for in-app event用于计算应用内事件的绝对时间戳。
User-initiated bug report用于在用户主动提交的诊断报告中记录系统启动时间。
Display to user on-device用于向用户显示磁盘空间信息。Disk space APIs
Write or delete file on-device用于写文件前检查磁盘空间是否充足,或检查到磁盘空间不足时触发垃圾文件清理。
User-initiated bug report用于在用户主动提交的诊断报告中记录磁盘空间信息。
Health research app用于检测是否有足够的磁盘空间存储应用收集的健康数据。
Custom keyboard app on-device用于自定义键盘类应用检查当前设备激活的键盘。Active keyboard APIs
Customized UI on-device用于根据激活键盘状态向用户呈现正确的定制化UI界面。
Access preferences data in-app用于访问仅限本应用读写的用户首选项配置信息。User preferences APIs
3rd-party SDK wrapper on-device用于应用调用第三方SDK提供的用户首选项(Preference API)封装函数。

pac.json5文件示例

{
"dataProcess": [
{
"dataType": "Identifiers",
"dataLabels": [
{
"label": "MAC",
"purposes": ["App functionality"],
"userLinked": true,
"tracking": true
}
]
}
],
"specialAPIs": [
{
"apiType": "File timestamp APIs",
"reasons": ["Display to user on-device","Access file metadata in-app"]
}
]
}