adbutils icon indicating copy to clipboard operation
adbutils copied to clipboard

Hangs on adb.device_list ()

Open mal-mel opened this issue 5 years ago • 4 comments

Hello, when I try to get a list of devices using the adb.device_list command, my script freezes. With the help of debug mode, I realized that adbutils hangs in this function:

    def iter_device(self):
        """
        Returns:
            iter of AdbDevice
        """
        with self._connect() as c:
            c.send("host:devices")
            c.check_okay()
            output = c.read_string()
            for line in output.splitlines():
                parts = line.strip().split("\t")
                if len(parts) != 2:
                    continue
                if parts[1] == 'device':
                    yield AdbDevice(self, parts[0])

But more specifically, then on this line c.check_okay() What could be the problem?

mal-mel avatar Nov 26 '19 17:11 mal-mel

is command : adb devices run normally?

Sent with GitHawk

codeskyblue avatar Nov 29 '19 03:11 codeskyblue

is command : adb devices run normally?

Sent with GitHawk

yep

mal-mel avatar Nov 29 '19 10:11 mal-mel

emmm ...

codeskyblue avatar Jul 22 '20 11:07 codeskyblue

This still seems to be a problem for me, but only when using a custom hostname/port

adbutils.adb.device_list() # Works fine

c = adbutils.AdbClient(host="127.0.0.1", port=65014, socket_timeout=10)
c.device_list() # Times out

Flojomojo avatar Feb 22 '23 19:02 Flojomojo