Home
last modified time | relevance | path

Searched full:serial (Results 1 – 25 of 230) sorted by relevance

12345678910

/packages/modules/adb/
Dsocket_spec_test.cpp30 std::string hostname, error, serial; in TEST() local
35 EXPECT_FALSE(parse_tcp_socket_spec(spec, &hostname, &port, &serial, &error)); in TEST()
41 std::string hostname, error, serial; in TEST() local
43 EXPECT_TRUE(parse_tcp_socket_spec("tcp:5037", &hostname, &port, &serial, &error)); in TEST()
46 EXPECT_EQ("", serial); in TEST()
50 std::string hostname, error, serial; in TEST() local
52 EXPECT_FALSE(parse_tcp_socket_spec("tcp:", &hostname, &port, &serial, &error)); in TEST()
53 EXPECT_FALSE(parse_tcp_socket_spec("tcp:-1", &hostname, &port, &serial, &error)); in TEST()
54 EXPECT_FALSE(parse_tcp_socket_spec("tcp:65536", &hostname, &port, &serial, &error)); in TEST()
58 std::string hostname, error, serial; in TEST() local
[all …]
Dadb.bash27 local where i cur serial state transport
30 serial="${ANDROID_SERIAL:-none}"
50 serial=${cur}
92 _adb_cmd_install "$serial" $i
95 _adb_cmd_sideload "$serial" $i
98 _adb_cmd_pull "$serial" $i
101 _adb_cmd_push "$serial" $i
110 _adb_cmd_shell "$serial" $i
113 _adb_cmd_uninstall "$serial" $i
130 local serial i cur where
[all …]
Dtransport.cpp222 D("transport %s was kicked. giving up on it.", it->transport->serial.c_str()); in Run()
242 D("attempting to reconnect %s", attempt.transport->serial.c_str()); in Run()
246 D("attempting to reconnect %s failed.", attempt.transport->serial.c_str()); in Run()
249 attempt.transport->serial.c_str()); in Run()
263 D("reconnection to %s succeeded.", attempt.transport->serial.c_str()); in Run()
268 D("cancelling reconnection attempt to %s.", attempt.transport->serial.c_str()); in Run()
291 std::string Connection::Serial() const { in Serial() function in Connection
299 LOG(INFO) << "BlockingConnectionAdapter(" << Serial() << "): destructing"; in ~BlockingConnectionAdapter()
306 LOG(FATAL) << "BlockingConnectionAdapter(" << Serial() << "): started multiple times"; in Start()
312 LOG(INFO) << Serial() << ": write thread spawning"; in Start()
[all …]
Dsocket_test.cpp320 std::string_view serial, command; \
321 bool result = internal::parse_host_service(&serial, &command, service); \
328 std::string_view serial, command; \
329 bool result = internal::parse_host_service(&serial, &command, service); \
331 EXPECT_EQ(std::string(expected_serial), std::string(serial)); \
335 // Check [tcp:|udp:]<serial>[:<port>]:<command> format.
342 std::string serial = protocol + "foo"; in TEST() local
343 VerifyParseHostService(serial + ":bar", serial, "bar"); in TEST()
344 VerifyParseHostService(serial + " :bar:baz", serial, "bar:baz"); in TEST()
349 std::string serial = protocol + "foo:123"; in TEST() local
[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 …]
DSERVICES.TXT43 host:transport:<serial-number>
45 <serial-number>. After the OKAY response, every client request will
65 host-serial:<serial-number>:<request>
66 This is a special form of query, where the 'host-serial:<serial-number>:'
72 A variant of host-serial used to target the single USB device connected
76 A variant of host-serial used to target the single emulator instance
85 Returns the serial number of the corresponding device/emulator.
86 Note that emulator serial numbers are of the form "emulator-5554"
99 host-serial/host-usb/host-local/host prefixes as described previously
137 <serial> " " <local> " " <remote> "\n"
[all …]
Dtransport.h136 std::string Serial() const;
319 std::string serial; variable
349 std::string serial_name() const { return !serial.empty() ? serial : "<unknown>"; } in serial_name()
377 // * <serial>
383 // If this is a local transport, serial will also match [tcp:|udp:]<hostname>[:port] targets.
384 // For example, serial "100.100.100.100:5555" would match any of:
456 // Returns true if the adb server owns all devices, or `serial`.
457 bool transport_server_owns_device(std::string_view serial);
459 // Returns true if the adb server owns all devices, `serial`, or `dev_path`.
460 bool transport_server_owns_device(std::string_view dev_path, std::string_view serial);
[all …]
Dsockets.cpp659 // * [tcp:|udp:]<serial>[:<port>]:<command>
660 // * <prefix>:<serial>:<command>
668 std::string_view serial; in parse_host_service() local
670 // Remove |count| bytes from the beginning of command and add them to |serial|. in parse_host_service()
671 auto consume = [&full_service, &serial, &command](size_t count) { in parse_host_service()
673 if (!serial.empty()) { in parse_host_service()
674 CHECK_EQ(serial.data() + serial.size(), command.data()); in parse_host_service()
677 serial = full_service.substr(0, serial.size() + count); in parse_host_service()
681 // Remove the trailing : from serial, and assign the values to the output parameters. in parse_host_service()
682 auto finish = [out_serial, out_command, &serial, &command] { in parse_host_service()
[all …]
Dtransport_test.cpp145 std::string serial = "foo"; in TEST_F() local
152 t.serial = &serial[0]; in TEST_F()
162 EXPECT_TRUE(t.MatchesTarget(serial)); in TEST_F()
176 std::string serial = "100.100.100.100:5555"; in TEST_F() local
179 t.serial = &serial[0]; in TEST_F()
/packages/modules/Bluetooth/system/blueberry/utils/
Darduino_base.py12 import serial
20 serial: serial object, a serial object which is used to communicate with
28 self.serial = serial.Serial(config['arduino_port'], 9600)
29 self.serial.timeout = 30
30 # Buffer between calling serial.Serial() and serial.Serial.write().
49 a python serial object and then send the same string to the serial object.
57 if (Serial.available() > 0) {
58 kRxString = Serial.readString();
60 Serial.write(kRxString.c_str());
75 self.serial.write(str.encode(tx_string))
[all …]
/packages/modules/adb/tools/
Dadb_usbreset.cpp30 struct Serial { struct
31 std::string_view serial; member
34 using DeviceSelection = std::variant<std::monostate, AllDevices, SingleDevice, Serial>; argument
37 fprintf(stderr, "usage: [ANDROID_SERIAL=SERIAL] usbreset [-d] [-s SERIAL]\n"); in Usage()
40 fprintf(stderr, "\t-s --serial\t\tReset device with specified serial\n"); in Usage()
69 std::variant<std::monostate, AllDevices, SingleDevice, Serial> selection; in main()
72 {"all", 0, 0, 'a'}, {"help", 0, 0, 'h'}, {"serial", required_argument, 0, 's'}, in main()
83 SetOption(&selection, Serial{optarg}); in main()
85 SetOption(&selection, Serial{optarg}); in main()
94 SetOption(&selection, Serial{env}); in main()
[all …]
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()
237 errx(1, "failed to get serial for device %u:%u", libusb_get_bus_number(device), 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()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/sap/
DSapRilReceiverHidl.java61 * @param serial Id to match req-resp. Resp must include same serial.
66 public void apduReq(int serial, int type, byte[] command) throws RemoteException { in apduReq() argument
68 mSapProxy.apduReq(serial, type, commandHidl); in apduReq()
74 * @param serial Id to match req-resp. Resp must include same serial.
78 public void connectReq(int serial, int maxMsgSizeBytes) throws RemoteException { in connectReq() argument
79 mSapProxy.connectReq(serial, maxMsgSizeBytes); in connectReq()
85 * @param serial Id to match req-resp. Resp must include same serial.
88 public void disconnectReq(int serial) throws RemoteException { in disconnectReq() argument
89 mSapProxy.disconnectReq(serial); in disconnectReq()
95 * @param serial Id to match req-resp. Resp must include same serial.
[all …]
DSapRilReceiver.java54 * @param serial Id to match req-resp. Resp must include same serial.
59 public void apduReq(int serial, int type, byte[] command) throws android.os.RemoteException { in apduReq() argument
60 mSapProxy.apduReq(serial, type, command); in apduReq()
66 * @param serial Id to match req-resp. Resp must include same serial.
70 public void connectReq(int serial, int maxMsgSizeBytes) throws android.os.RemoteException { in connectReq() argument
71 mSapProxy.connectReq(serial, maxMsgSizeBytes); in connectReq()
77 * @param serial Id to match req-resp. Resp must include same serial.
80 public void disconnectReq(int serial) throws android.os.RemoteException { in disconnectReq() argument
81 mSapProxy.disconnectReq(serial); in disconnectReq()
87 * @param serial Id to match req-resp. Resp must include same serial.
[all …]
/packages/modules/adb/daemon/
Dproperty_monitor.cpp45 // Read a property and return its value if it's been changed, while updating our cached serial.
49 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()
/packages/modules/Bluetooth/system/blueberry/controllers/
Dandroid_bt_target_device.py66 self.serial = config.get('device_id', None)
69 if self.serial:
71 self._ad = android_device.AndroidDevice(self.serial)
117 self.serial, self.sec_ad.serial))
119 self.serial, self.sec_ad.serial)
149 self.serial = self.pri_ad.serial
152 'connection', pri_ad.serial)
166 'connection', sec_ad.serial)
180 (bt_constants.CALL_STATE_TIMEOUT_SEC, self.serial))
250 self.serial, self.sec_ad.serial))
[all …]
/packages/apps/Camera2/src/com/android/camera/one/
DAbstractOneCamera.java36 * Number of characters from the end of the device serial number used to
62 * devices serial number, and 'XXX' are milliseconds of the timestamp.
80 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/modules/Bluetooth/system/blueberry/tests/gd/cert/
Dadb.py35 >> adb = BlueberryAdbProxy(<serial>)
40 def __init__(self, serial="", ssh_connection=None): argument
44 serial: str serial number of Android device from `adb devices`
48 super().__init__(serial)
52 if serial:
53 adb_cmd.append("-s %s" % serial)
62 remote_adb_cmd = "%s/adb %s root" % (temp_dir, "-s %s" % serial if serial else "")
/packages/modules/adb/client/
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,
61 // Set the server's "one device" id. This is either null, or a pointer to a serial number
70 // exactly one emulator connected (or if you use -s <serial> with a <serial>
73 const char* _Nullable serial);
79 // Create a host command corresponding to selected transport type/serial.
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()
59 // The user specified a serial number; is it an emulator? 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()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
DXmlParseUtils.java31 @SuppressWarnings("serial")
38 @SuppressWarnings("serial")
45 @SuppressWarnings("serial")
52 @SuppressWarnings("serial")
60 @SuppressWarnings("serial")
/packages/modules/Bluetooth/system/blueberry/tests/pan/
Dbluetooth_pan_test.py55 device.serial)
68 device.debug_tag = device.serial
190 'had been disabled.' % panu_device.serial))
200 'had been enabled.' % nap_device.serial))
210 panu_device.log.info('Pair to NAP device "%s".' % nap_device.serial)
215 nap_device.serial)
226 'connection.' % panu_device.serial))
292 self.primary_device.serial))
325 self.secondary_device.serial))
/packages/apps/Nfc/testutils/pn532/
Dpn532.py18 import serial
21 from serial.tools.list_ports import comports
50 """Initializes device on path, or first available serial port if none is provided."""
53 "Could not find device on serial port, make sure reader is plugged in."
65 self.log.debug("Serial port: %s", path)
66 self.device = serial.Serial(path, 115200, timeout=0.1)
72 raise RuntimeError("Could not verify PN532 firmware on serial path " + path)
/packages/modules/Bluetooth/framework/tests/metrics/host/
DAndroidTest.xml22 <option name="host-setup-command" value="adb -s $SERIAL reverse tcp:7999 tcp:7999" />
23 <option name="host-setup-command" value="adb -s $SERIAL forward tcp:6211 vsock:2:7300" />
24 <option name="host-teardown-command" value="adb -s $SERIAL forward --remove tcp:6211" />
27 <option name="host-teardown-command" value="adb -s $SERIAL reverse --remove tcp:7999" />

12345678910