因为养了两只小豚鼠,外出的时候不知道它们在家干嘛就想将它们“监控”起来。刚好手里有个上学时用的小米5s刚好可以利用起来,装好IP摄像头软件用手机摄像头当监控使用。因为手机里有电池,长时间连接充电器充电比较损耗电池。于是网上搜了搜发现有现成的项目可以用。
Advanced Charging Controller (ACC) 高级充电控制器
如果 ROM 不自带智能充电功能,你也不想手动写 shell 脚本,挂“服务”,处理定时任务。可以使用下面两个东西来实现:
不过前提是你的设备已经 Root,上面两个都是 “systemless” 的,也不强需要 Magisk。
安装
安装直接去项目主页下载 ZIP 包用 Magisk 刷入
Releases · VR-25/djs (控制器)
Releases · VR-25/acc (计划任务)
如果你不是用 Magisk 获得的 root 也没事,这两个支持非 magisk 方式安装,不过你给注意一下环境需求等,这里引用作者Github里环境条件说明
Advanced Charging Controller:PREREQUISITES
PREREQUISITES
Must read - how to prolong lithium ion batteries lifespan
Android or Android based OS
Any root solution (e.g., Magisk)
Busybox* (only if not rooted with Magisk)
Non-Magisk users can enable acc auto-start by running /data/adb/vr25/acc/service.sh, a copy of, or a link to it - with init.d or an app that emulates it.
Terminal emulator
Text editor (optional)
- A busybox binary can simply be placed in /data/adb/vr25/bin/. Permissions (0700) are set automatically, as needed. Precedence: /data/adb/vr25/bin/busybox > Magisk’s busybox > system’s busybox
Other executables or static binaries can also be placed in /data/adb/vr25/bin/ (with proper permissions) instead of being installed system-wide.
使用
本地终端?敲命令?不不不,经常用手机玩shell的,要么就是家里没电脑,要么就是你懂的。
我们才不在那么小块屏幕中用虚拟键盘来用难用的终端或外接其他设备来实现。
AccA(高级充电控制器 app)
推荐使用一个UI和交互都还不错的 acc & djs 的开源前端:
Advanced Charging Controller App
Acc app allows to edit acc config file and add a tile to start and stop acc deamon
任务计划
有了 AccA ,我们就能轻松利用 djs
和 acc
来实现智能充电和温控切断的效果。
比如:
晚上只充电到 60%,等待降到 55%就不充了
白天在我醒来之前将上限调整到 80%
如果你手机支持 电池闲置模式(连接电源时不使用电池的电),夜间充电甚至可以开启电池闲置优先。
AccuBattery(精准电量)
还可以配合 AccuBattery 来实现电池健康度监控,还能查看充放电记录。