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.

Pull fails without reason #107

Closed
Closed

Description

@FHantke

Hey, I tired to pull a directory from /sdcrad/ but it fails due to reason I don't see. Do you have any idea?
Shell works fine.
Thank you!

Code:

from adb import adb_commands, sign_m2crypto
import os

signer = sign_m2crypto.M2CryptoSigner(os.path.expanduser('~/.android/adbkey'))
device = adb_commands.AdbCommands()
device.ConnectDevice(rsa_keys=[signer])
device.Pull("/sdcard/mipush")

Failure:

Traceback (most recent call last):
  File "test.py", line 7, in <module>
    device.Pull("/sdcard/mipush")
  File "/.../adb/adb_commands.py", line 297, in Pull
    self.filesync_handler.Pull(conn, device_filename, dest_file, progress_callback)
  File "/.../adb/filesync_protocol.py", line 89, in Pull
    for cmd_id, _, data in cnxn.ReadUntil((b'DATA',), b'DONE'):
  File "/.../adb/filesync_protocol.py", line 236, in ReadUntil
    cmd_id, header, data = self.Read(expected_ids + finish_ids)
  File "/.../adb/filesync_protocol.py", line 221, in Read
    raise usb_exceptions.AdbCommandFailureException('Command failed: {}'.format(reason))
adb.usb_exceptions.AdbCommandFailureException: Command failed: 

Activity

  1. fahhem commented on May 31, 2018

    @fahhem
    Contributor

    Failures usually look like FAILNo such file or directory. If your device doesn't return a reason, then it could be anything. Could you try recursively listing everything in that directory to see if you have access to all the files? Until then, on master I've made this raise an exception that includes the filename that caused the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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