summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Lee <stayfan@google.com>2022-04-15 20:11:50 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-04-15 20:11:50 +0000
commitc2c5af115f825911dd525089776845c25650c19a (patch)
treec5082a20b160b6fe93c4d91b0e3fa46ac04ee46b
parentfe168512ad8013d95906f561401182054f23eb40 (diff)
parent70e219d3650028fd21affc8f7d6a22440adf1ab8 (diff)
downloadcoral-sepolicy-c2c5af115f825911dd525089776845c25650c19a.tar.gz
BatteryDefender: Allow health to read typec sysfs nodes am: 77b7b0832a am: 70e219d365
Original change: https://android-review.googlesource.com/c/device/google/coral-sepolicy/+/2058973 Change-Id: I287e966f18e5edd0175bad5b27a43d9366eab8be Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--vendor/google/file.te1
-rw-r--r--vendor/google/genfs_contexts1
-rw-r--r--vendor/google/hal_health_default.te2
-rw-r--r--vendor/google/hal_usb_impl.te3
-rw-r--r--vendor/google/pixelstats_vendor.te1
5 files changed, 8 insertions, 0 deletions
diff --git a/vendor/google/file.te b/vendor/google/file.te
index ed7fdff..07c9beb 100644
--- a/vendor/google/file.te
+++ b/vendor/google/file.te
@@ -24,6 +24,7 @@ type sysfs_pixelstats, fs_type, sysfs_type;
type sysfs_airbrush, sysfs_type, fs_type;
type sysfs_wlc, sysfs_type, fs_type;
type sysfs_pstore, sysfs_type, fs_type;
+type sysfs_typec_info, sysfs_type, fs_type;
#f2fs file
type debugfs_f2fs, debugfs_type, fs_type;
diff --git a/vendor/google/genfs_contexts b/vendor/google/genfs_contexts
index 61451ce..4a0487d 100644
--- a/vendor/google/genfs_contexts
+++ b/vendor/google/genfs_contexts
@@ -147,6 +147,7 @@ genfscon debugfs /tcpm/usbpd0 u:object_r:debugfs_usb:s0
genfscon debugfs /logbuffer/usbpd u:object_r:debugfs_usb:s0
genfscon debugfs /logbuffer/smblib u:object_r:debugfs_usb:s0
genfscon debugfs /logbuffer/pps u:object_r:debugfs_usb:s0
+genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8150b@2:qcom,usb-pdphy@1700/usbpd0/typec u:object_r:sysfs_typec_info:s0
# Airbrush
genfscon sysfs /devices/platform/soc/soc:abc-sm u:object_r:sysfs_airbrush:s0
diff --git a/vendor/google/hal_health_default.te b/vendor/google/hal_health_default.te
index 4119520..ea4f8f0 100644
--- a/vendor/google/hal_health_default.te
+++ b/vendor/google/hal_health_default.te
@@ -21,3 +21,5 @@ allow hal_health_default sysfs_chargelevel:file rw_file_perms;
set_prop(hal_health_default, vendor_shutdown_prop)
set_prop(hal_health_default, vendor_battery_defender_prop)
+
+r_dir_file(hal_health_default, sysfs_typec_info)
diff --git a/vendor/google/hal_usb_impl.te b/vendor/google/hal_usb_impl.te
index acb596e..7f4d632 100644
--- a/vendor/google/hal_usb_impl.te
+++ b/vendor/google/hal_usb_impl.te
@@ -12,3 +12,6 @@ allow hal_usb_impl sysfs_batteryinfo:file r_file_perms;
allow hal_usb_impl sysfs_contaminant:file rw_file_perms;
set_prop(hal_usb_impl, vendor_usb_prop)
allow hal_usb_impl sysfs_extcon:dir search;
+
+r_dir_file(hal_usb_impl, sysfs_typec_info)
+allow hal_usb_impl sysfs_typec_info:file rw_file_perms;
diff --git a/vendor/google/pixelstats_vendor.te b/vendor/google/pixelstats_vendor.te
index 0679660..7f13472 100644
--- a/vendor/google/pixelstats_vendor.te
+++ b/vendor/google/pixelstats_vendor.te
@@ -20,6 +20,7 @@ unix_socket_connect(pixelstats_vendor, chre, chre)
allow pixelstats_vendor sysfs_scsi_devices_0000:file rw_file_perms;
r_dir_file(pixelstats_vendor, sysfs_pixelstats)
+r_dir_file(pixelstats_vendor, sysfs_typec_info)
# wlc
allow pixelstats_vendor sysfs_wlc:dir search;