adb查看app包名和activity的方法

1、手机USB连接电脑,打开adb调试

2、打开要看包名的app

3、windows中cmd执行命令

adb shell dumpsys window w | findstr \/ | findstr name=
或者
adb shell dumpsys window |findstr mCurrent
或者
adb shell "dumpsys window w|grep \/|grep name=|sed 's/mSurface=Surface(name=//g'|sed 's/)//g'|sed 's/ //g'"

 上面命令的输出结果中,会包含app包名。

4.mac/linux中终端执行命令

adb shell dumpsys activity top | grep ACTIVITY

 

posted @ 2021-09-30 14:51  CJTARRR  阅读(363)  评论(0)    收藏  举报