Esempio n. 1
0
        public static void Execute(string command, bool withSerial = true)
        {
            BeforeExecute?.Invoke(null, EventArgs.Empty);

            if (String.IsNullOrWhiteSpace(SelectedDevice) || withSerial == false)
            {
                CLI.Execute(command);
            }
            else if (command.StartsWith("adb ", StringComparison.CurrentCultureIgnoreCase))
            {
                string cmd = ReplaceFirstOccurrence(command, "adb ", "adb -s " + SelectedDevice + " ");
                CLI.Execute(cmd);
            }
            else
            {
                CLI.Execute(command);
            }
        }