1*e4a36f41SAndroid Build Coastguard Worker### ADB daemon common rules. 2*e4a36f41SAndroid Build Coastguard Worker### Put things here that are needed for both adbd proper and adbd in trade-in mode. 3*e4a36f41SAndroid Build Coastguard Worker 4*e4a36f41SAndroid Build Coastguard Worker# Connect to mdnsd via mdnsd socket. 5*e4a36f41SAndroid Build Coastguard Workerunix_socket_connect(adbd_common, mdnsd, mdnsd) 6*e4a36f41SAndroid Build Coastguard Worker 7*e4a36f41SAndroid Build Coastguard Worker# adbd probes for vsock support. Do not generate denials when 8*e4a36f41SAndroid Build Coastguard Worker# this occurs. (b/123569840) 9*e4a36f41SAndroid Build Coastguard Workerdontaudit adbd_common self:{ socket vsock_socket } create; 10*e4a36f41SAndroid Build Coastguard Worker 11*e4a36f41SAndroid Build Coastguard Worker# Allow adbd inside vm to forward vm's vsock. 12*e4a36f41SAndroid Build Coastguard Workerallow adbd_common self:vsock_socket { create_socket_perms_no_ioctl listen accept }; 13*e4a36f41SAndroid Build Coastguard Worker 14*e4a36f41SAndroid Build Coastguard Worker# Access device logging gating property 15*e4a36f41SAndroid Build Coastguard Workerget_prop(adbd_common, device_logging_prop) 16*e4a36f41SAndroid Build Coastguard Worker 17*e4a36f41SAndroid Build Coastguard Worker# Use a pseudo tty. 18*e4a36f41SAndroid Build Coastguard Workerallow adbd_common devpts:chr_file rw_file_perms; 19*e4a36f41SAndroid Build Coastguard Worker 20*e4a36f41SAndroid Build Coastguard Worker# Read persist.adb.tls_server.enable property 21*e4a36f41SAndroid Build Coastguard Workerget_prop(adbd_common, system_adbd_prop) 22*e4a36f41SAndroid Build Coastguard Worker 23*e4a36f41SAndroid Build Coastguard Worker# Read whether or not Test Harness Mode is enabled 24*e4a36f41SAndroid Build Coastguard Workerget_prop(adbd_common, test_harness_prop) 25*e4a36f41SAndroid Build Coastguard Worker 26*e4a36f41SAndroid Build Coastguard Worker# Set service.adb.tcp.port, service.adb.tls.port, persist.adb.wifi.* properties 27*e4a36f41SAndroid Build Coastguard Workerset_prop(adbd_common, adbd_prop) 28*e4a36f41SAndroid Build Coastguard Workerset_prop(adbd_common, adbd_config_prop) 29*e4a36f41SAndroid Build Coastguard Worker 30*e4a36f41SAndroid Build Coastguard Worker# Read device's serial number from system properties 31*e4a36f41SAndroid Build Coastguard Workerget_prop(adbd_common, serialno_prop) 32