diff options
author | Kelly Rossmoyer <krossmo@google.com> | 2022-02-04 14:06:04 -0800 |
---|---|---|
committer | Kelly Rossmoyer <krossmo@google.com> | 2022-02-04 14:09:30 -0800 |
commit | 96f5029513383f6b391b567f27a280878b05b3a0 (patch) | |
tree | 770fbc4df02adb3a9c54829a7af05810e360a205 | |
parent | ca8d16731a71b204416064d04a5399a9c921f7ac (diff) | |
download | sunfish-sepolicy-96f5029513383f6b391b567f27a280878b05b3a0.tar.gz |
Allow PowerStatsHAL to read NFC power state statsandroid-t-preview-2android-t-preview-1android-t-beta-3android-s-v2-beta-3android-s-qpr3-beta-1android-t-preview-1android-s-v2-beta-3android-s-qpr3-beta-1
This change - in combination with the associated code change - allows
PowerStatsHAL to read high-level NFC power state stats from sysfs on
sunfish devices.
Without this sepolicy, the code change produces errors like the following:
02-01 20:12:40.350 1023 1023 W stats@1.0-servi: type=1400
audit(0.0:32): avc: denied { read } for name="power_stats" dev="sysfs"
ino=67037 scontext=u:r:hal_power_stats_default:s0
tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
02-01 20:12:40.353 1023 1023 E libpixelpowerstats: getResults:Failed
to open file /sys/class/misc/st21nfc/device/power_stats Error =
Permission denied: Permission denied
Bug: 217388683
Test: lshal debug android.hardware.power.stats@1.0::IPowerStats/default
Change-Id: I862d31bc92774fcaf4cbb8eb01d1305994cc08e5
-rw-r--r-- | vendor/google/genfs_contexts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vendor/google/genfs_contexts b/vendor/google/genfs_contexts index 27e24e7..f8c5ac7 100644 --- a/vendor/google/genfs_contexts +++ b/vendor/google/genfs_contexts @@ -50,6 +50,7 @@ genfscon sysfs /devices/platform/soc/soc:abc-sm/state_stats u:object_r:sysfs_power_stats:s0 genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-0010/iio:device2 u:object_r:sysfs_power_stats:s0 +genfscon sysfs /devices/platform/soc/888000.i2c/i2c-0/0-0008/power_stats u:object_r:sysfs_power_stats:s0 # Not used by PowerStatsHal genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:vadc@3100/iio:device0 |