By Dale


2019-05-15 21:32:22 8 Comments

A Moto G5 Plus device (Android 8.1.0) was charging and performing normally with a healthy battery response.

One morning, instead of being at 100% (expected after charging all night), the phone reported 61% (unexpected after charging all night). This was with the same charger I always use, which is the one that came with the phone. I also tried different chargers and cables, but there was no difference in symptoms.

Settings > Battery reports that the phone is charging, but the reported charging percent does not increase at all. So if I plug it in at night with 42%, it says 42% again in the morning.

The device is discharging at a normal rate. In other words, given a certain level of charge, and not plugged-in, the battery lasts a normal/long/expected amount of time (many hours with just a few battery percentage points down).

Theory of Cause: Not Slow Decline

Because of the suddenness and severity of the difference between the former and current observations, the likelihood of this being attributable to simple wear on the battery seems unlikely. That leaves a software problem as a more likely cause. A sudden hardware failure could also be the cause, but it seems less likely that a sensor suddenly failing is less likely than fallout from a software update.

1. Clear Cache

Activity

I read that clearing cache could help, so I tried that by doing the following:

  1. Press Power and Volume Down and hold a long time until you see the screen have a "weird menu" thing
  2. Press and release Volume Down until you see Recovery Mode, then press Power. You'll see an Android on it's back with a triangle/exclamation mark.
  3. Hold the Power button and then press and release Volume Up then release all buttons. You should see a list of actions.
  4. Use Volume Down to scroll to wipe cache partition, then press and release Power to activate.
  5. Use Volume Down to scroll to reboot system now, then press and release Power to reboot.

Result: No Change

Symptoms seem to persist as before: while plugged in and while the phone reports that it is charging, the percent reported does not increase.

Diagnostics

Because I'm an Android developer, I have access to Logcat in Android Studio. I see this reported periodically in the logs:

POWER_SUPPLY_VOLTAGE_NOW=4394353, POWER_SUPPLY_CHARGE_RATE=Normal, POWER_SUPPLY_HEALTH=Good, POWER_SUPPLY_CURRENT_NOW=124510, POWER_SUPPLY_PRESENT=1, SUBSYSTEM=power_supply, POWER_SUPPLY_TEMP=302, SEQNUM=3965, ACTION=change, POWER_SUPPLY_NAME=battery, POWER_SUPPLY_STATUS=Charging, POWER_SUPPLY_CHARGE_COUNTER=3038000, POWER_SUPPLY_CAPACITY=32, DEVPATH=/devices/soc/qpnp-smbcharger-17/power_supply/battery}

This is with the USB cable is plugged into a computer, of course.

The POWER_SUPPLY_VOLTAGE_NOW value ranges from 4394xxx up to 4397xxx, indicating the PC is offering a slightly different voltage over time or that the phone reads the voltage slightly different (0.07%), which seems normal.

The POWER_SUPPLY_CURRENT_NOW value ranges from 91xxx to 354xxx, but mostly is around 112xxx. This variability probably has to do with how much activity is going on in the phone and whether the screen is on. This also seems normal.

The POWER_SUPPLY_TEMP value started at 317 (when I first started logging) to 275 (after an hour). I'm not sure what this change (-13%) means, if anything. Probably because the screen was on earlier in the log and mostly off later in the log.

The rest of the fields seem not to be changing over time.

2. Lower Temperature

Activity

Knowing that some phones have had issues with getting too hot while charging, I thought that maybe this was an aggressive safety thing that was being incorrectly triggered. The phone was NOT getting even slightly warm when charging, but I thought I'd put it in the freezer while being charged. I put it in the freezer for an hour or two with the cord attached, and the phone "on".

Result: Improved, But Not Resolved

After charging the phone in the freezer, the phone did show a higher battery percent. The reported percent was erratic, though. It jumped around from the 90% range to the 30% range. The reported percentage changed as I plugged it into the charger and removed it from the charger.

3. Plugged in While Off

Activity

To reduce the number of programs active during charging, I powered the phone off and left it connected to the PC. Based on the PC's reaction to the USB connection, I can tell that there's still some kind of processing going on in the device, but I thought it might make a difference. The device reported 32% at the start. It indicated that the device was charging.

Result: Same Symptoms

After leaving the device connected for an hour, it still reported 32%, so the main symptom of this question persisted, even if the charging activity was undertaken while the device was "powered off".

4. Safe Mode

Activity

Although since charging with the device "off" didn't help, I didn't have much confidence in this action improving things, but wondered if the USB Logcat debugging would work and possibly show some diagnostics.

  1. Press and hold Power until on-screen menu shows Power off.
  2. Touch and hold Power off until Reboot to safe mode shows on screen.
  3. Touch OK (device begins restarting).

