[APP][4.0.3+] Ampere current meter

Search This thread

nihil0

Senior Member
Jan 7, 2007
304
384
Ampere current meter for pre Lollipop devices

Please read first the original thread.

Pre Lollipop devices (up to Android 4.4.x) do not have a common standard interface to read the battery charging current. On some devices the current value can be read from the kernel and on other devices the current can not be determined at all.

If the app works on your device, please report it in this thread, so I can add them to the list of working devices.

If the app doesn't work on your device, please read the second post and try to give some useful info, so the app can maybe enhanced to support also your device.

Debug info
If your device only shows 0mA all the time or other absurd value then you can long-push the battery button to get a debug info toast about the used interface (only pre Lollipop versions).

Beta tester community
You can join the Ampere beta testing community on G+ and you can become a tester to get the beta releases (if there is any) automatic on Google Play.

Background info about batteries and how they will be charged
LiPo batteries don't draw the maximum for the full time it takes to charge the phone. If your battery is charged almost full then the charging current will be much less as by lower battery levels.



Ampere on Blogger
The developer on Twitter
Ampere Beta testing community on Reddit
Ampere on Facebook



.
 

Attachments

  • sony_xperia_m_charging.png
    sony_xperia_m_charging.png
    58.9 KB · Views: 13,069
  • sony_xperia_m_discharging.png
    sony_xperia_m_discharging.png
    59.2 KB · Views: 12,691
  • wayteq_talk_5h_charging.png
    wayteq_talk_5h_charging.png
    67.9 KB · Views: 12,718
  • promo_h_faq_v001_240.png
    promo_h_faq_v001_240.png
    26.2 KB · Views: 278,555
Last edited:

nihil0

Senior Member
Jan 7, 2007
304
384
A.) If the app doesn't support your device, you can collect some info to help.

--------------
PLEASE read this first:
http://forum.xda-developers.com/showpost.php?p=64432305&postcount=164
-------------

1.) You need adb installed

2.) Pull a list of your /sys/class and /sys/devices directories
Code:
adb shell ls -alR /sys/class/ > files
adb shell ls -alR /sys/devices/ >> files

3.) Search for current_now or batt_current or BatteryAverageCurrent or power_now and look for the whole path (the interfaces currently used in the app are listed in point C)
Code:
grep -B20 -i <searched_word> files
## example:
grep -B20 -i current_now files

4.) Try it out. Reading the file gives the current, if lucky.
Code:
adb shell cat <your whole path>
## example:
adb shell cat /sys/class/power_supply/Battery/current_now

If it gives a value which can be considered as the current (between 0 and 500 in case of a normal USB 2.0 port), then read out the value more times and look if it changes or not.

5.) If you think, you found your device's interface file to read the current, then please report it in this thread, with the Model string and other device info together.

B.) If your device seems to be supported (no error dialog), but the measured current values are wrong or 0 all the time.

You can report this in this forum. You can switch on a debug info bubble (toast) in pre Lollipp devices (Android 4.0.3-4.4.4) by just long-pushing the battery button in the app, make a screenshot and insert the screen shot in your post.
attachment.php
attachment.php

The debug bubble shows the following:
  • The first line is a device info line
  • List of all available interfaces (path) including the multiplier (a number which is used to scale the row values got from the interface) and the app internal entry number.
  • The firs interface in the list is the for measurement used one
  • The debug bubble is also shown, if no interface is found
There are devices with mA interface ( value 10 = 10 mA) and there are devices with uA interface ( value 10000 = 10 000 uA which is 10 mA). The multiplier is used to get the mA value. In the mentioned first case it is 1.0 and in the second case it is 0.001.

Try to find out what is wrong. The multiplier is wrong, or the used interface is wrong. In the second case, please search for a correct interface (point A).

