[Galaxy S III Original Android Development] curiousrom:
S3 Battery Real Charging Current Data? - Bad USB Port

While you can use a root enabled file manager to make this search & open the files, I used Terminal Emulator by Jack Palevich because you can copy/paste to QuickEdit (XDA thread) or can email the content of the screen which sadly the Lineage built-in Terminal (if enabled in Developer options) can't do so I don't have to type all these paths. The same search can be done in adb shell but then you are connected via the computer's USB port (460mA max) & not via power adapter (1000mA max).

Maybe LineageOS + Boeffla based custom kernel + Boeffla-Config V2 users could do the same? :cool:

In bold is what you type in Terminal & interesting current related files:

i9300:/ $ su

i9300:/ # find /sys -type f -name *curr*

/sys/fs/selinux/class/process/perms/setcurrent

/sys/devices/platform/i2c-gpio.17/i2c-17/17-0066/max77693-charger/power_supply/max77693-charger/current_max

/sys/devices/platform/i2c-gpio.17/i2c-17/17-0066/max77693-charger/power_supply/max77693-charger/current_now

/sys/devices/platform/s5p-tmu/curr_temp <<< CPU temperature

/sys/devices/platform/samsung-battery/power_supply/battery/current_max <<< Maximum in Galaxy Charging Current

/sys/devices/platform/samsung-battery/power_supply/battery/current_now <<< Reference in Galaxy Charging Current

/sys/devices/platform/samsung-battery/power_supply/battery/current_avg <<< Average in Galaxy Charging Current

/sys/devices/system/cpu/cpuidle/current_driver

/sys/devices/system/cpu/cpuidle/current_governor_ro

/sys/devices/system/cpu/busfreq/curr_freq

/sys/devices/system/clocksource/clocksource0/current_clocksource

Observations:

- Opening both .../max77693-charger/current_now and .../battery/current_now files as text w/ QuickEdit shows the same default 999 while Galaxy Charging Current > Maximum was showing 300 mAh because of a bad USB connection on my S3 connected to a 5v 1A max output power adapter.

Both .../max77693-charger/current_max and .../power_supply/battery/current_max showed the same 300 mAh.

I think that Maximum (current_max) is the maximum a given cable/power adapter/connection to the phone's USB port combination can provide and not the actual current drawn by the phone. It changes for me if I disconnect/reconnect the cable to search for the best result or if I connect to a computer's USB port vs. a charger w/ 5v & 1A max output.

If you navigate in /sys/ using a file manger you will find several instances of current_max, current_now & current_avg but they are symbolic links (symlinks) I think. For example in /sys/class/power_supply/usb/device/power_supply/battery/current_max and showing the same data as above.

Searching the web for max77693-charger shows that it's related to the S3 I9300 power IC charging chip. And s5p-tmu is related to the CPU thermal sensor & the kernel which is this one as stock in Lineage for S3 i9300 14.1: https://github.com/LineageOS/android_kernel_samsung_smdk4412/

I attached a screenshot of Galaxy Charging Current's log & you can see that when I used the phone to do some stuff while charging it the cable connection wiggled and the Maximum current went from 1000 mAh to 500, 400 & 300. When the battery reached 100% I think the current was reduced to a trickle as shown by 0 in the Reference column (current_now).

If I keep the phone connected while not using it with the battery @ 100% it will go back to 999 for a short while then drop back to 0 as shown in the second screenshot & maybe you could confirm that with your USB multimeter?

It's far from being as accurate as your observations using a USB multimeter & described in the post you made & linked below but it's good enough to get an idea of what is going on during a charging session.

For those who did not see this link before: check S3 Battery Charging Current Monitoring post for explanations about why I am using Galaxy Charging Current to monitor the S3 while charging and especially the app's developer quote in it to whom I will write about the real battery temperature data file for S3 LOS 14.1 of which we posted about in the previous pages.

BTW does your USB multimeter (screenshot) can record a log? What is the model? Price? Could you post a photo while connected to the S3? I am jealous because I ordered a cheap one on Fleabay a couple of months ago but it got lost between China & Costa Rica. :crying:

Photo from the article The portable LED USB multimeter

Could you reply to this question I asked in a previous post: [MENTION=7746932]Robert-R[/MENTION] with your battery under 90% and using your USB current meter while charging the phone turned off vs. with the phone turned on is the voltage & ampere the same?

From what I've read it would draw less current with the phone turned on but it could different for the S3.

Lol you are a little bit late to the party ;) as if you read the last 2-3 pages (which is a good practice before posting in a thread IMO ;)) you will see like 8 posts about Boeffla-Config V2 w/ screenshots of it from 4 users including in my post here showing that is not compatible w/ stock Lineage w/ stock kernel: Why Not Run Boeffla-Config V2 on stock Official Lineage 14.1 for S3 i9300?

Now the question of [MENTION=7746932]Robert-R[/MENTION] above is about an app reporting the real charging current the S3 phone is receiving in mAh or mA. Check his post here where he explains that he used a USB in-line current meter (A.K.A. USB Multimeter) & noticed the current going down to 20 mA when the battery level gets near 100%:

Even if you set in Boeffla-Config V2 "Usb Charge to 1100mah" like you said that does not mean that the actual cable/power adapter/connection to the phone's USB port combination can physically provide it. The best way to check what is really happening would be to use a USB in-line current meter.

So if you answer his question: is there a place in Boeffla-Config V2 where it reports actual charging current & can you see it getting to near 20 mA when the battery is fully charged @ 100%? Please include firmware name + version & custom kernel you are using.

Maybe you could use Galaxy Charging Current to see what it reports and compare to the data shown in Boeffla-Config V2?

***

S3 Bad USB Port

Yep, my local cellular repair guy told me that the most frequent repair he made on S3's beside cracked screen is replacing the USB charging port. When I asked him how much it would cost to replace mine he said he did not want to do it anymore because the proper welding of it is difficult & not fun.

[MENTION=6643606]ArdaCsknn[/MENTION] posted here that he replaced his S3 USB charging port 5 times! :eek:

Video with really good magnification of the welding process:

[YOUTUBE]Gj_o6-oi3HU[/YOUTUBE]

***