yashsingh1/xdaforums huggingface dataset:
[Magisk] gloeyisk:
Universal GMS Doze

Overview

- Patches Google Play services app and certain processes/services to be able to use battery optimization

- Support API 23 or later

Download Links (Archives):

- GitHub Releases

- Mediafire

- MEGA

- SourceForge

- Telegram

Credits:

- @topjohnwu

Magisk - Magisk Module Template

- @MrCarb0n

Script / syntax helper

Extras:

- Donation: PayPal - LiberaPay - Ko-fi

- Source Code: GitHub
[Magisk] gloeyisk:
Troubleshooting

- Command-line for check optimization (with add-on installed):

> su
> gmsc

- Command-line for check optimization (general):

There's a line written Whitelist (except idle) system apps: and if com.google.android.gms line does not exist it means Google Play services is optimized.

> su
> dumpsys deviceidle

- Command-line for fix delayed incoming messages issue:

> su
> cd /data/data
> find . -type f -name '*gms*' -delete

- Command-line for disable Find My Device:

> su
> pm disable com.google.android.gms/
com.google.android.gms.mdm.receivers.MdmDeviceAdminReceiver

Change Log

- 1.9.0

Android 14 support

Fixed synchronization for Location Sharing and Play Games

- v1.8.8

A long-awaited hotfix

Addresses script that caused patching XML gone wrong

Raised Magisk Boot Service to 100 seconds

- v1.8.7

Android 13 support

Added GMS to battery optimization and disabled another components

Fixed broken API checking and Multi-User support

Moved to inbuilt (Magisk) BusyBox

Improved pre-boot conflict fixer and proper boot script execution

Improved superuser checking method and used cmd flag arguments

Improved XML patching logic

Minimized root path checking depth

Revived overall code quality and syntax

Rewrite GMS state checker bin

- v1.8.6

Added /system_ext detection support

Improved patching detections (Allow to revoke location permissions)

- v1.8.5

Added updateJson support

Improved patching detections (XML files)

v1.8.4

- Removed redundant script (GMS: Stay with disabling Find My Device only)

- v1.8.3

Android 12 support

Additional boot complete check

Multi-User support

Set ignore for GMS and IMS WRITE_SETTINGS

Minor improvements

- v1.8.2

Android 11 support

Improved installation (Magisk Live and Custom Recovery)

Improved patching detections (XML files and conflicting modules)

Integrated add-on (run 'gmsc' with superuser rights for check optimization status)

Set ignore for GMS and IMS BOOT_COMPLETED

Set ignore for GMS and IMS AUTO_START (custom permissions for Oxygen OS)

Updated template

- v1.8.1

Integrated custom recovery installation

Added boot logic for search and patch any conflicting modules (if present)

Whitelisted IMS and Turbo (this should fixed location crash issue in MIUI)

- v1.8.0

Initial re-release

100 seconds Magisk Boot Service
[Magisk] bartekm01:
Hi.

I'm using Your doze for some time now and it's working quite good. Good work, thanks.
[Magisk] VincentJoshuaET:
What does XiaomiDoze do, exactly and specifically?
[Magisk] amitporedi007:
What's the difference between universal gms doze NMF21F

Because it works great on OnePlus devices ,is the Oct version better than this
[Magisk] L22EEW:
Known issue for Pie. I have frozen Find my Device via TiB.

Flashed module, but still unable to optimise play services.

Anyone else on Pie managed to get this to work?
[Magisk] gloeyisk:
Not to freeze those Find My Device, I mean just Turning Off. Inside Settings > Security and location.
[Magisk] L22EEW:
Hmm. Tried that. Still no luck

I know this is still in experimental stage, I've been following this project. I can wait for more stable version ?
[Magisk] pinoholo:
What's the difference between device health service from Google and turbo app provided in zip, is it the same?

If it is the same could you make the module have an option to install or not, because some dev already included device health service in their roms.

Everytime I install this module and reboot, I got turbo crash first time my device booted up

Thanks in advance

Sorry for my broken English
[Magisk] ztoldy:
Is this module usable near greenify aggressive doze?
[Magisk] gloeyisk:
No, Greenify has its own doze methods. But my module compatible with it. Turning On/Off Aggressive Doze inside Greenify will be better.
[Magisk] mahir555:
Hi thanks for this work . I installed this module . am on android pie unofficial X rom for nexus 6 .

However I got this when I try to open the battery from setting.

I attached a log file too .
[Magisk] gloeyisk:
Thanks again for the report, which build of the module you've installed?
[Magisk] mahir555:
The latest 1.2.3
[Magisk] gloeyisk:
Is it happened too with previous build?
[Magisk] mahir555:
Ok give me some time ~20 min

.. Will report back

Yes . same behavior .. Even it appears when I try to open setting before clicking on battery .

I tried 1.2.2 & 1.2.0
[Magisk] lazostat:
I installed the magisk module. How can I see if it work?

I have also installed xxx rom limit with some Google play services wakelocks disabled through aroma installer . Any concern of conflicts?

I have OnePlus5.
[Magisk] dukkha:
Should I have to uninstall previous version of this module and reboot before install new one?
[Magisk] gloeyisk:
Ohh well, I'll take a look for a new build when I have free time. You can check OP for Telegram group link, you can asking there also.
[Magisk] 2k4ever:
thanks for this module!

would you mind provinding me with version 1.3.3?

battery life is worse for me on 1.3.4 and 1.4.0

Thanks!

(I'm running LOS 14.1 on a trusty old Nexus 5.

with v1.3.4 and 1.4.0 GMS is back on top of the battery consumption list - although GSM shows up as optimized)
[Magisk] mindyabiznis:
I noticed that exact same issue MASSIVE battery drain literally like 3hr SOT from 100-0!:silly:when I updated to v1.3.4 but I also updated vanced at the same time, didn't bother figuring out which was causing the issue so just reverted back to previous vanced and v1.3.3

I'm now running v1.4.0 and am going to see how I get on tomorrow.

Depending on battery drain with v1.4 I'll update to latest vanced and see if everything is fixed....

Failing that I'll go back to v1.3.3 and leave vanced updated and hopefully I should be back to my usual SOT.

Btw I'm running carbonROM 8.1 on a z3c and I was using NFS injector but have just switched to LKT set to balanced just before typing up this message.

Here's v1.3.3 mate:good:
[Magisk] gloeyisk:
Let me check what's wrong with the latest build, and also I'll build a new beta/experimental modules and uploaded to my channel only. I hope you can join support group (link available on OP).
[Magisk] gloeyisk:
Because your issue the same as previous person, maybe you should join support group and I'll build a new beta/experimental modules and hope everything goes well. Btw thanks for re-upload that v1.3.3 build.

Edit: Fixing some typos :silly:.
[Magisk] gloeyisk:
Deleted.
[Magisk] 2k4ever:
thanks a lot, mindyabiznis and gloeyisk!

I'll run v1.3.3 for 2 or 3 days to see if battery consumption is back to normal and then I'll switch to the new beta to cross-check
[Magisk] mindyabiznis:
No problem!

I'm running the beta since this morning and I can't notice any excess battery drain over v1.3.3:highfive:
[Magisk] Schroeder09:
Using v1.4 on Android 9 since last night. Battery consumption has sky rocketed. Google play services, carrier services, and the gms services are listed as being optimized, so this appears to be working. Battery consumption is 5-8% / hr according to BBS or EX kernel manager. Prior to installation of this module consumption was 1.7% or so. I see it shows as being awake with the screen off more according to BBS. Nothing in particular in the list of wakelocks looks out of the ordinary though.

When I got this phone consumption was like .7% / hr idle. Idk what happened. Somewhere along the line it went South. What do you need from me to see what's going on?
[Magisk] 2k4ever:
after 1 day running v1.3.3 battery seems back to what I was used to :)

