美文网首页
获取App的信息

获取App的信息

作者: 阿飞666666 | 来源:发表于2020-06-08 23:11 被阅读0次

(一)App 信息

1.获取当前界面元素:adb shell dumpsys activity top

2.获取任务列表:adb shell dumpsys activity activities

(二)App入口

1.adb logcat | grep -i displayed

2.aapt dump badging xxx.apk | grep launchable-activity

3.apkanalyzer 最新版本的SDK中才有

(三)启动应用

1. adb shell am start -W -n com.xueqiu.android/ .view.WelcomeActivityAlias -S

(四)常用命令列表

1.adb   2.pm   3.am    4.dumpsys   5.uiautomator  6.input

(五)Android 性能统计 dumpsys

1.获取所有的dumpsys 子命令 dumpsys | grep -i DUMP

2.获取当前activity adb shell dumpsys activity top 

3.获取activity 的记录,可以获取到appium 依赖的原始 accivity dumpsys activity activities

4.获取特定包基本信息 adb shell dumpsys package com.xueqiu.android

5.获取系统通知:adb shell dumpsys notification

6.获取内存信息:adb shell dumpsys meninfo com.android.setting

7.获取cpu 信息 : adb shell dumpsys cpuinfo

8.获取gpu绘制分析 :adb shell dumpsys gfxinfo com.android.settings

9.获取短信 adb shell dumpsys activity broadcasts | grep senderName =

(六)uiautomator

1.adb shell uiautomator runtest .....

2.adb shell uiautomator dump

(七)简单的自动化工具 input 命令

1.text <string> (Default:touchscreen)

2.keyevent [--longpress] <key code number or name> ... (Default:keyboard)

3.tap <x> <y> (Default : touchscreen)

4.swipe <x1> <y1> <x2> <y2> [duration(ms)] (Default:touchscreen)

5.draganddrop <x1> <y1> <x2> <y2> [duration(ms)] (Default:touchscreen)

6.press (Default : trackball)

7.roll <dx> <dy> <Default:trackbal>

相关文章

网友评论

      本文标题:获取App的信息

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