internal Task StartEmulator(string name, string logfile, CancellationToken cancellationToken) { var args = string.Format("@{0} > {1} 2>&1 &", name, logfile); var shellArgs = string.Format("-c \"{0} {1}\"", EmulatorTool, args); return(ProcessHelper.RunCommand("/bin/sh", shellArgs, cancellationToken)); }
internal Task CreateAvd(bool replace, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); var args = new StringBuilder(); args.Append("-v "); args.AppendFormat("create avd -n {0} -t {1}", Device.Name, Device.Target); if (!string.IsNullOrEmpty(Device.Abi)) { args.AppendFormat(" --abi {0}", Device.Abi); } if (!string.IsNullOrEmpty(Device.Device)) { args.AppendFormat(" --device \"{0}\"", Device.Device); } if (replace) { args.Append(" --force"); } return(ProcessHelper.RunCommand(AndroidTool, args.ToString(), cancellationToken)); }
internal Task ClearLogCat(CancellationToken cancellationToken) { var args = AdbCommandLine("logcat -c"); return(ProcessHelper.RunCommand(Adb, args, cancellationToken)); }
internal Task InstallApk(string apk, CancellationToken cancellationToken) { var args = AdbCommandLine($"install -r -d {apk}"); return(ProcessHelper.RunCommand(Adb, args, cancellationToken)); }
internal Task ClearLogCat(CancellationToken cancellationToken) { return(ProcessHelper.RunCommand(Adb, "logcat -c", cancellationToken)); }
internal Task InstallApk(string apk, CancellationToken cancellationToken) { var args = string.Format("install -r -d {0}", apk); return(ProcessHelper.RunCommand(Adb, args, cancellationToken)); }