aakk="adb devices"
aakk="adb shell dumpsys window w |findstr \/ |findstr name="
zh=[]
lx=[]
p = subprocess.Popen(aakk, shell=True, stdout=subprocess.PIPE)
out, err = p.communicate()
#print(out.splitlines()[24:27])
for line in out.splitlines():
aa=line.decode("utf-8")
print(len(aa))
try:
ab=re.findall('name=(.*?).HomeActivity',aa)
al=ab[0]+'.HomeActivity'
print(al)
except:
print("没有")
#if "offline" in line.decode('utf-8'):
adb shell am start -n com.kuaishou.nebula/com.yxcorp.gifshow.HomeActivity
打开快手