0

If you go into the adb shell, you can check what the amount of current the battery is discharging by using the following command

cat /sys/class/power_supply/battery/current_now

When the current is discharged it shows it as a negative value. I am wondering where in the kernel this current_now file is generated. I am using a nexus 7(flo) and I am using 4.3 jelly bean.

An app I am using (trepn) doesn't like negative measurements. So it shows current values as 0. I am trying to find where the current now file is generated and replace the sign

1 Answer 1

1

Basically there are battery drivers in the android. Actually the device consists of Fuel-Gauge which is the IC providing information regarding monitoring of voltage, current, temperature. These values are then send to the concerned unit, for eg. charging current is send to the Charger IC etc.

The battery driver (not device) present in the device provides interface to the charger IC and Fuel Gauge IC (not in all chipset but in most of the Samsung phones) and has nodes which has these values and are used by the framework layer through sysfs. So the value which you read is the exact value read from the registers of FuelGauge IC presrent.

Hope this helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .