From 5438e53361781607412cd1001b6f8d77a6f2d36d Mon Sep 17 00:00:00 2001 From: Sashanoraa Date: Sun, 6 Jul 2025 13:34:34 -0400 Subject: [PATCH] Support devices that don't do auth (#124) --- adb_client/src/device/adb_usb_device.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/adb_client/src/device/adb_usb_device.rs b/adb_client/src/device/adb_usb_device.rs index 0c9d0a2..ce33d37 100644 --- a/adb_client/src/device/adb_usb_device.rs +++ b/adb_client/src/device/adb_usb_device.rs @@ -180,6 +180,11 @@ impl ADBUSBDevice { self.get_transport_mut().write_message(message)?; let message = self.get_transport_mut().read_message()?; + // If the device returned CNXN instead of AUTH it does not require authentication, + // so we can skip the auth steps. + if message.header().command() == MessageCommand::Cnxn { + return Ok(()); + } message.assert_command(MessageCommand::Auth)?; // At this point, we should have receive an AUTH message with arg0 == 1