Result: Same Symptoms

Leaving the device, while in safe mode, connected to the PC for an hour, it remained at 32%. The Android Studio Logcat did provide this a possible clue No service published for: batterystats:

2019-05-15 19:23:52.186 2682-2682/? E/AndroidRuntime: Error reporting WTF
    java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.app.IActivityManager.handleApplicationWtf(android.os.IBinder, java.lang.String, boolean, android.app.ApplicationErrorReport$ParcelableCrashInfo)' on a null object reference
        at com.android.internal.os.RuntimeInit.wtf(RuntimeInit.java:332)
        at android.util.Log$1.onTerribleFailure(Log.java:117)
        at android.util.Log.wtf(Log.java:481)
        at android.util.Log.wtf(Log.java:471)
        at android.app.SystemServiceRegistry.onServiceNotFound(SystemServiceRegistry.java:1085)
        at android.app.SystemServiceRegistry$StaticServiceFetcher.getService(SystemServiceRegistry.java:1037)
        at android.app.SystemServiceRegistry.getSystemService(SystemServiceRegistry.java:962)
        at android.app.ContextImpl.getSystemService(ContextImpl.java:1682)
        at com.android.internal.os.PowerProfile.getBatteryCapacity(PowerProfile.java:463)
        at com.android.internal.os.BatteryStatsImpl.setPowerProfileLocked(BatteryStatsImpl.java:8983)
        at com.android.server.am.BatteryStatsService.<init>(BatteryStatsService.java:175)
        at com.android.server.am.ActivityManagerService.<init>(ActivityManagerService.java:2954)
        at com.android.server.am.ActivityManagerService$Lifecycle.<init>(ActivityManagerService.java:2853)
        at java.lang.reflect.Constructor.newInstance0(Native Method)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
        at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:96)
        at com.android.server.SystemServer.startBootstrapServices(SystemServer.java:539)
        at com.android.server.SystemServer.run(SystemServer.java:407)
        at com.android.server.SystemServer.main(SystemServer.java:285)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:791)
2019-05-15 19:23:52.187 2682-2682/? E/AndroidRuntime: Original WTF:
    android.util.Log$TerribleFailure: No service published for: batterystats
        at android.util.Log.wtf(Log.java:476)
        at android.util.Log.wtf(Log.java:471)
        at android.app.SystemServiceRegistry.onServiceNotFound(SystemServiceRegistry.java:1085)
        at android.app.SystemServiceRegistry$StaticServiceFetcher.getService(SystemServiceRegistry.java:1037)
        at android.app.SystemServiceRegistry.getSystemService(SystemServiceRegistry.java:962)
        at android.app.ContextImpl.getSystemService(ContextImpl.java:1682)
        at com.android.internal.os.PowerProfile.getBatteryCapacity(PowerProfile.java:463)
        at com.android.internal.os.BatteryStatsImpl.setPowerProfileLocked(BatteryStatsImpl.java:8983)
        at com.android.server.am.BatteryStatsService.<init>(BatteryStatsService.java:175)
        at com.android.server.am.ActivityManagerService.<init>(ActivityManagerService.java:2954)
        at com.android.server.am.ActivityManagerService$Lifecycle.<init>(ActivityManagerService.java:2853)
        at java.lang.reflect.Constructor.newInstance0(Native Method)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
        at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:96)
        at com.android.server.SystemServer.startBootstrapServices(SystemServer.java:539)
        at com.android.server.SystemServer.run(SystemServer.java:407)
        at com.android.server.SystemServer.main(SystemServer.java:285)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:791)
     Caused by: android.os.ServiceManager$ServiceNotFoundException: No service published for: batterystats
        at android.os.ServiceManager.getServiceOrThrow(ServiceManager.java:75)
        at android.app.SystemServiceRegistry$17.createService(SystemServiceRegistry.java:319)
        at android.app.SystemServiceRegistry$17.createService(SystemServiceRegistry.java:316)
        at android.app.SystemServiceRegistry$StaticServiceFetcher.getService(SystemServiceRegistry.java:1035)
        at android.app.SystemServiceRegistry.getSystemService(SystemServiceRegistry.java:962) 
        at android.app.ContextImpl.getSystemService(ContextImpl.java:1682) 
        at com.android.internal.os.PowerProfile.getBatteryCapacity(PowerProfile.java:463) 
        at com.android.internal.os.BatteryStatsImpl.setPowerProfileLocked(BatteryStatsImpl.java:8983) 
        at com.android.server.am.BatteryStatsService.<init>(BatteryStatsService.java:175) 
        at com.android.server.am.ActivityManagerService.<init>(ActivityManagerService.java:2954) 
        at com.android.server.am.ActivityManagerService$Lifecycle.<init>(ActivityManagerService.java:2853) 
        at java.lang.reflect.Constructor.newInstance0(Native Method) 
        at java.lang.reflect.Constructor.newInstance(Constructor.java:334) 
        at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:96) 
        at com.android.server.SystemServer.startBootstrapServices(SystemServer.java:539) 
        at com.android.server.SystemServer.run(SystemServer.java:407) 
        at com.android.server.SystemServer.main(SystemServer.java:285) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:791) 
