PrivacyManagerService
PrivacyManagerService is a command line capability developed based on hidumper for access control. It can display basic access control information and obtain the usage records of sensitive permissions.
Environment Setup
Set up the environment by referring to Environment Setup.
Obtaining Help Information
To view the help information, run the following command:
hidumper -s PrivacyManagerService -a '-h'
Example
-------------------------------[ability]-------------------------------
----------------------------------PrivacyManagerService----------------------------------
Privacy Dump:
Usage:
-h: command help
-t <TOKEN_ID>: according to specific token id dump permission used records
Obtaining Sensitive Permission Usage Records
You can run the following command to view the sensitive permission usage records by token ID of an application process:
hidumper -s PrivacyManagerService -a '-t <tokenId>'
You can run the atm-tool command to query the token ID required by the command.
Example
hidumper -s PrivacyManagerService -a '-t 536992218'
-------------------------------[ability]-------------------------------
----------------------------------PrivacyManagerService----------------------------------
Privacy Dump:
{
"permissionRecord": [
{
"bundleName": "com.ohos.camera",
"isRemote": false,
"permissionName": "ohos.permission.READ_IMAGEVIDEO",
"lastAccessTime": 1508577149393,
"lastAccessDuration": 0,
"accessCount": 2
}
]
}
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 hiappevent-watcher-app-killed-events
openharmony 鸿蒙 hiappevent-intro
openharmony 鸿蒙 hicollie-guidelines-ndk
openharmony 鸿蒙 event-subscription-overview
openharmony 鸿蒙 hiappevent-watcher-mainthreadjank-events-arkts
openharmony 鸿蒙 hiappevent-watcher-resourceleak-events-ndk
openharmony 鸿蒙 hilog-guidelines-arkts
openharmony 鸿蒙 hiappevent-watcher-apphicollie-events-ndk