美文网首页
battery-historian电量分析工具安装

battery-historian电量分析工具安装

作者: NIIIICO | 来源:发表于2023-06-11 15:55 被阅读0次
一、安装地址:

github地址:https://github.com/google/battery-historian
docker:https://docs.docker.com/engine/install/

二、安装步骤

推荐使用docker安装。

1、docker安装

在上述链接中的下载页面选择对应的版本进行下载,这里选择windows版本。下载好之后双击安装即可。


docker下载
2、docker安装问题

打开docker之后,可能会有报错,可以通过以下方式进行解决。

(1)Docker Desktop requires a newer WSL kernel version.

Docker Desktop requires a newer WSL kernel version
原因:WSL版本较低
解决:win + r 打开命令行,运行 wsl --update 等待更新。

(2)An unexpected error was encountered while executing a WSL command. Common causes include access rights issues, which occur after waking the computer or not being connected to your domain/active directory.

An unexpected error was encountered while executing a WSL command

解决:以管理员身份运行命令行,执行netsh winsock reset。再次进入docker即可解决,若仍有问题可以重启系统尝试。
以管理员身份运行命令行:
打开以下路径,C:\Windows\System32 -> 找到cmd.exe -> 右键 -> 以管理员身份运行。

3、battery-historian下载并运行

命令行使用执行以下命令:
docker -- run -p <port>:9999 gcr.io/android-battery-historian/stable:3.0 --port 9999
其中<port>是自己设置的端口。

下载并运行battery-historian

等待下载完成,屏幕出现Listening on port:9999之后,便可以通过localhost:<port>,进行访问。如图中所示,可以使用localhost:9998访问到battery-historian。

相关文章

网友评论

      本文标题:battery-historian电量分析工具安装

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