parent
27c9976adc
commit
acd4067f6e
10 changed files with 34 additions and 1 deletions
|
|
@ -15,6 +15,7 @@
|
|||
#
|
||||
|
||||
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += vendor/xiaomi/haydn-miuicamera/sepolicy/private
|
||||
SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += vendor/xiaomi/haydn-miuicamera/sepolicy/public
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += vendor/xiaomi/haydn-miuicamera/sepolicy/vendor
|
||||
|
||||
BUILD_BROKEN_DUP_RULES := true
|
||||
|
|
|
|||
1
sepolicy/private/platform_app.te
Normal file
1
sepolicy/private/platform_app.te
Normal file
|
|
@ -0,0 +1 @@
|
|||
hal_client_domain(platform_app, hal_misys)
|
||||
1
sepolicy/private/priv_app.te
Normal file
1
sepolicy/private/priv_app.te
Normal file
|
|
@ -0,0 +1 @@
|
|||
hal_client_domain(priv_app, hal_misys)
|
||||
1
sepolicy/public/attributes
Normal file
1
sepolicy/public/attributes
Normal file
|
|
@ -0,0 +1 @@
|
|||
hal_attribute_lineage(misys)
|
||||
4
sepolicy/vendor/file_contexts
vendored
4
sepolicy/vendor/file_contexts
vendored
|
|
@ -1 +1,5 @@
|
|||
/vendor/bin/hw/vendor\.xiaomi\.hardware\.misys@1\.0-service u:object_r:hal_misys_default_exec:s0
|
||||
/vendor/bin/hw/vendor\.xiaomi\.hardware\.misys@2\.0-service u:object_r:hal_misys_default_exec:s0
|
||||
/vendor/bin/hw/vendor\.xiaomi\.hardware\.misys@3\.0-service u:object_r:hal_misys_default_exec:s0
|
||||
|
||||
/vendor/lib(64)?/libmialgoengine\.so u:object_r:same_process_hal_file:s0
|
||||
|
|
|
|||
5
sepolicy/vendor/hal_misys.te
vendored
Normal file
5
sepolicy/vendor/hal_misys.te
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# HwBinder IPC from client to server
|
||||
binder_call(hal_misys_client, hal_misys_server)
|
||||
|
||||
add_hwservice(hal_misys_server, hal_misys_hwservice)
|
||||
allow hal_misys_client hal_misys_hwservice:hwservice_manager find;
|
||||
15
sepolicy/vendor/hal_misys_default.te
vendored
Normal file
15
sepolicy/vendor/hal_misys_default.te
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
type hal_misys_default, domain;
|
||||
hal_server_domain(hal_misys_default, hal_misys)
|
||||
|
||||
type hal_misys_default_exec, exec_type, vendor_file_type, file_type;
|
||||
|
||||
init_daemon_domain(hal_misys_default)
|
||||
|
||||
allow hal_misys_default camera_persist_file:file create_file_perms;
|
||||
allow hal_misys_default camera_persist_file:dir create_dir_perms;
|
||||
|
||||
r_dir_file(hal_misys_default, firmware_file)
|
||||
r_dir_file(hal_misys_default, mnt_vendor_file)
|
||||
|
||||
get_prop(hal_misys_default, vendor_camera_prop)
|
||||
get_prop(hal_misys_default, vendor_camera_sensor_prop)
|
||||
1
sepolicy/vendor/hwservice.te
vendored
Normal file
1
sepolicy/vendor/hwservice.te
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
type hal_misys_hwservice, hwservice_manager_type;
|
||||
2
sepolicy/vendor/hwservice_contexts
vendored
Normal file
2
sepolicy/vendor/hwservice_contexts
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# Miui camera
|
||||
vendor.xiaomi.hardware.misys::IMiSys u:object_r:hal_misys_hwservice:s0
|
||||
4
sepolicy/vendor/platform_app.te
vendored
4
sepolicy/vendor/platform_app.te
vendored
|
|
@ -4,7 +4,9 @@ binder_call(platform_app, hal_camera_default)
|
|||
|
||||
allow platform_app cgroup:file r_file_perms;
|
||||
|
||||
allow platform_app hal_misys_hwservice:hwservice_manager find;
|
||||
|
||||
allow platform_app miui_multi_display:service_manager find;
|
||||
|
||||
# Allow to access proc/stat
|
||||
allow platform_app proc_stat:file r_file_perms;
|
||||
allow platform_app proc_stat:file read;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue