【Android电量】Battery Historian环境部署

简介: 1、Install Docker Desktop for Mac (ps: Requires Apple Mac OS Sierra 10.12 or above.)手动下载安装https://docs.

1、Install Docker Desktop for Mac (ps: Requires Apple Mac OS Sierra 10.12 or above.)
手动下载安装

https://docs.docker.com/docker-for-mac/install/

使用 Homebrew 安装

brew cask install docker(推荐)

2、Run the Battery Historian image.

使用命令

docker run -d -p 9999:9999 bhaavan/battery-historian 加载启动镜像 (有问题的镜像,不要用)

docker run -p 9998:9998 gcr.io/android-battery-historian/stable:3.0 --port 9998 (亲测可用镜像)

didi@localhost  ~  docker run -p 9998:9998 gcr.io/android-battery-historian/stable:3.0 --port 9998
Unable to find image 'gcr.io/android-battery-historian/stable:3.0' locally
3.0: Pulling from android-battery-historian/stable
c62795f78da9: Pull complete
d4fceeeb758e: Pull complete
5c9125a401ae: Pull complete
0062f774e994: Pull complete
6b33fd031fac: Pull complete
a6bd6e1d0bdb: Pull complete
76cf9d0635af: Pull complete
856d20d533e0: Pull complete
e63a73f6a528: Pull complete
1a75578c9353: Pull complete
24f3649604d9: Pull complete
10f637765748: Pull complete
e06a9fa76cf2: Pull complete
Digest: sha256:265a37707f8cf25f2f85afe3dff31c760d44bb922f64bbc455a4589889d3fe91
Status: Downloaded newer image for gcr.io/android-battery-historian/stable:3.0
2019/04/15 12:46:23 Listening on port: 9998
2019/04/15 12:48:19 Trace starting analysisServer processing for: GET
2019/04/15 12:48:19 Trace finished analysisServer processing for: GET
2019/04/15 12:48:20 Trace starting analysisServer processing for: GET
2019/04/15 12:48:20 Trace finished analysisServer processing for: GET
2019/04/15 12:48:27 Trace starting analysisServer processing for: POST
2019/04/15 12:48:27 Trace starting reading uploaded file. 2330165 bytes
2019/04/15 12:48:28 failed to extract battery info: could not find battery time info in bugreport
2019/04/15 12:48:28 failed to extract time information from bugreport dumpstate: open /usr/lib/go-1.6/lib/time/zoneinfo.zip: no such file or directory
2019/04/15 12:48:28 Trace started analyzing "bugreport-ALP-AL00-HUAWEIALP-AL00-2019-04-15-14-31-10.zip~bugreport-ALP-AL00-HUAWEIALP-AL00-2019-04-15-14-31-10/bugreport-ALP-AL00-HUAWEIALP-AL00-2019-04-15-14-31-10.txt" file.
2019/04/15 12:48:28 Trace finished processing checkin.
2019/04/15 12:48:28 Trace finished processing summary data.
2019/04/15 12:48:28 Trace finished generating Historian plot.
2019/04/15 12:48:28 Trace finished analyzing "bugreport-ALP-AL00-HUAWEIALP-AL00-2019-04-15-14-31-10.zip~bugreport-ALP-AL00-HUAWEIALP-AL00-2019-04-15-14-31-10/bugreport-ALP-AL00-HUAWEIALP-AL00-2019-04-15-14-31-10.txt" file.
2019/04/15 12:48:29 Trace ended analyzing file.
2019/04/15 12:48:29 Trace finished analysisServer processing for: POST

didi@localhost  /usr/local/Cellar/go/1.12.4/src/github.com/google/battery-historian   master  docker ps -all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c19bb05d9198 bhaavan/battery-historian "/bin/sh -c 'go run …" 19 minutes ago Up 19 minutes 0.0.0.0:9999->9999/tcp sad_shaw
didi@localhost  /usr/local/Cellar/go/1.12.4/src/github.com/google/battery-historian   master 
didi@localhost  /usr/local/Cellar/go/1.12.4/src/github.com/google/battery-historian   master  docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
bhaavan/battery-historian latest 9a3a9fd0ca2f 2 years ago 922MB

3、Open BH
Run historian and visit http://localhost:9999
1

4、Upload Report

Both .txt and .zip bug reports are accepted.

To take a bug report from your Android device, you will need to enable USB debugging under Settings > System > Developer Options

To obtain a bug report from your development device running Android 7.0 and higher:

$ adb bugreport bugreport.zip

didi@localhost  ~  adb bugreport bugreport.zip
/data/user_de/0/com.android.shell/files/bugreports/bugreport-ALP-AL00-HUAWEIALP-AL00-2019-04-15-11-08-01.zip: 1 file pulled. 23.2 MB/s (2295220 bytes in 0.094s) // 手机本地

didi@localhost  ~  adb pull /data/user_de/0/com.android.shell/files/bugreports/bugreport-ALP-AL00-HUAWEIALP-AL00-2019-04-15-12-08-32.zip /Users/didi/Documents/ # 导出到电脑
/data/user_de/0/com.android.shell/files/bugreports/bugreport-ALP-AL00-HUAWEIALP-AL00-2019-04-15-12-08-32.zip: 1 file pulled. 24.1 MB/s (2415380 bytes in 0.096s)

