diff --git a/module/post-fs-data.sh b/module/post-fs-data.sh index 617f9e50..b1adcae6 100644 --- a/module/post-fs-data.sh +++ b/module/post-fs-data.sh @@ -20,28 +20,6 @@ fi rm -rf "$MODPATH"/system -# Uninstall conflict apps -APPS=" -/system/app/EliteDevelopmentModule -/system/app/XInjectModule -/system/product/app/XiaomiEUInject -/system/product/app/XiaomiEUInject-Stub -/system/system_ext/app/hentaiLewdbSVTDummy -/system/system_ext/app/PifPrebuilt -" - -for APP in $APPS; do - if [ -d "$APP" ]; then - HIDEPATH="$MODPATH$APP" - mkdir -p "$HIDEPATH" - if [ "$KSU" = "true" ] || [ "$APATCH" = "true" ]; then - setfattr -n trusted.overlay.opaque -v y "$HIDEPATH" - else - touch "$HIDEPATH"/.replace - fi - fi -done - # Conditional early sensitive properties # Samsung diff --git a/module/service.sh b/module/service.sh index 33d472a2..adf3afc9 100644 --- a/module/service.sh +++ b/module/service.sh @@ -1,5 +1,5 @@ MODPATH="${0%/*}" -. $MODPATH/common_func.sh +. "$MODPATH"/common_func.sh # Conditional sensitive properties @@ -43,3 +43,18 @@ resetprop_if_diff vendor.boot.vbmeta.device_state locked # Other resetprop_if_diff sys.oem_unlock_allowed 0 + +# Disable and uninstall conflict apps +APPS=" +eu.xiaomi.module.inject +" + +for APP in $APPS; do + if pm list packages | grep -q "$APP"; then + pm disable --user 0 "$APP" + pm disable "$APP" + + pm uninstall --user 0 "$APP" + pm uninstall "$APP" + fi +done