diff --git a/module/common_setup.sh b/module/common_setup.sh index 92cc80a..c3bcdf7 100644 --- a/module/common_setup.sh +++ b/module/common_setup.sh @@ -37,13 +37,13 @@ for APP in $(grep -v '^#' $LIST); do elif [[ "$APP" = *".apk" ]]; then APK=$(readlink -f $APP); fi - if [ "$APK" ]; then + if [ -s "$APK" ]; then PKGNAME=$(unzip -p $APK AndroidManifest.xml | tr -d '\0' | grep -oE '[[:alnum:].-_]+\*http' | cut -d\* -f1) if [ "$PKGNAME" ] && grep -q "overlay package=\"$PKGNAME" $CFG; then HIDECFG=$MODPATH$PREFIX$CFG - if [ ! -f $HIDECFG ]; then + if [ ! -f "$HIDECFG" ]; then mkdir -p $(dirname $HIDECFG) - cp -fp $CFG $HIDECFG + cp -af $CFG $HIDECFG fi sed -i 's;;;' $HIDECFG fi diff --git a/module/customize.sh b/module/customize.sh index 74e66d7..a6cd9f2 100644 --- a/module/customize.sh +++ b/module/customize.sh @@ -3,6 +3,12 @@ if [ "$API" -lt 26 ]; then abort "! You can't use this module on Android < 8.0" fi +# Copy any disabled app files to updated module +if [ -d "/data/adb/modules/playintegrityfix/system" ]; then + ui_print "- Restoring disabled ROM apps configuration" + cp -arf /data/adb/modules/playintegrityfix/system $MODPATH +fi + # Copy any supported custom files to updated module for FILE in custom.app_replace.list custom.pif.json; do if [ -f "/data/adb/modules/playintegrityfix/$FILE" ]; then