查看ps和dumpsys netpolicy

import os
import time

file = "data.txt"
text = os.popen("adb shell ps | findstr com.tencent")
fw = open(file,'w')

for line in text.readlines():
#print line
fw.write(line+'\n')
num = line.split(" ")[0]
back = os.popen("adb shell dumpsys netpolicy | findstr " + num[4:]) fw.write(back.read())fw.close()
相關文章
相關標籤/搜索