openatx / adbutils

pure python adb library for google adb service.
MIT License
761 stars 175 forks source link

Hangs on adb.device_list () #16

Open mal-mel opened 4 years ago

mal-mel commented 4 years ago

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?

codeskyblue commented 4 years ago

is command : adb devices run normally?

Sent with GitHawk

mal-mel commented 4 years ago

is command : adb devices run normally?

Sent with GitHawk

yep

codeskyblue commented 4 years ago

emmm ...

Flojomojo commented 1 year ago

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