1# loc_launcher service
2# which launches various other services supporting GPS & Wifi-RTT (LOWI) location
3type location, domain;
4type location_exec, exec_type, vendor_file_type, file_type;
5
6init_daemon_domain(location)
7
8# STOPSHIP b/28340421
9# Temporarily grant this permission (for LOWI) and log its use.
10allow location self:capability { net_admin };
11auditallow location self:capability { net_admin };
12
13allow location self:capability { setgid setuid };
14
15hwbinder_use(location)
16get_prop(location, hwservicemanager_prop)
17allow location fwk_sensor_hwservice:hwservice_manager find;
18binder_call(location, system_server)
19allow location hal_wifi:unix_stream_socket { read write };
20
21# Enable standard network access (for XTRA download)
22net_domain(location)
23
24# And some additional network access
25allow location self:netlink_generic_socket create_socket_perms_no_ioctl;
26allow location self:netlink_socket create_socket_perms_no_ioctl;
27allowxperm location self:udp_socket ioctl { SIOCGIFINDEX SIOCGIFHWADDR SIOCIWFIRSTPRIV_05 };
28
29allow location self:socket create_socket_perms;
30allowxperm location self:socket ioctl msm_sock_ipc_ioctls;
31
32# files in /sys
33r_dir_file(location, sysfs_type)
34
35dontaudit location kernel:system module_request;
36
37allow location proc_net_type:file r_file_perms;
38
39# execute /vendor/bin/lowi-server
40allow location location_exec:file rx_file_perms;
41
42# /data/vendor/location
43allow location location_data_file:dir create_dir_perms;
44allow location location_data_file:{ file sock_file } create_file_perms;
45
46userdebug_or_eng(`
47  allow location diag_device:chr_file rw_file_perms;
48')
49
50get_prop(location, wifi_hal_prop)
51