Back to Blog
Battery spy android vertiform6/9/2023 ![]() Checkout them like Battery temperature, Voltage, capacity, among other things. The last directory named battery has some other cool stuff which might interest some people. Not to mention that the second one is the symlink of the first one, and 00-qcom,charger may differ in your device.Īnyhow, 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 -180 or -840 (don't ask me why?) There's more sys/class/power_supply/battery/current_now 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.īefore 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: /sys/devices/00-qcom,charger/power_supply/battery/current_now 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. Test 3: A Qualcomm device running Android 5.0.2 (CyanogenOS 12) Somebody on XDA said that this app doesn't show true values, but that's none of my concern honestly. Correspondingly, Ampere showed the similar value with a slight mismatch of +- 1-10 mA. 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. The file BatteryAverageCurrent would show a numeric value with no mention of any unit (be it A or mA). The two files for my Android 4.4.2: /sys/device/platform/battery/power_supply/battery/BatteryAverageCurrent sys/class/power_supply/battery/BatteryAverageCurrent The two files for my Android 4.2.1: /sys/device/platform/mt6320-battery/power_supply/battery/BatteryAverageCurrent ( Rant: A design flaw I tend to think since I wasn't aware of that before digging it up). 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. Since MTK is involved, thing would behave a bit differently. Test 1 & 2: Two MTK devices running stock Android 4.2.1 and 4.4.2 I used three devices with different Android versions to test my answer. I also happen to know another question in this site.Īmpere shows us the value of current made available to the system by the kernel. Interestingly, there is another file named status which has values charging and discharging. It seems this is the current, but I guess I have to average it out to compare it with Ampere's output. When plugged in, it showed 412190 and the Ampere app showed 160mA. All these values were during the discharge phase. Ready to install custom kernel but stock ROM only.Įdit: Based on a comment from Firelord, I could see a file in /sys/class/power_supply/battery/current_now which at the moment of writing had a number 835910 and after a second it became 695229, then 673163. I am also aware of the app Battery Log, which logs the details but not the current.ĭevice info: Nexus 5 rooted, running stock 5.1.1. I am aware of the app called Ampere which displays the current, which is good but I want them logged over a period of time. Please note I am not asking about charging or discharging rate, but rather on the current. As the question reads, I want to log the current in milliAmpere or Ampere (both charging and discharging) over a period of time.
0 Comments
Read More
Leave a Reply. |