summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-10-01 01:03:18 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-10-01 01:03:18 +0000
commit240e7fab386ac0fa36a61cfa59c4778564a73fec (patch)
tree14f92311e433c18c0158c97be74ccae55685a02c
parentab57b19269798d7c7666318cc4c12053160bfda5 (diff)
parentbdf3d6abcce8bf7626e6dbfc5e9a2a3043aaa8c4 (diff)
downloadgs201-sepolicy-android13-qpr1-s1-release.tar.gz
Change-Id: Id24023e40c51388da69f47f2e734e5611427c3b4
-rw-r--r--whitechapel_pro/disable-contaminant-detection-sh.te7
-rw-r--r--whitechapel_pro/file_contexts1
-rw-r--r--whitechapel_pro/hal_health_default.te3
3 files changed, 11 insertions, 0 deletions
diff --git a/whitechapel_pro/disable-contaminant-detection-sh.te b/whitechapel_pro/disable-contaminant-detection-sh.te
new file mode 100644
index 0000000..95845a1
--- /dev/null
+++ b/whitechapel_pro/disable-contaminant-detection-sh.te
@@ -0,0 +1,7 @@
+type disable-contaminant-detection-sh, domain;
+type disable-contaminant-detection-sh_exec, vendor_file_type, exec_type, file_type;
+init_daemon_domain(disable-contaminant-detection-sh)
+
+allow disable-contaminant-detection-sh vendor_toolbox_exec:file execute_no_trans;
+allow disable-contaminant-detection-sh sysfs_batteryinfo:dir r_dir_perms;
+allow disable-contaminant-detection-sh sysfs_batteryinfo:file rw_file_perms;
diff --git a/whitechapel_pro/file_contexts b/whitechapel_pro/file_contexts
index e5467e8..83232f1 100644
--- a/whitechapel_pro/file_contexts
+++ b/whitechapel_pro/file_contexts
@@ -44,6 +44,7 @@
/vendor/bin/hw/battery_mitigation u:object_r:battery_mitigation_exec:s0
/vendor/bin/hw/android\.hardware\.memtrack-service\.pixel u:object_r:hal_memtrack_default_exec:s0
/system_ext/bin/convert_to_ext4\.sh u:object_r:convert-to-ext4-sh_exec:s0
+/vendor/bin/hw/disable_contaminant_detection\.sh u:object_r:disable-contaminant-detection-sh_exec:s0
# Vendor Firmwares
/vendor/firmware(/.*)? u:object_r:vendor_fw_file:s0
diff --git a/whitechapel_pro/hal_health_default.te b/whitechapel_pro/hal_health_default.te
index 0e39376..d953d4b 100644
--- a/whitechapel_pro/hal_health_default.te
+++ b/whitechapel_pro/hal_health_default.te
@@ -7,6 +7,9 @@ set_prop(hal_health_default, vendor_battery_defender_prop)
allow hal_health_default sysfs_scsi_devices_0000:dir r_dir_perms;
allow hal_health_default sysfs_scsi_devices_0000:file rw_file_perms;
+allow hal_health_default fwk_stats_service:service_manager find;
+binder_use(hal_health_default)
+
allow hal_health_default sysfs_wlc:dir search;
allow hal_health_default sysfs_batteryinfo:file w_file_perms;
allow hal_health_default sysfs_thermal:dir search;