[MODULE] Universal GMS Doze

Search This thread

Zaxx32

Senior Member
Mar 23, 2019
486
177
Morgantown
Moto G5 Plus
Moto G7
No idea if the gms doze module installs does what u need with chromecast or other issue. All I can say is Naptime works great re: basic functions...maybe 'Doze Google Play Services by Francisco Franco v1.1 (@franciscof_1990) is worth a peek (if it doesn't have said bugs ofc) I know it's like $2-3 and I dunno what the licensing is re: taking a peek at his module code. Again...that IF it doesn't have issues ur talking about. It's appear ant perf as a part of Naptime saves me a LOT of battery and has tons of relative features that it's known for. Dunno if said doze module is available separately...or even if it's performance relies on the Naptime app. I think it is worth a look to see if it works for everyone's feature needs. I'm no dev/coder but Franco's apps have a good rep (FKM, Naptime and Servicely). Just a suggestion...;)

Left out another part of my battery sipping 6a...along with Naptime, Google Doze...I also use Battery Guru w/root axx (Free w/ads but Adaway rulez!) I just make sure they don't step on each other's toes. I let Guru do the 'battery saver at screen off" and the settings that light up when pressed, ...leaving 'doze' settings and misc tweaks to Naptime ofc. Have 'extreme battery save' off in And setting, or maybe @15%. It's a precise 'dance' with them but one u have it dialed in just right...You'll always smile when u open BBS, you'll be grinnin'! Not 4 everyone obviously but when u get...you get it! Also recommend BBS Xda Ed. and MVK Kernel if u have a P6, P6Pro or P6a running stock or beta A13. And ACC mod w/AccA to stop battery chrg. at 90% too! :cool:

Servicley is a whole new post! Not currently using it...it can be a bit overkill imho...unless you're a total control freak. :oops:
 
Last edited:

yassine2217

Senior Member
May 22, 2011
106
27
Casablanca
OnePlus 9 Pro
Hi,

Has anyone experienced this type of behavior?

I installed this last module on my One Plus 7 Pro running ColorOS A12,1 when I reboot the phone I run gmsc it says optimized after 2 seconds I run gmsc it says not optimized any ideas please?
Screenshot_2022-11-07-13-02-12-59_84d3000e3f4017145260f7618db1d683.jpg
 

73sydney

Senior Member
Hi,

Has anyone experienced this type of behavior?

I installed this last module on my One Plus 7 Pro running ColorOS A12,1 when I reboot the phone I run gmsc it says optimized after 2 seconds I run gmsc it says not optimized any ideas please?
View attachment 5754699

Cant say ive ever seen that.....

Do you have any other modules, particularly of the tweak variety or tweak apps installed? Something is obviously resetting it, your best best would be logcat
 

yassine2217

Senior Member
May 22, 2011
106
27
Casablanca
OnePlus 9 Pro
Cant say ive ever seen that.....

Do you have any other modules, particularly of the tweak variety or tweak apps installed? Something is obviously resetting it, your best best would be logcat
Yes, bro, I recall installing another module from this thread called No GMS battery whitelist Magisk.zip alongside gms and getting the same result, in the beginning it always showed me (not optimized), but when I installed the second No GMS battery whitelist Magisk.zip alongside gms, it gave me what you see in the picture.
 

yassine2217

Senior Member
May 22, 2011
106
27
Casablanca
OnePlus 9 Pro
Cant say ive ever seen that.....

Do you have any other modules, particularly of the tweak variety or tweak apps installed? Something is obviously resetting it, your best best would be logcat
I just realized that the second module has nothing to do with this behavior, so I rebooted my phone and ran gms quickly twice, with the first result being gms optimized and the second being not optimized, and I discovered a google.xml in the folder /mnt/vendor/my bigball/etc/sysconfig/google.xml with read only access.
 

73sydney

Senior Member
I just realized that the second module has nothing to do with this behavior, so I rebooted my phone and ran gms quickly twice, with the first result being gms optimized and the second being not optimized, and I discovered a google.xml in the folder /mnt/vendor/my bigball/etc/sysconfig/google.xml with read only access.

Okay so can you tell me exactly (or attach) those modules you have installed and tested, as thats not a "legacy" path, and we can fix that

Oneplus device?

I knew id seen "my bigball" path before, a dev friend who has a debloat module recently added it for certain devices....he had to add it to the path list for his module

(these are all mount points under /system or SAR (System As Root)

arMountPointList="/product /vendor /system_ext /india /my_bigball"


can you also try these 2 commands (in a terminal or via adb shell) and paste the results of each (separately):

Code:
su -c find /system /system_ext /product /vendor -iname "google.xml" -print

su -c find /system /system_ext /product /vendor /my_bigball -iname "google.xml" -print
 
Last edited:

yassine2217

Senior Member
May 22, 2011
106
27
Casablanca
OnePlus 9 Pro
Okay so can you tell me exactly (or attach) those modules you have installed and tested, as thats not a "legacy" path, and we can fix that

Oneplus device?

I knew id seen "my bigball" path before, a dev friend who has a debloat module recently added it for certain devices....he had to add it to the path list for his module

(these are all mount points under /system or SAR (System As Root)

arMountPointList="/product /vendor /system_ext /india /my_bigball"


can you also try these 2 commands (in a terminal or via adb shell) and paste the results of each (separately):

Code:
su -c find /system /system_ext /product /vendor -iname "google.xml" -print

su -c find /system /system_ext /product /vendor /my_bigball -iname "google.xml" -print
yes sure bro
first command
/system/product/etc/sysconfig/google.xml
second command
/system/product/etc/sysconfig/google.xml
/my_bigball/etc/sysconfig/google.xml
:/data/data/com.termux/files/home #
 

yassine2217

Senior Member
May 22, 2011
106
27
Casablanca
OnePlus 9 Pro
This is what i have in magisk
I tried both version of gmsc
1.8.3 and the last one
both version show gmsc is optimized when i reboot the phone few second repeat the command (gmsc not optimized)
OS Coloros 12,1
Screenshot_2022-11-08-19-17-00-15_fc704e6b13c4fb26bf5e411f75da84f2.jpg

Screenshot_2022-11-08-19-08-26-96_785cfb1f0fb0c9a2030c9b38a1c3479a.jpg
 

Attachments

  • Screenshot_2022-11-08-19-08-32-03_785cfb1f0fb0c9a2030c9b38a1c3479a.jpg
    Screenshot_2022-11-08-19-08-32-03_785cfb1f0fb0c9a2030c9b38a1c3479a.jpg
    338.2 KB · Views: 57

73sydney

Senior Member
yes sure bro
first command
/system/product/etc/sysconfig/google.xml
second command
/system/product/etc/sysconfig/google.xml
/my_bigball/etc/sysconfig/google.xml
:/data/data/com.termux/files/home #

good, the 1st command is what the regular module finds, the second is what the adjusted one with new path added finds...which matches with what you mentioned.

after ive had a sleep (ive been up about 20 hours), ill mod the latest one (from the 1st post on this page) and my own "simplified" version and you can test them if you like
 
  • Like
Reactions: yassine2217

yassine2217

Senior Member
May 22, 2011
106
27
Casablanca
OnePlus 9 Pro
good, the 1st command is what the regular module finds, the second is what the adjusted one with new path added finds...which matches with what you mentioned.

after ive had a sleep (ive been up about 20 hours), ill mod the latest one (from the 1st post on this page) and my own "simplified" version and you can test them if you like
Thank you bro sleep well
 

73sydney

Senior Member
Thank you bro sleep well

okay, i modded the original 1.8.6 (last version i think that worked out of the box for most folks) and my own GMS Doze Simplified.v1.1 zip (only dozes gms, nothing else) to include the newer path

Please remove any existing doze related mod, and then try only one of these at a time, and tell me if either work

If either work, ill put in a request to have the newest version in the 1st post of this page, and on the magisk repo, to have the path added

Note: modded attachments removed to stop people going off on tangents
 
Last edited:

yassine2217

Senior Member
May 22, 2011
106
27
Casablanca
OnePlus 9 Pro
okay, i modded the original 1.8.6 (last version i think that worked out of the box for most folks) and my own GMS Doze Simplified.v1.1 zip (only dozes gms, nothing else) to include the newer path

Please remove any existing doze related mod, and then try only one of these at a time, and tell me if either work

If either work, ill put in a request to have the newest version in the 1st post of this page, and on the magisk repo, to have the path added
Thank you bro for your hard work unfortunately 2 modules does not work same thing happend, i attache screenshots and if you need any logs or something please tell me
 

Attachments

  • Screenshot_2022-11-09-09-46-53-99_84d3000e3f4017145260f7618db1d683.jpg
    Screenshot_2022-11-09-09-46-53-99_84d3000e3f4017145260f7618db1d683.jpg
    370.1 KB · Views: 51
  • Screenshot_2022-11-09-09-41-55-33_84d3000e3f4017145260f7618db1d683.jpg
    Screenshot_2022-11-09-09-41-55-33_84d3000e3f4017145260f7618db1d683.jpg
    481.3 KB · Views: 50
  • Like
Reactions: 73sydney

yassine2217

Senior Member
May 22, 2011
106
27
Casablanca
OnePlus 9 Pro
okay, i modded the original 1.8.6 (last version i think that worked out of the box for most folks) and my own GMS Doze Simplified.v1.1 zip (only dozes gms, nothing else) to include the newer path

Please remove any existing doze related mod, and then try only one of these at a time, and tell me if either work

If either work, ill put in a request to have the newest version in the 1st post of this page, and on the magisk repo, to have the path added
Hi bro again
I just realized that gmsc turns green only when my phone is disconnected from the internet; when I turn it back on (mobile network/wifi), it turns red.
No google gms when conection is disabled
Whitelist (except idle) system apps:
com.android.providers.calendar
com.android.providers.downloads
com.qualcomm.qti.telephonyservice
com.android.mms
com.qualcomm.qcrilmsgtunnel
com.qti.xdivert
com.android.cellbroadcastreceiver
com.android.proxyhandler
com.qualcomm.qti.ims
com.qualcomm.location
com.android.shell
com.google.android.cellbroadcastreceiver
com.qualcomm.atfwd
com.android.providers.contacts
google gms existe when conection is turn on
Whitelist (except idle) system apps:
com.android.providers.calendar
com.android.providers.downloads
com.qualcomm.qti.telephonyservice
com.android.vending
com.android.mms
com.qualcomm.qcrilmsgtunnel
com.qti.xdivert
com.android.cellbroadcastreceiver
com.google.android.gms
com.android.proxyhandler
com.qualcomm.qti.ims
com.qualcomm.location
com.android.shell
com.google.android.cellbroadcastreceiver
com.qualcomm.atfwd
com.android.providers.contacts
 

Attachments

  • Screenshot_2022-11-09-20-32-58-66_84d3000e3f4017145260f7618db1d683.jpg
    Screenshot_2022-11-09-20-32-58-66_84d3000e3f4017145260f7618db1d683.jpg
    431.3 KB · Views: 39
Last edited:

73sydney

Senior Member
Hi bro again
I just realized that gmsc turns green only when my phone is disconnected from the internet; when I turn it back on (mobile network/wifi), it turns red.
No google gms when conection is disabled
Whitelist (except idle) system apps:
com.android.providers.calendar
com.android.providers.downloads
com.qualcomm.qti.telephonyservice
com.android.mms
com.qualcomm.qcrilmsgtunnel
com.qti.xdivert
com.android.cellbroadcastreceiver
com.android.proxyhandler
com.qualcomm.qti.ims
com.qualcomm.location
com.android.shell
com.google.android.cellbroadcastreceiver
com.qualcomm.atfwd
com.android.providers.contacts
google gms existe when conection is turn on
Whitelist (except idle) system apps:
com.android.providers.calendar
com.android.providers.downloads
com.qualcomm.qti.telephonyservice
com.android.vending
com.android.mms
com.qualcomm.qcrilmsgtunnel
com.qti.xdivert
com.android.cellbroadcastreceiver
com.google.android.gms
com.android.proxyhandler
com.qualcomm.qti.ims
com.qualcomm.location
com.android.shell
com.google.android.cellbroadcastreceiver
com.qualcomm.atfwd
com.android.providers.contacts

I have no idea whats going on there,

as per https://forum.xda-developers.com/t/module-universal-gms-doze.3853710/post-77868802

Code:
dumpsys deviceidle | grep com.google.android.gms

should return 1 (nothing), regardless of the state, at least it does here

aka com.google.android.gms shouldnt appear in either list

please attach both:

/system/product/etc/sysconfig/google.xml
/my_bigball/etc/sysconfig/google.xml

here, even then im not promising i can figure it out...
 
  • Like
Reactions: yassine2217

yassine2217

Senior Member
May 22, 2011
106
27
Casablanca
OnePlus 9 Pro
I have no idea whats going on there,

as per https://forum.xda-developers.com/t/module-universal-gms-doze.3853710/post-77868802

Code:
dumpsys deviceidle | grep com.google.android.gms

should return 1 (nothing), regardless of the state, at least it does here

aka com.google.android.gms shouldnt appear in either list

please attach both:

/system/product/etc/sysconfig/google.xml
/my_bigball/etc/sysconfig/google.xml

here, even then im not promising i can figure it out...
Thanks for your reply bro
the first command show
umpsys deviceidle | grep com.google.android.gms <
com.google.android.gms
com.google.android.gms
com.google.android.gms
:/data/data/com.termux/files/home #
The files in attachements
 

Attachments

  • system_google.xml
    3.6 KB · Views: 5
  • my_bigball_google.xml
    4.7 KB · Views: 3

73sydney

Senior Member
Thanks for your reply bro
the first command show
umpsys deviceidle | grep com.google.android.gms <
com.google.android.gms
com.google.android.gms
com.google.android.gms
:/data/data/com.termux/files/home #
The files in attachements

Hopefully this makes sense, its a lot, so stick with it

Okay, im going to refer first to the original (traditional) method first discussed years ago, and which my simplified module does

Back in the dawn of time, to doze gms

the line in google.xml

<allow-in-power-save package="com.google.android.gms" />

was manually commented out to become:

<!-- <allow-in-power-save package="com.google.android.gms" /> -->

this left the line in place and able to be reversed

this is essentially what my module does, but automatically, (and adjusted for a range of paths since the original path):
Code:
# add <!=== prefix and --> suffix around relevant line in google.xml
sed -i 's/<allow-in-power-save package=\"com.google.android.gms\" \/>/<!--  &  -->/' "$MODPATH/$finalgxmlpath/google.xml"

other modules may just delete the line - theres comments about this in the thread - me i like to (try and) make fully reversible modules

Okay, from the files attached

system_google.xml:

theres NO <allow-in-power-save package="com.google.android.gms" />

i assume it either never existed (perhaps because of the presence of the my_bigball version - only a stock clean install would tell for sure) , or was removed by another module

my_bigball_google.xml:

theres 3 lines...

the "standard" <allow-in-power-save package="com.google.android.gms" />

and 3 more :

<allow-in-data-usage-save package="com.google.android.gms" />
<allow-unthrottled-location package="com.google.android.gms" />
<allow-ignore-location-settings package="com.google.android.gms" attributionTag="com.google.android.gms.thunderbird" />

the other 3 include where its toggling on with data...so that mystery is partially solved

the (modded) gloeyisk GMS Doze 1.8.6 i attached was modded to check for /my_bigball but it only looked for the lines

allow-unthrottled-location
allow-ignore-location-settings


the one it didnt look for out of the 3 you have was:

allow-in-data-usage-save

so i assume therefore thats the one triggering when data is on....mystery solved?

gloesky's module latest 1.8.7 (github) module searches for and attempts to patch these other lines

allow-unthrottled-location
allow-ignore-location-settings
allow-in-power-save
allow-in-data-usage-save


Both gloeyisks module and now CrazyBytes (modded) version on the Alt-Magisk-Repo (and github here:


Also both patch lines not related to gms, and for other packages like ims etc

Neither though look for the my_bigball path....

Mine, as mentioned, has never looked for the additional lines, or modified for other packages, and it wouldnt be true to the original method, or "simplified" if i started adding all the "features" that gloeyisk and now CrazyBytes version added. My version was merely made for me, and it serves me well, i merely uploaded it for anyone wanting the "original method" that broke less stuff, and i have added new paths where ive come across them.

So im not going to alter my module for these new lines (or other packages)

But what i will do is make a request for the gloeyisk and CrazyBytes to add the my_bigballs path to their modules, if your test (see below) pans out. Going on recent history CrazyBytes will likely make this change first

In the meantime, ill attach modded versions of CrazyBytes (which will hopefully work), as this seems like it will be the most updated going forward. Can you then test and give me feedback if it works (or not) as its all still theory until backed by evidence :)

CrazyBytes has 2 versions (both have been modded with the path)

GMS.Doze.V1.3A.zip = Find My Phone NOT blocked for extra battery saving
GMS.Doze.V1.3B.zip = Find My Phone IS blocked for extra battery saving

His warning (somewhat redundant i feel): These should only be flashed after Google account has been added...

If testing okay and i submit a request for path addition, when/if he adds the changes, i will update you and you can update via the Repo of via his github going forwards

Note: modded attachments removed to stop people going off on tangents
 
Last edited:
  • Like
Reactions: yassine2217

yassine2217

Senior Member
May 22, 2011
106
27
Casablanca
OnePlus 9 Pro
Hopefully this makes sense, its a lot, so stick with it

Okay, im going to refer first to the original (traditional) method first discussed years ago, and which my simplified module does

Back in the dawn of time, to doze gms

the line in google.xml

<allow-in-power-save package="com.google.android.gms" />

was manually commented out to become:

<!-- <allow-in-power-save package="com.google.android.gms" /> -->

this left the line in place and able to be reversed

this is essentially what my module does, but automatically, (and adjusted for a range of paths since the original path):
Code:
# add <!=== prefix and --> suffix around relevant line in google.xml
sed -i 's/<allow-in-power-save package=\"com.google.android.gms\" \/>/<!--  &  -->/' "$MODPATH/$finalgxmlpath/google.xml"

other modules may just delete the line - theres comments about this in the thread - me i like to (try and) make fully reversible modules

Okay, from the files attached

system_google.xml:

theres NO <allow-in-power-save package="com.google.android.gms" />

i assume it either never existed (perhaps because of the presence of the my_bigball version - only a stock clean install would tell for sure) , or was removed by another module

my_bigball_google.xml:

theres 3 lines...

the "standard" <allow-in-power-save package="com.google.android.gms" />

and 3 more :

<allow-in-data-usage-save package="com.google.android.gms" />
<allow-unthrottled-location package="com.google.android.gms" />
<allow-ignore-location-settings package="com.google.android.gms" attributionTag="com.google.android.gms.thunderbird" />

the other 3 include where its toggling on with data...so that mystery is partially solved

the (modded) gloeyisk GMS Doze 1.8.6 i attached was modded to check for /my_bigball but it only looked for the lines

allow-unthrottled-location package
allow-ignore-location-settings


the one it didnt look for out of the 3 you have was:

allow-in-data-usage-save

so i assume therefore thats the one triggering when data is on....mystery solved?

gloesky's module latest 1.8.7 (github) module searches for and attempts to patch these other lines

allow-unthrottled-location package
allow-ignore-location-settings package
allow-in-power-save package
allow-in-data-usage-save package


Both gloeyisks module and now CrazyBytes (modded) version on the Alt-Magisk-Repo (and github here:


Also both patch lines not related to gms, and for other packages like ims etc

Neither though look for the my_bigball path....

Mine, as mentioned, has never looked for the additional lines, or modified for other packages, and it wouldnt be true to the original method, or "simplified" if i started adding all the "features" that gloeyisk and now CrazyBytes version added. My version was merely made for me, and it serves me well, i merely uploaded it for anyone wanting the "original method" that broke less stuff, and i have added new paths where ive come across them.

So im not going to alter my module for these new lines (or other packages)

But what i will do is make a request for the gloeyisk and CrazyBytes to add the my_bigballs path to their modules, if your test (see below) pans out. Going on recent history CrazyBytes will likely make this change first

In the meantime, ill attach modded versions of CrazyBytes (which will hopefully work), as this seems like it will be the most updated going forward. Can you then test and give me feedback if it works (or not) as its all still theory until backed by evidence :)

CrazyBytes has 2 versions (both have been modded with the path)

GMS.Doze.V1.3A.zip = Find My Phone NOT blocked for extra battery saving
GMS.Doze.V1.3B.zip = Find My Phone IS blocked for extra battery saving

His warning (somewhat redundant i feel): These should only be flashed after Google account has been added...

If testing okay and i submit a request for path addition, when/if he adds the changes, i will update you and you can update via the Repo of via his github going forwards
I don't want to disappoint you, but I tried both modules I found on github, and they all go green when I disconnect from the internet, so hopefully there will be a new patch that can fix this in the future, and I want to thank you for your help over the last two days, bro. I apologize for bothering you so much.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 172
    Universal GMS Doze

    Overview:
    - Optimized and adjusted Google Play services.
    - Support API 23 or later.
    - Support Magisk Live or Custom Recovery installations.

    Contents:
    - Base extensions
    module: 1.8.4 (0830)
    code: 184

    Credits:
    - @topjohnwu / Magisk - Magisk Module Template
    - @JumboMan / Custom installation script

    Extras:
    - Donation: PayPal - LiberaPay
    - Mirror Links: GitHub Releases - Telegram - Index
    - Source Code: GitHub
    69
    Troubleshooting:

    - Command-line for check optimization (with add-on installed):
    Code:
    > 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.
    Code:
    > su
    > dumpsys deviceidle

    - Command-line for fix delayed incoming messages issue:
    Code:
    > su
    > cd /data/data
    > find . -type f -name '*gms*' -delete

    - Command-line for disable Find My Device:
    Code:
    > su
    > pm disable com.google.android.gms/
    com.google.android.gms.mdm.receivers.MdmDeviceAdminReceiver

    Changelog:

    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
    35
    So this is it guys, both of my old machines are totally broken and some parts are get burned. I've no idea to revive it since my money were spent for my primary demands. I've built ±5 beta builds available in the support group (if you want to) but there's no special things since I'm still tinkering with every devices that Find My Device doesn't disabled automatically. Talking/sharing in here or in support group would be a nice place to find other workarounds. I'm so sorry for the lack of updates, also I just want to tell that I'll married soon.

    Keep up all of your supports, sorry for the inconveniences.
    Have a nice day!
    30
    New stable build is up!​

    This is like a dilemma, where I've to continue this GMS optimization stuff or not. But I got a few ideas lately where my loyal supporters always ask about GMS optimization and this is the answer. I will continue to try to make this module work well, stable, efficiently and of course optimized GMS.
    Please remember to read installation guides on OP, and don't use similar modules or tweaks because I won't know where the issue came from that might one day happens to you. I would like to say Thank You to all my supporters for my simplicity-oriented-usability project.
    Happy flashing :fingers-crossed:
    27
    GL-DP wishes you Happy Eid Mubarak
    and
    Here's the Stable Update!​

    I've made a lot of changes regarding I'll stop/drop supports or works for optimizing GMS. Now I'm starting to focus to prevent unnecessary GMS running in the background with my own modified services in hope for getting better battery life. Please note that I'm not referred you to use similar modules while reporting any issues you've faced of. So I can check whether the wrong is from my module or in your ends.

    While the ponds is starting to dry, don't forget that the ponds will stay wet when the rain comes.
    Happy flashing! :fingers-crossed: