[Detail] Add map permission for shell_exec to let Batterylog.java can set command from shell. Modify the permission list to rx_file_perms. MTK-Commit-Id: d8f72393dddc2787c88bb2141594319bfe473e9a Change-Id: I04b1b5c056223e30d5d8b6f8fe7a503afc28b521 CR-Id: ALPS04324880 Feature: Power Delivery (cherry picked from commit 63fd26ecb2014b5a03db649b332858943a6893a9)
82 lines
2.0 KiB
Plaintext
82 lines
2.0 KiB
Plaintext
# ==============================================
|
|
# Policy File of /system/bin/em_svr Executable File
|
|
|
|
|
|
# ==============================================
|
|
# Type Declaration
|
|
# ==============================================
|
|
|
|
type em_svr_exec, system_file_type, exec_type, file_type;
|
|
typeattribute em_svr coredomain;
|
|
|
|
# ==============================================
|
|
# Android Policy Rule
|
|
# ==============================================
|
|
|
|
# ==============================================
|
|
# NSA Policy Rule
|
|
# ==============================================
|
|
|
|
# ==============================================
|
|
# MTK Policy Rule
|
|
# ==============================================
|
|
|
|
init_daemon_domain(em_svr)
|
|
|
|
# Date: WK1812
|
|
# Purpose: add for MD log filter
|
|
allow em_svr block_device:dir search;
|
|
allow em_svr sdcardfs:dir { search write add_name };
|
|
allow em_svr sdcardfs:file { write create open };
|
|
|
|
allow em_svr media_rw_data_file:dir { read write search open add_name };
|
|
allow em_svr media_rw_data_file:file { write create open };
|
|
|
|
|
|
|
|
# Date: WK1812
|
|
# Purpose: add for controlling screen on/off
|
|
allow em_svr graphics_device:dir search;
|
|
allow em_svr graphics_device:chr_file { open read write ioctl };
|
|
allow em_svr surfaceflinger_service:service_manager find;
|
|
binder_use(em_svr)
|
|
binder_call(em_svr, surfaceflinger)
|
|
|
|
# Date: WK1812
|
|
# Purpose: add for controlling backlight
|
|
allow em_svr sysfs_leds:dir search;
|
|
|
|
# Date: WK1812
|
|
# Purpose: add for sensor calibration
|
|
allow em_svr self:capability { chown fsetid };
|
|
|
|
# Date: WK1812
|
|
# Purpose: add for shell cmd
|
|
allow em_svr shell_exec:file rx_file_perms;
|
|
|
|
# Date: WK1812
|
|
# Purpose: add for power battery charge/PMU
|
|
allow em_svr toolbox_exec:file { getattr execute read open execute_no_trans };
|
|
|
|
# Date: WK1812
|
|
# Purpose: sys file access
|
|
allow em_svr sysfs:dir { open read };
|
|
|
|
# Date: WK1822
|
|
# Purpose: battery temprature setting
|
|
allow em_svr sysfs_batteryinfo:dir search;
|
|
#allow em_svr sysfs_batteryinfo:file { write open };
|
|
#r_dir_file(em_svr, sysfs_batteryinfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|