Merge "[ALPS04431500] battery: add selinux policy in em_svr" into alps-trunk-q0.basic

Change-Id: I1dd23be2b709812426a1d85e673d4b751fe9af82
MTK-Commit-Id: 3c6fefaadbbd74b2374e6ceb52253e59e1d1164d
This commit is contained in:
Wy Chuang 2020-01-18 10:13:07 +08:00 committed by Gerrit Code Review
commit 509a95b365
4 changed files with 25 additions and 1 deletions

View File

@ -59,6 +59,13 @@ allow em_svr sysfs_spm:file { open read write };
# Date: 2019/04/09 # Date: 2019/04/09
# Purpose: battery temprature setting # Purpose: battery temprature setting
allow em_svr sysfs_battery_temp:file w_file_perms; 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 # Date : 2018/10/12
# Purpose : EM Power PMU register reading/setting # Purpose : EM Power PMU register reading/setting

View File

@ -342,7 +342,14 @@ type sysfs_mmcblk, fs_type, sysfs_type;
type sysfs_leds_setting, fs_type, sysfs_type; type sysfs_leds_setting, fs_type, sysfs_type;
# Date : 2019/04/09 # 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_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; type aee_dipdebug_vendor_file, file_type, data_file_type;

View File

@ -122,4 +122,9 @@ genfscon sysfs /kernel/md/mdee u:object_r:sysfs_mdinfo:s0
# Date : 2019/04/09 # Date : 2019/04/09
# Purpose: mtk EM battery temprature settings # 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/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

View File

@ -143,6 +143,11 @@ get_prop(radio, mtk_debug_md_reset_prop)
allow radio sysfs_batteryinfo:dir search; allow radio sysfs_batteryinfo:dir search;
#allow radio sysfs_batteryinfo:file { read write getattr open create}; #allow radio sysfs_batteryinfo:file { read write getattr open create};
allow radio sysfs_vbus:file { read getattr open }; 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 # Date : 2018/06/15
# Purpose : Allow EM access touchscreen settings # Purpose : Allow EM access touchscreen settings