scheduleDetectConnectedInterface_ in packet_capture_android.js. Perhaps extract it into adb.js as a public utility? There are already utilities there around ps output parsing, so it's within the mandate of that module.