C.) The list of currently scanned file interfaces:
  • /sys/class/power_supply/ab8500_fg/current_now
  • /sys/class/power_supply/android-battery/current_now
  • /sys/class/power_supply/battery/batt_attr_text
  • /sys/class/power_supply/battery/batt_chg_current
  • /sys/class/power_supply/battery/batt_current
  • /sys/class/power_supply/battery/batt_current_adc
  • /sys/class/power_supply/battery/batt_current_now
  • /sys/class/power_supply/battery/BatteryAverageCurrent
  • /sys/class/power_supply/battery/charger_current
  • /sys/class/power_supply/battery/current_avg
  • /sys/class/power_supply/battery/current_max
  • /sys/class/power_supply/battery/current_now
  • /sys/class/power_supply/Battery/current_now
  • /sys/class/power_supply/battery/smem_text
  • /sys/class/power_supply/bq27520/current_now
  • /sys/class/power_supply/da9052-bat/current_avg
  • /sys/class/power_supply/ds2784-fuelgauge/current_now
  • /sys/class/power_supply/max17042-0/current_now
  • /sys/class/power_supply/max170xx_battery/current_now
  • /sys/devices/platform/battery/power_supply/battery/BatteryAverageCurrent
  • /sys/devices/platform/cpcap_battery/power_supply/usb/current_now
  • /sys/devices/platform/ds2784-battery/getcurrent
  • /sys/devices/platform/i2c-adapter/i2c-0/0-0036/power_supply/battery/current_now
  • /sys/devices/platform/i2c-adapter/i2c-0/0-0036/power_supply/ds2746-battery/current_now
  • /sys/devices/platform/msm-charger/power_supply/battery_gauge/current_now
  • /sys/devices/platform/mt6320-battery/power_supply/battery/BatteryAverageCurrent
  • /sys/devices/platform/mt6329-battery/FG_Battery_CurrentConsumption
  • /sys/EcControl/BatCurrent
 

Attachments

  • debug_bubble1.jpg
    debug_bubble1.jpg
    46.6 KB · Views: 211,559
  • debug_bubble2.jpg
    debug_bubble2.jpg
    41.8 KB · Views: 210,465
Last edited:

nihil0

Senior Member
Jan 7, 2007
304
384
List of supported and not supported devices

List of supported and not supported devices

Supported devices
  • Moto G (XT1033) with Android version 4.4.4
  • Samsung Galaxy S3 4.3 (XXUGNA5 working partially, showing correct values when charging but discharging shows 0 mA)
  • Samsung Galaxy S4 mini (GT-I9195, Android 4.4.2, KOT49H)
  • Sony Xperia M (C1905)
  • Sony Xperia SP (stock rom 4.3)
  • Sony Xperia Z1 compact (D5503, with 4.4.2)
  • Karbonn Sparkle V
  • Nexus 4 (4.4.4, KTU84Q)
  • Wayteq talk_5

Partially supported devices
E.g. Samsung devices showing only fix charging and discharging currents
  • Samsung Galaxy S4 (GT-I9505, Android 4.4.2, KOT49H)
  • Samsung Note 2 (only 2 charging current: 470mA/ 1700mA, discharging current always 0mA )

Not supported devices
  • Galaxy Nexus (stock and CM11 )
 
Last edited:

tzalay

Member
Feb 10, 2011
14
3
Budapest
Galaxy S3 4.3 XXUGNA5 working partially, showing correct values when charging but discharging shows 0 mA
Huawei Mediapad 7 s7-301u with CM11 4.4.2 not working yet, but there's a device to measure it:

/sys/devices/platform/msm-charger/power_supply/battery_gauge/current_now
 
Last edited:

speig

Senior Member
Oct 18, 2010
52
19
works on sony xperia z1 compact D5503, with 4.4.4.
and showed 140mAh with the third party cradle vs. 1040 with original usb cable :p
 
Last edited:

dark_phoenix

Senior Member
Feb 6, 2013
300
42
Ampere current meter for pre Lollipop devices

Please read first the original thread.

Pre Lollipop devices (up to Android 4.4.x) do not have a common standard interface to read the battery charging current. On some devices the current value can be read from the kernel and on other devices the current can not be determined at all.

If the app works on your device, please report it in this thread, so I can add them to the list of working devices.

If the app doesn't work on your device, please read the second post and try to give some useful info, so the app can maybe enhanced to support also your device.

Debug info
If your device only shows 0mA all the time or other absurd value then you can long-push the battery button to get a debug info toast about the used interface (only pre Lollipop versions).

Alpha tester community
You can join the Ampere alpha testing community on G+ and you can become a tester to get the alpha releases (if there is any) automatic on Google Play.



The app on Google Play

.



Several such goodies on Play. None of them will work on all devices so hit or miss. Some devices, none will work.

thnx guys, it is awesome. will test now.
tested it is working. here is the screenshot attached.
And just a little question. Is the Current Amperage OK ?
 

Attachments

  • dark_phoenix.jpg
    dark_phoenix.jpg
    70.7 KB · Views: 2,131
Last edited:

nihil0

Senior Member
Jan 7, 2007
304
384
Great app. But it shows only 200 mA or -200mA . Nothing more. LG G Flex D955 4.4.2 stock kitkat. I try to get logcat if needed. Thanks :eek:

Gesendet von meinem LG-D955

Please read the first and the second posts in this thread. Please attache also a screenshot with the debug bubble. Try to find the correct interface on your phone and please describe your experience so I can work with that.
 

nihil0

Senior Member
Jan 7, 2007
304
384
LG G Flex European D955 KitKat 4.4.2
/sys/devices/f9923000.i2c/i2c-1/1-006b/power_supply/battery/current_now

current shows: 200000

i hope it helps:eek::)

Do I understand you correctly, that you found out where to read the current on your phone? The value you included is what you got manually? Can you confirm, that the current changes with the time?
 

spyne82

Senior Member
Apr 6, 2011
203
26
Huawei Watch 2
OPPO Find X2 Pro
usb similar to ac charging only shows 200 mA in positiv
and without charging it shows 200 mA in negativ..

no crashes cool design. if this would work for me, this app would be the first that shows me the correct current on KK.. on JB it worked with other apps in past..

---------- Post added at 05:38 PM ---------- Previous post was at 05:34 PM ----------

Do I understand you correctly, that you found out where to read the current on your phone? The value you included is what you got manually? Can you confirm, that the current changes with the time?

yes i find it out with some little knowledge...
the value i included is what adb shows up after comand "cat /sys/..."
the value doesn`t changed .
always 200000....
i`ll tried several times.
 

nihil0

Senior Member
Jan 7, 2007
304
384
usb similar to ac charging only shows 200 mA in positiv
and without charging it shows 200 mA in negativ..

no crashes cool design. if this would work for me, this app would be the first that shows me the correct current on KK.. on JB it worked with other apps in past..

Join please the Ampere alpha testing community on G+ and you can become a tester. I will make a test release, so you can try it, whether it works wit this or not.
 
List of supported and not supported devices
Not supported devices
  • Galaxy Nexus (stock and CM11 )

Is there any specific reason that the Galaxy Nexus is unsupported? Is it hardware related? I ask because I've been looking for a program that can accurately measure the current draw of my Sprint Galaxy Nexus (toroplus) and I haven't been able to find one anywhere. Even with a brand new 2100 mAh battery, I have issues where it discharges while plugged in and I'm trying to find the current draw to work out if the issue is with all of my chargers or with the phone itself. Thanks ^_^
 

nihil0

Senior Member
Jan 7, 2007
304
384
Is there any specific reason that the Galaxy Nexus is unsupported? Is it hardware related? I ask because I've been looking for a program that can accurately measure the current draw of my Sprint Galaxy Nexus (toroplus) and I haven't been able to find one anywhere. Even with a brand new 2100 mAh battery, I have issues where it discharges while plugged in and I'm trying to find the current draw to work out if the issue is with all of my chargers or with the phone itself. Thanks ^_^

