android adb命令获取处于当前屏幕的Activity

6 篇文章 0 订阅

android adb命令获取处于当前屏幕的Activity

使用adb命令:

adb shell dumpsys activity activities

 

输出,例如:

ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)
Display #0 (activities from top to bottom):
  * Task{38ef601 #5281 type=standard A=10450:com.example.myapplication U=0 visible=true visibleRequested=true mode=fullscreen translucent=false sz=1}
    mResizeMode=RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION
    mHasBeenVisible=true
    mDexDocking=undefined
    isSleeping=false
    topResumedActivity=ActivityRecord{46a9fe8 u0 com.example.myapplication/.MainActivity} t5281}
    * Hist  #0: ActivityRecord{46a9fe8 u0 com.example.myapplication/.MainActivity} t5281}
      packageName=com.example.myapplication processName=com.example.myapplication
      launchedFromUid=10127 launchedFromPackage=com.sec.android.app.launcher launchedFromFeature=null userId=0       
      app=ProcessRecord{6143248 17697:com.example.myapplication/u0a450}
      Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.example.myapplication/.MainActivity bnds=[795,139][1041,474] }
      rootOfTask=true task=Task{38ef601 #5281 type=standard A=10450:com.example.myapplication U=0 visible=true visibleRequested=true mode=fullscreen translucent=false sz=1}
      taskAffinity=10450:com.example.myapplication
      mActivityComponent=com.example.myapplication/.MainActivity
      baseDir=/data/app/~~k6HJUDEleb5O5lC7hfnd_w==/com.example.myapplication-Ijc7ZXChoYAHUGpC-CPB9Q==/base.apk       
      dataDir=/data/user/0/com.example.myapplication
      stateNotNeeded=false componentSpecified=false mActivityType=standard
      compat={540dpi} labelRes=0x7f0f001c icon=0x7f0d0000 theme=0x7f100262

 

已经明确告知是

Display #0 (activities from top to bottom):

从顶至底,#0 0号即为当前屏幕显示的界面数据。

 

Android adb shell dump当前手机设备的所有activity_zhangphil的博客-CSDN博客adb命令:adb shell dumpsys activity activiteshttps://blog.csdn.net/zhangphil/article/details/120982891

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zhangphil

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值