appium常用的命令行

先打开app,输入即可获得当前app包名与页面
一、获取包名
'''
adb shell "dumpsys window | grep mCurrent"
adb shell dumpsys window | findstr mCurrent
'''
获取activity页面
'''
adb shell "dumpsys activity | grep mFocusedActivity"
adb shell dumpsys activity | findstr mFocusedActivity
'''

  1. findstr 和 grep 查找字符串说明
    findstr:windows平台查找字符串命令, 一般格式如下:
    adb shell xxx | findstr xxx
    grep:linux平台查找字符串命令,一般先adb shell 进入shell命令行再使用,也可直接使用,把shell 后面带grep的命令加双引号即可:
    adb shell "xxx | grep xxx"
    二、aapt获取包名
    aapt dump badging apk路径

三、adb devices 获取连接设备

四、adb连接不上模拟器
https://blog.csdn.net/qq_30183767/article/details/81384318

厚积薄发
原文地址:https://www.cnblogs.com/yr434/p/14000864.html