I am a very young developer, I managed to develop a too that runs ADB commands, but my problem is, the tool run to the end and shows done as I instructed it. I have codes of disabling packages,my main issues is it doesn’t display successfully and failed operations, it works silently. Please help
public static string adb(string cmd)
{
Process process = new Process()
{
StartInfo = new ProcessStartInfo()
{
UseShellExecute = false,
CreateNoWindow = true,
FileName = Environment.CurrentDirectory + "/adb/adb.exe",
Arguments = cmd,
RedirectStandardOutput = true
}
};
process.Start();
return process.StandardOutput.ReadToEnd();
}// Start ADB server
public bool Adbdevice()
{
bool flag = false;
if (Form1.adb("devices").Contains("tdevice"))
flag = true;
return flag;
} // Check if device is connected in ADB mode
New contributor
DISCOUNT CENTRE DISCOUNTY is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.