Compare commits

15 Commits
v1.4.1 ... v1.7

Author SHA1 Message Date
KOWX712
20c402d425 v1.7 2024-11-03 16:22:54 +08:00
KOWX712
f61009b34e Update module.prop 2024-11-03 13:25:33 +08:00
KOWX712
39b6eb4b3d Update update.json 2024-11-02 18:22:29 +08:00
KOWX712
52e10335dc v1.6 2024-11-02 17:58:09 +08:00
KOWX712
3fe5853a7d Update customize.sh 2024-11-01 05:37:39 +08:00
KOWX712
65def0bed2 Update service.sh 2024-11-01 04:20:11 +08:00
KOWX712
a2fef2e1ed update v1.5 2024-11-01 03:35:41 +08:00
KOWX712
6cb72d87aa update v1.5 2024-11-01 03:27:02 +08:00
KOWX712
2948476589 optimize 2024-10-31 23:27:00 +08:00
KOWX712
842b2691a7 Update customize.sh 2024-10-31 23:10:26 +08:00
KOWX712
eb3ab39a80 fix config list issue
fix multiple package name in config list when updating module
2024-10-31 22:45:21 +08:00
KOWX712
1d105428e2 Update update.json 2024-10-31 21:53:11 +08:00
KOWX712
e11937b1c5 Update update.json 2024-10-31 21:48:54 +08:00
KOWX712
02c27b9692 Update customize.sh 2024-10-31 21:48:08 +08:00
KOWX712
b36c48b554 Update update.json 2024-10-31 21:21:30 +08:00
12 changed files with 105 additions and 96 deletions

View File

@@ -1,4 +1,4 @@
# **Tricky Addon: Update Target List** # **Tricky Addon - Update Target List**
An addon module for tricky store An addon module for tricky store
--- ---
@@ -25,7 +25,7 @@ An addon module for tricky store
- MT manager is recommened for this method - MT manager is recommened for this method
## More ## More
- Support to pass Patition Check Fail in Minotaur test **Support to pass Patition Check Fail in Minotaur test**
- Put Verfied Boot Hash to `boot_hash` in `/data/adb/modules/TA_utl`, reboot. - Put Verfied Boot Hash to `boot_hash` in `/data/adb/modules/TA_utl`, reboot.
## Links ## Links

View File

@@ -10,6 +10,16 @@ GitHub release: [Tricky Addon: Update Target List](https://github.com/KOWX712/Tr
Telegram channel: [KOW's Little World](https://t.me/kowchannel) Telegram channel: [KOW's Little World](https://t.me/kowchannel)
## Changelog ## Changelog
### v1.7
- Fixed update issue (Will start to work in next update)
### v1.6
- Updated something
### v1.5
- Fixed some known issue
- Updated something
### v1.4.1 ### v1.4.1
- Fixed Magisk installation issue - Fixed Magisk installation issue

View File

@@ -4,10 +4,14 @@
- Recommend to run with MT manager - Recommend to run with MT manager
## Changelog ## Changelog
### v1.4.1 ### v1.6, v1.7
- Remain same with v1.3.1 - Remain same with v1.5
### v1.4 ### v1.5
- Reduced size
- Removed useless code
### v1.4, v1.4.1
- Remain same with v1.3.1 - Remain same with v1.3.1
### v1.3.1 ### v1.3.1

View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# by KOW # by KOW
# Tricky Addon Lite: Update Target List Script v1.4.1 (v1.3.1) # 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
@@ -26,7 +26,6 @@ echo " "
echo " Staring script..." echo " Staring script..."
echo " " echo " "
# Create or overwrite the target.txt file
> /data/adb/tricky_store/target.txt > /data/adb/tricky_store/target.txt
echo " Adding apps to target.txt..." echo " Adding apps to target.txt..."
@@ -46,8 +45,4 @@ for app in $ADDITION; do
fi fi
done done
# Force stop gms. Not necessary, you can add it if you want
#su -c killall com.google.android.gms
#su -c killall com.google.android.gms.unstable
echo " All done!" echo " All done!"

View File

@@ -1,9 +1,16 @@
TS="/data/adb/tricky_store" SCRIPT_DIR="/data/adb/tricky_store"
echo "**********************************************" echo "**********************************************"
echo "- Staring script..." echo "- Staring script..."
echo " " echo " "
sh "$TS"/UpdateTargetList.sh if [ ! -f "$SCRIPT_DIR/UpdateTargetList.sh" ]; then
echo "! Script missing, please install module again"
echo "**********************************************"
exit 1
else
. "$SCRIPT_DIR/UpdateTargetList.sh"
fi
echo "**********************************************" echo "**********************************************"
echo "\(__All set!__)/" echo "\(__All set!__)/"

View File

@@ -1,12 +1,8 @@
#!/bin/sh #!/bin/sh
# by KOW, 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
# Using module to put normal app into system app may exclude corresponding app from this script too, please disable it if you found this script doesn't work.
MODDIR="/data/adb/tricky_store/target_list_config" MODDIR="/data/adb/tricky_store/target_list_config"
# Config file check
echo "- Checking config files..." echo "- Checking config files..."
echo " " echo " "
if [ ! -f "$MODDIR/EXCLUDE" ]; then if [ ! -f "$MODDIR/EXCLUDE" ]; then
@@ -24,34 +20,26 @@ else
echo " " echo " "
fi fi
# Read exclution and addition config
EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$MODDIR/EXCLUDE" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | tr '\n' '|' | sed 's/|$//') EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$MODDIR/EXCLUDE" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | tr '\n' '|' | sed 's/|$//')
ADDITION=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$MODDIR/ADDITION") ADDITION=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$MODDIR/ADDITION")
# Create or overwrite the target.txt file
echo "- Overwritting target.txt" echo "- Overwritting target.txt"
echo " " echo " "
> /data/adb/tricky_store/target.txt > /data/adb/tricky_store/target.txt
# Add all non-system apps to the target file and remove exclusions
echo "- Adding apps into /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
# Add additional apps to the target file if they are not already present
echo "- Adding addition app... " echo "- Adding addition app... "
echo " " echo " "
for app in $ADDITION; do for app in $ADDITION; do
app=$(echo "$app" | tr -d '[:space:]') # Trim any whitespace app=$(echo "$app" | tr -d '[:space:]')
if ! grep -Fxq "$app" /data/adb/tricky_store/target.txt; then if ! grep -Fq "$app" /data/adb/tricky_store/target.txt; then
echo "$app" >> /data/adb/tricky_store/target.txt echo "$app" >> /data/adb/tricky_store/target.txt
fi fi
done done
# Force stop gms. Not necessary, you can add it if you want
#su -c killall com.google.android.gms
#su -c killall com.google.android.gms.unstable
echo "- target.txt updated successfully" echo "- target.txt updated successfully"
echo " " echo " "

View File

@@ -1,83 +1,83 @@
SKIPUNZIP=0 SKIPUNZIP=0
DEBUG=false DEBUG=false
if [ "$MAGISK_VER_CODE" ]; then
BM="Magisk:$MAGISK_VER$MAGISK_VER_CODE" ui_print " ";
if [ "$APATCH" ]; then
ui_print "- APatch:$APATCH_VER$APATCH_VER_CODE"
elif [ "$KSU" ]; then elif [ "$KSU" ]; then
BM="KSU:$KSU_KERNEL_VER_CODE$KSU_VER_CODE" ui_print "- KSU:$KSU_KERNEL_VER_CODE$KSU_VER_CODE"
elif [ "$APATCH" ]; then elif [ "$MAGISK_VER_CODE" ]; then
BM="APatch:$APATCH_VER$APATCH_VER_CODE" ui_print "- Magisk:$MAGISK_VER$MAGISK_VER_CODE"
else else
ui_print " "; ui_print " ";
ui_print "! recovery is not supported"; ui_print "! recovery is not supported";
abort " "; abort " ";
fi fi
print_modname() {
ui_print "*******************************************************"
ui_print "Installing Tricky Addon: Update Target List"
ui_print "Author: KOWX712"
ui_print "*******************************************************"
}
COMPATH="$MODPATH/common" COMPATH="$MODPATH/common"
TS="/data/adb/tricky_store" TS="/data/adb/modules/tricky_store"
CONFIG_DIR="$TS/target_list_config" SCRIPT_DIR="/data/adb/tricky_store"
CONFIG_DIR="$SCRIPT_DIR/target_list_config"
MODNAME=$(grep '^id=' "$MODPATH/module.prop" | awk -F= '{print $2}' | xargs) MODNAME=$(grep '^id=' "$MODPATH/module.prop" | awk -F= '{print $2}' | xargs)
ORG_DIR="/data/adb/modules/$MODNAME" ORG_DIR="/data/adb/modules/$MODNAME"
EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/EXCLUDE") kb="$COMPATH/.default"
ADDITION=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/ADDITION")
if [ -d "$TS" ]; then if [ -d "$TS" ]; then
echo "- Tricky store module installed" ui_print "- Tricky store module installed"
ui_print " "
else else
echo "! Tricky store module is not installed" ui_print "! Tricky store module is not installed"
abort " " abort " "
fi fi
key_check() { key_check() {
while true; do while true; do
key_check=$(/system/bin/getevent -qlc 1) key_check=$(/system/bin/getevent -qlc 1)
key_event=$(echo "$key_check" | awk '{ print $3 }' | grep 'KEY_') key_event=$(echo "$key_check" | awk '{ print $3 }' | grep 'KEY_')
key_status=$(echo "$key_check" | awk '{ print $4 }') key_status=$(echo "$key_check" | awk '{ print $4 }')
if [[ "$key_event" == *"KEY_"* && "$key_status" == "DOWN" ]]; then if [[ "$key_event" == *"KEY_"* && "$key_status" == "DOWN" ]]; then
keycheck="$key_event" keycheck="$key_event"
break break
fi fi
done done
while true; do while true; do
key_check=$(/system/bin/getevent -qlc 1) key_check=$(/system/bin/getevent -qlc 1)
key_event=$(echo "$key_check" | awk '{ print $3 }' | grep 'KEY_') key_event=$(echo "$key_check" | awk '{ print $3 }' | grep 'KEY_')
key_status=$(echo "$key_check" | awk '{ print $4 }') key_status=$(echo "$key_check" | awk '{ print $4 }')
if [[ "$key_event" == *"KEY_"* && "$key_status" == "UP" ]]; then if [[ "$key_event" == *"KEY_"* && "$key_status" == "UP" ]]; then
break break
fi fi
done done
} }
add_exclude() { add_exclude() {
for app in $EXCLUDE; do EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/EXCLUDE")
if ! grep -qx "$app" $COMPATH/EXCLUDE; then for app in $EXCLUDE; do
echo "$app" >> $COMPATH/EXCLUDE app=$(echo "$app" | tr -d '[:space:]')
fi if ! grep -Fq "$app" $COMPATH/EXCLUDE; then
done echo "$app" >> $COMPATH/EXCLUDE
mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE" fi
done
mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE"
} }
add_addition() { add_addition() {
for app in $ADDITION; do ADDITION=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/ADDITION")
if ! grep -qx "$app" $COMPATH/ADDITION; then for app in $ADDITION; do
echo "$app" >> $COMPATH/ADDITION app=$(echo "$app" | tr -d '[:space:]')
fi if ! grep -Fq "$app" $COMPATH/ADDITION; then
done echo "$app" >> $COMPATH/ADDITION
mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION" fi
done
mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION"
} }
ui_print "- Installing..." ui_print "- Installing..."
if [ -f "$TS/UpdateTargetList.sh" ] if [ -f "$SCRIPT_DIR/UpdateTargetList.sh" ]; then
rm -f "$TS/UpdateTargetList.sh" rm -f "$SCRIPT_DIR/UpdateTargetList.sh"
fi fi
mv "$COMPATH/UpdateTargetList.sh" "$TS/UpdateTargetList.sh" mv "$COMPATH/UpdateTargetList.sh" "$SCRIPT_DIR/UpdateTargetList.sh"
cp "$MODPATH/module.prop" "$COMPATH/module.prop.orig" cp "$MODPATH/module.prop" "$COMPATH/module.prop.orig"
if [ -d "$CONFIG_DIR" ]; then if [ -d "$CONFIG_DIR" ]; then
@@ -94,7 +94,9 @@ if [ -d "$CONFIG_DIR" ]; then
add_exclude add_exclude
add_addition add_addition
fi fi
ui_print "- Migrating old config data"
else else
ui_print "- Creating config folder $CONFIG_DIR"
mkdir -p "$CONFIG_DIR" mkdir -p "$CONFIG_DIR"
mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE" mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE"
mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION" mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION"
@@ -115,7 +117,6 @@ if [ -f "$ORG_DIR/system.prop" ]; then
fi fi
fi fi
kb="$COMPATH/.keybox"
ui_print "*********************************************" ui_print "*********************************************"
ui_print "- Do you want to replace tricky store keybox?" ui_print "- Do you want to replace tricky store keybox?"
ui_print " VOL [+]: YES" ui_print " VOL [+]: YES"
@@ -124,16 +125,15 @@ ui_print "*********************************************"
key_check key_check
if [[ "$keycheck" == "KEY_VOLUMEUP" ]]; then if [[ "$keycheck" == "KEY_VOLUMEUP" ]]; then
ui_print "*********************************************" ui_print "*********************************************"
ui_print "- Backing up original keybox..."
ui_print "- Replacing keybox..." ui_print "- Replacing keybox..."
ui_print "*********************************************" ui_print "*********************************************"
if [ -f "$ORG_DIR/common/origkeybox" ]; then if [ -f "$ORG_DIR/common/origkeybox" ]; then
mv "$ORG_DIR/common/origkeybox" "$COMPATH/origkeybox" mv "$ORG_DIR/common/origkeybox" "$COMPATH/origkeybox"
else else
mv "$TS/keybox.xml" "$COMPATH/origkeybox" mv "$SCRIPT_DIR/keybox.xml" "$COMPATH/origkeybox"
fi fi
mv "$kb" "$SCRIPT_DIR/keybox.xml"
mv "$kb" "$TS/keybox.xml"
else else
if [ -f "$ORG_DIR/common/origkeybox" ]; then if [ -f "$ORG_DIR/common/origkeybox" ]; then
mv "$ORG_DIR/common/origkeybox" "$COMPATH/origkeybox" mv "$ORG_DIR/common/origkeybox" "$COMPATH/origkeybox"
@@ -144,4 +144,4 @@ fi
ui_print " " ui_print " "
ui_print "- Installation completed successfully! " ui_print "- Installation completed successfully! "
ui_print " " ui_print " "

View File

@@ -1,7 +1,7 @@
id=TA_utl id=TA_utl
name=Tricky Addon: Update Target List name=Tricky Addon - Update Target List
version=v1.4.1 version=v1.7
versionCode=141 versionCode=170
author=KOWX712 author=KOWX712
description=Update tricky store target list with action button. Custom config: ADDITION and EXCLUDE in /data/adb/tricky_store/target_list_config 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/master/update.json updateJson=https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/master/update.json

View File

@@ -1,5 +1,6 @@
MODPATH=${0%/*} MODPATH=${0%/*}
TS="/data/adb/modules/tricky_store" TS="/data/adb/modules/tricky_store"
SCRIPT_DIR="/data/adb/tricky_store"
hash_value=$(grep -v '^#' "$MODPATH/boot_hash" | tr -d '[:space:]') hash_value=$(grep -v '^#' "$MODPATH/boot_hash" | tr -d '[:space:]')
if [ -n "$hash_value" ]; then if [ -n "$hash_value" ]; then
@@ -18,10 +19,13 @@ if [ ! -d "$TS" ]; then
elif [ -f "$TS/disable" ]; then elif [ -f "$TS/disable" ]; then
sed -i 's/^description=.*/description=Tricky store is disabled/' "$MODPATH/module.prop" sed -i 's/^description=.*/description=Tricky store is disabled/' "$MODPATH/module.prop"
touch "$MODPATH/disable" touch "$MODPATH/disable"
elif [ ! -f "$SCRIPT_DIR/UpdateTargetList.sh" ]; then
sed -i 's/^description=.*/description=Script missing, please install module again/' "$MODPATH/module.prop"
touch "$MODPATH/disable"
else else
cat "$MODPATH/common/module.prop.orig" > "$MODPATH/module.prop" cat "$MODPATH/common/module.prop.orig" > "$MODPATH/module.prop"
until [ "$(getprop sys.boot_completed)" = "1" ]; do until [ "$(getprop sys.boot_completed)" = "1" ]; do
sleep 1 sleep 1
done done
. "$MODPATH/UpdateTargetList.sh" . "$SCRIPT_DIR/UpdateTargetList.sh"
fi fi

View File

@@ -1,9 +1,10 @@
MODPATH=${0%/*} MODPATH=${0%/*}
TS="/data/adb/tricky_store" SCRIPT_DIR="/data/adb/tricky_store"
# Remove residue and restore original keybox. # Remove residue and restore original keybox.
rm -rf "$TS/target_list_config" rm -rf "$SCRIPT_DIR/target_list_config"
rm -f "$TS/UpdateTargetList.sh" rm -f "$SCRIPT_DIR/UpdateTargetList.sh"
if [ -f "$MODPATH/common/origkeybox" ]; then if [ -f "$MODPATH/common/origkeybox" ]; then
rm -f "$TS/keybox.xml" rm -f "$SCRIPT_DIR/keybox.xml"
mv "$MODPATH/common/origkeybox" "$TS/keybox.xml" mv "$MODPATH/common/origkeybox" "$SCRIPT_DIR/keybox.xml"
fi fi

View File

@@ -1,6 +1,6 @@
{ {
"versionCode": 140, "versionCode": 160,
"version": "v1.4", "version": "v1.6",
"zipUrl": "https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/download/v1.4/TrickyAddonModule_UpdateTargetList-v1.4.zip", "zipUrl": "https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/download/v1.6/TrickyAddonModule-v1.6.zip",
"changelog": "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/refs/heads/master/changelog.md" "changelog": "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/refs/heads/master/changelog.md"
} }