2019-05-15 19:23:52.187 2682-2682/? D/BatteryStatsImpl: Reading daily items from /data/system/batterystats-daily.xml

Seeing batterystats, above, led me to run the following command:

adb shell dumpsys batterystats > c:\my\tmp\batterystats.txt

That generated a file with over 46,000 lines. There's apparently a way to analyze that data, but I haven't figured that out (yet?). More detail is on this page on the Android Developer site.

5. Overnight Freezer w/Device Off

Activity

The device was powered off, plugged in, showed as charging at 32%, then placed in the freezer. The next day, the device was placed in a sealed bag at room temperature and let to naturally warm up.

Result: Still No Charging

The device was started normally and showed 32% (same percent, no charge was reported). Repeatedly plugging/unplugging the PC USB did not cause the reported percentage to change. Repeatedly plugging/unplugging the 110 USB power adapter did not cause the reported percentage to change.

This was unexpected, since earlier it seemed that a reduced temperature caused charging to occur. This could have been because the phone was "off" or it could have been that the earlier low temperature charging was coincidence.

Below is the battery usage diagram for the last few days while this problem has been going on. You can see the erratic changes, indicating that the percentage is inaccurate. The span without data is when the phone was "off":

battery graph

6. Allow Discharge

Activity

Through all of these steps, the device was typically plugged in. The next activity I inadvertently tried (due to not being in a place where power was available), was to allow the phone to run without power connected.

Result: Erratic Charge Percentage

After NOT being connected to power, the charge percentage stayed at 32% for around 6 hours, then the next time I looked, the charge percentage was unexpectedly shown as 93%. So without a power connection, the phone significantly increased it's reporting of battery percentage as shown in the image below.

graph showing jump from 32% to 93% without being charged

Over the next 3 days, without significant charging, the battery proved to be very healthy. I plugged the device into my computer one time for a few minutes to interact with Android Studio and the percent dropped from 65% to 0% instantly. When I unplugged the device, it immediately shutdown. When I turned it on again, it showed 65% again (see spike in the graph, below).

three days of healthy battery decline with down spike

Discussion

Given that the device ran for 3 days without charging, one must conclude that the battery itself is healthy.

Given that the device runs for a very long time after being plugged in indicates that charging going on, the battery is picking up a charge, even though the reported percent does not increase.

Also, given that the battery is successfully picking up a charge indicates that it's not the cable, the adapter, lint in the micro USB plug, or anything like that.

So something about the ability of the device to reflect proper level of charge remaining is "broken".

QUESTION:

Is there an action or set of actions I can take to get the device to resume normal reflection of percent charge remaining?

0 comments

Related Questions

Sponsored Content

0 Answered Questions

7 Answered Questions

[SOLVED] Is power consumed from battery to run the phone when charging?

2 Answered Questions

[SOLVED] Cannot charge due to low battery temperature on Lenovo P780

  • 2014-04-27 17:55:26
  • siloy
  • 18876 View
  • 0 Score
  • 2 Answer
  • Tags:   battery charging

3 Answered Questions

[SOLVED] Xperia SP looks like it's charging, but it doesn't charge

2 Answered Questions

[SOLVED] Device Steadily Discharging While Plugged Into AC?

  • 2013-12-08 17:26:56
  • Keavon
  • 10049 View
  • 3 Score
  • 2 Answer
  • Tags:   battery charging

4 Answered Questions

[SOLVED] Battery meter went crazy and now stays at 0%

  • 2013-09-14 12:34:38
  • Nathan Osman
  • 13529 View
  • 5 Score
  • 4 Answer
  • Tags:   battery charging

0 Answered Questions

How to prevent S3 from turning on when charging

0 Answered Questions

Galaxy s2 is recognised by computer but doesn't charge

0 Answered Questions

unable to charge Google Nexus I9250

0 Answered Questions

Phone interrupted during first charge, battery damage?

  • 2013-02-01 08:18:28
  • Chris
  • 530 View
  • 1 Score
  • 0 Answer
  • Tags:   battery charging

Sponsored Content