Add sepolicy read permissions to hal_dumpstate_impl for bd_*
Bug: 173149361
Test: adb bugreport and check value pass.
Signed-off-by: Ted Lin <tedlin@google.com>
Change-Id: I36df4ace3a364f69c0305f5735405e71bc4169aa
diff --git a/vendor/google/genfs_contexts b/vendor/google/genfs_contexts
index 76b661d..0e4d6e5 100644
--- a/vendor/google/genfs_contexts
+++ b/vendor/google/genfs_contexts
@@ -18,3 +18,14 @@
# Charger
genfscon sysfs /devices/platform/soc/soc:google,charger/charge_start_level u:object_r:sysfs_chargelevel:s0
genfscon sysfs /devices/platform/soc/soc:google,charger/charge_stop_level u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_drainto_soc u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_recharge_soc u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_recharge_voltage u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_resume_abs_temp u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_resume_soc u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_resume_temp u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_resume_time u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_trigger_temp u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_trigger_time u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_trigger_voltage u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_temp_enable u:object_r:sysfs_chargelevel:s0
diff --git a/vendor/qcom/common/hal_dumpstate_impl.te b/vendor/qcom/common/hal_dumpstate_impl.te
index 211961b..089f64d 100644
--- a/vendor/qcom/common/hal_dumpstate_impl.te
+++ b/vendor/qcom/common/hal_dumpstate_impl.te
@@ -132,6 +132,8 @@
# Query and dump power supply nodes
allow hal_dumpstate_impl sysfs_batteryinfo:dir search;
allow hal_dumpstate_impl sysfs_batteryinfo:file r_file_perms;
+allow hal_dumpstate_impl sysfs_chargelevel:dir search;
+allow hal_dumpstate_impl sysfs_chargelevel:file r_file_perms;
# Dump QCOM FG content
allow hal_dumpstate_impl debugfs_fg_sram:dir search;