Home
last modified time | relevance | path

Searched refs:serial (Results 1 – 25 of 55) sorted by relevance

123

/packages/modules/adb/
Dadb.bash27 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 …]
Dsocket_spec_test.cpp28 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 …]
Dtransport.cpp211 D("transport %s was kicked. giving up on it.", it->transport->serial.c_str()); in Run()
232 D("attempting to reconnect %s", attempt.transport->serial.c_str()); in Run()
236 D("attempting to reconnect %s failed.", attempt.transport->serial.c_str()); in Run()
239 attempt.transport->serial.c_str()); in Run()
253 D("reconnection to %s succeeded.", attempt.transport->serial.c_str()); in Run()
258 D("cancelling reconnection attempt to %s.", attempt.transport->serial.c_str()); in Run()
559 VLOG(TRANSPORT) << dump_packet(t->serial.c_str(), "to remote", p); in send_packet()
566 D("%s: failed to enqueue packet, closing transport", t->serial.c_str()); in send_packet()
780 D("transport: %s deleting", t->serial.c_str()); in transport_registration_func()
800 D("%s: remote read: bad header", t->serial.c_str()); in transport_registration_func()
[all …]
Dsocket_test.cpp314 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 …]
Dtest_adb.py110 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 …]
Dsockets.cpp600 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 …]
Dsocket_spec.cpp79 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()
276 if (serial) { in socket_spec_connect()
277 *serial = android::base::StringPrintf("vsock:%u:%d", cid, port_value); in socket_spec_connect()
318 if (serial) { in socket_spec_connect()
319 *serial = address; in socket_spec_connect()
Dtransport_test.cpp132 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()
Dadb.cpp469 p->msg.arg1, s->peer->id, p->msg.arg1, t->serial.c_str()); in handle_packet()
496 t->serial.c_str(), s->peer->transport->serial.c_str()); in handle_packet()
1126 const char* serial, TransportId transport_id, int reply_fd, in handle_host_request() argument
1157 serial = serial_storage.c_str(); in handle_host_request()
1182 serial = serial_storage.c_str(); in handle_host_request()
1187 atransport* t = acquire_one_transport(type, serial, transport_id, nullptr, &error); in handle_host_request()
1234 : acquire_one_transport(type, serial, transport_id, nullptr, &error); in handle_host_request()
1271 std::string serial; in handle_host_request() local
1276 serial = address; in handle_host_request()
1277 } else if (!android::base::ParseNetAddress(address, &host, &port, &serial, &error)) { in handle_host_request()
[all …]
DSERVICES.TXT41 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
138 <serial> " " <local> " " <remote> "\n"
[all …]
Dtransport.h309 std::string serial; variable
339 std::string serial_name() const { return !serial.empty() ? serial : "<unknown>"; } in serial_name()
431 atransport* acquire_one_transport(TransportType type, const char* serial, TransportId transport_id,
447 atransport* find_transport(const char* serial);
465 void register_usb_transport(std::shared_ptr<Connection> connection, const char* serial,
467 void register_usb_transport(usb_handle* h, const char* serial, const char* devpath,
478 bool register_socket_transport(unique_fd s, std::string serial, int port, int local,
Dservices.cpp155 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()
/packages/modules/adb/tools/
Dcheck_ms_os_desc.cpp86 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 …]
Dadb_usbreset.cpp31 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()
/packages/modules/adb/daemon/
Dproperty_monitor.cpp49 uint32_t serial; in ReadProperty() member
55 [](void* cookie, const char* name, const char* value, uint32_t serial) { in ReadProperty() argument
58 result->serial = serial; in ReadProperty()
62 if (result.serial <= data->serial) { in ReadProperty()
66 data->serial = result.serial; in ReadProperty()
74 .serial = 0, in Add()
Dmdns.cpp167 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()
/packages/modules/adb/client/
Dtransport_local.cpp90 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 …]
Dconsole.cpp57 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()
Dusb_osx.cpp149 char serial[256]; in AndroidInterfaceAdded() local
278 serial[i] = buffer[i + 1]; in AndroidInterfaceAdded()
279 serial[i] = 0; in AndroidInterfaceAdded()
289 vendor, product, serial); in AndroidInterfaceAdded()
291 devpath = serial; in AndroidInterfaceAdded()
308 VLOG(USB) << "Add usb device " << serial; in AndroidInterfaceAdded()
309 LOG(INFO) << "reported max packet size for " << serial << " is " << handle->max_packet_size; in AndroidInterfaceAdded()
311 register_usb_transport(reinterpret_cast<::usb_handle*>(handle_p), serial, devpath.c_str(), in AndroidInterfaceAdded()
Dadb_client.h57 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);
Dadb_client.cpp57 void adb_set_transport(TransportType type, const char* serial, TransportId transport_id) { in adb_set_transport() argument
59 __adb_serial = serial; in adb_set_transport()
63 void adb_get_transport(TransportType* type, const char** serial, TransportId* transport_id) { in adb_get_transport() argument
65 if (serial) *serial = __adb_serial; in adb_get_transport()
Dusb_linux.cpp587 std::string serial; in register_device() local
588 if (!android::base::ReadFileToString(serial_path, &serial)) { in register_device()
593 serial = ""; in register_device()
595 serial = android::base::Trim(serial); in register_device()
603 register_usb_transport(done_usb, serial.c_str(), dev_path, done_usb->writeable); in register_device()
/packages/apps/Launcher3/src/com/android/launcher3/pm/
DUserCache.java92 long serial = mUserManager.getSerialNumberForUser(user); in enableAndResetCache() local
93 mUsers.put(serial, user); in enableAndResetCache()
94 mUserToSerialMap.put(user, serial); in enableAndResetCache()
119 Long serial = mUserToSerialMap.get(user); in getSerialNumberForUser() local
120 return serial == null ? 0 : serial; in getSerialNumberForUser()
/packages/apps/Camera2/src/com/android/camera/one/
DAbstractOneCamera.java80 String serial = android.os.Build.SERIAL; in makeDebugDir() local
81 if (serial != null) { in makeDebugDir()
82 int length = serial.length(); in makeDebugDir()
85 serialSubstring = serial.substring(length - DEBUG_FOLDER_SERIAL_LENGTH, length); in makeDebugDir()
87 serialSubstring = serial; in makeDebugDir()
/packages/services/Car/car-usb-handler/src/android/car/usb/handler/
DUsbSettingsStorage.java53 String serial = device.getSerialNumber(); in queryFor() local
58 selectionArgs.add(serial); in queryFor()
59 } else if (serial == null) { in queryFor()
63 selectionArgs.add(serial); in queryFor()

123