• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[MOD] [ROM & Google Play Services] [v7.3.29] SystemUpdateService Wakelock Fix

Search This thread

Calkulin

Recognized Developer
Sep 3, 2008
1,647
9,109
Samsung Galaxy S21+
Since this issue seems to affecting a lot of people, I decided to post what I use to fix the issue. Basically what this mod does is remove the command that acquires the wakelock, so it never exist.

Note: If the app updates itself, the wakelock will be back(unless Google fixes it), so I will try to keep this up to date with the latest version until it's not needed anymore.

To install, flash the zip in recovery

Modded Google Play Services

xx0 versions are for all DPIs, so it covers xx2, xx4, xx6 & xx8 in 1 file

KitKat v7.3.29(030) - All DPI - armeabi-v7a - Older Android versions that don't have the system/priv-app folder, you can rename the priv-app folder in the zip to app
md5 - 8bfac34b48a5cd05773ac85c714927c2

Lollipop v7.3.29(430) - All DPI - armeabi-v7a
md5 - ddf795c287546d3545fab2a3140654ea

Lollipop v7.3.29(438) - 480 DPI - armeabi-v7a
md5 - 8627599d7dd12e5b850fc3b41f41f54a

Lollipop v7.3.29(440) - All DPI - arm64-v8a - Being worked on
md5 -

Modded Framework

This fixes the root cause of the issue, so the service will operate properly now. The modded Google Play Services versions are not needed with this
Be sure to enable the SystemUpdateService for Google Play Services & Google Services Framework if you use DisableService or similar app

YNG1TAS0YL

Instructions for Modifying Framework

Decompile framework-res.apk and modify values/array.xml

Before - If you don't see this code, then your ROM is not the cause of this wakelock
Code:
    <string-array name="config_disabledComponents">
        <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateActivity</item>
        <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateService</item>
        <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateService$Receiver</item>
        <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateActivity</item>
        <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateService</item>
        <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateService$Receiver</item>
        <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateService$ActiveReceiver</item>
    </string-array>
After
Code:
    <string-array name="config_disabledComponents">
        <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateActivity</item>
        <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateService$Receiver</item>
        <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateService$SecretCodeReceiver</item>
        <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateActivity</item>
        <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateService$Receiver</item>
        <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateService$ActiveReceiver</item>
        <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateService$SecretCodeReceiver</item>
    </string-array>
 
Last edited:

pk5720

Senior Member
Mar 1, 2013
166
47
Mumbai
Since this issue seems to affecting a lot of people, I decided to post what I use to fix the issue. If the app updates itself, the wake lock will be back(unless Google fixes it), so I will try to keep this up to date with the latest version until it's not needed anymore.

To install, flash the zip in recovery

Finally...thanks a lot..this is much needed..:thumbup:

Sent from my A0001 using xda app-developers app
 

nhshah7

Senior Member
Feb 14, 2009
2,069
568
Boston
Since this issue seems to affecting a lot of people, I decided to post what I use to fix the issue. If the app updates itself, the wake lock will be back(unless Google fixes it), so I will try to keep this up to date with the latest version until it's not needed anymore.

To install, flash the zip in recovery
Might be forced to give this a try since nothing else is working lol. What changes did you make?
 

Larsush

Senior Member
Feb 20, 2015
78
13
Since this issue seems to affecting a lot of people, I decided to post what I use to fix the issue. If the app updates itself, the wake lock will be back(unless Google fixes it), so I will try to keep this up to date with the latest version until it's not needed anymore.

To install, flash the zip in recovery

This is very nice. Would it be possible to elaborate what this actually does?

Same as the "DisableService" solution to prevent 'SystemUpdateService' ??

I'm just curious :)
 

CarlosMBM

Member
Apr 10, 2015
13
0
Seixal
Instant results?

Hey man.

For starters thanks a lot for your help! I was wondering if the results are instant or does it take a while to check the difference? Because after I flashed the .zip and booted the phone I went to check the battery status and the Google Services were still taking 66% of the my battery life. Is that normal?

Thanks in advance!
 

jase33

Senior Member
Jul 29, 2010
1,646
1,762
- /
Hey man.

For starters thanks a lot for your help! I was wondering if the results are instant or does it take a while to check the difference? Because after I flashed the .zip and booted the phone I went to check the battery status and the Google Services were still taking 66% of the my battery life. Is that normal?

Thanks in advance!


that doesn't mean that it is still "taking" 66%. It is saying that the service has used that percentage of the total used amount so far. the change will be "instant" but the usage counts will still show that until they reset.
 
  • Like
Reactions: dr. killjoy

Calkulin

Recognized Developer
Sep 3, 2008
1,647
9,109
Samsung Galaxy S21+
Might be forced to give this a try since nothing else is working lol. What changes did you make?


It basically doesn't acquire the wake lock, so it never exist

Can you please provide the checksums?

getapatalked mit Android 5.1


I'll put them up shortly

which wakelock does this fix, the NextAlarmTracker wakelock?


SystemUpdateService but my phone doesn't have the NextAlarmTracker wake lock, so I can look into that one also and add it

This is very nice. Would it be possible to elaborate what this actually does?

Same as the "DisableService" solution to prevent 'SystemUpdateService' ??

I'm just curious :)


Like I said, it just doesn't acquire the wake lock, so it doesn't exist
 
Last edited:

nuwan32

Senior Member
May 8, 2011
1,184
251
OnePlus 8T
It basically doesn't acquire the wake lock, so it never exist




I'll put them up shortly




SystemUpdateService but my phone doesn't have the NextAlarmTracker wake lock, so I can look into that one also and add it




Like I said, it just doesn't acquire the wake lock, so it doesn't exist




I'll try to find it and remove that one also

thank you! i dont know if it is related to playstore though. some people are saying its calendar related, others are saying its clock, but nobody is sure.
 

Calkulin

Recognized Developer
Sep 3, 2008
1,647
9,109
Samsung Galaxy S21+
thank you! i dont know if it is related to playstore though. some people are saying its calendar related, others are saying its clock, but nobody is sure.


I just looked and could not find it anywhere in Play Services, so is that the exact name of what's showing? Do you have screenshot in BetterBatteryStats?

Thank you @Calkulin!



As always, waiting for you too...


Is there an OTA zip out that I don't know about yet??
 
  • Like
Reactions: malavan

