def list(self, extended=False) -> List[AdbDeviceInfo]:
        """
        Returns:
            list of device info, including offline
        """
        infos = []
        with self.make_connection() as c:
            if extended:
                c.send_command("host:devices-l")
            else:
                c.send_command("host:devices")
            c.check_okay()
            output = c.read_string_block()
            for line in output.splitlines():
                parts = line.split()
                tags = {}
                num_required_fields = 2 # serial and state
                if len(parts) < num_required_fields:
                    continue
                if extended:
                    for part in parts[num_required_fields:]:
                        fields = part.split(':', 1)
                        if len(fields) != 2:
                            continue
                        tags[fields[0]] = fields[1]
                infos.append(AdbDeviceInfo(serial=parts[0], state=parts[1], tags=tags))
        return infos

        Returns:
            list of device info, including offline
        
adbutils/__init__.py