其他分享
首页 > 其他分享> > apk 获取 appPackage和appActivity

apk 获取 appPackage和appActivity

作者:互联网

adb shell 方式获取

通过cmd adb命令,执行前需要把想要获取appPackage和appActivity的App运行

(之后通adb 连接手机或模拟器)

0、adb connect 127.0.0.1:7555 #先连接手机或模拟器,这里是模拟器

1. adb shell

2. dumpsys activity | grep mFocusedActivity

 

+执行结果如下+++++++++++++++++++++++++++++++++++++++++++++++++

D:\leam\>adb shell

root@DUK-AL20:/ # dumpsys activity | grep mFocusedActivity

dumpsys activity | grep mFocusedActivity
mFocusedActivity: ActivityRecord{f35c466 u0 com.ss.android.ugc.trill/com.ss.an
droid.ugc.aweme.splash.SplashActivity t289}

root@DUK-AL20:/ #

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#蓝色为appPackage

#绿色为appActivity

标签:shell,grep,dumpsys,apk,adb,appPackage,appActivity,mFocusedActivity
来源: https://www.cnblogs.com/khaha/p/10955972.html