diff --git a/module/common/ADDITION b/module/common/ADDITION deleted file mode 100644 index 30c4e64..0000000 --- a/module/common/ADDITION +++ /dev/null @@ -1,8 +0,0 @@ -# This is the list of additional apps to include in the target file -# DO NOT remove the default app here -# You can add your custom addition app's package name here -# Each app package name should be on a new line -com.google.android.gms -io.github.vvb2060.keyattestation -io.github.vvb2060.mahoshojo -icu.nullptr.nativetest diff --git a/module/common/EXCLUDE b/module/common/EXCLUDE deleted file mode 100644 index 623dd5b..0000000 --- a/module/common/EXCLUDE +++ /dev/null @@ -1,10 +0,0 @@ -# This is the list of apps to exclude from the target file -# DO NOT remove the default app here -# You can add your custom exclusion app here -# Each app package name should be on a new line -oneplus -coloros -miui -com.android.patch -me.bmax.apatch -me.garfieldhan.apatch.next diff --git a/module/common/UpdateTargetList.sh b/module/common/UpdateTargetList.sh deleted file mode 100644 index 5506051..0000000 --- a/module/common/UpdateTargetList.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -# This script will put non-system app into /data/adb/tricky_store/target.txt -CONFIG_DIR="/data/adb/tricky_store/target_list_config" - -echo "- Checking config files..." -echo " " -if [ ! -f "$CONFIG_DIR/EXCLUDE" ]; then - echo "! Exclude list is missing, please install module again" - exit 1 -else - echo "- Exclude config file found" - echo " " -fi -if [ ! -f "$CONFIG_DIR/ADDITION" ]; then - echo "! Addition list is missing, please install module again" - exit 1 -else - echo "- Addition config file found" - echo " " -fi - -EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/EXCLUDE" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') -ADDITION=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/ADDITION" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') - -for app in $ADDITION; do - app=$(echo "$app" | tr -d '[:space:]') - if grep -Fq "$app" "$CONFIG_DIR/EXCLUDE"; then - sed -i "\|^$app$|d" "$CONFIG_DIR/EXCLUDE" - fi -done - -EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/EXCLUDE" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | tr '\n' '|' | sed 's/|$//') - -echo "- Adding apps into /data/adb/tricky_store/target.txt..." -echo " " -pm list packages -3 &1 | awk -F: '{print $2}' | grep -Ev "$EXCLUDE" > /data/adb/tricky_store/target.txt - -echo "- Adding addition app..." -echo " " -for app in $ADDITION; do - app=$(echo "$app" | tr -d '[:space:]') - if ! grep -Fq "$app" /data/adb/tricky_store/target.txt; then - echo "$app" >> /data/adb/tricky_store/target.txt - fi -done - -echo "- target.txt updated successfully" -echo " " \ No newline at end of file diff --git a/module/install_func.sh b/module/install_func.sh index 3a36bbd..ea8dd27 100644 --- a/module/install_func.sh +++ b/module/install_func.sh @@ -2,17 +2,12 @@ initialize() { if [ -f "$SCRIPT_DIR/UpdateTargetList.sh" ]; then rm -f "$SCRIPT_DIR/UpdateTargetList.sh" fi - if [ -f "$CONFIG_DIR/skipwebui" ]; then - rm -f "$CONFIG_DIR/skipwebui" - fi 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 "$COMPATH/.default" "$COMPATH/temp/.default" - mv "$COMPATH/UpdateTargetList.sh" "$SCRIPT_DIR/UpdateTargetList.sh" - set_perm $SCRIPT_DIR/UpdateTargetList.sh 0 2000 0755 set_perm $COMPATH/get_extra.sh 0 2000 0755 set_perm $COMPATH/get_WebUI.sh 0 2000 0755 @@ -46,47 +41,9 @@ initialize() { rm -rf "$MODPATH/bin" } -add_exclude() { - EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/EXCLUDE") - for app in $EXCLUDE; do - app=$(echo "$app" | tr -d '[:space:]') - if ! grep -Fq "$app" $COMPATH/EXCLUDE; then - echo "$app" >> $COMPATH/EXCLUDE - fi - done - mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE" -} - -add_addition() { - ADDITION=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/ADDITION") - for app in $ADDITION; do - app=$(echo "$app" | tr -d '[:space:]') - if ! grep -Fq "$app" $COMPATH/ADDITION; then - echo "$app" >> $COMPATH/ADDITION - fi - done - mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION" -} - find_config() { if [ -d "$CONFIG_DIR" ]; then - if [ ! -f "$CONFIG_DIR/EXCLUDE" ] && [ ! -f "$CONFIG_DIR/ADDITION" ]; then - mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE" - mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION" - elif [ ! -f "$CONFIG_DIR/ADDITION" ]; then - mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION" - add_exclude - elif [ ! -f "$CONFIG_DIR/EXCLUDE" ]; then - mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE" - add_addition - else - add_exclude - add_addition - fi - else - mkdir -p "$CONFIG_DIR" - mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE" - mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION" + rm -rf "$CONFIG_DIR" fi }