@gloeyisk Any chance to adapt your module's scripts to this /system_ext path? Or any way to make the
@RandomNewbie solution work for FlameGApps?
You can:
1) Unzip the module
2) Open customize.sh
Add
/system_ext/ to the paths in the lines:
# Patch the XML and place the modified one to the original directory
ui_print "- Patching XML files"
gms=$(xml=$(find /system/ /product/ /vendor/ -iname "*.xml");for i in $xml; do if grep -q 'allow-in-power-save package="com.google.android.gms"' $ROOT$i 2>/dev/null; then echo "$i";fi; done)
ims=$(xml=$(find /system/ /product/ /vendor/ -iname "*.xml");for i in $xml; do if grep -q 'allow-in-power-save package="com.google.android.ims"' $ROOT$i 2>/dev/null; then echo "$i";fi; done)
pst=$(xml=$(find /system/ /product/ /vendor/ -iname "*.xml");for i in $xml; do if grep -q 'allow-in-power-save package="com.google.android.apps.safetyhub"' $ROOT$i 2>/dev/null; then echo "$i";fi; done)
trb=$(xml=$(find /system/ /product/ /vendor/ -iname "*.xml");for i in $xml; do if grep -q 'allow-in-power-save package="com.google.android.apps.turbo"' $ROOT$i 2>/dev/null; then echo "$i";fi; done)
aka
# Patch the XML and place the modified one to the original directory
ui_print "- Patching XML files"
gms=$(xml=$(find /system/
/system_ext/ /product/ /vendor/ -iname "*.xml");for i in $xml; do if grep -q 'allow-in-power-save package="com.google.android.gms"' $ROOT$i 2>/dev/null; then echo "$i";fi; done)
ims=$(xml=$(find /system/
/system_ext/ /product/ /vendor/ -iname "*.xml");for i in $xml; do if grep -q 'allow-in-power-save package="com.google.android.ims"' $ROOT$i 2>/dev/null; then echo "$i";fi; done)
pst=$(xml=$(find /system/
/system_ext/ /product/ /vendor/ -iname "*.xml");for i in $xml; do if grep -q 'allow-in-power-save package="com.google.android.apps.safetyhub"' $ROOT$i 2>/dev/null; then echo "$i";fi; done)
trb=$(xml=$(find /system/
/system_ext/ /product/ /vendor/ -iname "*.xml");for i in $xml; do if grep -q 'allow-in-power-save package="com.google.android.apps.turbo"' $ROOT$i 2>/dev/null; then echo "$i";fi; done)
3) zip the files in the root of the modules folder back up, and flash and test
OR
You can try my simpler GMS Doze module (added the /system_ext/ path just now)
It doesnt do as much as gloeyisk's, but it uses the "original" method as described
here (this is the OG of doze tweaks)
aka it merely comments out
<
allow-in-power-save package="com.google.android.gms" />
to
<!-- <allow-in-power-save package="com.google.android.gms" /> -->
my common/install.sh (i use MMT-Ex module format):
Bash:
gxml=$(find /system/ /system_ext/ /product/ /vendor/ -iname "google.xml" -print | head -n 1 | sed 's|/[^/]*$||')
ui_print "google.xml found at: $gxml"
ui_print "creating directory: $MODPATH$gxml"
mkdir -p "$MODPATH$gxml"
ui_print "copying $gxml/google.xml to $MODPATH$gxml/"
cp -af "$gxml/google.xml" "$MODPATH$gxml/google.xml"
ui_print "modifying $MODPATH$gxml/google.xml"
sed -i 's/<allow-in-power-save package=\"com.google.android.gms\" \/>/<!-- & -->/g' "$MODPATH$gxml/google.xml"
what it does (similar to above, though different): finds the first google.xml it can in the paths:
/system/
/system_ext/
/product/
/vendor/
copies the google.xml to the modules /system folder
and then uses sed to add a <--- prefix and ---> suffix to the relevant line
thats all it does. for those who have issues with main GMS Doze module, you may like to try this simpler one. I made it (in 30 seconds) in response to a members question on here, and only up till now shared it with him privately. It resolved the issue was personally having, ymmv
attached....
never be afraid to open up a script and look for ways to customize it to your needs, its often easily to figure out how to add/change a path...its hard to hose your device with a magisk module, even if you bootloop it, its fixable....