/// <summary> /// Gets the currently available jdwp process id's on the given device. /// </summary> public static IEnumerable <int> GetJdwpProcessIds(IDevice device, int timeout) { try { using (var socket = new AdbJdwpRequest(EndPoint)) { return(socket.JdwpProcessIds(device)); } } catch (Exception ex) { throw new AdbException(string.Format("Failed to list jdwp pid's because: {0}", ex.Message)); } }
/// <summary> /// Perform the monitor loop /// </summary> private void Run() { var initialLoopCounter = loopCounter; while (initialLoopCounter == loopCounter) { try { if (errorCount > 0) { // Ensure Adb is started new Adb().StartServer(Adb.Timeout.StartServer); errorCount = 0; Thread.Sleep(500); } else { // Start tracking try { using (request = new AdbJdwpRequest(endPoint)) { request.TrackJdwpProcessIds(device, CallBack); } } finally { request = null; } } } catch { errorCount++; } } }
/// <summary> /// Gets the currently available jdwp process id's on the given device. /// </summary> public static IEnumerable<int> GetJdwpProcessIds(IDevice device, int timeout) { try { using (var socket = new AdbJdwpRequest(EndPoint)) { return socket.JdwpProcessIds(device); } } catch (Exception ex) { throw new AdbException(string.Format("Failed to list jdwp pid's because: {0}", ex.Message)); } }