Traceback (most recent call last):
File "/home/lleedaniel/Test_Code/gren_RSA_KEY.py", line 15, in
device2.connect(rsa_keys=[signer], auth_timeout_s=0.1)
File "/home/lleedaniel/.local/lib/python3.11/site-packages/adb_shell/adb_device.py", line 675, in connect
self._available, self._maxdata = self._io_manager.connect(self._banner, rsa_keys, auth_timeout_s, auth_callback, adb_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lleedaniel/.local/lib/python3.11/site-packages/adb_shell/adb_device.py", line 221, in connect
self._transport.connect(adb_info.transport_timeout_s)
File "/home/lleedaniel/.local/lib/python3.11/site-packages/adb_shell/transport/usb_transport.py", line 254, in connect
self._transport.claimInterface(self._interface_number)
File "/home/lleedaniel/.local/lib/python3.11/site-packages/usb1/init.py", line 1146, in claimInterface
mayRaiseUSBError(
File "/home/lleedaniel/.local/lib/python3.11/site-packages/usb1/init.py", line 127, in mayRaiseUSBError
raiseUSBError(value)
File "/home/lleedaniel/.local/lib/python3.11/site-packages/usb1/init.py", line 119, in raiseUSBError
raise STATUS_TO_EXCEPTION_DICT.get(value, __USBError)(value)
usb1.USBErrorBusy: LIBUSB_ERROR_BUSY [-6]
Description
Following the readme guide to connect device, but the error raise when connect to device. Link
I can reproduce this every time, and never get sucess connect.
My code is
from adb_shell.auth.keygen import keygen
from adb_shell.adb_device import AdbDeviceTcp, AdbDeviceUsb
from adb_shell.auth.sign_pythonrsa import PythonRSASigner
keygen('./adbkey')
adbkey = './adbkey'
with open(adbkey) as f:
with open(adbkey + '.pub') as f:
signer = PythonRSASigner(pub, priv)
device = AdbDeviceUsb()
device.connect(rsa_keys=[signer], auth_timeout_s=0.1)
Log
Traceback (most recent call last): File "/home/lleedaniel/Test_Code/gren_RSA_KEY.py", line 15, in
device2.connect(rsa_keys=[signer], auth_timeout_s=0.1)
File "/home/lleedaniel/.local/lib/python3.11/site-packages/adb_shell/adb_device.py", line 675, in connect
self._available, self._maxdata = self._io_manager.connect(self._banner, rsa_keys, auth_timeout_s, auth_callback, adb_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lleedaniel/.local/lib/python3.11/site-packages/adb_shell/adb_device.py", line 221, in connect
self._transport.connect(adb_info.transport_timeout_s)
File "/home/lleedaniel/.local/lib/python3.11/site-packages/adb_shell/transport/usb_transport.py", line 254, in connect
self._transport.claimInterface(self._interface_number)
File "/home/lleedaniel/.local/lib/python3.11/site-packages/usb1/init.py", line 1146, in claimInterface
mayRaiseUSBError(
File "/home/lleedaniel/.local/lib/python3.11/site-packages/usb1/init.py", line 127, in mayRaiseUSBError
raiseUSBError(value)
File "/home/lleedaniel/.local/lib/python3.11/site-packages/usb1/init.py", line 119, in raiseUSBError
raise STATUS_TO_EXCEPTION_DICT.get(value, __USBError)(value)
usb1.USBErrorBusy: LIBUSB_ERROR_BUSY [-6]