Fix ROM injection app replacement on partitions other than /system

This commit is contained in:
osm0sis
2024-01-18 14:27:55 -04:00
parent 4c08eb1e42
commit d36b35b7e9
2 changed files with 16 additions and 6 deletions

View File

@@ -25,9 +25,14 @@ 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
HIDEDIR=$MODPATH/$APP
mkdir -p $HIDEDIR
touch $HIDEDIR/.replace
case $APP in
/system/*) HIDEDIR=$MODPATH/$APP;;
*) HIDEDIR=$MODPATH/system/$APP;;
esac
if [ ! -f "$HIDEDIR/.replace" ]; then
mkdir -p $HIDEDIR
touch $HIDEDIR/.replace
fi
ui_print "! $(basename $APP) ROM app disabled"
fi
done