Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I'm using my Samsung Galaxy S2 for development so I regularly plug it while it's not fully charged, and my phone starts charging over USB. I think this (charging while in use) can affect battery life (is that correct)? Is there any way to avoid charging while the phone is on and connected via USB?

share|improve this question
2  
Does the phone function when plugged in but the battery removed? –  Al E. Nov 25 '11 at 13:54
    
That's quite a hack, I don't think it does since it doesn't boot when battery is fully empty. –  AsTeR Nov 28 '11 at 18:01
1  
This would also be useful you want to tether your phone to your computer with the least amount of power draw on your phone's battery. –  chobok Apr 23 '12 at 8:37

4 Answers 4

The outer pins of a standard USB connector are used for power. You could try removing them from your cable, leaving only the inner data pins.

For more info on the pins, see http://pinouts.ru/Slots/USB_pinout.shtml. For more info on battery life, see Does constant charging harm my Android cellphone?

share|improve this answer
4  
This is really geek, I won't risk to ruin my usb connectors, but this is cool ! –  AsTeR Jan 13 '12 at 23:12
    
+1 Quirky, but nice! –  Power-Inside May 16 '12 at 7:00
    
You can try this, but if I'm not mistaken the power uptake is involved in the signalling that a device is present. Therefore, if you cut the power lines, the device may not be recognized! –  Michael Kohne May 16 '12 at 17:18
    
Has anyone tried this? Does it detect device after cutting the power lines? –  iSid Sep 9 '12 at 18:28
    
I cut the red power wire on a usb cable as an experiment to see if i could send data from a device without powering it. The result was as suggested above, the pc would not recognise the device. This was not an android device, but a garmin gpsmap 62s. I want to send satellite info from the garmin to other mapping software without powering the garmin, I am as frustrated as you guys. –  user33307 May 3 '13 at 2:16

I have an Android 4.0.3 phone without root access so can't test any of this but let me point you to /sys/class/power_supply/battery/ which gives some info/control over charging issues. In particular there is charging_enabled which gives the current state (0 not charging, 1 charging) and may be writable on some phones?

$ adb shell
$ cat /sys/class/power_supply/battery/charging_enabled
1

There is also a file charger_control which sounds promising and is writable by root but I've found no documentation on it.

Someone has requested this feature as an enhancement on the google developer forum but so far without response: http://code.google.com/p/android/issues/detail?id=30612

share|improve this answer
    
user1059432, yes. we can change value in /sys/class/power_supply/battery/charger_control to 0. so we have connecting via usb without charging. –  xoxol_89 Jul 26 '13 at 11:01
    
@xoxol_89 That is extremely dependent on what device and type of battery driver, not all of them work! Look at my project on github it only works specifically for the Zte Blade. –  t0mm13b Jul 26 '13 at 12:36
    
shell@pisces:/sys/class/power_supply $ ls ls ac max170xx_battery usb seems I can't do anything with my battery max170xx_battery –  Gohan Nov 10 at 13:02

You can find an interesting article about phone batteries at http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries.

Basically, the more heat, the less lifetime your battery will have. My suggestion would be to charge it while the phone is shut down, that way there is no drain or load on the battery other than charging.

share|improve this answer
    
This does not answer OP's question (see the title) at all. –  Power-Inside May 21 '12 at 10:27
    
Actually, he's also asking if it is correct that the battery life can be affected by using it while charging, which increases the heat of the phone so reduces battery life. The article I posted talks about the relation between temperature and battery life. –  Weboide May 29 '12 at 15:48
    
Oh, my bad. I didn't notice that. :) Well it would have been more apt to state that what you're posting is just "partial answer" etc. –  Power-Inside May 29 '12 at 16:03

This is very dependent on the battery driver found in the kernel for said device.

Unlike Galaxy S 2, that uses the TI battery driver which does not have that capability to be able to write out the value to the /sys/module/msm_battery/parameters/usb_chg_enable file.

For the MSM7x27 line of chipsets, Qualcomm to you and me, such as MSM7227 or MSM7627, for example, Europa (Galaxy 5), Zte Blade, as they use the generic MSM battery driver, which was rather easy to work with.

I have the open sourced project hosted on Github that does this exactly that, by selectively activating the charge or using it as ordinary usb without charging, it does require root though.

share|improve this answer

protected by Community Oct 1 '13 at 8:09

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.