(Temp. fix:root reqd.) High CPU usage and battery drain due to Google Play Services.

Search This thread

ruruoli

Member
May 4, 2022
7
4
After an irrecoverable bootloop( probably due to LSPosed plus the necessity to freeze the Magisk Manager app to get a few banking apps working) I finally decided to move to an A12 and as expected this issue didn't occur.
If your rom is new enough (may/june patch) there will be no system update for you, wait a month or two (maybe three) and it will start to occur.
 

livingbeing

Member
Jun 16, 2019
13
2
hi, did you find any solution to solve this without root?
when I check my log file from adb, I am quite sure that the problem will occur once a day at every "SystemUpdate" service from play store,
without root, i can only kill the play service at that time from developer settings
 

amn1987

Senior Member
hi, did you find any solution to solve this without root?
when I check my log file from adb, I am quite sure that the problem will occur once a day at every "SystemUpdate" service from play store,
without root, i can only kill the play service at that time from developer settings
Try the command in ADB. Otherwise the real fix is to switch to an upto date ROM.
 

amn1987

Senior Member
can confirm that. But I took another approach and as root, killed the installd process. log SPAM and high CPU usage are gone and no other strange side effects so far.
Device: oneplus3, android 11 msm-xtended custom ROM

What's the current status?
 

mmortal03

Senior Member
Apr 15, 2014
346
57
No idea. In my case A11 builds are EOL. I haven't come across anyone running A12 with this issue.
I believe it's still an issue on some A12.1 builds (see below). Also, someone in the Telegram chat told me that disabling com.google.android.gms/.chimera.GmsIntentOperationService broke more than just Google Keep -- it broke sync in various ways. For those of us without good A12 builds available, such as Moto G5 Plus, this is really frustrating.

 

amn1987

Senior Member
I believe it's still an issue on some A12.1 builds (see below). Also, someone in the Telegram chat told me that disabling com.google.android.gms/.chimera.GmsIntentOperationService broke more than just Google Keep -- it broke sync in various ways. For those of us without good A12 builds available, such as Moto G5 Plus, this is really frustrating.

In A11, Contacts sync had stopped working and some reminders from Calendar were missing most of the time. Probably due to this issue. I had read somewhere of a Magisk module to disable Google Play System Update but couldn't find it anywhere. In my case after updating to A12 fortunately it's not an issue.
 

mmortal03

Senior Member
Apr 15, 2014
346
57
Maybe microG is worth a shot if this issue persists in case of upto date builds as well. I suspect this issue could be related to spoofing devices as Pixels for the unlimited Google Photos backup hack.
That's a good idea. I just did a bit of searching and it didn't bring up much as far as recent potter support for microG, though, and I'm really not interested in trying to compile my own right now. What's frustrating is that I have no need for the unlimited Google Photos hack!

It was just suggested to me that, if a backport can be made from a fix in 12.1, that we look at commits in PixelPropsUtil (frameworks/base/core/java/com/android/internal/util/custom/PixelPropsUtils.java)

 
  • Like
Reactions: amn1987

amn1987

Senior Member
That's a good idea. I just did a bit of searching and it didn't bring up much as far as recent potter support for microG, though, and I'm really not interested in trying to compile my own right now. What's frustrating is that I have no need for the unlimited Google Photos hack!

It was just suggested to me that, if a backport can be made from a fix in 12.1, that we look at commits in PixelPropsUtil (frameworks/base/core/java/com/android/internal/util/custom/PixelPropsUtils.java)

MicroG isn't device dependent AFAIK. Just flash the module or the zip as the case might be.
It will be good to have a proper fix for this frustrating issue as at some point ROM development will stop for most devices.
 

mmortal03

Senior Member
Apr 15, 2014
346
57
MicroG isn't device dependent AFAIK. Just flash the module or the zip as the case might be.
It will be good to have a proper fix for this frustrating issue as at some point ROM development will stop for most devices.
I haven't installed MicroG before, but I understand the basic concept, and I've been reading up on it since you mentioned it. I read that it needs signature spoofing support in the OS, which CrDroid supposedly has, but, in this particular case, if my purpose is simply to get around a bug in Google Play services, then the goal would be to *not* go down the rabbit hole of full-on MicroG, right? I could be misunderstanding it, so correct me if I'm wrong, but I don't believe there's some way to just swap out the gapps version of com.google.android.gms with the MicroG version of it and keep everything else the same (i.e. the regular Play Store and the common Google apps included with opengapps or whatever)?
 

amn1987

Senior Member
I haven't installed MicroG before, but I understand the basic concept, and I've been reading up on it since you mentioned it. I read that it needs signature spoofing support in the OS, which CrDroid supposedly has, but, in this particular case, if my purpose is simply to get around a bug in Google Play services, then the goal would be to *not* go down the rabbit hole of full-on MicroG, right? I could be misunderstanding it, so correct me if I'm wrong, but I don't believe there's some way to just swap out the gapps version of com.google.android.gms with the MicroG version of it and keep everything else the same (i.e. the regular Play Store and the common Google apps included with opengapps or whatever)?
No it doesn't work that way. I couldn't stick to microG for very long even in a years old entry-level device where it's super low resource usage would have been very handy due to app incompatibilities. Some apps that worked fine without Play Services would just crash with microG. As a stopgap solution it should be OK while waiting for a proper fix.
 

mmortal03

Senior Member
Apr 15, 2014
346
57
su pm disable com.google.android.gms/.chimera.GmsIntentOperationService

Are there any other such commands that might have an effect here? I found a very old thread referring to the following, but none of these have an effect on this issue:
Code:
adb shell su -c pm disable com.google.android.gms/.update.SystemUpdateActivity
adb shell su -c pm disable com.google.android.gms/.update.SystemUpdateService
adb shell su -c pm disable com.google.android.gms/.update.SystemUpdateService$ActiveReceiver
adb shell su -c pm disable com.google.android.gms/.update.SystemUpdateService$Receiver
adb shell su -c pm disable com.google.android.gms/.update.SystemUpdateService$SecretCodeReceiver

Trying to think outside the box, the following guy blocked OTA updates by write-protecting the ota_package folder on boot! That doesn't seem to apply here, but I wonder if something along those lines could work.

 

rocker00

Senior Member
Jun 23, 2012
494
492
All A12L ROMs that I've tried are affected by this issue, derpfest, ricedroid, sparkos and cherishos, so it doesn't really matter about the android version or the ROM is outdated or so, as i mentioned before, seems like that spoofing has to be modified or even completely removed from the framework, I've tried to mess with build.prop by modifying many things but nothing helped, for example, why Miui stock ROMs are not affected? simply, no spoofing!

I hope that the developers pay more attention to this cuz this is really annoying and the solution brings more issues!
 
Last edited:

mmortal03