I own 2 GN devices. One has CM11 and the other the stock 4.3. I was not able to find a current interface file on them. Therefore I put them on the not supported list. If I have time, I look a second time....
 

Top Liked Posts

  • There are no posts matching your filters.
  • 39
    Ampere current meter for pre Lollipop devices

    Please read first the original thread.

    Pre Lollipop devices (up to Android 4.4.x) do not have a common standard interface to read the battery charging current. On some devices the current value can be read from the kernel and on other devices the current can not be determined at all.

    If the app works on your device, please report it in this thread, so I can add them to the list of working devices.

    If the app doesn't work on your device, please read the second post and try to give some useful info, so the app can maybe enhanced to support also your device.

    Debug info
    If your device only shows 0mA all the time or other absurd value then you can long-push the battery button to get a debug info toast about the used interface (only pre Lollipop versions).

    Beta tester community
    You can join the Ampere beta testing community on G+ and you can become a tester to get the beta releases (if there is any) automatic on Google Play.

    Background info about batteries and how they will be charged
    LiPo batteries don't draw the maximum for the full time it takes to charge the phone. If your battery is charged almost full then the charging current will be much less as by lower battery levels.



    Ampere on Blogger
    The developer on Twitter
    Ampere Beta testing community on Reddit
    Ampere on Facebook



    .
    10
    A.) If the app doesn't support your device, you can collect some info to help.

    --------------
    PLEASE read this first:
    http://forum.xda-developers.com/showpost.php?p=64432305&postcount=164
    -------------

    1.) You need adb installed

    2.) Pull a list of your /sys/class and /sys/devices directories
    Code:
    adb shell ls -alR /sys/class/ > files
    adb shell ls -alR /sys/devices/ >> files

    3.) Search for current_now or batt_current or BatteryAverageCurrent or power_now and look for the whole path (the interfaces currently used in the app are listed in point C)
    Code:
    grep -B20 -i <searched_word> files
    ## example:
    grep -B20 -i current_now files

    4.) Try it out. Reading the file gives the current, if lucky.
    Code:
    adb shell cat <your whole path>
    ## example:
    adb shell cat /sys/class/power_supply/Battery/current_now

    If it gives a value which can be considered as the current (between 0 and 500 in case of a normal USB 2.0 port), then read out the value more times and look if it changes or not.

    5.) If you think, you found your device's interface file to read the current, then please report it in this thread, with the Model string and other device info together.

    B.) If your device seems to be supported (no error dialog), but the measured current values are wrong or 0 all the time.

    You can report this in this forum. You can switch on a debug info bubble (toast) in pre Lollipp devices (Android 4.0.3-4.4.4) by just long-pushing the battery button in the app, make a screenshot and insert the screen shot in your post.
    attachment.php
    attachment.php

    The debug bubble shows the following:
    • The first line is a device info line
    • List of all available interfaces (path) including the multiplier (a number which is used to scale the row values got from the interface) and the app internal entry number.
    • The firs interface in the list is the for measurement used one
    • The debug bubble is also shown, if no interface is found
    There are devices with mA interface ( value 10 = 10 mA) and there are devices with uA interface ( value 10000 = 10 000 uA which is 10 mA). The multiplier is used to get the mA value. In the mentioned first case it is 1.0 and in the second case it is 0.001.

    Try to find out what is wrong. The multiplier is wrong, or the used interface is wrong. In the second case, please search for a correct interface (point A).

    C.) The list of currently scanned file interfaces:
    • /sys/class/power_supply/ab8500_fg/current_now
    • /sys/class/power_supply/android-battery/current_now
    • /sys/class/power_supply/battery/batt_attr_text
    • /sys/class/power_supply/battery/batt_chg_current
    • /sys/class/power_supply/battery/batt_current
    • /sys/class/power_supply/battery/batt_current_adc
    • /sys/class/power_supply/battery/batt_current_now
    • /sys/class/power_supply/battery/BatteryAverageCurrent
    • /sys/class/power_supply/battery/charger_current
    • /sys/class/power_supply/battery/current_avg
    • /sys/class/power_supply/battery/current_max
    • /sys/class/power_supply/battery/current_now
    • /sys/class/power_supply/Battery/current_now
    • /sys/class/power_supply/battery/smem_text
    • /sys/class/power_supply/bq27520/current_now
    • /sys/class/power_supply/da9052-bat/current_avg
    • /sys/class/power_supply/ds2784-fuelgauge/current_now
    • /sys/class/power_supply/max17042-0/current_now
    • /sys/class/power_supply/max170xx_battery/current_now
    • /sys/devices/platform/battery/power_supply/battery/BatteryAverageCurrent
    • /sys/devices/platform/cpcap_battery/power_supply/usb/current_now
    • /sys/devices/platform/ds2784-battery/getcurrent
    • /sys/devices/platform/i2c-adapter/i2c-0/0-0036/power_supply/battery/current_now
    • /sys/devices/platform/i2c-adapter/i2c-0/0-0036/power_supply/ds2746-battery/current_now
    • /sys/devices/platform/msm-charger/power_supply/battery_gauge/current_now
    • /sys/devices/platform/mt6320-battery/power_supply/battery/BatteryAverageCurrent
    • /sys/devices/platform/mt6329-battery/FG_Battery_CurrentConsumption
    • /sys/EcControl/BatCurrent
    7
    New way to get your device supported

    If you want to help, please do the followings:
    1. Please install the latest Ampere
    2. Start the System Info screen: Touch 6 times the Build version in Settings/About Ampere
    3. Without leaving the System Info please share the outputs with me. The easiest way is to save (share) to Drive/DropBox or somewhere others one by one. Later you can put the files from there in your post as attachment.
    4. The test cases:
    • No charging -> push refresh -> share
    • USB charging -> push refresh -> share
    • AC charging -> push refresh -> share
    • Wireless charging -> push refresh -> share
    • Fast/Quick charging -> push refresh -> share
    Please do not forget to rename the files or to give a proper description (No Charging, USB charging,...) by sharing

    attachment.php
    4
    List of supported and not supported devices

    List of supported and not supported devices

    Supported devices
    • Moto G (XT1033) with Android version 4.4.4
    • Samsung Galaxy S3 4.3 (XXUGNA5 working partially, showing correct values when charging but discharging shows 0 mA)
    • Samsung Galaxy S4 mini (GT-I9195, Android 4.4.2, KOT49H)
    • Sony Xperia M (C1905)
    • Sony Xperia SP (stock rom 4.3)
    • Sony Xperia Z1 compact (D5503, with 4.4.2)
    • Karbonn Sparkle V
    • Nexus 4 (4.4.4, KTU84Q)
    • Wayteq talk_5

    Partially supported devices
    E.g. Samsung devices showing only fix charging and discharging currents
    • Samsung Galaxy S4 (GT-I9505, Android 4.4.2, KOT49H)
    • Samsung Note 2 (only 2 charging current: 470mA/ 1700mA, discharging current always 0mA )

    Not supported devices
    • Galaxy Nexus (stock and CM11 )
    2
    Ampere v1.56
    Ampere v1.56 has been published on Google Play (and also in the first post of this thread).

    Changes
    • Alert ringtone chooser added (Settings / Alert settings)
    • Max. USB current detection added (Settings / Basic settings)
    • New measurement interfaces added
    • Bug fixes

    USB-C cable checking with Ampere
    If you have an USB-C device and you want to know, if your USB-C cable is an USB-C spec compliant cable, you can do it with Ampere. Here is the description how to do it.

    Note
    On Nexus devices is the measurement interface in Marshmallow (Android 6) unfortunately not working (always 0 mA). This is a firmware bug. Please use the "Old measurement method" which is still fully functional also in Android 6.

    attachment.php