美文网首页
battery historain相关概念

battery historain相关概念

作者: HelloWorld__ | 来源:发表于2019-02-13 15:07 被阅读0次

1 bugreport

    Android系统调试分析工具,几乎涵盖整个系统各个层面内容,对于分析BUG是一大利器
    $ adb bugreport > bugreport.txt  (5.0. 6.0)
    $ adb bugreport  bugreport.zip (7.0 +)

2 Batterystats

    包含在Android框架中的工具,用于收集设备上的电池数据
    $ adb shell dumpsys batterystats --reset
    $ adb shell dumpsys batterystats --enable full-wake-history
    $ adb shell dumpsys batterystats > batterystats.txt
    $ adb shell dumpsys batterystats --disable full-wake-history

3 app消耗电量的体现

   cpu、Wakelock(保持唤醒锁)、无线电(2G/3G/4G)、WIFI、蓝牙、各种传感器、相机、闪光灯

4 Battery Historian

   google 官方开源的电量分析工具,帮助开发人员定位app具体的耗电场景
   $ docker run -p 9999:9999 registry.cn-hangzhou.aliyuncs.com/xyz10/android-battery-historian:stable-3.0

5 ChkBugReport

    索尼开源项目,bugreport分析工具,方便开发查看日志,定位各种问题
    java -jar ChkBugReport.jar bugreport.txt

6 uiautomator

    android 4.1+的原生自动化测试框架

7 AppiumBootstrap.jar

    基于uiautomator1.0的android自动化测试脚本,
    appium项目的子项目,封装原生uiautomator接口,透出socket接口,与pc通信

8 启动appiumbootstrap

adb push AppiumBootstrap.jar /data/local/tmp
adb shell uiautomator runtest /data/local/tmp/AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap

9 appium通信协议,拍照的数据格式

{"cmd":"action","action":"find","params":{"strategy":"id","selector":"com.android.camera:id/shutter_button","context":"","multiple":false}}
{"cmd":"action","action":"element:click","params":{"elementId":"1"}}

相关文章

网友评论

      本文标题:battery historain相关概念

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