Пример #1
0
 /// <summary>
 /// Creates an archive of the /data partition
 /// </summary>
 /// <returns>
 /// The output of the archive command.
 /// </returns>
 public string ArchiveDataPartition()
 {
     //Try to mount /data and /sdcard, the result is pretty much irrelevant since tar will error out if need be
     _parent.WriteToConsole(AdbCommand.ExecuteShellCommand(Constants.MOUNT_DATA).Replace("\r", "") + "\n");
     _parent.WriteToConsole(AdbCommand.ExecuteShellCommand(Constants.MOUNT_SDCARD).Replace("\r", "") + "\n");
     return(AdbCommand.ExecuteShellCommandWithOutput(Constants.TAR_CREATE, _parent));
 }
Пример #2
0
 /// <summary>
 /// Extracts a data archive on the remote device, effectively restoring the /data partition.
 /// </summary>
 /// <returns>
 /// The output of the extract command.
 /// </returns>
 public string ExtractDataArchive()
 {
     return(AdbCommand.ExecuteShellCommandWithOutput(Constants.TAR_EXTRACT, _parent));
 }