blob: 8a1fbe59b999ad9893d833d463795e43b59ea7bf [file] [log] [blame]
Alex Klyubin53656c12017-04-13 19:05:27 -07001# HwBinder IPC from client to server, and callbacks
2binder_call(hal_telephony_client, hal_telephony_server)
3binder_call(hal_telephony_server, hal_telephony_client)
4
Steven Moreland9234e002018-06-06 09:30:18 -07005hal_attribute_hwservice(hal_telephony, hal_telephony_hwservice)
Sarah Chine3dfbdb2021-11-05 14:18:56 -07006hal_attribute_service(hal_telephony, hal_radio_config_service)
7hal_attribute_service(hal_telephony, hal_radio_data_service)
8hal_attribute_service(hal_telephony, hal_radio_messaging_service)
9hal_attribute_service(hal_telephony, hal_radio_modem_service)
10hal_attribute_service(hal_telephony, hal_radio_network_service)
11hal_attribute_service(hal_telephony, hal_radio_sim_service)
12hal_attribute_service(hal_telephony, hal_radio_voice_service)
Alex Klyubin53656c12017-04-13 19:05:27 -070013
Amit Mahajan30073442018-03-12 17:12:09 +000014allowxperm hal_telephony_server self:udp_socket ioctl priv_sock_ioctls;
15
16allow hal_telephony_server self:netlink_route_socket nlmsg_write;
17allow hal_telephony_server kernel:system module_request;
18allow hal_telephony_server self:global_capability_class_set { setpcap setgid setuid net_admin net_raw };
Amit Mahajan30073442018-03-12 17:12:09 +000019allow hal_telephony_server cgroup:dir create_dir_perms;
20allow hal_telephony_server cgroup:{ file lnk_file } r_file_perms;
Marco Ballesioaa4ce952021-02-11 15:18:11 -080021allow hal_telephony_server cgroup_v2:dir create_dir_perms;
22allow hal_telephony_server cgroup_v2:{ file lnk_file } r_file_perms;
Amit Mahajan30073442018-03-12 17:12:09 +000023allow hal_telephony_server radio_device:chr_file rw_file_perms;
24allow hal_telephony_server radio_device:blk_file r_file_perms;
Amit Mahajan30073442018-03-12 17:12:09 +000025allow hal_telephony_server efs_file:dir create_dir_perms;
26allow hal_telephony_server efs_file:file create_file_perms;
27allow hal_telephony_server vendor_shell_exec:file rx_file_perms;
28allow hal_telephony_server bluetooth_efs_file:file r_file_perms;
29allow hal_telephony_server bluetooth_efs_file:dir r_dir_perms;
Amit Mahajan30073442018-03-12 17:12:09 +000030
31# property service
Inseob Kim641cffe2020-06-05 10:40:16 +090032get_prop(hal_telephony_server, telephony_config_prop)
Inseob Kimc87c63b2020-07-28 15:17:24 +090033set_prop(hal_telephony_server, radio_control_prop)
Amit Mahajan30073442018-03-12 17:12:09 +000034set_prop(hal_telephony_server, radio_prop)
Inseob Kimad631702020-05-14 21:47:43 +090035set_prop(hal_telephony_server, telephony_status_prop)
Amit Mahajan30073442018-03-12 17:12:09 +000036
37allow hal_telephony_server tty_device:chr_file rw_file_perms;
38
39# Allow hal_telephony_server to create and use netlink sockets.
40allow hal_telephony_server self:netlink_socket create_socket_perms_no_ioctl;
41allow hal_telephony_server self:netlink_generic_socket create_socket_perms_no_ioctl;
42allow hal_telephony_server self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
43
44# Access to wake locks
45wakelock_use(hal_telephony_server)
46
Jeff Vander Stoep7a4af302018-04-10 12:47:48 -070047r_dir_file(hal_telephony_server, proc_net_type)
Amit Mahajan30073442018-03-12 17:12:09 +000048r_dir_file(hal_telephony_server, sysfs_type)
Amit Mahajan30073442018-03-12 17:12:09 +000049
50# granting the ioctl permission for hal_telephony_server should be device specific
51allow hal_telephony_server self:socket create_socket_perms_no_ioctl;
Tomasz Wasilczyk9d561072021-10-21 11:40:31 -070052
53# Allow AIDL HAL shim to call HIDL HAL implementation
54binder_call(hal_telephony_server, hal_telephony_server)