Top Liked Posts

  • There are no posts matching your filters.
  • 399
    Since this issue seems to affecting a lot of people, I decided to post what I use to fix the issue. Basically what this mod does is remove the command that acquires the wakelock, so it never exist.

    Note: If the app updates itself, the wakelock will be back(unless Google fixes it), so I will try to keep this up to date with the latest version until it's not needed anymore.

    To install, flash the zip in recovery

    Modded Google Play Services

    xx0 versions are for all DPIs, so it covers xx2, xx4, xx6 & xx8 in 1 file

    KitKat v7.3.29(030) - All DPI - armeabi-v7a - Older Android versions that don't have the system/priv-app folder, you can rename the priv-app folder in the zip to app
    md5 - 8bfac34b48a5cd05773ac85c714927c2

    Lollipop v7.3.29(430) - All DPI - armeabi-v7a
    md5 - ddf795c287546d3545fab2a3140654ea

    Lollipop v7.3.29(438) - 480 DPI - armeabi-v7a
    md5 - 8627599d7dd12e5b850fc3b41f41f54a

    Lollipop v7.3.29(440) - All DPI - arm64-v8a - Being worked on
    md5 -

    Modded Framework

    This fixes the root cause of the issue, so the service will operate properly now. The modded Google Play Services versions are not needed with this
    Be sure to enable the SystemUpdateService for Google Play Services & Google Services Framework if you use DisableService or similar app

    YNG1TAS0YL

    Instructions for Modifying Framework

    Decompile framework-res.apk and modify values/array.xml

    Before - If you don't see this code, then your ROM is not the cause of this wakelock
    Code:
        <string-array name="config_disabledComponents">
            <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateActivity</item>
            <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateService</item>
            <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateService$Receiver</item>
            <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateActivity</item>
            <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateService</item>
            <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateService$Receiver</item>
            <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateService$ActiveReceiver</item>
        </string-array>
    After
    Code:
        <string-array name="config_disabledComponents">
            <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateActivity</item>
            <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateService$Receiver</item>
            <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateService$SecretCodeReceiver</item>
            <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateActivity</item>
            <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateService$Receiver</item>
            <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateService$ActiveReceiver</item>
            <item>com.google.android.gms/com.google.android.gms.update.SystemUpdateService$SecretCodeReceiver</item>
        </string-array>
    31
    v7.3.29 is now up.....
    24
    [GUIDE][HowTo][Tools]Framework-Res.apk

    Hello everyone.

    Edit:::This post is for people who are on CM11 based Roms which are not already patched. I put it in this thread because it is attracting the MOST attention. If you are the same ROM as Calkulin, he has fixed it and just Flash his framework, but if you are on another Cyanogenmod 11 based ROM, THIS is the post for you.

    Due to this being a Major problem for MANY people, I was getting many requests asking me to fix Frameworks. I cannot do this as each Framework is ROM specific and there are many Roms as you know. So instead of ignoring everyone, I am taking my time out to write another more detailed post.

    So to make it easy, I have put together all the Tools + more in this simple file along with Instructions. It is really about Common Sense. If there is something you do not understand, try your favorite search engine. This post is becoming full of junk posts which hide important posts that contain valuable information. So I am urging everyone to READ first. It is better to read for 2 hours and Fix your problem in 30 seconds than NOT Reading and trying to get someone else to fix it for 2 hours


    NOTE: WHEN I Type in caps, It does not mean I am yelling. It means PAY ATTENTION.

    1) YOU CAN ONLY USE YOUR OWN ROM'S FRAMEWORK

    2) YES THIS WORKS

    3) YOU HAVE TO UNDO THE CHANGES YOU MADE - Scripts, AppOps, etc etc. UNDO it. Its not Needed after this fix.

    4) DON'T BUG YOUR ROM DEVS - THEY KNOW ABOUT THIS. EITHER THEY WILL FIX IT OR THEY WON'T. IF THEY DON'T, THEN YOU HAVE THIS GUIDE.

    If you are UNWilling to read, or act, and expect everything to be fixed by someone else, buy an iPhone and call it a day.

    Basic Computer Knowledge is Required. Such as.

    1) Common Sense
    2) How to open a Command Prompt.
    3) How to Type.


    DOWNLOAD APKTOOL : FIX YOUR OWN FRAMEWORK

    IF YOU WOULD RATHER SKIP THE DOWNLOAD AND ONLY WANT THE INSTRUCTIONS, THEY ARE POSTED BELOW

    Updated Text for Clarity

    All tools are included. Except 7zip and Java. You need to download and install Java and 7zip or if you have them as portable programs, you need to point your windows environment variables to where you Java and 7zip are. Google that.

    1) Place framework-res.apk into THIS (Where you have your apktool, etc) directory. Hold Shift, Right Click "Open Command Window Here"

    2) Decompile Framework-res.apk

    C:\{This directory where your apktool is}> java -jar apktool.jar d framework-res.apk

    3) Modify Arrays.xml Look at the code on the first Page of this post please

    4) Compile Framework-res (from Folder back to apk) - > Again, Shift Right Click > Open Command Prompt

    C:\{This directory where your apktool is}> java -jar apktool.jar b framework-res

    ***It will start and it will say (W : Could not find sources) but thats ok let it continue. It may mention Translation errors. Ignore that. This is because there is no use of smali / backsmali (*These are needed in some cases to "install" a framework, with command "apktool if" but it is not needed here)


    6) The NEW framework-res.apk will be in the dist folder located inside the framework-res folder in the same directory as your apktool.jar

    7) Using 7zip, Open BOTH the newly created framework-res.apk from the DIST folder, and the original framework-res.apk.

    FROM the Original Framework-res.apk, Select the META-INF and AndroidManifest.xml, and Drag and Drop them into the Newly created framework-res.apk which you also have opened inside of 7zip.

    You should have 2 7zip windows open. 1 with the old framework-res.apk on the left, 1 with the new framework-res.apk on the right.

    Note: Open the apk INSIDE of 7zip. Do NOT Extract the Apk. The APK is already compressed. However it contains SOME files that should NOT be further compressed.
    You do not want resources.arsc file to be compressed because Android will not read it. If you look at Compressed and Uncompressed sizes for resources.arsc, they should be the same!

    Close 7zip Program window.

    8) Almost done. You need to ZIPALIGN this new apk - It is recommended. So Open another Command window within this directory again and type

    C:\{This directory where your zipalign.exe is}>zipalign -f -v 4 framework-res.apk framework-res-za.apk

    This will create a new Zipaligned framework-res-za.apk - > Rename this new zipaligned framework-res-za.apk back to framework-res.apk.

    9) THE END - Make Flashable zip with provided Template by copying the NEW framework-res.apk into Flashable_Zip_Template_Directory /system/framework/ (This is where your new apk should be)

    Use 7Zip to Zip it - Open 7zip, Drag and drop META-INF + system, Add to Archive, Zip it using Normal Compression.

    Check it to see if your Zip has META-INF and System > Go in system and see if it has framework-res.apk.

    How to get this Framework-res.apk into your ROM There are 3 ways. This is as noob friendly as I can type it out.

    1) Flash the zip you made (Easiest Method, I don't see why you would bother with option 2 or 3 but I am putting it here for those who need to feel like Command Prompt busters.)

    OR

    2) Copy Framework-res.apk into your SD, Go in Recovery, Mount System, Copy the file into /system/framework, then fix permissions.

    3) ADB

    If you prefer ADB, You need to first make sure you have ADB access from either your Rom or your Recovery.

    You can do this in your terminal by typing >

    adb start-server
    adb remount root -rw
    adb push framework-res.apk /system/framework/
    adb shell
    su
    chmod 644 /system/framework/framework-res.apk
    chown root.root /system/framework/framework-res.apk

    Wipe your Dalvik Cache and Cache, then Reboot your device and you are done.


    UPDATE : Further research indicates that Simply changing Framework-res.apk is not enough for ROMS that use their own theming such as Carbon ROM and AOKP, on certain Sony devices which I tested. Also, you cannot Flash such ROMS with the modified Framework-res baked into the ROM. In order to successfully modify the Framework - Here are the steps :

    1) Remove any Theming from your ROM. - Turn off Dark Carbon, etc etc.
    2) Before Decompiling, look for Frameworks.jar or Frameworks2.jar type files in /Framework and copy them to your PC.
    3) Use Apktool command "if" to Install all the Framework files First before Decompiling.
    4) Once installed, you can then Modify these Values, then Flash them to your ROM.
    5) Always make sure to do a Backup in recovery first.

    Other Solutions are to find an Updated ROM that does not suffer from these issues. If the Dev is not Merging their ROM with latest CM Upstream changes, IMO, that ROM is not worth having. Hope this helped those who are still affected by this.​
    17
    And FYI, I'm still experimenting with how to stop it from updating without breaking other things, so hopefully I can have a solution by the weekend
    16
    For AOSP 5.1.1 Lollipop Users

    UPDATE 01, October, 2015 ::::

    I am Back with More Information about Wakelocks and battery drains.

    Lollipop has a famous Mobile Radio Active bug that has been coming to light recently. This is one of the biggest battery drainers in Android Lollipop and there is no official fix from Google as far as I know. There's a lot of info flying around in XDA about patches and such but those patches do not fix the core problem. They only help report the correct battery usage. This is NOT the fault of your custom ROM Maker, or Manufacturer. This is Google's fault, and as expected, they know about this issue but are prolonging a fix. The bug happens when Android OS will continually try to access the Radio in your phone even if no request for data are being transmitted. So far as I know. If someone has better information, make a thread or post, and pm me.
    Once there is an absolute solution available and has been proven to work, I will update this thread.


    In the past couple months. I tried Every software you can throw at Android, but its misbehavior, and limiting users, continues to escalate as version numbers go up. Lollipop coupled with Google Play Services has been one such Problem.

    Lollipop has a constant need for your data. Mix this with Google Play Services, and you have a battery recipe of 5 hours max on a Modern fairly powerful device.

    For those of you on Lollipop AOSP Builds 5.1.1 Suffering from Battery Drains. There are a Few Options which I will list that can help you figure out your issues. This MAY or MAY NOT work for your ROM.

    Root users Only - Install the following. (Please note in some cases, SELinux in your ROM should be set to Permissive)

    1 - AFWall+ from Fdroid : https://f-droid.org/repository/browse/?fdid=dev.ukanth.ufirewall

    Set it to BLACKLIST Mode - and Block Data Access from Apps that do not need it. Be Careful.

    2 - AdAway from Fdroid https://f-droid.org/repository/browse/?fdid=org.adaway

    3 - Your ROM should have Privacy Guard or App Ops - Long Press on the App then Deny/Ignore *Location, *Wakeup *Keep awake for Pesky Apps like Google Play Services and Google PlayStore. You can also disable Autostart for some apps.

    Apps like Greenify, Xposed, etc, will cause more problems for average users than they are worth. More often than not, these type of Apps limit functionality if the User does not know exactly how to use them.

    4 - Use Disable Service to Disable Useless Services from Google Play Services *CAUTIONARY, Leave it alone if you don't know what you are doing* - I personally disable the following by using Search in Disable Service:

    Ad*, Fit*, Wear*, Youtube, Kids, Cast, Games, GoogleNetworkLocation*(cautionary) - This may or may not save Ram when loading Services but I do this because I do not like Google Bloat.
    If you use Google maps, you may want to leave Googlenetwork location. Do not disable "Network Location Service".

    Do NOT Disable System Update Service as this will causing pesky Google Services to hold thousands of Wakelocks.

    5 - In Developer Options, enable Captive Portal Detection. This will disallow Data connection unless a Connection to Google Servers can be established. Essentially, this will save Data usage caused by some rebel Apps. [This setting is ON by default even if it is not in your ROM]

    6 - If you do not have a Data plan but you have MMS Messaging, you can create a new APN that allows ONLY MMS. [If your APN does not stick, and keeps reverting back to another auto selected APN, delete all APNs and only keep the Default APN, edit it > APN Type > remove everything except for MMS, no worries, all APNs can be restored to defaults later if need be.

    7 - If you do not use Google Maps, in Location, set it to Device Only.

    8 - Install Wake Lock Detector - it should give you information on what is causing the Wakelock. Usually it is an App that uses the System or Google Play Services to request Data, and hits multiple times. [Lollipop has a pesky mobile radio active bug, which should have been fixed by now, check with your ROM dev]

    9 - Remove unncessary Syncs - *I leave Contacts, and Calendar on.

    10 - In the Dialer, if you do not use Google's lookup services, you can uncheck Forward/Reverse lookups. Now the Phone/dialer will not hold unnecessary wakelock when you have no data connection. Your provider automatically sends This data when a phone call is received anyway and this service is mostly useless unless you are constantly connected.
    Not Rooted users can also try

    *NO ROOT Firewall. *This will make a VPN Connection but its internal only. It gives fine grain control over Data transfer but by itself it does not prevent Google Services from playing dirty and continually turn on the CPU. It saves bandwidth.

    https://play.google.com/store/apps/details?id=app.greyshirts.firewall

    Its a little complicated but once you understand it, its fairly simple and can help save unnecessary data hits and even prevent ads loading up on your limited mobile data plans.

    APN AND MOBILE DATA SETTINGS [Lollipop]

    Starting with Lollipop, Mobile Data HAS to be on for you to get MMS. Apps cannot turn on Mobile Data when they need to. Google wants you connected Constantly. The problem is When there is a bad signal, Not only will your Phone continue to try to search for a Connection, it will also continually try to Sync data and constantly Search for your GPS / AGPS location keeping your CPU awake and draining your battery.

    1) If you do not have a Data Plan, and would still like to get MMS, Get your proper APN settings from your Carrier.

    Edit your APN and in APN Type remove Default,Suppl and leave MMS.

    2) If you do have a Data Plan, but you don't want Google to constantly be connecting, Restrict Background Mobile Data by going into Data Usage > Scroll down and you will see Google Play Services and Play Store. Select them and Restrict Background Data. Also make sure in AppOps or Privacy Guard to turn off Wake Up and Keep Awake (I personally disable Location and Auto start) as well but that is my personal preference only. I prefer syncing manually.)

    This will prevent further battery drains unless you want Google to sync on your Data plan.

    Conclusion :
    ,
    If I have more information I will update this thread. Please read instead of filling up threads with useless, and unnecessary questions. Google first for information.

    OH NOES! My Phone is messed up, Plllleeeez HAAAALP is NOT going to Help you.

    I wish everyone the best in solving their Google problems.