1、连接设备并启动被测试app应用
2、打开cmd窗口
3、windows获取包名和activity
adb shell dumpsys activity |find "mFocusedActivity" 获取当前activity
adb shell dumpsys window | findstr mCurrentFocus 获取当前activity
adb shell logcat | findstr cmp= 获取包和activity ,不太好用
4、linux获取包名和activity
adb shell dumpsys activity |find "mFocusedActivity" 获取当前activity
adb shell dumpsys window | grep mCurrentFocus 获取当前activity
adb shell logcat | grep cmp= 获取包和activity,不太好用