/system/core/adb/ |
D | socket_spec_test.cpp | 28 std::string hostname, error, serial; in TEST() local 30 EXPECT_FALSE(parse_tcp_socket_spec("sneakernet:5037", &hostname, &port, &serial, &error)); in TEST() 35 std::string hostname, error, serial; in TEST() local 37 EXPECT_TRUE(parse_tcp_socket_spec("tcp:5037", &hostname, &port, &serial, &error)); in TEST() 40 EXPECT_EQ("", serial); in TEST() 44 std::string hostname, error, serial; in TEST() local 46 EXPECT_FALSE(parse_tcp_socket_spec("tcp:", &hostname, &port, &serial, &error)); in TEST() 47 EXPECT_FALSE(parse_tcp_socket_spec("tcp:-1", &hostname, &port, &serial, &error)); in TEST() 48 EXPECT_FALSE(parse_tcp_socket_spec("tcp:65536", &hostname, &port, &serial, &error)); in TEST() 52 std::string hostname, error, serial; in TEST() local [all …]
|
D | adb.bash | 27 local where i cur serial 30 serial="${ANDROID_SERIAL:-none}" 47 serial=${cur} 78 _adb_cmd_install "$serial" $i 81 _adb_cmd_sideload "$serial" $i 84 _adb_cmd_pull "$serial" $i 87 _adb_cmd_push "$serial" $i 96 _adb_cmd_shell "$serial" $i 99 _adb_cmd_uninstall "$serial" $i 110 local serial i cur where [all …]
|
D | socket_test.cpp | 314 std::string_view serial, command; \ 315 bool result = internal::parse_host_service(&serial, &command, service); \ 322 std::string_view serial, command; \ 323 bool result = internal::parse_host_service(&serial, &command, service); \ 325 EXPECT_EQ(std::string(expected_serial), std::string(serial)); \ 336 std::string serial = protocol + "foo"; in TEST() local 337 VerifyParseHostService(serial + ":bar", serial, "bar"); in TEST() 338 VerifyParseHostService(serial + " :bar:baz", serial, "bar:baz"); in TEST() 343 std::string serial = protocol + "foo:123"; in TEST() local 344 VerifyParseHostService(serial + ":bar", serial, "bar"); in TEST() [all …]
|
D | transport.cpp | 209 D("transport %s was kicked. giving up on it.", it->transport->serial.c_str()); in Run() 230 D("attempting to reconnect %s", attempt.transport->serial.c_str()); in Run() 234 D("attempting to reconnect %s failed.", attempt.transport->serial.c_str()); in Run() 237 attempt.transport->serial.c_str()); in Run() 251 D("reconnection to %s succeeded.", attempt.transport->serial.c_str()); in Run() 256 D("cancelling reconnection attempt to %s.", attempt.transport->serial.c_str()); in Run() 557 VLOG(TRANSPORT) << dump_packet(t->serial.c_str(), "to remote", p); in send_packet() 564 D("%s: failed to enqueue packet, closing transport", t->serial.c_str()); in send_packet() 778 D("transport: %s deleting", t->serial.c_str()); in transport_registration_func() 798 D("%s: remote read: bad header", t->serial.c_str()); in transport_registration_func() [all …]
|
D | test_adb.py | 110 def adb_connect(unittest, serial): argument 116 output = subprocess.check_output(["adb", "connect", serial]) 118 "connected to {}".format(serial).encode("utf8")) 124 subprocess.Popen(["adb", "disconnect", serial], 301 with adb_connect(self, serial="localhost:{}".format(port)): 390 serial = "emulator-{}".format(port - 1) 394 "-s", serial, "get-state"], 400 "error: device '{}' not found".format(serial).encode("utf8")) 411 "-s", serial, "wait-for-device"]) 413 "-s", serial, "get-state"]) [all …]
|
D | transport_test.cpp | 132 std::string serial = "foo"; in TEST_F() local 139 t.serial = &serial[0]; in TEST_F() 149 EXPECT_TRUE(t.MatchesTarget(serial)); in TEST_F() 163 std::string serial = "100.100.100.100:5555"; in TEST_F() local 166 t.serial = &serial[0]; in TEST_F()
|
D | socket_spec.cpp | 79 std::string* serial, std::string* error) { in parse_tcp_socket_spec() argument 104 if (!android::base::ParseNetAddress(addr, &hostname_value, &port_value, serial, error)) { in parse_tcp_socket_spec() 186 bool socket_spec_connect(unique_fd* fd, std::string_view address, int* port, std::string* serial, in socket_spec_connect() argument 191 if (!parse_tcp_socket_spec(address, &hostname, &port_value, serial, error)) { in socket_spec_connect() 208 if (serial) { in socket_spec_connect() 209 *serial = android::base::StringPrintf("%s.%s", in socket_spec_connect() 270 if (serial) { in socket_spec_connect() 271 *serial = android::base::StringPrintf("vsock:%u:%d", cid, port_value); in socket_spec_connect() 312 if (serial) { in socket_spec_connect() 313 *serial = address; in socket_spec_connect()
|
D | socket_spec.h | 28 bool socket_spec_connect(unique_fd* fd, std::string_view address, int* port, std::string* serial, 33 std::string* serial, std::string* error);
|
D | sockets.cpp | 600 std::string_view serial; in parse_host_service() local 603 auto consume = [&full_service, &serial, &command](size_t count) { in parse_host_service() 605 if (!serial.empty()) { in parse_host_service() 606 CHECK_EQ(serial.data() + serial.size(), command.data()); in parse_host_service() 609 serial = full_service.substr(0, serial.size() + count); in parse_host_service() 614 auto finish = [out_serial, out_command, &serial, &command] { in parse_host_service() 615 if (serial.empty() || command.empty()) { in parse_host_service() 619 CHECK_EQ(':', serial.back()); in parse_host_service() 620 serial.remove_suffix(1); in parse_host_service() 622 *out_serial = serial; in parse_host_service() [all …]
|
D | SERVICES.TXT | 41 host:transport:<serial-number> 43 <serial-number>. After the OKAY response, every client request will 63 host-serial:<serial-number>:<request> 64 This is a special form of query, where the 'host-serial:<serial-number>:' 70 A variant of host-serial used to target the single USB device connected 74 A variant of host-serial used to target the single emulator instance 86 Returns the serial number of the corresponding device/emulator. 87 Note that emulator serial numbers are of the form "emulator-5554" 100 host-serial/host-usb/host-local/host prefixes as described previously 137 <serial> " " <local> " " <remote> "\n" [all …]
|
D | adb.cpp | 444 p->msg.arg1, s->peer->id, p->msg.arg1, t->serial.c_str()); in handle_packet() 471 t->serial.c_str(), s->peer->transport->serial.c_str()); in handle_packet() 1101 const char* serial, TransportId transport_id, int reply_fd, in handle_host_request() argument 1132 serial = serial_storage.c_str(); in handle_host_request() 1157 serial = serial_storage.c_str(); in handle_host_request() 1162 atransport* t = acquire_one_transport(type, serial, transport_id, nullptr, &error); in handle_host_request() 1209 : acquire_one_transport(type, serial, transport_id, nullptr, &error); in handle_host_request() 1238 std::string serial; in handle_host_request() local 1243 serial = address; in handle_host_request() 1244 } else if (!android::base::ParseNetAddress(address, &host, &port, &serial, &error)) { in handle_host_request() [all …]
|
D | services.cpp | 155 static void wait_service(unique_fd fd, std::string serial, TransportId transport_id, in wait_service() argument 201 acquire_one_transport(transport_type, !serial.empty() ? serial.c_str() : nullptr, in wait_service() 242 asocket* host_service_to_socket(std::string_view name, std::string_view serial, in host_service_to_socket() argument 252 std::string(serial), transport_id, spec)); in host_service_to_socket()
|
D | transport.h | 308 std::string serial; variable 338 std::string serial_name() const { return !serial.empty() ? serial : "<unknown>"; } in serial_name() 432 atransport* acquire_one_transport(TransportType type, const char* serial, TransportId transport_id, 448 atransport* find_transport(const char* serial); 465 void register_usb_transport(usb_handle* h, const char* serial, const char* devpath, 476 bool register_socket_transport(unique_fd s, std::string serial, int port, int local,
|
D | adb_listeners_test.cpp | 30 static bool listener_is_installed(const std::string& serial, const std::string& source, in listener_is_installed() argument 36 (serial.empty() || info[0] == serial) && in listener_is_installed()
|
/system/core/fastboot/ |
D | fastboot.bash | 27 local where i cur serial 30 serial="${ANDROID_SERIAL:-none}" 47 serial=${cur} 84 _fastboot_cmd_flash "$serial" $i 93 _fastboot_cmd_update "$serial" $i 104 local serial i cur 107 serial=$1 120 local serial i cur 122 serial=$1
|
/system/vold/ |
D | FsCrypt.h | 24 bool fscrypt_vold_create_user_key(userid_t user_id, int serial, bool ephemeral); 26 bool fscrypt_add_user_key_auth(userid_t user_id, int serial, const std::string& token, 28 bool fscrypt_clear_user_key_auth(userid_t user_id, int serial, const std::string& token, 32 bool fscrypt_unlock_user_key(userid_t user_id, int serial, const std::string& token, 36 bool fscrypt_prepare_user_storage(const std::string& volume_uuid, userid_t user_id, int serial,
|
/system/core/adb/client/ |
D | console.cpp | 57 static int adb_get_emulator_console_port(const char* serial) { in adb_get_emulator_console_port() argument 58 if (serial) { in adb_get_emulator_console_port() 61 return (sscanf(serial, "emulator-%d", &port) == 1) ? port : -1; in adb_get_emulator_console_port() 94 static int connect_to_console(const char* serial) { in connect_to_console() argument 95 int port = adb_get_emulator_console_port(serial); in connect_to_console() 110 int adb_send_emulator_command(int argc, const char** argv, const char* serial) { in adb_send_emulator_command() argument 111 unique_fd fd(connect_to_console(serial)); in adb_send_emulator_command()
|
D | transport_local.cpp | 90 std::string serial, prefix_addr; in connect_device() local 99 socket_spec_connect(&fd, prefix_addr, &port, &serial, response); in connect_device() 107 std::string serial; in connect_device() local 108 socket_spec_connect(&fd, prefix_addr, &port, &serial, &response); in connect_device() 122 if (!register_socket_transport(std::move(fd), serial, port, 0, std::move(reconnect), false, in connect_device() 125 *response = android::base::StringPrintf("already connected to %s", serial.c_str()); in connect_device() 127 *response = android::base::StringPrintf("failed to authenticate to %s", serial.c_str()); in connect_device() 129 *response = android::base::StringPrintf("failed to connect to %s", serial.c_str()); in connect_device() 132 *response = android::base::StringPrintf("connected to %s", serial.c_str()); in connect_device() 157 std::string serial = getEmulatorSerialString(console_port); in local_connect_arbitrary_ports() local [all …]
|
D | adb_client.h | 57 void adb_set_transport(TransportType type, const char* _Nullable serial, TransportId transport_id); 58 void adb_get_transport(TransportType* _Nullable type, const char* _Nullable* _Nullable serial, 69 const char* _Nullable serial);
|
D | usb_osx.cpp | 150 char serial[256]; in AndroidInterfaceAdded() local 279 serial[i] = buffer[i + 1]; in AndroidInterfaceAdded() 280 serial[i] = 0; in AndroidInterfaceAdded() 290 vendor, product, serial); in AndroidInterfaceAdded() 292 devpath = serial; in AndroidInterfaceAdded() 309 VLOG(USB) << "Add usb device " << serial; in AndroidInterfaceAdded() 310 LOG(INFO) << "reported max packet size for " << serial << " is " << handle->max_packet_size; in AndroidInterfaceAdded() 312 register_usb_transport(reinterpret_cast<::usb_handle*>(handle_p), serial, devpath.c_str(), in AndroidInterfaceAdded()
|
/system/core/adb/tools/ |
D | check_ms_os_desc.cpp | 86 static void check_ms_os_desc_v1(libusb_device_handle* device_handle, const std::string& serial) { in check_ms_os_desc_v1() argument 156 errx(1, "failed to find v1 MS OS descriptor specifying WinUSB for device %s", serial.c_str()); in check_ms_os_desc_v1() 159 static void check_ms_os_desc_v2(libusb_device_handle* device_handle, const std::string& serial) { in check_ms_os_desc_v2() argument 164 fprintf(stderr, "failed to get bos descriptor for device %s\n", serial.c_str()); in check_ms_os_desc_v2() 234 std::optional<std::string> serial = in main() local 236 if (!serial) { in main() 241 if (expected_serial && *serial != expected_serial) { in main() 242 fprintf(stderr, "skipping %s (wanted %s)\n", serial->c_str(), expected_serial); in main() 248 fprintf(stderr, "fetching v1 OS descriptor from device %s\n", serial->c_str()); in main() 249 check_ms_os_desc_v1(device_handle, *serial); in main() [all …]
|
D | adb_usbreset.cpp | 31 std::string_view serial; member 157 std::string serial(buf, buf + rc); in main() local 159 if (s->serial == serial) { in main() 160 selected_devices.push_back(std::make_pair(std::move(serial), device_handle)); in main() 163 selected_devices.push_back(std::make_pair(std::move(serial), device_handle)); in main() 175 for (auto& [serial, device_handle] : selected_devices) { in main() 180 printf("%s: successfully reset\n", serial.c_str()); in main() 182 PrintLibusbError(rc, "%s: failed to reset", serial.c_str()); in main()
|
/system/core/liblog/ |
D | properties.cpp | 56 uint32_t serial; member 65 return cache->pinfo && __system_property_serial(cache->pinfo) != cache->serial; in check_cache() 80 cache->cache.serial = __system_property_serial(cache->cache.pinfo); in refresh_cache() 312 uint32_t serial; member 332 if (current_serial != self->serial) { in do_cache2_char() 338 self->serial = current_serial; in do_cache2_char() 385 cache->cache.serial = __system_property_serial(cache->cache.pinfo); in refresh_cache_property() 395 uint32_t serial; member 415 if (current_serial != self->serial) { in do_cache2_property_size() 421 self->serial = current_serial; in do_cache2_property_size()
|
/system/core/adb/daemon/ |
D | mdns.cpp | 167 std::string serial = android::base::GetProperty("ro.serialno", ""); in GenerateDeviceGuid() local 168 if (serial.empty()) { in GenerateDeviceGuid() 170 serial = RandomAlphaNumString(16); in GenerateDeviceGuid() 172 guid += serial + '-'; in GenerateDeviceGuid()
|
D | transport_qemu.cpp | 106 std::string serial = android::base::StringPrintf("host-%d", fd.get()); in qemu_socket_thread() local 109 std::move(fd), std::move(serial), port, 1, in qemu_socket_thread()
|