Ampere shows us the value of current made available to the system by the kernel. I used three devices with different Android versions to test my answer. Here we go!
Test 1 & 2: Two MTK devices running stock Android 4.2.1 and 4.4.2
Since MTK is involved, thing would behave a bit differently. In both the devices Ampere had trouble measuring the current not because it couldn't, but two files were available to measure the current, and the user had to choose one from its Settings → Basic settings → Measurement interface. (Rant: A design flaw I tend to think since I wasn't aware of that before digging it up).
The two files for my Android 4.2.1:
The two files for my Android 4.4.2:
BatteryAverageCurrent would show a numeric value with no mention of any unit (be it
In my devices, both the files (second was the symlink of the first) had the same value (dynamic, Current varies of course) like
440 when connected to PC, and
880 when connected to charger. Correspondingly, Ampere showed the similar value with a slight mismatch of +-
1-10 mA. // Somebody on XDA said that this app doesn't show true values, but that's none of my concern honestly.
Test 3: A Qualcomm device running Android 5.0.2 (CyanogenOS 12)
I read that Google made changes in Lollipop related to measurement of current, and among other things,
BatteryAverageCurrent is nowhere to be found in the system, at least not in my system. Don't blame me since I didn't verify whether the changes were introduce in Lollipop or before, and it's not really a concern to test the things here.
Before I tell the tale further I should mention that Ampere had no trouble in this device even though there were two files to measure current:
Not to mention that the second one is the symlink of the first one, and
00-qcom,charger may differ in your device.
Anyhow, when it comes to the content of the
current_now you can consider everything same as in
BatteryAverageCurrent except that the value was in negative like
-840 (don't ask me why?)
The last directory named
battery has some other cool stuff which might interest some people. Checkout them like Battery temperature, Voltage, capacity, among other things.
If you want a summary of them, look at
uevent file whose output would be like:
And if (somehow) you're wondering about
POWER_SUPPLY_CURRENT_NOW=0 then know that
POWER_SUPPLY_CAPACITY=100 i.e. charging was complete and even Ampere was showing
As for Logging, sorry! since I've no detailed solution as I didn't bother because the logging can be done using an automation tool like Tasker.
But a brief usage of Tasker must be told:
- Create a profile based on time or the type that suits your goal.
- There are two file actions under the action File namely
Read File and
Write File. If it doesn't work, then you can always do
cat <SOURCE> >> <DESTINATION> using the action Code → Run Shell and you don't need root access.
We're good to go now!
/sys/class/power_supply/.... It was easy for me to see the real value inside the file but Lollipop has made some changes so I can't find out which new file holds the value for current. Anyhow, if you do end-up with such file then use Tasker app to log the value for your time period.
current_nowmade me to rethink about posting. :)