1# location - Location daemon 2type location, domain; 3type location_exec, exec_type, vendor_file_type, file_type; 4 5init_daemon_domain(location) 6 7allow location self:capability setgid; 8 9# files in /sys 10r_dir_file(location, sysfs_soc) 11r_dir_file(location, sysfs_esoc) 12r_dir_file(location, sysfs_msm_subsys) 13r_dir_file(location, sysfs_ssr) 14 15# Execute /vendor/bin/lowi-server 16allow location location_exec:file rx_file_perms; 17 18# Enable standard network access (for XTRA download) 19net_domain(location) 20 21## And some additional network access 22allow location self:{ 23 netlink_generic_socket 24 qipcrtr_socket 25} create_socket_perms_no_ioctl; 26allowxperm location self:udp_socket ioctl { SIOCGIFINDEX SIOCGIFHWADDR SIOCIWFIRSTPRIV_05 }; 27 28# /data/vendor/location 29allow location location_data_file:dir create_dir_perms; 30allow location location_data_file:file create_file_perms; 31 32# /data/vendor/wifi/wpa 33allow location wpa_data_file:dir rw_dir_perms; 34allow location wpa_data_file:sock_file create_file_perms; 35allow location hal_wifi_supplicant_default:unix_dgram_socket sendto; 36 37# /dev/socket/location 38allow location location_socket:sock_file create_file_perms; 39allow location location_socket:dir w_dir_perms; 40 41allow location hal_gnss_qti:unix_dgram_socket sendto; 42 43allow location wifihal_socket:dir search; 44unix_socket_send(location, wifihal, hal_wifi_ext); 45 46get_prop(location, hwservicemanager_prop) 47binder_call(location, hwservicemanager) 48allow location hal_cacert_hwservice:hwservice_manager find; 49 50userdebug_or_eng(` 51 allow location diag_device:chr_file rw_file_perms; 52') 53 54