You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add AdbDevice._streaming_service and AdbDevice.streaming_shell (#80)
* Add AdbDevice._streaming_service and AdbDevice.streaming_shell
streaming shell can be necessary for shell commands like "getevent -lt"
* Add AdbDevice._streaming_service and AdbDevice.streaming_shell
fix for python 2.7
* Add AdbDevice._streaming_service and AdbDevice.streaming_shell
PR comments + unit tests
* Add AdbDevice._streaming_service and AdbDevice.streaming_shell
PR comments
"""Send an ADB command to the device, yielding each line of output.
409
+
410
+
Parameters
411
+
----------
412
+
service : bytes
413
+
The ADB service to talk to (e.g., ``b'shell'``)
414
+
command : bytes
415
+
The command that will be sent
416
+
timeout_s : float, None
417
+
Timeout in seconds for sending and receiving packets, or ``None``; see :meth:`BaseHandle.bulk_read() <adb_shell.handle.base_handle.BaseHandle.bulk_read>`
418
+
and :meth:`BaseHandle.bulk_write() <adb_shell.handle.base_handle.BaseHandle.bulk_write>`
419
+
total_timeout_s : float
420
+
The total time in seconds to wait for a ``b'CLSE'`` or ``b'OKAY'`` command in :meth:`AdbDevice._read`
421
+
decode : bool
422
+
Whether to decode the output to utf8 before returning
423
+
424
+
Yields
425
+
-------
426
+
bytes, str
427
+
The line-by-line output of the ADB command as a string if ``decode`` is True, otherwise as bytes.
"""Send an ADB shell command to the device, yielding each line of output.
464
+
465
+
Parameters
466
+
----------
467
+
command : str
468
+
The shell command that will be sent
469
+
timeout_s : float, None
470
+
Timeout in seconds for sending and receiving packets, or ``None``; see :meth:`BaseHandle.bulk_read() <adb_shell.handle.base_handle.BaseHandle.bulk_read>`
471
+
and :meth:`BaseHandle.bulk_write() <adb_shell.handle.base_handle.BaseHandle.bulk_write>`
472
+
total_timeout_s : float
473
+
The total time in seconds to wait for a ``b'CLSE'`` or ``b'OKAY'`` command in :meth:`AdbDevice._read`
474
+
decode : bool
475
+
Whether to decode the output to utf8 before returning
476
+
477
+
Yields
478
+
-------
479
+
bytes, str
480
+
The line-by-line output of the ADB shell command as a string if ``decode`` is True, otherwise as bytes.
0 commit comments