Esempio n. 1
0
        public async Task <bool> PushFileAsync(string filePath, string destinationFilePath, int timeout = Command.DEFAULT_TIMEOUT)
        {
            AdbCommand adbCmd = Adb.FormAdbCommand(this, "push", "\"" + filePath + "\"", "\"" + destinationFilePath + "\"");

            return(await Adb.ExecuteAdbCommandReturnExitCodeAsync(adbCmd.WithTimeout(timeout)) == 0);
        }
Esempio n. 2
0
        /// <summary>
        /// Pulls a file from the device asynchronously
        /// </summary>
        /// <param name="fileOnDevice">Path to file to pull from device</param>
        /// <param name="destinationDirectory">Directory on local computer to pull file to</param>
        /// /// <param name="timeout">The timeout for this operation in milliseconds (Default = -1)</param>
        /// <returns>True if file is pulled, false if pull failed</returns>
        public async Task <bool> PullFileAsync(string fileOnDevice, string destinationDirectory, int timeout = Command.DEFAULT_TIMEOUT)
        {
            AdbCommand adbCmd = Adb.FormAdbCommand(this, "pull", "\"" + fileOnDevice + "\"", "\"" + destinationDirectory + "\"");

            return(await Adb.ExecuteAdbCommandReturnExitCodeAsync(adbCmd.WithTimeout(timeout)) == 0);
        }