美文网首页
adb笔记3:Android获取App当前页面的Activity

adb笔记3:Android获取App当前页面的Activity

作者: _百草_ | 来源:发表于2021-09-11 20:10 被阅读0次

方法1. adb命令获取该页面的名称

adb shell "dumpsys window | grep mCurrentFocus"
adb命令获取比较简单直接(对于获取单个页面比较方便)

adb shell 'dumpsys window'|grep mCurrentFocus

方法2. Android studio 的Layout Inspector获取

打开android studio 连接手机,打开您想查看的App,之后在android studio中点击

Tools > Layout Inspector (用Layout Inspector功能)
————————————————
参考链接:https://blog.csdn.net/github_2011/article/details/102554727

相关文章

网友评论

      本文标题:adb笔记3:Android获取App当前页面的Activity

      本文链接:https://www.haomeiwen.com/subject/mdnpjltx.html