common: add policy for powershare HAL
authorLinux4 <tim@linux4.de>
Mon, 20 Apr 2020 16:02:08 +0000 (18:02 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 1 May 2020 16:18:52 +0000 (18:18 +0200)
Change-Id: I2e17e677613b4563215db1f40645eb7d84ce98dc

common/vendor/file_contexts
common/vendor/hal_lineage_powershare_default.te [new file with mode: 0644]

index 4c77ff21e96a788f765ea8533deed7dbd34ba041..54b7f79b6934fe8d5ef4f7d523aba40c1d0bef93 100644 (file)
 /(vendor|system/vendor)/bin/hw/android\.hardware\.power@[0-9].[0-9]-service\.exynos               u:object_r:hal_power_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.vibrator@[0-9].[0-9]-service\.samsung-haptic    u:object_r:hal_vibrator_default_exec:s0
 /(vendor|system/vendor)/bin/hw/vendor\.lineage\.biometrics\.fingerprint\.inscreen@1.0-service.samsung     u:object_r:hal_lineage_fod_default_exec:s0
+/(vendor|system/vendor)/bin/hw/vendor\.lineage\.powershare@[0-9].[0-9]-service\.samsung           u:object_r:hal_lineage_powershare_default_exec:s0
 /(vendor|system/vendor)/bin/hw/vendor\.samsung_slsi\.hardware\.configstore@[0-9]\.[0-9]-service   u:object_r:hal_vendor_configstore_default_exec:s0
 /(vendor|system/vendor)/bin/hw/vendor\.samsung_slsi\.hardware\.ExynosHWCServiceTW@[0-9]\.[0-9]-service    u:object_r:hal_vendor_hwcservice_default_exec:s0
 
diff --git a/common/vendor/hal_lineage_powershare_default.te b/common/vendor/hal_lineage_powershare_default.te
new file mode 100644 (file)
index 0000000..48b9dd8
--- /dev/null
@@ -0,0 +1,5 @@
+# hal_lineage_powershare_default.te
+
+allow hal_lineage_powershare_default sysfs_battery:dir search;
+allow hal_lineage_powershare_default sysfs_battery_writable:dir search;
+allow hal_lineage_powershare_default sysfs_battery_writable:file rw_file_perms;