I'll give it another day before switching to the new beta
[Magisk] affendymahmud:
The new update is much stable for me :laugh:
[Magisk] Schroeder09:
Just updated to the new version in the repository. It wiped my phone's finger prints, lots of app data, notification settings, and all sorts of other app settings. It's like it wiped cache of some sort. It won't connect to WiFi at all. I'm gonna have to reflash the December image and start over on a bunch of stuff.

Beware.
[Magisk] gloeyisk:
Hi! Can you tell me more specific what's happened? Since everyone including me doesn't facing any issues like that.
[Magisk] Schroeder09:
I updated theough the magisk repository. I rebooted through magisk after the install. When the phone came back up I had no touch on the screen. I rebooted with the hard power button. Now some of my icons look weird, app setting data is gone, when I open apps it's like I've opened them for the first time, wifi will not connect to any network so something is broken there. Notification, adaptive brightness, ex kernel settings, everything is gone.
[Magisk] gloeyisk:
Have you installed another modules? Or even mods?
[Magisk] altlpd11:
Thanks for your Great work! This module works fine for me.

I wonder what is the difference between the module Sysconfig Patcher and Universal GMS Doze?

Because I saw someone say "First one does exactly what UGD does plus more. UGD is only about GMS which is covered by Sysconfig too".
[Magisk] gloeyisk:
Perhaps, you need to check or even read OP once again, it was about bunch of explains on there. And also where you find that " I saw someone say"? May you can provide me the link?

Ah btw, you can feels free join to support group (the link on OP).
[Magisk] 2k4ever:
the new stable build is running good for me, battery life seems on par with v1.3.3

big thanks gloeyisk!

Schroeder09, which version of Magic are you on? An update hit recently and I'v heard about some people having problems with it...
[Magisk] Schroeder09:
I have launcher mods and other magisk modules.
[Magisk] papatzis:
Hi to all little help please I have a xiaomi running miui 10 android 6.0 ( redmi note 4 ) I have installed the module through magisk manager, but in settings --> battery I cannot find the menu as in the screenshots, I had also installed greenify, what I am doing wrong

Thanks in advance
[Magisk] gloeyisk:
Hello, that Optimization section on MIUI only available on Nougat+, so you don't need to be worry about that. Just flash and profit.
[Magisk] papatzis:
In greenify settings agressive doze I can check gms in optimization yes or not is this good or leave it as it is?

Στάλθηκε από το Redmi Note 4 μου χρησιμοποιώντας Tapatalk
[Magisk] gloeyisk:
Greenify's Doze Optimization is different with mine, but turning it On it'll more good depend on your usage.
[Magisk] Bintang Krisna:
Makes "Backup using Gdrive" inactive.

Any workaround?
[Magisk] gloeyisk:
Running Pie ROM?
[Magisk] Bintang Krisna:
Stock Oxygen OS Android Oreo 8.0
[Magisk] gloeyisk:
Ahhh OEM, will recheck and hopes you can get back your backup services.
[Magisk] Bintang Krisna:
Thank you
[Magisk] gloeyisk:
If that backup services is really important for you, you can drop using my module as well. No one can force you ;).
[Magisk] guanto96:
If I don't disable "find my device" in pie, module doesn't work or work in a different way? Thanks
[Magisk] gloeyisk:
Still work, but the GMS will showed "Not Optimized"
[Magisk] jiexi:
Thoughts on Naptime + Sysconfig Patcher + Universal GMS Doze?

Can all three play together? Does Universal GMS Doze need to be used if Sysconfig Patcher is used?
[Magisk] gloeyisk:
No and No.

If you want to use UGD, then you need to remove SP. Choose which suitable for you.
[Magisk] hank81:
I have the same issue with stock Android 9 (Android One).
[Magisk] chaoscreater:
What's the difference between this and "[MAGISK 16][Battery Saver][6.0+] ENABLE DOZE on Google Play Services"?
[Magisk] chaoscreater:
Tried this and it really does improve my battery life by quite a lot. However, none of my messaging apps like Line works anymore, I can't get notifications. It looks like there's a bunch of system apps that have been set to optimized. I'm using Galaxy S8+ Alexis ROM Oreo.

Nevermind, issue was with another app.
[Magisk] gloeyisk:
Tried to clear data of that app?

Since I never had issue like delaying incoming messages.
[Magisk] chaoscreater:
Yup it's all good, sorry it was an issue with another app.
[Magisk] gloeyisk:
For everyone who still minds that my module kept XiaomiDoze, it's already dropped about long time ago.

PSA: OP already edited, module still on development, all reports would be appreciated to the users who had to test even included my module as theirs important mods!

Edit: Fastest development only remains on support group (invite link available on OP) which I'll build beta/experimental first on top of stable, if both of them giving good results then I'll remake it and merged it one to the stable builds and pushed to the Magisk repo.
[Magisk] Maverick Jester:
[MENTION=8350043]gloeyisk[/MENTION] Would a different tap to pay service affect this, or only Google Pay? I'm currently using the tap to pay service offered by my local bank, and from what I can tell, this module is not setting Google Play Services to optimised. So, I'm trying to determine whether this is the cause, as I've disabled Find my device everywhere else.

Also, I use Cerebrus in place of Find my device. Would this also have an impact?
[Magisk] gloeyisk:
Hi! Firstly can you tell me a bit specific what is "Cerebrus"? Second, optimized GMS is only disabled Find My Device on Device admin apps section only.

And after the GMS optimized, could you confirm me once again that Tap to Pay still working or not?;)
[Magisk] asusgarb:
On my Galaxy Note 3 with Lineage 14.1, after I installed this module, I had spontaneous reboots. I tried uninstalling it but it didn't solved the issue. Only solution was a reflash of the ROM.

I thought they might be caused by some app, but they started after the flash, and after that no new apps installed.
[Magisk] gloeyisk:
Hello! Uhmm weird issue.

My phone is an old phone, running LineageOS 14.1 Nougat too, but all is working just fine on my side.

Let me recheck why this issue happened on you!;)
[Magisk] Maverick Jester:
Apologies, I misspelled that. It's Cerberus, which is a remote protection app. I use it because it as more robust protection features than Find My Device.

I'll check the tap to pay functionality later on and confirm that it is still working. Unfortunately, my bank app does not provide the option to disable it outside of uninstalling the application.

For now, I'm using this mod on my Pixel 2 XL, which actually sets Google Play Services to "Optimising battery usage".
[Magisk] gloeyisk:
Very well.

About that Cerberus I don't use that app, so maybe you can confirm me after you do some test. For your current mods, it's specific for Pixel devices so everything depend on your needs. At least, mine was universal ;).
[Magisk] Maverick Jester:
Fair enough. I think that Google customises the Pixel setup enough to affect modules like yours.
[Magisk] gloeyisk:
My module a little bit need some workarounds to make it working properly, starting from Pie. As I explained some days ago all is just work fine for Marshmallow to Oreo.
[Magisk] Maverick Jester:
Looking forward to the update!
[Magisk] asusgarb:
Don't get angry because I'm going to talk about another similar module, but maybe this comparison will help you find the problem.