Senior Member
Apr 15, 2014
346
57
@rocker00 , even if that's true, maybe on the affected ROMs the devs can find a way to spoof things even further, lol, to get around this particular issue -- rather than remove all the spoofing. :) I don't care which way they do it, as long as we can find a fix.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Google Play Services is causing high CPU usage and massive battery drain( >25%/h) continuously. Battery temps. cross 40°C in no time. The issue persisted upon rebooting the device. Had to finally freeze it.
    In FKM, I/O section shows constant 20-25MB/s writes. "com.google.android.gms" and "com.google.android.gms.persistent" are the two processes causing consistently high CPU usage. There's also "jbd2/sda1-8".
    After booting into Safe Mode the issue didn't persist. But still no idea what exactly is causing this issue.
    Poco F1 running crDroid 7.14. This issue cropped up the first time ever in build 7.7. Only resolved after dirty flashing 7.13. NikGApps Core version.

    Temp. fix : type the following in any Terminal emulator of your choice with the recommendation being Termux
    su
    pm disable com.google.android.gms/.chimera.GmsIntentOperationService

    If not rooted maybe try via ADB.

    Issue arises due to spoofing Pixels for the unlimited Google Photos backup hack. Real solution is either removal of the PixelPropsUtils framework or it's suitable modification. It's all in the hands of the ROM devs.
    7
    If the problem is "system update" of Google play services, perhaps we need to do a clean flash of a Rom with an updated Gapps package.
    Try this command:
    su
    pm disable com.google.android.gms/.chimera.GmsIntentOperationService
    After using it immediately the logcat spam stopped. It's been a few hours and it hasn't recurred. Got this from another user also suffering from this issue and he confirmed that it's been over a day since the issue last occurred.
    5
    The solution from this thread also helped me with com.google.android.gms eating CPU time on my RealMe 7 Pro with AospExtended ROM.
    The logs look a bit different, thus I'm leaving this here so that others may find it.

    This solved it: "pm disable com.google.android.gms/.chimera.GmsIntentOperationService"
    Lots of other "pm disable" commands for related issues did not change anything.

    I had already added the ota-update adblock entries mentioned earlier in this thread to solve a previous issue with gms battery consumption.

    Using "Kernel Toolkit" to set the CPU scheduler to Conservative and changing the frequency up/down thresholds to 35/90 already mitigated the battery drain a bit, but it was still draining way too fast while in use.

    "top -H" revealed that the .INSTALL_UPDATE thread of com.google.android.gms was using a full core.

    "adb logcat" gave some more info on what was happening. There was the InstallationIntentOperation along with a CertPathValidatorException in an endless loop.
    08-13 10:22:34.072 2604 2666 I SystemUpdate: [Control,InstallationControl] Installation progress updated to (0x116, -1.000).
    08-13 10:22:34.190 2604 2666 I SystemUpdate: [Control,InstallationControl] Resume on reboot feature enabled: true.
    08-13 10:22:34.377 2604 2666 I SystemUpdate: [Execution,ExecutionManager] Action pre-download-validate executed for 1.68 seconds.
    08-13 10:22:34.401 2604 2666 I SystemUpdate: [Execution,ExecutionManager] Action exponential-backoff-delay-execution executed for 0.01 seconds.
    08-13 10:22:34.442 2604 2666 I SystemUpdate: [Control,InstallationControl] Installation progress updated to (0x017, -1.000).
    08-13 10:22:34.617 2604 2666 I SystemUpdate: [Control,InstallationControl] Resume on reboot feature enabled: true.
    08-13 10:22:35.012 2604 2666 E SystemUpdate: [Execution,PreDownloadValidateAction] Failed to download.
    08-13 10:22:35.012 2604 2666 E SystemUpdate: bmhu: Unknown download exception.
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at bmia.f:)[email protected][email protected] (150400-461192076):19)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at bmia.e:)[email protected][email protected] (150400-461192076):3)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at bmfv.a:)[email protected][email protected] (150400-461192076):42)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.google.android.gms.update.execution.InstallationIntentOperation.onHandleIntent:)[email protected][email protected] (150400-461192076):14)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.google.android.chimera.IntentOperation.onHandleIntent:)[email protected][email protected] (150400-461192076):2)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at uzc.onHandleIntent:)[email protected][email protected] (150400-461192076):4)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at ffs.run:)[email protected][email protected] (150400-461192076):3)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at ffr.run:)[email protected][email protected] (150400-461192076):11)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at cfnu.run:)[email protected][email protected] (150400-461192076):2)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at java.lang.Thread.run(Thread.java:923)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Execution exception
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at java.util.concurrent.FutureTask.report(FutureTask.java:123)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at java.util.concurrent.FutureTask.get(FutureTask.java:207)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at bmia.f:)[email protected][email protected] (150400-461192076):16)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: ... 11 more
    08-13 10:22:35.012 2604 2666 E SystemUpdate: Caused by: java.lang.RuntimeException: Execution exception
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at bmhy.run:)[email protected][email protected] (150400-461192076):5)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at xoc.c:)[email protected][email protected] (150400-461192076):6)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at xoc.run:)[email protected][email protected] (150400-461192076):7)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at xth.run:)[email protected][email protected] (150400-461192076):0)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: ... 1 more
    08-13 10:22:35.012 2604 2666 E SystemUpdate: Caused by: bmhu: Unable to get response code.
    08-13 10:22:35.012 2604 2666 E SystemUpdate: ... 9 more
    08-13 10:22:35.012 2604 2666 E SystemUpdate: Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake:)[email protected][email protected] (150400-461192076):25)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at bffn.b:)[email protected][email protected] (150400-461192076):2)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at bffn.createSocket:)[email protected][email protected] (150400-461192076):9)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:185)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:153)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:542)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:106)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:30)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: at bmhy.run:)[email protected][email protected] (150400-461192076):2)
    08-13 10:22:35.012 2604 2666 E SystemUpdate: ... 8 more

    "dumpsys activity broadcasts" also showed a lot of gms update spam:

    #162: act=com.google.android.finsky.downloadservice.intent.action.WAKING_STATE_UPDATE_BROADCAST_ACTION flg=0x10000010 pkg=com.android.vending (has extras)
    0 dispatch +17ms finish
    enq=2022-08-13 10:12:02.195 disp=2022-08-13 10:12:02.195 fin=2022-08-13 10:12:02.212
    extras: Bundle[{STRIPPED=1}]
    #163: act=com.google.android.finsky.downloadservice.intent.action.STATE_UPDATE_BROADCAST_ACTION flg=0x10000010 pkg=com.android.vending (has extras)
    0 dispatch 0 finish
    enq=2022-08-13 10:12:02.188 disp=2022-08-13 10:12:02.188 fin=2022-08-13 10:12:02.188
    extras: Bundle[{STRIPPED=1}]
    #164: act=com.google.android.finsky.downloadservice.intent.action.WAKING_STATE_UPDATE_BROADCAST_ACTION flg=0x10000010 pkg=com.android.vending (has extras)
    0 dispatch +22ms finish
    enq=2022-08-13 10:12:02.117 disp=2022-08-13 10:12:02.117 fin=2022-08-13 10:12:02.139
    extras: Bundle[{STRIPPED=1}]
    #165: act=com.google.android.finsky.downloadservice.intent.action.STATE_UPDATE_BROADCAST_ACTION flg=0x10000010 pkg=com.android.vending (has extras)
    0 dispatch 0 finish
    enq=2022-08-13 10:12:02.125 disp=2022-08-13 10:12:02.125 fin=2022-08-13 10:12:02.125
    extras: Bundle[{STRIPPED=1}]


    Historical broadcasts [background]:
    Historical Broadcast background #0:
    BroadcastRecord{5fd6fba u0 com.google.android.gms.update.STATUS_CHANGED} to user 0
    Intent { act=com.google.android.gms.update.STATUS_CHANGED flg=0x10 pkg=com.google.android.gms (has extras) }
    extras: Bundle[{STRIPPED=1}]
    caller=com.google.android.gms 2604:com.google.android.gms/u0a206 pid=2604 uid=10206
    enqueueClockTime=2022-08-13 11:51:32.283 dispatchClockTime=2022-08-13 11:51:32.283
    dispatchTime=-790ms (0 since enq) finishTime=-761ms (+29ms since disp)
    resultTo=null resultCode=0 resultData=null
    nextReceiver=1 receiver=null
    Deliver +21ms #0: (manifest)
    priority=0 preferredOrder=0 match=0x108000 specificIndex=-1 isDefault=false
    ActivityInfo:
    name=com.google.android.gms.chimera.GmsIntentOperationService$PersistentInternalReceiver
    packageName=com.google.android.gms
    processName=com.google.android.gms.persistent
    enabled=true exported=false directBootAware=true
    resizeMode=RESIZE_MODE_RESIZEABLE
    Historical Broadcast background #1:
    BroadcastRecord{8cf6e6b u0 com.google.android.gms.update.STATUS_CHANGED} to user 0
    Intent { act=com.google.android.gms.update.STATUS_CHANGED flg=0x10 pkg=com.google.android.gms (has extras) }
    extras: Bundle[{STRIPPED=1}]
    caller=com.google.android.gms 2604:com.google.android.gms/u0a206 pid=2604 uid=10206
    enqueueClockTime=2022-08-13 11:51:31.722 dispatchClockTime=2022-08-13 11:51:31.723
    dispatchTime=-1s353ms (+1ms since enq) finishTime=-1s336ms (+17ms since disp)
    resultTo=null resultCode=0 resultData=null
    nextReceiver=1 receiver=null
    Deliver +16ms #0: (manifest)
    priority=0 preferredOrder=0 match=0x108000 specificIndex=-1 isDefault=false
    ActivityInfo:
    name=com.google.android.gms.chimera.GmsIntentOperationService$PersistentInternalReceiver
    packageName=com.google.android.gms
    processName=com.google.android.gms.persistent
    enabled=true exported=false directBootAware=true
    resizeMode=RESIZE_MODE_RESIZEABLE


    #0: act=com.google.android.gms.update.STATUS_CHANGED flg=0x10 pkg=com.google.android.gms (has extras)
    0 dispatch +29ms finish
    enq=2022-08-13 11:51:32.283 disp=2022-08-13 11:51:32.283 fin=2022-08-13 11:51:32.312
    extras: Bundle[{STRIPPED=1}]
    #1: act=com.google.android.gms.update.STATUS_CHANGED flg=0x10 pkg=com.google.android.gms (has extras)
    +1ms dispatch +17ms finish
    enq=2022-08-13 11:51:31.722 disp=2022-08-13 11:51:31.723 fin=2022-08-13 11:51:31.740
    extras: Bundle[{STRIPPED=1}]

    This finally revaled com.google.android.gms.chimera.GmsIntentOperationService$PersistentInternalReceiver
    I wonder if there's any way one would've arrived that this fix from just the logcat above.
    2
    So, my question is... has anyone figured out WHAT EXACTLY has been screwed up by disabling GmsIntentOperationService, because it's rather important, as I understand it? No problem not having notifications on Google Keep, since I am not using it. Are push messages still ok, for say... Whatsapp, Telegram? What did disablint that service screw up?

    Any other possible fix found? It's unbelievable that most devs don't acknowledge the issue on custom roms and fix it...

    It's definitely rather important, and I'd ideally like to know, too. But as far as any other possible fix, I can report to you that Moto G5 Plus users like me just received an updated CrDroid ROM yesterday, and whatever the dev did -- whether it was building in the hosts file blocking, or something with incorporating the latest Android bug fixes -- but it fixed our constant barrage of SystemUpdate logcat messages. I believe, as per the above posts by rocker00, that if a dev sought to remove some of the Pixel spoofing code it could also deal with it. Ideally, I'd love to know why or how the spoofing code specifically causes it.
    2
    `pm disable com.google.android.gms/.chimera.GmsIntentOperationService` works but this command breaks google keep notifications :(