Allow files on the app replace list

This commit is contained in:
osm0sis
2024-02-02 15:44:33 -04:00
parent fae28159b9
commit 608e60adbb
3 changed files with 43 additions and 19 deletions

View File

@@ -20,22 +20,33 @@ if [ -d /data/adb/modules/MagiskHidePropsConf ]; then
ui_print "! MagiskHidePropsConfig (MHPC) module may cause issues with PIF"
fi
# Replace conflicting custom ROM injection app folders to disable them
# Replace/remove conflicting custom ROM injection app folders/files to disable them
LIST=$MODPATH/example.app_replace.list
[ -f "$MODPATH/custom.app_replace.list" ] && LIST=$MODPATH/custom.app_replace.list
for APP in $(grep -v '^#' $LIST); do
if [ -d "$APP" ]; then
if [ -e "$APP" ]; then
case $APP in
/system/*) HIDEDIR=$MODPATH/$APP;;
*) HIDEDIR=$MODPATH/system/$APP;;
/system/*) HIDEPATH=$MODPATH/$APP;;
*) HIDEPATH=$MODPATH/system/$APP;;
esac
mkdir -p $HIDEDIR
if [ "$KSU" = "true" -o "$APATCH" = "true" ]; then
setfattr -n trusted.overlay.opaque -v y $HIDEDIR
if [ -d "$APP" ]; then
mkdir -p $HIDEPATH
if [ "$KSU" = "true" -o "$APATCH" = "true" ]; then
setfattr -n trusted.overlay.opaque -v y $HIDEPATH
else
touch $HIDEPATH/.replace
fi
else
touch $HIDEDIR/.replace
mkdir -p $(dirname $HIDEPATH)
if [ "$KSU" = "true" -o "$APATCH" = "true" ]; then
mknod $HIDEPATH c 0 0
else
touch $HIDEPATH
fi
fi
if [[ -d "$APP" -o "$APP" = *".apk" ]]; then
ui_print "! $(basename $APP .apk) ROM app disabled, please uninstall any user app versions/updates after next reboot"
fi
ui_print "! $(basename $APP) ROM app disabled, please uninstall any user app versions/updates after next reboot"
fi
done

View File

@@ -1,7 +1,7 @@
# Rename to custom.app_replace.list once customized
#
# Add conflicting custom ROM injection app folder paths to this list
# and they will be replaced systemlessly to disable them
# Add conflicting custom ROM injection app folder/files paths to this list
# and they will be replaced/removed systemlessly to disable them
# Xiaomi.eu
/product/app/XiaomiEUInject
@@ -13,3 +13,7 @@
# hentaiOS
/system_ext/app/hentaiLewdbSVTDummy
# PixelOS
/system_ext/overlay/CertifiedPropsOverlay.apk
/system_ext/overlay/config/config.xml

View File

@@ -11,20 +11,29 @@ if [ -d /data/adb/modules/safetynet-fix ]; then
touch /data/adb/modules/safetynet-fix/remove
fi
# Replace conflicting custom ROM injection app folders to disable them
# Replace/remove conflicting custom ROM injection app folders/files to disable them
LIST=$MODDIR/example.app_replace.list
[ -f "$MODDIR/custom.app_replace.list" ] && LIST=$MODDIR/custom.app_replace.list
for APP in $(grep -v '^#' $LIST); do
if [ -d "$APP" ]; then
if [ -e "$APP" ]; then
case $APP in
/system/*) HIDEDIR=$MODDIR/$APP;;
*) HIDEDIR=$MODDIR/system/$APP;;
/system/*) HIDEPATH=$MODDIR/$APP;;
*) HIDEPATH=$MODDIR/system/$APP;;
esac
mkdir -p $HIDEDIR
if [ "$KSU" = "true" -o "$APATCH" = "true" ]; then
setfattr -n trusted.overlay.opaque -v y $HIDEDIR
if [ -d "$APP" ]; then
mkdir -p $HIDEPATH
if [ "$KSU" = "true" -o "$APATCH" = "true" ]; then
setfattr -n trusted.overlay.opaque -v y $HIDEPATH
else
touch $HIDEPATH/.replace
fi
else
touch $HIDEDIR/.replace
mkdir -p $(dirname $HIDEPATH)
if [ "$KSU" = "true" -o "$APATCH" = "true" ]; then
mknod $HIDEPATH c 0 0
else
touch $HIDEPATH
fi
fi
fi
done