MOD: start adb server beforehand
This commit is contained in:
@@ -303,20 +303,14 @@ class AndroidHelper
|
|||||||
|
|
||||||
if (System.hostPlatform != WINDOWS)
|
if (System.hostPlatform != WINDOWS)
|
||||||
{
|
{
|
||||||
var tempFile = System.getTemporaryFile();
|
/*
|
||||||
|
* using System.runProcess on *NIX platforms for `adb devices` usually
|
||||||
System.runCommand('/bin', 'sh', ["-c", '${adbPath}${adbName} devices > ${tempFile}'], true, true);
|
* hangs when adb also starts the server.
|
||||||
|
* To avoid this, we start the server beforehand
|
||||||
if (FileSystem.exists(tempFile))
|
*/
|
||||||
{
|
System.runCommand(adbPath, adbName, ["start-server"], true);
|
||||||
output = File.getContent(tempFile);
|
|
||||||
FileSystem.deleteFile(tempFile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
output = System.runProcess(adbPath, adbName, ["devices"], true, true);
|
|
||||||
}
|
}
|
||||||
|
output = System.runProcess(adbPath, adbName, ["devices"], true, true);
|
||||||
|
|
||||||
if (output != null && output != "")
|
if (output != null && output != "")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user