TeamWin / android_bootable_recovery

1.3k stars 408 forks source link

adb wait-for-recovery broken because adb usb interface is reconnecting on flo #266

Open xsrf opened 1 year ago

xsrf commented 1 year ago

Device codename: flo TWRP version: 3.6.2_9-0

ISSUE

TWRP first exposes a single adb interface, then after few seconds exposes a composite device with adb and mtp and disconnects the first adb device. Scripts using adb wait-for-recovery catch the first adb connection and break when it's disconnected.

The issue was introduced with 3.1.0-0.

NirSoft USBLogView Output (affected versions):

Event Type  Event Time  Device Name Description Device Type Drive Letter    Serial Number   Vendor ID   Product ID  Vendor Name Product Name    Firmware Revision   USB Class   USB SubClass    USB Protocol    
Plug    25.09.2022 21:07:34 Port_#0001.Hub_#0006    @oem61.inf,%SingleAdbInterface% Vendor Specific     0954e5ad    18d1    d001    Google Inc.     2.28    ff  42  01  
Plug    25.09.2022 21:07:38 Port_#0001.Hub_#0006    USB Composite Device    Unknown     0954e5ad    18d1    4ee2    Google Inc.     2.28    00  00  00  
Plug    25.09.2022 21:07:38 0000.0014.0000.001.001.001.000.000.000  MTP-USB-Gerät   Unknown         18d1    4ee2    Google Inc.     2.28    00  00  00  
Plug    25.09.2022 21:07:38 0000.0014.0000.001.001.001.000.000.000  Android Composite ADB Interface Vendor Specific         18d1    4ee2    Google Inc.     2.28    ff  42  01  
Unplug  25.09.2022 21:07:38 Port_#0001.Hub_#0006    @oem61.inf,%SingleAdbInterface% Vendor Specific     0954e5ad    18d1    d001    Google Inc.     2.28    ff  42  01  

NirSoft USBLogView Output (working versions):

Event Type  Event Time  Device Name Description Device Type Drive Letter    Serial Number   Vendor ID   Product ID  Vendor Name Product Name    Firmware Revision   USB Class   USB SubClass    USB Protocol    
Plug    25.09.2022 21:09:12 Port_#0001.Hub_#0006    USB Composite Device    Unknown     0954e5ad    18d1    4ee2    Google Inc.     2.28    00  00  00  
Plug    25.09.2022 21:09:12 0000.0014.0000.001.001.001.000.000.000  Nexus 7 2013    Unknown         18d1    4ee2    Google Inc.     2.28    00  00  00  
Plug    25.09.2022 21:09:12 0000.0014.0000.001.001.001.000.000.000  Android Composite ADB Interface Vendor Specific         18d1    4ee2    Google Inc.     2.28    ff  42  01  

Tested and NOT affected:

Tested and affected: