diff --git a/non_plat/factory.te b/non_plat/factory.te index c919e6c..1a03f39 100644 --- a/non_plat/factory.te +++ b/non_plat/factory.te @@ -227,7 +227,7 @@ allow factory sysfs_ccci:file r_file_perms; # avc: denied { read } for name="boot_mode" dev="sysfs" ino=117 # scontext=u:r:factory:s0 tcontext=u:object_r:sysfs:s0 # tclass=file permissive=0 -#allow factory sysfs:file rw_file_perms; +allow factory sysfs_boot:file rw_file_perms; # Date: WK16.30 #Purpose: For gps test diff --git a/non_plat/file.te b/non_plat/file.te index 9d2e54f..fafabb7 100644 --- a/non_plat/file.te +++ b/non_plat/file.te @@ -233,3 +233,7 @@ type mtk_powerhal_data_file, file_type, data_file_type; # Date : WK1743 # Purpose : for meta_tst copy MD DB from MD image type mddb_data_file, file_type, data_file_type; + +# Date : WK1814 +# Purpose : for factory to get boot mode +type sysfs_boot, fs_type, sysfs_type; diff --git a/non_plat/file_contexts b/non_plat/file_contexts index ed10bb8..812d0c0 100644 --- a/non_plat/file_contexts +++ b/non_plat/file_contexts @@ -473,6 +473,7 @@ /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 ############################# # debugfs files