Lines Matching refs:name
143 [[maybe_unused]] static unique_fd reboot_device(const std::string& name) { in reboot_device() argument
146 auto reboot_service = [name](unique_fd fd) { in reboot_device()
147 std::string reboot_string = android::base::StringPrintf("reboot,%s", name.c_str()); in reboot_device()
159 cmd += name; in reboot_device()
238 asocket* daemon_service_to_socket(std::string_view name) { in daemon_service_to_socket() argument
239 if (name == "jdwp") { in daemon_service_to_socket()
241 } else if (name == "track-jdwp") { in daemon_service_to_socket()
243 } else if (name == "track-app") { in daemon_service_to_socket()
245 } else if (android::base::ConsumePrefix(&name, "sink:")) { in daemon_service_to_socket()
247 if (!ParseUint(&byte_count, name)) { in daemon_service_to_socket()
251 } else if (android::base::ConsumePrefix(&name, "source:")) { in daemon_service_to_socket()
253 if (!ParseUint(&byte_count, name)) { in daemon_service_to_socket()
262 unique_fd daemon_service_to_fd(std::string_view name, atransport* transport) { in daemon_service_to_fd() argument
263 ADB_LOG(Service) << "transport " << transport->serial_name() << " opening service " << name; in daemon_service_to_fd()
266 if (name.starts_with("abb:") || name.starts_with("abb_exec:")) { in daemon_service_to_fd()
267 return execute_abb_command(name); in daemon_service_to_fd()
272 if (name.starts_with("framebuffer:")) { in daemon_service_to_fd()
274 } else if (android::base::ConsumePrefix(&name, "remount:")) { in daemon_service_to_fd()
276 cmd += name; in daemon_service_to_fd()
278 } else if (android::base::ConsumePrefix(&name, "reboot:")) { in daemon_service_to_fd()
279 return reboot_device(std::string(name)); in daemon_service_to_fd()
280 } else if (name.starts_with("root:")) { in daemon_service_to_fd()
282 } else if (name.starts_with("unroot:")) { in daemon_service_to_fd()
284 } else if (android::base::ConsumePrefix(&name, "backup:")) { in daemon_service_to_fd()
286 cmd += name; in daemon_service_to_fd()
288 } else if (name.starts_with("restore:")) { in daemon_service_to_fd()
291 } else if (name.starts_with("disable-verity:")) { in daemon_service_to_fd()
294 } else if (name.starts_with("enable-verity:")) { in daemon_service_to_fd()
297 } else if (android::base::ConsumePrefix(&name, "tcpip:")) { in daemon_service_to_fd()
298 std::string str(name); in daemon_service_to_fd()
306 } else if (name.starts_with("usb:")) { in daemon_service_to_fd()
311 if (android::base::ConsumePrefix(&name, "jdwp:")) { in daemon_service_to_fd()
313 if (!ParseUint(&pid, name)) { in daemon_service_to_fd()
317 } else if (android::base::ConsumePrefix(&name, "shell")) { in daemon_service_to_fd()
318 return ShellService(name, transport); in daemon_service_to_fd()
319 } else if (android::base::ConsumePrefix(&name, "exec:")) { in daemon_service_to_fd()
320 return StartSubprocess(std::string(name), nullptr, SubprocessType::kRaw, in daemon_service_to_fd()
322 } else if (name.starts_with("sync:")) { in daemon_service_to_fd()
324 } else if (android::base::ConsumePrefix(&name, "reverse:")) { in daemon_service_to_fd()
325 return reverse_service(name, transport); in daemon_service_to_fd()
326 } else if (name == "reconnect") { in daemon_service_to_fd()
329 } else if (name == "spin") { in daemon_service_to_fd()