private DeviceInfo[] GetDevices() { Log.V(cLogTag, ">> Entering getDevices()"); try { string deviceListText = ExecuteAdbCommand("devices", false); string[] deviceListLines = deviceListText.Split(new String[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); bool deviceListStarted = false; List <DeviceInfo> deviceList = new List <DeviceInfo>(); DeviceInfo currentDevice; foreach (string currentLine in deviceListLines) { if (deviceListStarted) { if ((currentDevice = DeviceInfo.CreateFromAdbDeviceListData(currentLine)) != null) { Log.V(cLogTag, "Found device: {0}", currentDevice); deviceList.Add(currentDevice); } continue; } if (currentLine.Trim() == "List of devices attached") { deviceListStarted = true; } } return(deviceList.ToArray()); } finally { Log.V(cLogTag, "<< Exiting getDevices()"); } }