ADB命令

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

打开快手

 

posted @ 2020-12-04 17:38  myrj  阅读(65)  评论(0编辑  收藏  举报