一、背景
在使用appium做安卓app自动化的时候,有两个必要的启动参数appPackage和appActivity是需要获取的
二、获取appPackage
1、Windows
adb shell pm list packages | findstr "yourAppName"
2、Mac or Linux
adb shell pm list packages | grep "yourAppName"
三、获取appActivity
1、Windows
adb shell am force-stop "yourAppPackage"
adb logcat *:S ActivityManager:* | findstr "yourAppPackage"
2、Mac or Linux
adb shell am force-stop "yourAppPackage"
adb logcat *:S ActivityManager:* | grep "yourAppPackage"