Skip to content

Basic tools to grab battery event file data and to analyze collected traces of such grabs.

Notifications You must be signed in to change notification settings

phillipstanleymarbell/android-fuel-gauge-uevent-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

android-fuel-gauge-uevent-analysis

Basic tools to grab battery event file data and to analyze collected traces of such grabs.

This tool is just a proof-of-concept. See the list of limitations below.

To install:

(1) Grab the repository:

git clone [email protected]:phillipstanleymarbell/android-fuel-gauge-uevent-analysis.git

(2) Running 'make install' will copy the script to the Android device currently connected to your workstation via USB. (Be sure to first enable USB debugging on the Android device.)

make install

(3) Run ‘adb shell’ to login to the Android device. Change directory to '/data/local/tmp' (this is where 'make install' copied the logger script to) and launch the script in the background, saving it to the file 'log':

adb shell

shell@angler:/ $ cd /data/local/tmp

shell@angler:/data/local/tmp $ ./fuelGauge.sh > log &

(4) Disconnect the USB debug cable and use the phone or run your tests as usual.

(5) To retrieve the log:

make retrieve

This will retrieve the file '/data/local/tmp/log' from the Android device, and will store the retrieved file in a time-named file within 'Logs/' of the repository root.

(6) To analyze the log, run it through the Mathematica notebook in the Mathematica/ subdirectory of the repository.

Limitations

  • It samples at 1Hz. This has the advantage that it does not induce much system activity.

  • Sampling at 1Hz will however not catch transients, and will be too coarse-grained to be useful in general. You can always rewrite fuelGauge.sh to achieve more- or less-frequent sampling.

  • The analysis tools presently only look at the instantaneous current and voltage samples, and not at the battery state-of-charge.

About

Basic tools to grab battery event file data and to analyze collected traces of such grabs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages