使用运行adb命令模块,输入命令adb shell top -n 1 | grep <package_name>
打印output结果,报错取值超过列表范围,直接adb shell top -n 1 可以运行成功,打印出含有包名的记得结果