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

Demo code does not work #39

@direvius

Description

@direvius

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions