From 5e790b98f72fb12d8f4c2b40733a4417513426d1 Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Sun, 27 Oct 2024 01:06:03 +0800 Subject: [PATCH] 1.3.1 initial --- changelog.md | 4 ++++ lite-script_only/README.md | 3 +++ lite-script_only/UpdateTargetList.sh | 5 +++-- module/common/EXCLUDE | 3 ++- module/customize.sh | 30 ++++++++++++++++++++++++---- module/module.prop | 4 ++-- module/service.sh | 4 ++-- update.json | 6 +++--- 8 files changed, 45 insertions(+), 14 deletions(-) diff --git a/changelog.md b/changelog.md index 28d6c40..60d123b 100755 --- a/changelog.md +++ b/changelog.md @@ -8,6 +8,10 @@ GitHub release: https://github.com/KOWX712/Tricky-Addon-Update-Target-List/relea Telegram channel: https://t.me/kowchannel ## Changelog +### v1.3.1 +- Added Apatch Next package name to exclude list +- Fix automatic update target script not working issue + ### v1.3 - Minor improvement in code - Overwrtie protection: won't remove previous setup when updating module diff --git a/lite-script_only/README.md b/lite-script_only/README.md index 3fbf8a0..31fabb4 100644 --- a/lite-script_only/README.md +++ b/lite-script_only/README.md @@ -3,6 +3,9 @@ - Run with root priviledge ## Changelog +### v1.3.1 +- Added Apatch Next package name to exclude list + ### v1.3 - More user friendly exclude and addition list config diff --git a/lite-script_only/UpdateTargetList.sh b/lite-script_only/UpdateTargetList.sh index d798c0a..f8c205e 100644 --- a/lite-script_only/UpdateTargetList.sh +++ b/lite-script_only/UpdateTargetList.sh @@ -1,7 +1,7 @@ #!/bin/sh # by KOW -# Tricky Addon Lite: Update Target List Script v1.3 +# Tricky Addon Lite: Update Target List Script v1.3.1 # GitHub Repository: https://github.com/KOWX712/Tricky-Addon-Update-Target-List/blob/master/lite-script_only/README.md # Telegram channel: https://t.me/kowchannel @@ -13,7 +13,8 @@ EXCLUDE=" oneplus coloros com.android.patch -me.bmax.apatch" +me.bmax.apatch +me.garfieldhan.apatch.next" ADDITION=" com.google.android.gms diff --git a/module/common/EXCLUDE b/module/common/EXCLUDE index 3261968..306aef9 100644 --- a/module/common/EXCLUDE +++ b/module/common/EXCLUDE @@ -6,4 +6,5 @@ oneplus coloros com.android.patch -me.bmax.apatch \ No newline at end of file +me.bmax.apatch +me.garfieldhan.apatch.next \ No newline at end of file diff --git a/module/customize.sh b/module/customize.sh index 82de218..abefe44 100644 --- a/module/customize.sh +++ b/module/customize.sh @@ -51,6 +51,27 @@ COMPATH="$MODPATH/common" CONFIG_DIR="/data/adb/tricky_store/target_list_config" SCRIPT_DIR="/data/adb/tricky_store" MODNAME=$(grep '^id=' "$MODPATH/module.prop" | awk -F= '{print $2}' | xargs) +EXCLUDE=$(grep -vE '^#|^$' "$CONFIG_DIR/EXLUDE") +ADDITION=$(grep -vE '^#|^$' "$CONFIG_DIR/ADDITION") + +add_exclude() { + for app in $EXCLUDE; do + if ! grep -qx "$app" $COMPATH/EXCLUDE; then + echo "$app" >> $COMPATH/EXCLUDE + fi + done + mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE" +} + +add_addition() { + for app in $ADDITION; do + if ! grep -qx "$app" $COMPATH/ADDITION; then + echo "$app" >> $COMPATH/ADDITION + fi + done + mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION" +} + for status in normal ninstalled disabled; do cp "$MODPATH/module.prop" "$COMPATH/$status" done @@ -58,6 +79,7 @@ sed -i 's/^description=.*/description=Tricky store is not installed/' "$COMPATH/ sed -i 's/^description=.*/description=Tricky store is disabled/' "$COMPATH/disabled" rm -f "$SCRIPT_DIR/UpdateTargetList.sh" cp "$COMPATH/UpdateTargetList.sh" "$SCRIPT_DIR/UpdateTargetList.sh" + if [ ! -d "$CONFIG_DIR" ]; then mkdir -p "$CONFIG_DIR" mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE" @@ -68,13 +90,13 @@ elif [ -d "$CONFIG_DIR" ]; then mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION" elif [ ! -f "$CONFIG_DIR/ADDITION" ]; then mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION" - rm -f "$COMPATH/EXCLUDE" + add_exclude elif [ ! -f "$CONFIG_DIR/EXCLUDE" ]; then mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE" - rm -f "$COMPATH/ADDITION" + add_addition else - rm -f "$COMPATH/EXCLUDE" - rm -f "$COMPATH/ADDITION" + add_exclude + add_addition fi fi diff --git a/module/module.prop b/module/module.prop index bce591a..a0bb250 100644 --- a/module/module.prop +++ b/module/module.prop @@ -1,7 +1,7 @@ id=TA_utl name=Tricky Addon: Update Target List -version=v1.3 -versionCode=13 +version=v1.3.1 +versionCode=131 author=KOWX712 description=Update tricky store target list with action button. Custom config: ADDITION and EXCLUDE in /data/adb/tricky_store/target_list_config updateJson=https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/refs/heads/master/update.json \ No newline at end of file diff --git a/module/service.sh b/module/service.sh index f44f5c1..a9506f0 100644 --- a/module/service.sh +++ b/module/service.sh @@ -4,7 +4,7 @@ TS="/data/adb/modules/tricky_store" if [ ! -f "$COMPATH/ninstalled" ] || [ ! -f "$COMPATH/disabled" ] || [ ! -f "$COMPATH/normal" ]; then sed -i 's/^description=.*/description=Module is corrupted, please reinstall module./' "$MODDIR/module.prop" - abort + exit 1 fi if [ ! -d "$TS" ]; then @@ -16,5 +16,5 @@ else until [ "$(getprop sys.boot_completed)" = "1" ]; do sleep 1 done - . "$COMPATH/common/UpdateTargetList.sh" + . "$COMPATH/UpdateTargetList.sh" fi \ No newline at end of file diff --git a/update.json b/update.json index 86fa8cf..b15c9e1 100755 --- a/update.json +++ b/update.json @@ -1,6 +1,6 @@ { - "version": "v1.2", - "versionCode": 12, - "zipUrl": "https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/download/v1.2/TrickyAddonModule_UpdateTargetList-v1.2.zip", + "version": "v1.3", + "versionCode": 13, + "zipUrl": "https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/download/v1.3/TrickyAddonModule_UpdateTargetList-v1.3.zip", "changelog": "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/refs/heads/master/changelog.md" }