Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 1.27 KB

README.md

File metadata and controls

24 lines (21 loc) · 1.27 KB

Android Battery Monitor

Python Scripts to log Battery Status for Android Devices using ADB over WiFi and to plot data

android-battery-monitor.py

  • Connects to Android device using ADB over wifi and starts logging (outputs to a file)
  • Device needs to already be configured for wireless ADB (need to plug it in and send command)
  • Arguments:
    • --ip: IP address of the Android Device (needs to be on the same WiFi network) (Required)
    • -f, --file: File to output info to (Required)
    • -b, --battery-target: Stops logging and exits program once this battery level has been reached (Optional, default = 100)

plotter.py

  • Plots data from file that was generated by android-battery-monitor.py
  • Continous Mode: Keeps reading from file and updates the graph live
  • Single Mode: Reads file once (for log files that have already been completed)
  • Arguments:
    • -c, --continuous: (Flag) Indicates whether continuous mode should be enabled
    • -b, --best-fit-enabled: (Flag) Indicates whether to draw a line of best fit
    • -s, --single-plot: Only draw a single plot instead of all of them - indicate Y and X axes
    • -t, --title: Title of the plot
    • -m, --markers: (Flag) Draw point markers
    • -i, --interval: Take datapoints at specific intervals (default=10)
    • file: File to read data from