From ad905cb6e04f67f9f2e658b30be46144c0bd5a3b Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Sat, 7 Dec 2024 17:02:42 +0800 Subject: [PATCH] fix invisible ksu residue --- module/install_func.sh | 9 ++++++--- module/post-fs-data.sh | 7 +++++++ module/service.sh | 8 -------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/module/install_func.sh b/module/install_func.sh index b9ccf95..f697e7b 100644 --- a/module/install_func.sh +++ b/module/install_func.sh @@ -5,9 +5,7 @@ initialize() { if [ -d "/data/adb/modules/$NEW_MODID" ]; then rm -rf "/data/adb/modules/$NEW_MODID" fi - - cp "$MODPATH/module.prop" "$COMPATH/temp/module.prop" - cp "$MODPATH/uninstall.sh" "$COMPATH/temp/uninstall.sh" + set_perm $COMPATH/get_extra.sh 0 2000 0755 set_perm $COMPATH/get_WebUI.sh 0 2000 0755 @@ -25,9 +23,14 @@ initialize() { echo "- Setting to visible..." rm -rf "$COMPATH/temp" NEW_MODID="$MODID" + if [ "$KSU" ] && [ -d "/data/adb/modules/.TA_utl" ]; then + touch "/data/adb/modules/.TA_utl/remove" + fi else mkdir -p "$COMPATH/temp/common" cp "$COMPATH/.default" "$COMPATH/temp/common/.default" + cp "$MODPATH/module.prop" "$COMPATH/temp/module.prop" + cp "$MODPATH/uninstall.sh" "$COMPATH/temp/uninstall.sh" fi fi sed -i "s|\"set-path\"|\"/data/adb/modules/$NEW_MODID/\"|" "$MODPATH/webroot/index.js" || { diff --git a/module/post-fs-data.sh b/module/post-fs-data.sh index 85f17ed..17698dc 100644 --- a/module/post-fs-data.sh +++ b/module/post-fs-data.sh @@ -14,4 +14,11 @@ if [ ! -d "$TS" ] || [ -f "$TS/remove" ]; then touch "$MODPATH/remove" fi exit 1 +fi + +if [ -f "$TS/action.sh" ]; then + rm -f "$TS/action.sh" +fi +if [ -d "$TS/webroot" ]; then + rm -rf "$TS/webroot" fi \ No newline at end of file diff --git a/module/service.sh b/module/service.sh index 2dc5412..8a9ae05 100644 --- a/module/service.sh +++ b/module/service.sh @@ -1,7 +1,6 @@ MODPATH=${0%/*} HIDE_DIR="/data/adb/modules/.TA_utl" TS="/data/adb/modules/tricky_store" -SCRIPT_DIR="/data/adb/tricky_store" TSPA="/data/adb/modules/tsupport-advance" aapt() { "$MODPATH/common/aapt" "$@"; } @@ -18,13 +17,6 @@ elif [ ! -d "$TSPA" ] && [ -f "/storage/emulated/0/stop-tspa-auto-target" ]; the rm -f "/storage/emulated/0/stop-tspa-auto-target" fi -if [ -f "$TS/action.sh" ]; then - rm -f "$TS/action.sh" -fi -if [ -d "$TS/webroot" ]; then - rm -rf "$TS/webroot" -fi - if [ -d "$MODPATH/common/temp" ]; then if [ "$KSU" ] || [ "$APATCH" ]; then rm -f "$MODPATH/module.prop"