adb 获取app的包名、类名

通过adbshell命令行工具,使用dumpsysactivityactivities和logcat命令来监控设备上运行的应用活动。日志显示了多个应用的启动事件,如com.example.and_web和com.tianci.movieplatform的相关Activity。这表明在进行Android应用的调试或性能分析。
摘要由CSDN通过智能技术生成

前提:当前app正在运行

方法一:adb shell dumpsys activity activities | findstr “Run”
在这里插入图片描述
方法二:adb logcat | find “START”(推荐)

在这里插入图片描述
C:\Users\user>adb connect 172.16.37.162
connected to 172.16.37.162:5555
C:\Users\user>adb shell dumpsys activity activities | findstr “Run”
Running activities (most recent first):
Run #0: ActivityRecord{3a5d23e u0 com.example.and_web/.MainActivity t218}
Running activities (most recent first):
Run #0: ActivityRecord{edcab27 u0 com.tianci.movieplatform/com.coocaa.homepage.vast.HomePageActivity t1}
C:\Users\user>adb logcat | find “START”
11-25 11:25:53.536 3617 12096 I ActivityManager: START u0 {flg=0x10000000 pkg=com.example.webview_change_url cmp=com.example.webview_change_url/.MainActivity} from uid 1000
11-25 11:29:01.867 3617 3892 I ActivityManager: START u0 {flg=0x10000000 pkg=com.tianci.setting cmp=com.tianci.setting/.activity.MainActivity (has extras)} from uid 1000
11-25 11:29:04.067 3617 3892 I ActivityManager: START u0 {cmp=com.tianci.setting/.activity.ConnectSetting (has extras)} from uid 1000
11-25 11:29:05.419 3617 8720 I ActivityManager: START u0 {cmp=com.tianci.setting/.connectsetting.net.wifi.WifiActivity (has extras)} from uid 1000
11-25 11:29:09.426 3617 13510 I ActivityManager: START u0 {cmp=com.tianci.setting/.activity.MainActivity (has extras)} from uid 1000
11-25 11:34:16.456 3617 13510 I ActivityManager: START u0 {flg=0x10000000 pkg=com.example.webview_change_url cmp=com.example.webview_change_url/.MainActivity (has extras)} from uid 1000
11-25 11:35:41.633 3617 3892 I ActivityManager: START u0 {flg=0x10000000 pkg=com.tianci.setting cmp=com.tianci.setting/.activity.MainActivity (has extras)} from uid 1000
11-25 11:35:43.178 3617 8720 I ActivityManager: START u0 {cmp=com.tianci.setting/.activity.ConnectSetting (has extras)} from uid 1000
11-25 11:35:44.347 3617 13510 I ActivityManager: START u0 {cmp=com.tianci.setting/.connectsetting.net.wifi.WifiActivity (has extras)} from uid 1000
11-25 11:36:27.892 3617 3892 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.webview_change_url/.MainActivity} from uid 2000
11-25 11:45:44.579 3617 3892 I ActivityManager: START u0 {cmp=com.tianci.setting/.activity.MainActivity (has extras)} from uid 1000
11-25 11:45:51.527 3617 3892 I ActivityManager: START u0 {flg=0x10000000 pkg=com.example.and_web cmp=com.example.and_web/.MainActivity (has extras)} from uid 1000

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值