diff --git a/non_plat/file.te b/non_plat/file.te index d4214ca..86af27f 100644 --- a/non_plat/file.te +++ b/non_plat/file.te @@ -255,6 +255,7 @@ type consyslog_data_file, file_type, data_file_type; type sysfs_comport_type, fs_type, sysfs_type; type sysfs_uart_info, fs_type, sysfs_type; -# Date : WK1817 -# Purpose : for fuelgauged access -type battery_node, fs_type, sysfs_type; +# Date : WK1820 +# Purpose : for charger to access vbus info and pump_express +type sysfs_vbus, fs_type, sysfs_type; +type sysfs_pump_express, fs_type, sysfs_type; diff --git a/non_plat/file_contexts b/non_plat/file_contexts index 28d84ce..169d1d9 100644 --- a/non_plat/file_contexts +++ b/non_plat/file_contexts @@ -481,7 +481,8 @@ /sys/devices/virtual/BOOT/BOOT/boot/boot_mode(/.*)? u:object_r:sysfs_boot:s0 /sys/bus/platform/drivers/meta_com_type_info/meta_com_type_info(/.*)? u:object_r:sysfs_comport_type:s0 /sys/bus/platform/drivers/meta_uart_port_info/meta_uart_port_info(/.*)? u:object_r:sysfs_uart_info:s0 -/sys/devices/platform/battery(/.*)? u:object_r:battery_node:s0 +/sys/devices/platform/(charger|battery)/ADC_Charger_Voltage u:object_r:sysfs_vbus:s0 +/sys/devices/platform/(charger|battery)/Pump_Express u:object_r:sysfs_pump_express:s0 ############################# # debugfs files diff --git a/non_plat/fuelgauged.te b/non_plat/fuelgauged.te index 96590a9..76f03d3 100644 --- a/non_plat/fuelgauged.te +++ b/non_plat/fuelgauged.te @@ -88,5 +88,5 @@ allow fuelgauged nvcfg_file:file { read write getattr open create }; # Date: W18.17 # Operation : add label for /sys/devices/platform/battery(/.*) # Purpose : add fuelgauged could access -allow fuelgauged battery_node:file { read open }; +r_dir_file(fuelgauged, sysfs_batteryinfo); diff --git a/non_plat/fuelgauged_nvram.te b/non_plat/fuelgauged_nvram.te index 1a674f9..42d1737 100644 --- a/non_plat/fuelgauged_nvram.te +++ b/non_plat/fuelgauged_nvram.te @@ -66,4 +66,4 @@ allow fuelgauged_nvram nvcfg_file:file { read write getattr open create }; # Date: W18.17 # Operation : add label for /sys/devices/platform/battery(/.*) # Purpose : add fuelgauged could access -allow fuelgauged_nvram battery_node:file { read open }; +r_dir_file(fuelgauged_nvram, sysfs_batteryinfo) diff --git a/non_plat/genfs_contexts b/non_plat/genfs_contexts index 6dda30d..164043a 100644 --- a/non_plat/genfs_contexts +++ b/non_plat/genfs_contexts @@ -35,5 +35,5 @@ genfscon iso9660 / u:object_r:iso9660:s0 genfscon rawfs / u:object_r:rawfs:s0 genfscon fuseblk / u:object_r:fuseblk:s0 -genfscon sysfs /devices/platform/battery/power_supply u:object_r:sysfs_batteryinfo:s0 +genfscon sysfs /devices/platform/battery u:object_r:sysfs_batteryinfo:s0 genfscon sysfs /devices/platform/mt_charger/power_supply u:object_r:sysfs_batteryinfo:s0