Battery – How can I solve a charging problem in Moto G5 Plus?

A Moto G5 Plus device (Android 8.1.0) was charging and running 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 that I always use, which is the one that comes with the phone. I also tried different chargers and cables, but there was no difference in the symptoms.

Settings > Drums informs that the phone is charging, but the reported upload percentage does not increase at all. So if I connect it at night with 42%, it says 42% in the morning.

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

Theory of the cause: no slow decline

Due to the abruptness and severity of the difference between the previous and current observations, the likelihood of this being attributable to simple battery wear 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 that fails suddenly is less likely than the consequences of a software update.

First action attempted: clear cache

I read that deleting the cache could help, so I tried to do the following:

  1. press Power Y Download volume and hold a long time until you see that the screen has a "strange menu"
  2. press and release Download volume until you see Recovery mode, then press Power. You will see an Android on its back with a triangle / exclamation mark.
  3. Hold the Power button and then press and release Turn up the volume then release all the buttons. You should see a list of actions.
  4. Use Download volume to scroll to erase cache partition, then press and release Power Activate.
  5. Use Download volume to scroll to restart system now, then press and release Power restart.

Result of the first action: No change

The symptoms seem to persist as before: while connected and while the phone is reporting that it is being charged, the reported percentage does not increase.

Diagnostics

As I am an Android developer, I have access to Logcat in Android Studio. I see this reported periodically in the records:

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 = Load, POWER_SUPPLY_CHARGE_COUNTER = 3038000 , POWER_SUPPLY_CAPACITY = 32, DEVPATH = / devices / soc / qpnp-smbcharger-17 / power_supply / battery}

This is with the USB cable that is connected to a computer, of course.

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

the POWER_SUPPLY_CURRENT_NOW The range of values ​​varies from 91xxx to 354xxx, but it is mostly around 112xxx. This variability probably has to do with the amount of activity that is being done on the phone and if the screen is on. This also seems normal.

the POWER_SUPPLY_TEMP the value started at 317 (when I started registering for the first time) at 275 (after one hour). I am not sure what this change means (-13%), in any case. Probably because the screen was previously turned on in the registry and most of it was turned off later in the registry.

The rest of the fields do not seem to change with time.

Second action attempted: lower temperature

Knowing that some phones have had problems getting too hot while they are charging, I thought that maybe it was an issue of aggressive security that was activated incorrectly. The phone was NOT warming up slightly when it was charging, but I thought I would put it in the freezer while it was charging. I put it in the freezer for one or two hours with the cable connected and the phone "on".

Result of the second action: improved, but not resolved

After charging the phone in the freezer, the phone showed a higher percentage of battery. However, the reported percentage was erratic. It jumped around the 90% range to the 30% range. The reported percentage changed when I connected it to the charger and removed it from the charger.

Third attempted action: plugged in while it is turned off

To reduce the number of active programs while charging, I turned off the phone and left it connected to the PC. Based on the reaction of the PC to the USB connection, I can say that there is still some kind of processing on the device, but I thought it could make a difference. The device reported 32% at the beginning. It indicated that the device was charging.

Result of the third action: the 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 performed while the device was "turned off".

Fourth action attempted: Safe mode

Although since loading with the device "turned off" did not help, I did not trust much in this action to improve things, but I wondered if debugging the USB Logcat would work and possibly show some diagnostics.

  1. press and hold Power until the on-screen menu appears Off.
  2. Touch and hold Off until Restart to safe mode shows on screen.
  3. I touched IN AGREEMENT (the device starts to restart).

Fourth result of the action: the same symptoms

When leaving the device, while in safe mode, connected to the PC for an hour, it remained at 32%. The Android Studio Logcat provided this a possible clue There is no published service for: batterystats:

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

Seeing battery status, above, it led me to execute the following command:

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

That generated a file with more than 46,000 lines. Apparently there is a way to analyze that data, but I have not discovered it (yet?). More details are on this page on the Android Developer site.

QUESTION:

Is there any action or set of actions that I can take for the device to resume normal charging behavior?