Lines Matching refs:name
278 int service_to_fd(const char* name, const atransport* transport) { in service_to_fd() argument
281 if(!strncmp(name, "tcp:", 4)) { in service_to_fd()
282 int port = atoi(name + 4); in service_to_fd()
283 name = strchr(name + 4, ':'); in service_to_fd()
284 if(name == 0) { in service_to_fd()
292 ret = network_connect(name + 1, port, SOCK_STREAM, 0, &error); in service_to_fd()
298 } else if(!strncmp(name, "local:", 6)) { in service_to_fd()
299 ret = socket_local_client(name + 6, in service_to_fd()
301 } else if(!strncmp(name, "localreserved:", 14)) { in service_to_fd()
302 ret = socket_local_client(name + 14, in service_to_fd()
304 } else if(!strncmp(name, "localabstract:", 14)) { in service_to_fd()
305 ret = socket_local_client(name + 14, in service_to_fd()
307 } else if(!strncmp(name, "localfilesystem:", 16)) { in service_to_fd()
308 ret = socket_local_client(name + 16, in service_to_fd()
312 } else if(!strncmp("dev:", name, 4)) { in service_to_fd()
313 ret = unix_open(name + 4, O_RDWR | O_CLOEXEC); in service_to_fd()
314 } else if(!strncmp(name, "framebuffer:", 12)) { in service_to_fd()
316 } else if (!strncmp(name, "jdwp:", 5)) { in service_to_fd()
317 ret = create_jdwp_connection_fd(atoi(name+5)); in service_to_fd()
318 } else if(!strncmp(name, "shell", 5)) { in service_to_fd()
319 ret = ShellService(name + 5, transport); in service_to_fd()
320 } else if(!strncmp(name, "exec:", 5)) { in service_to_fd()
321 ret = StartSubprocess(name + 5, nullptr, SubprocessType::kRaw, SubprocessProtocol::kNone); in service_to_fd()
322 } else if(!strncmp(name, "sync:", 5)) { in service_to_fd()
324 } else if(!strncmp(name, "remount:", 8)) { in service_to_fd()
326 } else if(!strncmp(name, "reboot:", 7)) { in service_to_fd()
327 void* arg = strdup(name + 7); in service_to_fd()
330 } else if(!strncmp(name, "root:", 5)) { in service_to_fd()
332 } else if(!strncmp(name, "unroot:", 7)) { in service_to_fd()
334 } else if(!strncmp(name, "backup:", 7)) { in service_to_fd()
336 (name + 7)).c_str(), in service_to_fd()
338 } else if(!strncmp(name, "restore:", 8)) { in service_to_fd()
341 } else if(!strncmp(name, "tcpip:", 6)) { in service_to_fd()
343 if (sscanf(name + 6, "%d", &port) != 1) { in service_to_fd()
347 } else if(!strncmp(name, "usb:", 4)) { in service_to_fd()
349 } else if (!strncmp(name, "reverse:", 8)) { in service_to_fd()
350 ret = reverse_service(name + 8); in service_to_fd()
351 } else if(!strncmp(name, "disable-verity:", 15)) { in service_to_fd()
353 } else if(!strncmp(name, "enable-verity:", 15)) { in service_to_fd()
355 } else if (!strcmp(name, "reconnect")) { in service_to_fd()
511 asocket* host_service_to_socket(const char* name, const char* serial) { in host_service_to_socket() argument
512 if (!strcmp(name,"track-devices")) { in host_service_to_socket()
514 } else if (android::base::StartsWith(name, "wait-for-")) { in host_service_to_socket()
515 name += strlen("wait-for-"); in host_service_to_socket()
525 if (android::base::StartsWith(name, "local")) { in host_service_to_socket()
526 name += strlen("local"); in host_service_to_socket()
528 } else if (android::base::StartsWith(name, "usb")) { in host_service_to_socket()
529 name += strlen("usb"); in host_service_to_socket()
531 } else if (android::base::StartsWith(name, "any")) { in host_service_to_socket()
532 name += strlen("any"); in host_service_to_socket()
538 if (!strcmp(name, "-device")) { in host_service_to_socket()
540 } else if (!strcmp(name, "-recovery")) { in host_service_to_socket()
542 } else if (!strcmp(name, "-sideload")) { in host_service_to_socket()
544 } else if (!strcmp(name, "-bootloader")) { in host_service_to_socket()
546 } else if (!strcmp(name, "-any")) { in host_service_to_socket()
554 } else if (!strncmp(name, "connect:", 8)) { in host_service_to_socket()
555 char* host = strdup(name + 8); in host_service_to_socket()