Want faster charging/Device discharging while charging/not charging? Read within!
Warning, extremely long post, hopefully quite detailed. If you don't want to read all the technical stuff skip to the bottom for the solutions + a TlDr.
Hi all, I, for a very short period of time was suffering from the problem of my phone DISCHARGING while it was charging. This made no logical sense to me until I did some research, which I will detail below.
Firstly let's discuss USB power provisioning. Strictly speaking, the specifications say that any given USB port should provide a maximum of 500mA (or 0.5A) at 5 volts. *Don't shoot me electronics guys, I'm simplifying for ease of explanations sake*. Imagine that ampage as the actual force of the charger, how quickly it can ram power into your phone. Like the rate of flow on a pipe.
This was all fine and dandy when all USB was really used for was Keyboards, Mice, Memory, etc, low current draw devices. Something else I should mention here is that the Ampage that a port CAN provide is not the Ampage it DOES provide - the device draws a certain Ampage and if the USB controller agrees it outputs said Ampage.
Later, when USB was beginning to be used for more power hungry applications, ie External hard drives, these required more power than the port could (In theory) provide. However, most more modern motherboards/USB controllers were more than capable of supplying plenty more Ampage if it was requested. This was breaking the specification but not in any massively dangerous way so as such nothing bad happens.
USB Wall warts are extremely dumb devices generally, they output 5v and whatever Ampage the device requests with no interaction on the data pair of the USB Wire.
This is where we get to the actual issue people are experiencing here. The Nexus 4 is a standards compliant device in the respect that it seems to only draw 500mA from any USB port no matter what it's potential, unless it's an AC Wall wart. If you're experiencing problems with wakelocks (see XDA) and other things, this causes your phone to draw more than 500mA which means your phone actually discharges while it's charging! Terrible!
This is quite easy to get around, but again I'm going into detail so let's explain how the phone tells the difference beween a dumb wall wart and a USB controller. Easily! The USB controller obviously makes use of the data pins found within the USB cable, whereas a wallwart just shorts them out. The Nexus 4 can detect this short, and as such draw more power *While still in quotation marks staying in spec*.
The root problem is not with how the N4 is charging, it's with the wakelock you're experiencing which is causing the phone to draw so much power while the screen is off. While the screen is off and the phone is in Deepsleep (A CPU state where it uses very little power) - it should draw no more than 50mA leaving 450mA for charging the battery, but you guys are probably experiencing a wakelock of some sort.
The simple solution is to install this app: https://play.google.com/store/apps/d...ller.batrsaver
This forces the device into a Deep sleep when the screen goes off by killing applications and turning off all internal chipsets that have wakelock capability, most commonly networking on the Nexus 4. This will allow your phone to charge (slowly) off USB without an issue. Another common wakelock is when the device is picked up by your desktop as a media device. The USB controller inside the Nexus 4 forces a wakelock which keeps it from charging. Stupid design, I know.
* A more hackish solution is to install Francos kernel, buy his app, and tick the Fast charging option in the kernel settings dialog. This will force the phone to think that everything is an AC adaptor and will force the phone to draw as much current as it can from the USB port (which on most modern motherboards is fine, and results in extremely quick charging).
* An even simpler solution than all this is to just use a 'USB Charging cable' - this is simply a cable that does not have the Data pins, and as such does exactly the same as what enabling USB fast charge above does. http://www.ebay.co.uk/itm/Micro-USB-...item51a465d124
If you live near a Poundland store here in the UK they sell a 4 in one USB cable type thing which turns 1 USB port into Ipod sync connector, Nokia connector, MicroUSB and MiniUSB, and this doesn't have the data pins and as such is excellent.
One final point, an excellent app for monitoring whether your device is actually charging or not and how quickly is Current widget: https://play.google.com/store/apps/d...ntwidget&hl=en
This widget will tell you how much Ampage is going into or leaving your battery. If the battery icon is green, then it's discharging, if it's black/white then it's charging. The bigger the number, the faster the discharge/charge. This is an extremely easy way to test speed of chargers too.
Another solution, just use an AC Wall wart - they're cheap as hell and the one supplied with the Nexus 4 is an extremely fast charging one. Shame I've gone and lost mine.
Tl;Dr: - install https://play.google.com/store/apps/d...ntwidget&hl=en
and monitor, if the battery is green while charging it's discharging and you need a more powerful charger/to figure out what's causing your phone to use so much power.
DISCLAIMER: I am not an electronics engineer nor do I claim to be, I am simply a hobbyist and this is what I've found to be the case. Please correct me if I've made any mistakes, I want to learn.