Fix uninstall conflict apps

This commit is contained in:
chiteroman 2024-10-25 01:11:18 +02:00
parent 2a3506a053
commit 01036c58a7
2 changed files with 16 additions and 23 deletions

View File

@ -20,28 +20,6 @@ fi
rm -rf "$MODPATH"/system 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 # Conditional early sensitive properties
# Samsung # Samsung

View File

@ -1,5 +1,5 @@
MODPATH="${0%/*}" MODPATH="${0%/*}"
. $MODPATH/common_func.sh . "$MODPATH"/common_func.sh
# Conditional sensitive properties # Conditional sensitive properties
@ -43,3 +43,18 @@ resetprop_if_diff vendor.boot.vbmeta.device_state locked
# Other # Other
resetprop_if_diff sys.oem_unlock_allowed 0 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