怎么获取到真机的appPackage和appActivity

为什么adb连接真机后,获取不到appPackage和appActivity,安卓版本是10。

在终端输入 adb logcat ActivityManager:I | grep "cmp",然后打开被测app,通过日志就可以抓到啦