diff --git a/non_plat/file.te b/non_plat/file.te index fafabb7..4873284 100644 --- a/non_plat/file.te +++ b/non_plat/file.te @@ -56,7 +56,6 @@ type proc_lk_env, fs_type; type proc_ged, fs_type; type proc_perfmgr, fs_type; type sysfs_therm, fs_type, sysfs_type; -type sysfs_power_supply, fs_type, sysfs_type; type sysfs_fps, fs_type, sysfs_type; type sysfs_ccci, fs_type, sysfs_type; type sysfs_ssw, fs_type,sysfs_type; diff --git a/non_plat/file_contexts b/non_plat/file_contexts index cb06e5c..f12be62 100644 --- a/non_plat/file_contexts +++ b/non_plat/file_contexts @@ -473,7 +473,6 @@ /sys/bus/platform/drivers/dev_info/dev_info u:object_r:sysfs_devinfo:s0 /sys/firmware/devicetree/base/chosen/atag\,devinfo u:object_r:sysfs_devinfo:s0 /sys/devices/virtual/thermal(/.*)? u:object_r:sysfs_therm:s0 -/sys/devices/platform/battery/power_supply(/.*)? u:object_r:sysfs_power_supply:s0 /sys/devices/virtual/switch/fps(/.*)? u:object_r:sysfs_fps:s0 /sys/class/BOOT/BOOT/boot/boot_mode(/.*)? u:object_r:sysfs_boot:s0 diff --git a/non_plat/genfs_contexts b/non_plat/genfs_contexts index 9c595e6..25da084 100644 --- a/non_plat/genfs_contexts +++ b/non_plat/genfs_contexts @@ -23,3 +23,6 @@ genfscon proc /perfmgr u:object_r:proc_perfmgr:s0 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/mt_charger/power_supply u:object_r:sysfs_batteryinfo:s0 diff --git a/non_plat/mtk_hal_camera.te b/non_plat/mtk_hal_camera.te index f77df38..633044f 100644 --- a/non_plat/mtk_hal_camera.te +++ b/non_plat/mtk_hal_camera.te @@ -264,8 +264,8 @@ allow mtk_hal_camera mtk_cmdq_device:chr_file { read ioctl open }; # Date : WK17.36 # Operation : O Migration # Purpose: Allow to access battery status -allow mtk_hal_camera sysfs_power_supply:dir search; -allow mtk_hal_camera sysfs_power_supply:file { getattr open read }; +allow mtk_hal_camera sysfs_batteryinfo:dir search; +allow mtk_hal_camera sysfs_batteryinfo:file { getattr open read }; # Date : WK17.39 # Operation : O Migration @@ -291,4 +291,4 @@ allow mtk_hal_camera aee_aedv:unix_stream_socket connectto; # Date : WK18.02 # Stage: O Migration # Purpose: ISP tuning remapping -allow mtk_hal_camera mediatek_prop:property_service set; \ No newline at end of file +allow mtk_hal_camera mediatek_prop:property_service set; diff --git a/non_plat/untrusted_app.te b/non_plat/untrusted_app.te index 110653d..7dc9f3b 100644 --- a/non_plat/untrusted_app.te +++ b/non_plat/untrusted_app.te @@ -28,8 +28,8 @@ allow untrusted_app_25 proc_thermal:file { getattr open read }; allow untrusted_app_25 sysfs_fps:dir search; allow untrusted_app_25 sysfs_fps:file { getattr open read }; -allow untrusted_app_25 sysfs_power_supply:dir search; -allow untrusted_app_25 sysfs_power_supply:file { getattr open read }; +allow untrusted_app_25 sysfs_batteryinfo:dir search; +allow untrusted_app_25 sysfs_batteryinfo:file { getattr open read }; allow untrusted_app_25 sysfs_therm:dir { open read search }; allow untrusted_app_25 sysfs_therm:file { getattr open read };