I always used before (and now, sorry:() Sysconfig Patcher. Reading the 2 OPs I can't understand the specific differences between these 2 module, but maybe you, with your experience, can.

Anyway, I want to thank you about this module, because reading comments it's very appreciated.
[Magisk] gloeyisk:
No angry or even offence at all, I'm still learning also for developed this module, I'm still beginner...

Nearly the same, but as you can see mine was shipped with Unity (you can find what's it around xda), some additional props and doze system which I'm really hard working for make it universal (works for almost a lot of the phones), regular check (depend on someone's reports which the issue is major or even normal then I'll revision it as soon as possible) and so on ;).
[Magisk] venkatsrin:
It's the issue with Google backups resolved or could it be resolved soon? :fingers-crossed:
[Magisk] gloeyisk:
This issue actually happened for some users, but don't worry I'll try to fix current issues.

Edit: Fixed some typos:rolleyes:
[Magisk] jackint:
Hi. I am using Miui Eu and after flashing your module through Magisk, whenever i open an app that requires google services to work i get notification that i have to update google service through google play store. I did this and the problem is solved, but my question is, does your module still works?
[Magisk] gloeyisk:
Which Android version your MIUI? Also can you access "Battery optimizations" section on Settings and check whether Play services is optimized or not? ;)
[Magisk] jackint:
Thanks for quick reply!

