通过分析bugreport文件,统计后台耗电各项指标,以及指标是否合格。
-
支持系统:
- windows
- Linux
- Mac
-
需要环境:
- python3.5+
-
使用指南:
# 1.将bugreport报告放到files目录下
# 2. 执行run.py
# <= android 6
# bugreport_file = "bugreport_SM9.txt"
# >= android 7
bugreport_file = "bugreport-2020-12-10-15-08-27.zip"
app_name = "wechat"
pkg_name = "com.tencent.mm"
app_info, battery_statistics, report_html = analyze_report(app_name, pkg_name, bugreport_file)
logger.success(app_info)
logger.success(battery_statistics)
logger.success("后台耗电报告: %s" % report_html)