FORUMS
Remove All Ads from XDA

[APP][4.0.3+] Ampere current meter

267 posts
Thanks Meter: 304
 
By nihil0, Senior Member on 25th February 2015, 10:02 PM
Post Reply Email Thread
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.
app

Ampere on Blogger
The developer on Twitter
Ampere Beta testing community on Google Plus
Ampere on Facebook



.
Attached Thumbnails
Click image for larger version

Name:	sony_xperia_m_charging.png
Views:	9634
Size:	58.9 KB
ID:	3184605   Click image for larger version

Name:	sony_xperia_m_discharging.png
Views:	9364
Size:	59.2 KB
ID:	3184606   Click image for larger version

Name:	wayteq_talk_5h_charging.png
Views:	9318
Size:	67.9 KB
ID:	3184607   Click image for larger version

Name:	promo_h_faq_v001_240.png
Views:	266828
Size:	26.2 KB
ID:	3316843  
The Following 33 Users Say Thank You to nihil0 For This Useful Post: [ View ] Gift nihil0 Ad-Free
 
 
25th February 2015, 10:02 PM |#2  
OP Senior Member
Flag Budapest
Thanks Meter: 304
 
More
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/show...&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.
debug bubble1 debug bubble2
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
Attached Thumbnails
Click image for larger version

Name:	debug_bubble1.jpg
Views:	206240
Size:	46.6 KB
ID:	3208339   Click image for larger version

Name:	debug_bubble2.jpg
Views:	205174
Size:	41.8 KB
ID:	3208340  
The Following 9 Users Say Thank You to nihil0 For This Useful Post: [ View ] Gift nihil0 Ad-Free
25th February 2015, 10:02 PM |#3  
OP Senior Member
Flag Budapest
Thanks Meter: 304
 
More
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 )
The Following 4 Users Say Thank You to nihil0 For This Useful Post: [ View ] Gift nihil0 Ad-Free
25th February 2015, 11:00 PM |#4  
ktetreault14's Avatar
Senior Member
Flag Largo
Thanks Meter: 1,810
 
Donate to Me
More
Nice
26th February 2015, 09:28 AM |#5  
Junior Member
Flag Budapest
Thanks Meter: 3
 
More
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
26th February 2015, 01:10 PM |#6  
Senior Member
Flag Kolkata
Thanks Meter: 18
 
More
Seems to work on Moto G (XT1033) with Android version 4.4.4 for both charging and discharging.
The Following User Says Thank You to rmittal For This Useful Post: [ View ] Gift rmittal Ad-Free
27th February 2015, 08:47 PM |#7  
Member
Thanks Meter: 20
 
More
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
28th February 2015, 12:47 PM |#8  
Senior Member
Flag NIterói, Rio de Janeiro
Thanks Meter: 137
 
More
Working
Nexus 4
4.4.4

28th February 2015, 12:49 PM |#9  
gicoypm's Avatar
Junior Member
Flag Adana
Thanks Meter: 8
 
More
Fine Thanks...
5th March 2015, 12:16 PM |#10  
dark_phoenix's Avatar
Senior Member
Thanks Meter: 37
 
More
Thumbs up
Quote:
Originally Posted by nihil0

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

.



Quote:
Originally Posted by Dovidhalevi

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 ?
Attached Thumbnails
Click image for larger version

Name:	dark_phoenix.jpg
Views:	1746
Size:	70.7 KB
ID:	3195383  
6th March 2015, 08:09 AM |#11  
spyne82's Avatar
Senior Member
Thanks Meter: 26
 
More
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

Gesendet von meinem LG-D955
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes