HAL: adding a needed config so normal users dont use this advanced stuff when compiling

also fixed camera sepolicy

Change-Id: Ifc4d36d2d6b8916ba228cade1683ece257d2c5ea
This commit is contained in:
PythonLimited 2018-02-20 17:02:11 +01:00
parent 3f6f5c7d21
commit c5c5560011
5 changed files with 7 additions and 67 deletions

View file

@ -1,2 +1,3 @@
ifeq ($(strip $(TARGET_USE_NEO_HAL)),true)
include $(call all-subdir-makefiles)
endif

View file

@ -21,7 +21,7 @@
*
*/
//#define LOG_NDEBUG 0
#define LOG_NDEBUG 0
#define LOG_TAG "CameraWrapper"
#include <cutils/log.h>

View file

@ -28,10 +28,10 @@ unix_socket_connect(camera, sensors, sensors)
allow camera sensors_socket:sock_file read;
allow camera devpts:chr_file { read write getattr };
allow camera device:chr_file { read write ioctl open };
allow camera device:chr_file { ioctl };
allow camera mpdecision:unix_stream_socket connectto;
allow camera servicemanager:binder call;
allow camera socket_device:sock_file write;
allow camera system:binder call;
allow camera system:unix_stream_socket { read write setopt };
allow camera system_data_file:file { open write };
#allow camera system:binder call;
#allow camera system:unix_stream_socket { read write setopt };
allow camera system_data_file:file { open };

View file

@ -1,6 +0,0 @@
type libqc-opt, domain;
# Set sys.media.vdec.sw value
allow init_shell performance_prop:property_service set;
allow libqc-opt performance_prop:property_service set;
allow zygote performance_prop:property_service set;

View file

@ -1,55 +0,0 @@
# Qcom init scripts
allow rootfs shell_exec:file rx_file_perms;
allow init_shell ctl_default_prop:property_service set;
allow init_shell default_prop:property_service set;
allow init_shell graphics_device:dir w_dir_perms;
allow init_shell graphics_device:lnk_file create_file_perms;
allow init_shell radio_efs_file:dir r_dir_perms;
allow init_shell radio_efs_file:file x_file_perms;
allow init_shell rootfs:file r_file_perms;
allow init_shell self:capability { fowner chown fsetid };
allow init_shell sysfs:file create_file_perms;
allow init_shell system_prop:property_service set;
allow init_shell tmpfs:chr_file r_file_perms;
allow init_shell system_file:lnk_file getattr;
allow init_shell tmpfs:chr_file w_file_perms;
allow init_shell kernel:process setsched;
allow init_shell labeledfs:filesystem remount;
allow init_shell system_file:file { write create };
allow init_shell system_file:lnk_file create;
allow init_shell system_file:dir w_dir_perms;
allow init_shell cache_file:file { write lock open setattr };
allow init_shell dhcp_data_file:dir { read write open remove_name };
allow init_shell dhcp_data_file:file unlink;
allow init_shell proc:file write;
allow init_shell self:capability { net_admin dac_override };
allow init_shell sensors_data_file:dir { getattr setattr };
allow init_shell sensors_data_file:file { write getattr setattr };
allow init_shell system_data_file:dir setattr;
allow init_shell tmpfs:file execute;
allow init_shell wifi_data_file:file { read getattr open };
# pds backup and restorecon
allow shell camera_data_file:dir getattr;
allow shell pds_file:dir { read search open getattr };
allow shell pds_file:file getattr;
allow init_shell pds_file:file { read open };
allow init_shell pds_file:dir getattr;
allow pds_file rootfs:filesystem associate;
allow init_shell block_device:blk_file { read open };
allow init_shell device:chr_file { getattr setattr write open };
allow init_shell device:dir { write read open add_name };
allow init_shell device:lnk_file create;
allow init_shell self:capability sys_module;
allow init_shell sensors_device:chr_file getattr;
allow init_shell kernel:system syslog_mod;
allow init_shell self:capability2 syslog;
allow persist_file rootfs:filesystem associate;
allow init_shell persist_file:dir { getattr write remove_name read add_name open };
allow init_shell persist_file:lnk_file { read create getattr unlink };
allow init_shell persist_wifi_file:file getattr;
allow init_shell persist_wifi_file:lnk_file unlink;
allow init_shell diagnostic_device:chr_file { read write };
allow init_shell init:fifo_file { read ioctl getattr };