diff --git a/non_plat/em_svr.te b/non_plat/em_svr.te index 8e1274c..5c00360 100644 --- a/non_plat/em_svr.te +++ b/non_plat/em_svr.te @@ -59,6 +59,13 @@ allow em_svr sysfs_spm:file { open read write }; # Date: 2019/04/09 # Purpose: battery temprature setting allow em_svr sysfs_battery_temp:file w_file_perms; +allow em_svr sysfs_battery_consumption:file r_file_perms; +allow em_svr sysfs_power_on_vol:file r_file_perms; +allow em_svr sysfs_power_off_vol:file r_file_perms; +allow em_svr sysfs_fg_disable:file w_file_perms; +allow em_svr sysfs_dis_nafg:file w_file_perms; + + # Date : 2018/10/12 # Purpose : EM Power PMU register reading/setting diff --git a/non_plat/file.te b/non_plat/file.te index 2223e93..026d178 100644 --- a/non_plat/file.te +++ b/non_plat/file.te @@ -341,7 +341,14 @@ type sysfs_mmcblk, fs_type, sysfs_type; type sysfs_leds_setting, fs_type, sysfs_type; # Date : 2019/04/09 -# Purpose: mtk EM battery temprature settings +# Purpose: mtk EM battery settings type sysfs_battery_temp, fs_type, sysfs_type; +type sysfs_battery_consumption, fs_type, sysfs_type; +type sysfs_power_on_vol, fs_type, sysfs_type; +type sysfs_power_off_vol, fs_type, sysfs_type; +type sysfs_fg_disable, fs_type, sysfs_type; +type sysfs_dis_nafg, fs_type, sysfs_type; + + type aee_dipdebug_vendor_file, file_type, data_file_type; diff --git a/non_plat/genfs_contexts b/non_plat/genfs_contexts index 5fdcc6d..82e92f8 100644 --- a/non_plat/genfs_contexts +++ b/non_plat/genfs_contexts @@ -121,4 +121,9 @@ genfscon sysfs /kernel/md/mdee u:object_r:sysfs_mdinfo:s0 # Date : 2019/04/09 # Purpose: mtk EM battery temprature settings genfscon sysfs /devices/platform/battery/Battery_Temperature u:object_r:sysfs_battery_temp:s0 +genfscon sysfs /devices/platform/battery/FG_Battery_CurrentConsumption u:object_r:sysfs_battery_consumption:s0 +genfscon sysfs /devices/platform/battery/Power_On_Voltage u:object_r:sysfs_power_on_vol:s0 +genfscon sysfs /devices/platform/battery/Power_Off_Voltage u:object_r:sysfs_power_off_vol:s0 +genfscon sysfs /devices/platform/battery/FG_daemon_disable u:object_r:sysfs_fg_disable:s0 +genfscon sysfs /devices/platform/battery/disable_nafg u:object_r:sysfs_dis_nafg:s0 diff --git a/non_plat/radio.te b/non_plat/radio.te index bb32b94..036faeb 100644 --- a/non_plat/radio.te +++ b/non_plat/radio.te @@ -143,6 +143,11 @@ get_prop(radio, mtk_debug_md_reset_prop) allow radio sysfs_batteryinfo:dir search; #allow radio sysfs_batteryinfo:file { read write getattr open create}; allow radio sysfs_vbus:file { read getattr open }; +allow radio sysfs_battery_consumption:file r_file_perms; +allow radio sysfs_power_on_vol:file r_file_perms; +allow radio sysfs_power_off_vol:file r_file_perms; +allow radio sysfs_fg_disable:file w_file_perms; +allow radio sysfs_dis_nafg:file w_file_perms; # Date : 2018/06/15 # Purpose : Allow EM access touchscreen settings