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 37 38# execute /vendor/bin/lowi-server 39allow location location_exec:file rx_file_perms; 40 41# /data/vendor/location 42allow location location_data_file:dir create_dir_perms; 43allow location location_data_file:file create_file_perms; 44 45# /dev/socket/location 46allow location location_socket:sock_file create_file_perms; 47allow location location_socket:dir rw_dir_perms; 48allow location hal_gnss_qti:unix_dgram_socket sendto; 49 50userdebug_or_eng(` 51 allow location diag_device:chr_file rw_file_perms; 52') 53 54allow location hal_cne_hwservice:hwservice_manager find; 55binder_call(location, cnd) 56 57get_prop(location, wifi_hal_prop) 58