[python] adb logcat realtime processing -- subprocess

CMD_logcat_clean = 'adb logcat -c'
CMD = '''adb shell "logcat | grep abc"'''

subprocess.Popen(args = CMD_logcat_clean, stdin = None, stdout= None, stderr= None, shell = False)
p_obj = subprocess.Popen(args = CMD, stdin = None, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell = False)

 

with p_obj:
  for line in p_obj.stdout:

 

上一篇:移动端adb常用命令


下一篇:[Android-01] Android Studio 使用