Skip to content

About

A small C utility for reading battery information from selected Samsung smartphones powered by a MediaTek SoC.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MediaTek Fuel Gauge Reader

A small C utility for reading battery information from selected Samsung smartphones powered by a MediaTek SoC.

The values are obtained through the following device:

/dev/MT_pmic_adc_cali

The program outputs few CSV line containing:

  • timestamp (ms)
  • current (raw value)
  • voltage (mV)
  • temperature (raw value)

Build

gcc -O2 -o batvolt batvolt.c

Usage

Print measurements:

./batvolt

Print the CSV header:

./batvolt --header

Print only one measurement :

./batvolt --one

Example:

timestamp_ms,current_raw,voltage_mv,temperature_raw
1752420512345,-182,4176,298

Compatibility

This program was developed and tested on a rooted Samsung Galaxy A14 (SM-A145R) running Android.

It may also work on other MediaTek-based devices exposing the /dev/MT_pmic_adc_cali device, although compatibility is not guaranteed.

License

This project is distributed under the MIT License. See the LICENSE file for details.

About

A small C utility for reading battery information from selected Samsung smartphones powered by a MediaTek SoC.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages