You've already forked Tricky-Addon-Update-Target-List
mirror of
https://github.com/KOWX712/Tricky-Addon-Update-Target-List.git
synced 2025-09-06 06:37:09 +00:00
clarify rermark
remove useless code, unify variable,
This commit is contained in:
@@ -4,6 +4,10 @@
|
|||||||
- Recommend to run with MT manager
|
- Recommend to run with MT manager
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
### v1.8
|
||||||
|
- More clarify remark in code
|
||||||
|
- Remove useless code
|
||||||
|
|
||||||
### v1.6, v1.7
|
### v1.6, v1.7
|
||||||
- Remain same with v1.5
|
- Remain same with v1.5
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# by KOW
|
# Tricky Addon Lite: Update Target List Script v1.8
|
||||||
# Tricky Addon Lite: Update Target List Script v1.7 (v1.5)
|
|
||||||
# GitHub Repository: https://github.com/KOWX712/Tricky-Addon-Update-Target-List/blob/master/lite-script_only/README.md
|
# GitHub Repository: https://github.com/KOWX712/Tricky-Addon-Update-Target-List/blob/master/lite-script_only/README.md
|
||||||
# Telegram channel: https://t.me/kowchannel
|
# Telegram channel: https://t.me/kowchannel
|
||||||
|
|
||||||
# This script will put all non-system app into /data/adb/tricky_store/target.txt
|
# This script will put all non-system app into /data/adb/tricky_store/target.txt
|
||||||
|
|
||||||
|
###################################################
|
||||||
# Configurable exclude and addition list
|
# Configurable exclude and addition list
|
||||||
# DO NOT remove default package names here
|
# DO NOT remove default package names here
|
||||||
|
###################################################
|
||||||
|
|
||||||
EXCLUDE="
|
EXCLUDE="
|
||||||
oneplus
|
oneplus
|
||||||
coloros
|
coloros
|
||||||
@@ -22,14 +24,14 @@ io.github.vvb2060.keyattestation
|
|||||||
io.github.vvb2060.mahoshojo
|
io.github.vvb2060.mahoshojo
|
||||||
icu.nullptr.nativetest"
|
icu.nullptr.nativetest"
|
||||||
|
|
||||||
echo " "
|
###################################################
|
||||||
echo " Staring script..."
|
# Script
|
||||||
echo " "
|
###################################################
|
||||||
|
|
||||||
> /data/adb/tricky_store/target.txt
|
|
||||||
|
|
||||||
echo " Adding apps to target.txt..."
|
|
||||||
echo " "
|
echo " "
|
||||||
|
echo "- Staring script..."
|
||||||
|
echo " "
|
||||||
|
echo "- Adding apps to target.txt..."
|
||||||
|
|
||||||
EXCLUDE=$(echo "$EXCLUDE" | tr '\n' '|' | sed 's/^|//;s/|$//')
|
EXCLUDE=$(echo "$EXCLUDE" | tr '\n' '|' | sed 's/^|//;s/|$//')
|
||||||
ADDITION=$(echo "$ADDITION" | tr '\n' ' ' | sed 's/^ //;s/ $//')
|
ADDITION=$(echo "$ADDITION" | tr '\n' ' ' | sed 's/^ //;s/ $//')
|
||||||
@@ -45,4 +47,5 @@ for app in $ADDITION; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo " All done!"
|
echo " "
|
||||||
|
echo "- All done!"
|
||||||
|
|||||||
@@ -1,33 +1,29 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# This script will put all non-system app into /data/adb/tricky_store/target.txt
|
# This script will put all non-system app into /data/adb/tricky_store/target.txt
|
||||||
MODDIR="/data/adb/tricky_store/target_list_config"
|
CONFIG_DIR="/data/adb/tricky_store/target_list_config"
|
||||||
|
|
||||||
echo "- Checking config files..."
|
echo "- Checking config files..."
|
||||||
echo " "
|
echo " "
|
||||||
if [ ! -f "$MODDIR/EXCLUDE" ]; then
|
if [ ! -f "$CONFIG_DIR/EXCLUDE" ]; then
|
||||||
echo "! Exclude list is missing!"
|
echo "! Exclude list is missing, please install module again"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "- Exclude config file found."
|
echo "- Exclude config file found"
|
||||||
echo " "
|
echo " "
|
||||||
fi
|
fi
|
||||||
if [ ! -f "$MODDIR/ADDITION" ]; then
|
if [ ! -f "$CONFIG_DIR/ADDITION" ]; then
|
||||||
echo "! Addition list is missing"
|
echo "! Addition list is missing, please install module again"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "- Addition config file found."
|
echo "- Addition config file found"
|
||||||
echo " "
|
echo " "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$MODDIR/EXCLUDE" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | tr '\n' '|' | sed 's/|$//')
|
EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/EXCLUDE" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | tr '\n' '|' | sed 's/|$//')
|
||||||
ADDITION=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$MODDIR/ADDITION")
|
ADDITION=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/ADDITION")
|
||||||
|
|
||||||
echo "- Overwritting target.txt"
|
echo "- Adding apps into /data/adb/tricky_store/target.txt..."
|
||||||
echo " "
|
|
||||||
> /data/adb/tricky_store/target.txt
|
|
||||||
|
|
||||||
echo "- Adding apps into /data/adb/tricky_store/target.txt"
|
|
||||||
echo " "
|
echo " "
|
||||||
su -c pm list packages -3 </dev/null 2>&1 | cat | awk -F: '{print $2}' | grep -Ev "$EXCLUDE" > /data/adb/tricky_store/target.txt
|
su -c pm list packages -3 </dev/null 2>&1 | cat | awk -F: '{print $2}' | grep -Ev "$EXCLUDE" > /data/adb/tricky_store/target.txt
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|||||||
Reference in New Issue
Block a user