This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Description
Seems like adb connection is closed after each Shell comand:
95:automation direvius$ python ./cmd.py
0
Traceback (most recent call last):
File "./cmd.py", line 16, in <module>
print device.Shell('echo %d' % i)
File "/usr/local/lib/python2.7/site-packages/adb/adb_commands.py", line 227, in Shell
timeout_ms=timeout_ms)
File "/usr/local/lib/python2.7/site-packages/adb/adb_protocol.py", line 369, in Command
return ''.join(cls.StreamingCommand(usb, service, command, timeout_ms))
File "/usr/local/lib/python2.7/site-packages/adb/adb_protocol.py", line 394, in StreamingCommand
for data in connection.ReadUntilClose():
AttributeError: 'NoneType' object has no attribute 'ReadUntilClose'
It works when there are ConnectDevice calls before every Shell