diff --git a/tools/helpers/AndroidHelper.hx b/tools/helpers/AndroidHelper.hx index a6f12b304..d073dbf36 100644 --- a/tools/helpers/AndroidHelper.hx +++ b/tools/helpers/AndroidHelper.hx @@ -282,7 +282,26 @@ class AndroidHelper { public static function listDevices ():Array { var devices = new Array (); - var output = ProcessHelper.runProcess (adbPath, adbName, [ "devices" ]); + var output = ""; + + if (PlatformHelper.hostPlatform == Platform.MAC) { + + var tempFile = PathHelper.getTemporaryFile (); + + ProcessHelper.runCommand (adbPath, adbName, [ "devices", ">", tempFile ], true, true); + + if (FileSystem.exists (tempFile)) { + + output = File.getContent (tempFile); + FileSystem.deleteFile (tempFile); + + } + + } else { + + ProcessHelper.runCommand (adbPath, adbName, [ "devices" ], true, true); + + } if (output != null && output != "") {