예제 #1
0
        private static ADBResult Shell(string arg)
        {
            ADBResult result;

            using (Process p = new Process())
            {
                p.StartInfo           = psi;
                p.StartInfo.Arguments = $"shell {(su ? "su -c" : "")} \"{arg}\"";
                p.Start();
                string text_stdout = p.StandardOutput.ReadToEnd();
                string text_stderr = p.StandardError.ReadToEnd();
                p.WaitForExit();
                result = new ADBResult(text_stdout, text_stderr);
            }
            return(result);
        }
예제 #2
0
        private static ADBResult Run(string arg)
        {
            ADBResult result;

            using (Process p = new Process())
            {
                p.StartInfo           = psi;
                p.StartInfo.Arguments = arg;
                p.Start();
                string text_stdout = p.StandardOutput.ReadToEnd();
                string text_stderr = p.StandardError.ReadToEnd();
                p.WaitForExit();
                result = new ADBResult(text_stdout, text_stderr);
            }
            return(result);
        }