Alex Klyubin | 53656c1 | 2017-04-13 19:05:27 -0700 | [diff] [blame] | 1 | # HwBinder IPC from client to server, and callbacks |
| 2 | binder_call(hal_telephony_client, hal_telephony_server) |
| 3 | binder_call(hal_telephony_server, hal_telephony_client) |
| 4 | |
Steven Moreland | 9234e00 | 2018-06-06 09:30:18 -0700 | [diff] [blame] | 5 | hal_attribute_hwservice(hal_telephony, hal_telephony_hwservice) |
Sarah Chin | e3dfbdb | 2021-11-05 14:18:56 -0700 | [diff] [blame^] | 6 | hal_attribute_service(hal_telephony, hal_radio_config_service) |
| 7 | hal_attribute_service(hal_telephony, hal_radio_data_service) |
| 8 | hal_attribute_service(hal_telephony, hal_radio_messaging_service) |
| 9 | hal_attribute_service(hal_telephony, hal_radio_modem_service) |
| 10 | hal_attribute_service(hal_telephony, hal_radio_network_service) |
| 11 | hal_attribute_service(hal_telephony, hal_radio_sim_service) |
| 12 | hal_attribute_service(hal_telephony, hal_radio_voice_service) |
Alex Klyubin | 53656c1 | 2017-04-13 19:05:27 -0700 | [diff] [blame] | 13 | |
Amit Mahajan | 3007344 | 2018-03-12 17:12:09 +0000 | [diff] [blame] | 14 | allowxperm hal_telephony_server self:udp_socket ioctl priv_sock_ioctls; |
| 15 | |
| 16 | allow hal_telephony_server self:netlink_route_socket nlmsg_write; |
| 17 | allow hal_telephony_server kernel:system module_request; |
| 18 | allow hal_telephony_server self:global_capability_class_set { setpcap setgid setuid net_admin net_raw }; |
Amit Mahajan | 3007344 | 2018-03-12 17:12:09 +0000 | [diff] [blame] | 19 | allow hal_telephony_server cgroup:dir create_dir_perms; |
| 20 | allow hal_telephony_server cgroup:{ file lnk_file } r_file_perms; |
Marco Ballesio | aa4ce95 | 2021-02-11 15:18:11 -0800 | [diff] [blame] | 21 | allow hal_telephony_server cgroup_v2:dir create_dir_perms; |
| 22 | allow hal_telephony_server cgroup_v2:{ file lnk_file } r_file_perms; |
Amit Mahajan | 3007344 | 2018-03-12 17:12:09 +0000 | [diff] [blame] | 23 | allow hal_telephony_server radio_device:chr_file rw_file_perms; |
| 24 | allow hal_telephony_server radio_device:blk_file r_file_perms; |
Amit Mahajan | 3007344 | 2018-03-12 17:12:09 +0000 | [diff] [blame] | 25 | allow hal_telephony_server efs_file:dir create_dir_perms; |
| 26 | allow hal_telephony_server efs_file:file create_file_perms; |
| 27 | allow hal_telephony_server vendor_shell_exec:file rx_file_perms; |
| 28 | allow hal_telephony_server bluetooth_efs_file:file r_file_perms; |
| 29 | allow hal_telephony_server bluetooth_efs_file:dir r_dir_perms; |
Amit Mahajan | 3007344 | 2018-03-12 17:12:09 +0000 | [diff] [blame] | 30 | |
| 31 | # property service |
Inseob Kim | 641cffe | 2020-06-05 10:40:16 +0900 | [diff] [blame] | 32 | get_prop(hal_telephony_server, telephony_config_prop) |
Inseob Kim | c87c63b | 2020-07-28 15:17:24 +0900 | [diff] [blame] | 33 | set_prop(hal_telephony_server, radio_control_prop) |
Amit Mahajan | 3007344 | 2018-03-12 17:12:09 +0000 | [diff] [blame] | 34 | set_prop(hal_telephony_server, radio_prop) |
Inseob Kim | ad63170 | 2020-05-14 21:47:43 +0900 | [diff] [blame] | 35 | set_prop(hal_telephony_server, telephony_status_prop) |
Amit Mahajan | 3007344 | 2018-03-12 17:12:09 +0000 | [diff] [blame] | 36 | |
| 37 | allow hal_telephony_server tty_device:chr_file rw_file_perms; |
| 38 | |
| 39 | # Allow hal_telephony_server to create and use netlink sockets. |
| 40 | allow hal_telephony_server self:netlink_socket create_socket_perms_no_ioctl; |
| 41 | allow hal_telephony_server self:netlink_generic_socket create_socket_perms_no_ioctl; |
| 42 | allow hal_telephony_server self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl; |
| 43 | |
| 44 | # Access to wake locks |
| 45 | wakelock_use(hal_telephony_server) |
| 46 | |
Jeff Vander Stoep | 7a4af30 | 2018-04-10 12:47:48 -0700 | [diff] [blame] | 47 | r_dir_file(hal_telephony_server, proc_net_type) |
Amit Mahajan | 3007344 | 2018-03-12 17:12:09 +0000 | [diff] [blame] | 48 | r_dir_file(hal_telephony_server, sysfs_type) |
Amit Mahajan | 3007344 | 2018-03-12 17:12:09 +0000 | [diff] [blame] | 49 | |
| 50 | # granting the ioctl permission for hal_telephony_server should be device specific |
| 51 | allow hal_telephony_server self:socket create_socket_perms_no_ioctl; |
Tomasz Wasilczyk | 9d56107 | 2021-10-21 11:40:31 -0700 | [diff] [blame] | 52 | |
| 53 | # Allow AIDL HAL shim to call HIDL HAL implementation |
| 54 | binder_call(hal_telephony_server, hal_telephony_server) |