1type hal_rcsservice, domain;
2type hal_rcsservice_exec, exec_type, vendor_file_type, file_type;
3
4# Started by init
5init_daemon_domain(hal_rcsservice)
6net_domain(hal_rcsservice)
7
8get_prop(hal_rcsservice, hwservicemanager_prop)
9
10# To register imsrcsd to hwBinder
11hwbinder_use(hal_rcsservice)
12# add IUceSerive and IService to Hidl interface
13add_hwservice(hal_rcsservice, hal_imsrcsd_hwservice)
14add_hwservice(hal_rcsservice, hal_imscallinfo_hwservice)
15
16get_prop(hal_rcsservice, ims_prop)
17
18get_prop(hal_rcsservice, hwservicemanager_prop)
19
20# allow hal to read sysfs file
21r_dir_file(hal_rcsservice, sysfs_msm_subsys)
22r_dir_file(hal_rcsservice, sysfs_diag)
23r_dir_file(hal_rcsservice, sysfs_soc)
24
25allow hal_rcsservice sysfs_timestamp_switch:file r_file_perms;
26
27#required for socket creation
28unix_socket_connect(hal_rcsservice, ims, ims)
29allow hal_rcsservice self:socket create_socket_perms;
30allowxperm hal_rcsservice self:socket ioctl msm_sock_ipc_ioctls;
31
32# imsrcsd to bind with UceShimService.apk
33binder_call(hal_rcsservice, dataservice_app)
34
35# imsrcsd needs read/write access to devpts
36allow hal_rcsservice devpts:chr_file rw_file_perms;
37
38# allow imsrcsd capabilities
39wakelock_use(hal_rcsservice)
40allow hal_rcsservice self:capability net_bind_service;
41
42set_prop(hal_rcsservice, ctl_vendor_imsrcsservice_prop)
43
44userdebug_or_eng(`
45  allow hal_rcsservice diag_device:chr_file rw_file_perms;
46')
47
48dontaudit hal_rcsservice kernel:system module_request;
49