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