For devices 6.0 and lower:

$ adb bugreport > bugreport.txt

5、Start analyzing!

Timeline:

2

System stats:
App stats:
相关文章
|
10天前
|
IDE Android开发 iOS开发
深入解析Android与iOS的系统架构及开发环境差异
本文旨在探讨Android和iOS两大主流移动操作系统在系统架构、开发环境和用户体验方面的显著差异。通过对比分析,我们将揭示这两种系统在设计理念、技术实现以及市场策略上的不同路径,帮助开发者更好地理解其特点,从而做出更合适的开发决策。
38 2
|
8天前
|
Dart 开发工具 Android开发
在 Android 系统上搭建 Flutter 环境的具体步骤是什么?
在 Android 系统上搭建 Flutter 环境的具体步骤是什么?
|
2月前
|
API 开发工具 Android开发
探索Android与iOS开发环境的差异及对开发者的影响
【8月更文挑战第10天】在移动应用开发的广阔天地中,Android和iOS作为两大主要平台,各自拥有独特的开发环境和生态系统。本文将深入探讨这两个平台的开发环境差异,以及这些差异如何影响开发者的工作效率、应用性能和最终用户体验。通过比较两者的开发工具、编程语言和API等方面,我们将揭示平台选择对项目成功的重要性,并为开发者提供在选择平台时的参考依据。
|
2月前
|
开发者 算法 虚拟化
惊爆!Uno Platform 调试与性能分析终极攻略,从工具运用到代码优化,带你攻克开发难题成就完美应用
【8月更文挑战第31天】在 Uno Platform 中,调试可通过 Visual Studio 设置断点和逐步执行代码实现,同时浏览器开发者工具有助于 Web 版本调试。性能分析则利用 Visual Studio 的性能分析器检查 CPU 和内存使用情况,还可通过记录时间戳进行简单分析。优化性能涉及代码逻辑优化、资源管理和用户界面简化,综合利用平台提供的工具和技术,确保应用高效稳定运行。
40 0
|
2月前
|
搜索推荐 Java Android开发
打造个性化安卓应用:从设计到部署的全栈之旅
【8月更文挑战第31天】在数字化时代的浪潮中,移动应用已成为人们日常生活的一部分。本文将带你走进安卓应用的开发世界,从设计理念到实际编码,再到最终的用户手中,我们将一起探索如何将一个想法转变为现实中触手可及的应用。你将学习到如何利用安卓开发工具包(SDK)和编程语言(如Kotlin或Java),结合Material Design设计原则,创建出既美观又实用的应用。此外,我们还将讨论如何通过Google Play将应用发布给全球用户,并确保应用的安全性与维护性。无论你是初学者还是有一定经验的开发者,这篇文章都将为你提供宝贵的知识和启发。
|
2月前
|
搜索推荐 Java Android开发
打造个性化安卓应用:从设计到部署的全攻略
【8月更文挑战第31天】在这篇文章中,我们将一起探索如何从零开始构建一个安卓应用,并为其添加个人特色。我们将通过实际的代码示例,学习如何使用Android Studio进行开发,以及如何将应用发布到Google Play商店。无论你是编程新手还是有经验的开发者,这篇文章都将为你提供有价值的见解和技巧,帮助你打造独一无二的安卓应用。
|
2月前
|
Android开发
【Azure 环境】记录使用Notification Hub,安卓手机收不到Push通知时的错误,Error_Code 30602 or 30608
【Azure 环境】记录使用Notification Hub,安卓手机收不到Push通知时的错误,Error_Code 30602 or 30608
|
3月前
|
IDE 开发工具 Android开发
安卓与iOS开发环境对比分析
在移动应用开发的广阔舞台上,安卓与iOS这两大操作系统各占半壁江山。它们在开发环境上的差异,不仅影响了开发者的编码体验,也在一定程度上塑造了应用生态的多样性。本文将深入探讨两者在开发工具、编程语言、用户界面设计以及市场分布等方面的不同特点,为即将踏入这一领域的开发者提供一盏明灯。
|
3月前
|
IDE 开发工具 Android开发
安卓与iOS开发环境的差异性分析
在移动应用开发的广阔舞台上,安卓和iOS两大操作系统各据一方,引领着市场潮流。它们各自拥有独特的开发环境和工具集,为开发者提供了不同的挑战与机遇。本文旨在深入剖析这两个平台的开发环境,通过比较它们的编程语言、集成开发环境(IDE)、用户界面设计、以及系统架构等方面,揭示各自的优势与局限。我们将探讨如何基于这些差异来优化开发策略,并预测未来可能的发展趋势,以期为开发者在选择平台时提供有价值的参考。
|
3月前
|
开发工具 Android开发 iOS开发
探索Android与iOS开发环境的差异性
在移动应用开发的广阔天地中,Android和iOS两大平台如同双子星座般耀眼。本文将深入探讨这两个操作系统的开发环境,揭示它们在编程语言、工具、用户界面设计以及性能优化等方面的显著差异。通过对比分析,旨在为开发者提供清晰的平台选择指导,并帮助他们理解各自环境下的最佳实践。
下一篇
无影云桌面