adb_shell icon indicating copy to clipboard operation
adb_shell copied to clipboard

Add support for pulling directories

Open wimmatthijs opened this issue 2 years ago • 2 comments

Description

Was trying to automate a command where i pull a complete directory from the device. Just like adb pull /sdcard/someDirectory

Log

Traceback (most recent call last):
  File "C:\Artland_script\Artland_logscript.py", line 52, in <module>
    device.pull("/sdcard/someDirectory",os.getcwd()+"\someDirectory")
  File "C:\Users\Wim.Matthijs\AppData\Local\Programs\Python\Python310\lib\site-packages\adb_shell\adb_device.py", line 944, in pull
    self._pull(device_path, stream, progress_callback, adb_info, filesync_info)
  File "C:\Users\Wim.Matthijs\AppData\Local\Programs\Python\Python310\lib\site-packages\adb_shell\adb_device.py", line 969, in _pull
    for cmd_id, _, data in self._filesync_read_until([constants.DATA], [constants.DONE], adb_info, filesync_info):
  File "C:\Users\Wim.Matthijs\AppData\Local\Programs\Python\Python310\lib\site-packages\adb_shell\adb_device.py", line 1433, in _filesync_read_until
    cmd_id, header, data = self._filesync_read(expected_ids + finish_ids, adb_info, filesync_info)
  File "C:\Users\Wim.Matthijs\AppData\Local\Programs\Python\Python310\lib\site-packages\adb_shell\adb_device.py", line 1372, in _filesync_read
    raise exceptions.AdbCommandFailureException('Command failed: {}'.format(reason))
adb_shell.exceptions.AdbCommandFailureException: Command failed: read failed: Is a directory

wimmatthijs avatar Jan 12 '23 09:01 wimmatthijs