Android version is 8.1, and i can access battery optimization settings but there is no google play service at all, just play store which is optimized.
[Magisk] gloeyisk:
Maybe the Play services doesn't optimized, can you check any apps which "Not Optimized"?
[Magisk] jackint:
I did check and i couldn't find google services.
[Magisk] gloeyisk:
As I already wrote on OP, I can't guarantee fully for any OEMs :(
[Magisk] gloeyisk:
[MENTION=7334294]venkatsrin[/MENTION] can you tell me what phone you're using? I'll try to reworked for the backup one.
[Magisk] venkatsrin:
Pixel XL (gen 1), thank you looking forward
[Magisk] jackint:
I reflashed miui eu rom and downloaded Miui hidden settings and there I found google play services and "optimized" them. No errors, everything works like a charm. Thanks :)
[Magisk] Bintang Krisna:
Having same problem on Oneplus 3 with stock ROM,thank you
[Magisk] gloeyisk:
Backup services?
[Magisk] Bintang Krisna:
Yeapp
[Magisk] gloeyisk:
This issue still persist for some users :crying:
[Magisk] venkatsrin:
Yes also with your latest update :(
[Magisk] gloeyisk:
For everyone who still facing backup issue, can you do a test for my new beta build? The module pushed only on support group (link available on OP). Thanks before.
[Magisk] habylab:
What have you changed?
[Magisk] pekkle_hksar:
Tested and it works. Thanks!!!
[Magisk] habylab:
Couldn't see a download link for the beta in Telegram, which I don't usually use, so I will wait for a new stable build. I think that all development work should stay on XDA.
[Magisk] gloeyisk:
Hello! As I ever said and explain, beta/experimental builds only pushed on support group which doesn't mean released to public. Also if this new beta build become well and everything just fine, I'll merged it and push it to Magisk repo :fingers-crossed:
[Magisk] habylab:
As I just mentioned, I joined the support group and couldn't see anything to download. I'll look forward to the stable build!
[Magisk] gloeyisk:
Uhm really? Which one? Because I didn't saw it.

Also I always welcomed every new members come in.
[Magisk] habylab:
Installed Telegram, saw the messages but didn't join as I couldn't see anything in there and believe development should exist on XDA only.
[Magisk] makopls:
hi, may u can appreciate what [MENTION=8350043]gloeyisk[/MENTION] does for the community? maybe he got some reason why he doing that. if so, just wait until him push the beta and make it stable. fine?

i dont join his group but i believe he will do the best for community
[Magisk] habylab:
Hey, didn't say I don't appreciate, did I?

As I said, I will wait for the stable release. All is fine.
[Magisk] denisalexandru03:
hi im running on an unofficial lineageos 16 build for htc u ultra with android 9 and i have magisk , i installed gms doze but i can t optimize the google play services , whenever i try to do it and i press done it just resets back , what should i do?

*nvm silly me , i didnt read the bugs section, all working now
[Magisk] Falcon_X:
Anyone else gets the error after Android system starts - Android Web View crashes and closes and from time to time Magisk, too?

I don't know for what Android Web View is for, the error messages are just annoying. After disabling GMS Doze the failure seems to be gone...
[Magisk] habylab:
Nope.
[Magisk] Falcon_X:
I found out GMS Doze is not the problem.

I don't know what causes this...
[Magisk] gloeyisk:
Check any other modules or mods you've previously used. As I'm never facing weird issue like that.
[Magisk] kryshnakishore:
Using Google pay & Google work profile.. Not supporting
[Magisk] gloeyisk:
New stable build is up!

GL-DP wishes you Happy New Year 2019!
[Magisk] ColdUser:
Im using a xiaimi Mi5 on syberia ROM and notifications always late with this module especially with WhatsApp..
[Magisk] gloeyisk:
You can try Clear Data of your WhatsApp and recheck.
[Magisk] kryshnakishore:
Wish to get more support for Android pie 9.0
[Magisk] DaveedDB:
Wish to get $1 mil in this new Year
[Magisk] gloeyisk:
Sure I'll do my best for my current module, actually it's works it's just need some workaround for optimized the GMS which only some users still facing this issue.
[Magisk] gkornaks:
For some reason the latest update triggers barclaycard root detection.
[Magisk] gloeyisk:
Can you confirm me which other mods like another modules or tweaks you've used? Seems everyone including me working fine ;)
[Magisk] gkornaks:
I'm using quite few. So I started uninstalling them one by one. After removing your mod the trigger stopped. If I install it back barclaycard detects root. Could it be carrier services optimisation? "Enable Doze for Magisk GSM" doesn't trigger root detection.
[Magisk] gloeyisk:
Have you tried to put your app into MagiskHide with my module installed? Ah btw, everything is depends on you if other module is working fine then go on :D
[Magisk] gkornaks:
Yes, it is on MagisHide list. Just stating the fact if someone going to use your mod to be aware of Barclaycard root detection.

Thanks for your great work!
[Magisk] gloeyisk:
It seems your app having problem, take a look to every feedback on Play Store. Someone said that his app detection root on his device but actually he's aren't rooted user.

So I can assume this isn't my module's fault.
[Magisk] gloeyisk:
You can take a look to this attachment.
[Magisk] gkornaks:
What I'm trying to say that I've got 14 mods and only yours triggers root detection for this app. If I uninstall your mode then it works fine. It's on MagisHide list and MM is hidden. So that's why I assumed it's your mod triggers detection. It's doesn't trigger for the rest banking apps.
[Magisk] winamp26:
Can I flash on magisk 17.3? It's not in download list
[Magisk] gloeyisk:
Starting from v1.5.0 build I've bumped it to 18000 Template means only support Magisk 18 and upper. I'm so sorry :crying:
[Magisk] ventussm:
I am on a pie custom ROM - ArrowOS, with disabled "find my device", but when I select optimize "Google Play Services", it stays unoptimized. Any ideas how to make it work? Thx.
[Magisk] gloeyisk:
Where's the location of that Find My Device? The correct one is disabled Find My Device in "Device Admin apps" section ;)
[Magisk] ventussm:
Seems I didn't read properly first post. Thanks, now works fine.
[Magisk] vl319:
Same goes to mine. Whatsapp notifications delayed. Any solution? I am using op5t with latest stable oos pie
[Magisk] gloeyisk:
Clear Data for the WhatsApp app.
[Magisk] ColdUser:
After installing the module.. delete data?
[Magisk] str8str:
I have it disabled and still showing optimized on latest pie

Scratch that working now thanks
[Magisk] vl319:
Cache or data? Clear data means wipe everything?
[Magisk] madbat99:
For that app, yes
[Magisk] gloeyisk:
"Clear data" inside the app only.
[Magisk] Depressed T.Bear:
Hi, I've installed your module successfully with magisk 18. But I can't see Google play services in the list of apps I could optimize. Am I doing something wrong?

I'm on the latest OxygenOS 9.0.3, Pie.
[Magisk] Cablespider:
Go to settings>applications>see all. Run down the list and check the battery status of the app or service in question. It'll indicate if it is optimized or not.