From 1eb6bfcd3edc28f46cfb71b5cb40b34798528997 Mon Sep 17 00:00:00 2001 From: Denny cy Lee Date: Tue, 18 May 2021 15:08:58 +0800 Subject: [PATCH] Hardwareinfo: battery info porting Test: No read error in logcat Bug: 171947164 Bug: 181915166 Bug: 181177926 Bug: 181914888 Bug: 188627513 Change-Id: Ibbed06cc7e6eb00c8611cdc8bc95356b17c7e043 Signed-off-by: Denny cy Lee --- tracking_denials/hardware_info_app.te | 10 ---------- whitechapel/vendor/google/hardware_info_app.te | 9 ++++++++- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/tracking_denials/hardware_info_app.te b/tracking_denials/hardware_info_app.te index 8e02952f..dd3c4647 100644 --- a/tracking_denials/hardware_info_app.te +++ b/tracking_denials/hardware_info_app.te @@ -1,14 +1,4 @@ -# b/181177926 -dontaudit hardware_info_app sysfs_batteryinfo:file { read }; -dontaudit hardware_info_app sysfs:file { read }; -dontaudit hardware_info_app sysfs:file { open }; -dontaudit hardware_info_app sysfs:file { getattr }; -dontaudit hardware_info_app sysfs_batteryinfo:dir { search }; # b/181914888 -dontaudit hardware_info_app sysfs_batteryinfo:file { open }; -dontaudit hardware_info_app sysfs_batteryinfo:file { getattr }; dontaudit hardware_info_app vendor_regmap_debugfs:dir { search }; # b/181915166 -dontaudit hardware_info_app sysfs_batteryinfo:file { getattr }; -dontaudit hardware_info_app sysfs_batteryinfo:file { open }; dontaudit hardware_info_app vendor_regmap_debugfs:dir { search }; diff --git a/whitechapel/vendor/google/hardware_info_app.te b/whitechapel/vendor/google/hardware_info_app.te index 90ed9a60..80b53377 100644 --- a/whitechapel/vendor/google/hardware_info_app.te +++ b/whitechapel/vendor/google/hardware_info_app.te @@ -14,4 +14,11 @@ allow hardware_info_app sysfs_pixelstats:file r_file_perms; # Storage allow hardware_info_app sysfs_scsi_devices_0000:dir search; -allow hardware_info_app sysfs_scsi_devices_0000:file r_file_perms; \ No newline at end of file +allow hardware_info_app sysfs_scsi_devices_0000:file r_file_perms; + +# Battery +allow hardware_info_app sysfs_batteryinfo:file r_file_perms; +allow hardware_info_app sysfs_batteryinfo:dir search; + +# SoC +allow hardware_info_app sysfs:file r_file_perms;