/chargerTest

some tools for testing charger

Primary LanguagePython

chargerTest

some tools for testing charger

chargingTest.sh

recording the process when charging.

adb push chargingTest.sh /data
adb shell
cd /data
su
chmod a+x chargingTest.sh
./chargingTest.sh > chargingProcess.txt &

chargingShow.py

visualize the file generated by chargingTest.sh

python chargingShow.py

mpower_tools.py

useful tools for analyzing the mbattery log

system requirement

  • python version

python 3.4

  • dependency
matplotlib
re
copy
xlsxwriter
argparse

usage

usage: mpower_tools.py [-h] [-o OUTPUT]
                       [-p {cc,icl,vbus,ulmt,scrn,fstchg,usoc,tsoc,vbat,ibat,usbvltg,dischg,brdtmp,battmp,usbtmp}]
                       [-P {cc,icl,vbus,ulmt,scrn,fstchg,usoc,tsoc,vbat,ibat,usbvltg,dischg,brdtmp,battmp,usbtmp}]
                       [-v]
                       logpath

positional arguments:
  logpath

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        save as excel file
  -p {cc,icl,vbus,ulmt,scrn,fstchg,usoc,tsoc,vbat,ibat,usbvltg,dischg,brdtmp,battmp,usbtmp}, --plot {cc,icl,vbus,ulmt,scrn,fstchg,usoc,tsoc,vbat,ibat,usbvltg,dischg,brdtmp,battmp,usbtmp}
                        plot the given argument sequentially
  -P {cc,icl,vbus,ulmt,scrn,fstchg,usoc,tsoc,vbat,ibat,usbvltg,dischg,brdtmp,battmp,usbtmp}, --PLOT {cc,icl,vbus,ulmt,scrn,fstchg,usoc,tsoc,vbat,ibat,usbvltg,dischg,brdtmp,battmp,usbtmp}
                        plot the given argument by time
  -v, --version         print version

example

save as excel file

python mpower_tools.py ./log -o output.xlsx

save2excel

plot the vbat value sequentially

python mpower_tools.py ./log -p vbat

plotvbatseq

plot the vbat value by time

python mpower_tools.py ./log -P vbat

plotvbatbytime