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
---
@@ -25,7 +25,7 @@ An addon module for tricky store
- MT manager is recommened for this method
## 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.
## 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)
## 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
- Fixed Magisk installation issue

View File

@@ -4,10 +4,14 @@
- Recommend to run with MT manager
## Changelog
### v1.4.1
- Remain same with v1.3.1
### v1.6, v1.7
- 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
### v1.3.1

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# 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
# Telegram channel: https://t.me/kowchannel
@@ -26,7 +26,6 @@ echo " "
echo " Staring script..."
echo " "
# Create or overwrite the target.txt file
> /data/adb/tricky_store/target.txt
echo " Adding apps to target.txt..."
@@ -46,8 +45,4 @@ for app in $ADDITION; do
fi
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!"

View File

@@ -1,9 +1,16 @@
TS="/data/adb/tricky_store"
SCRIPT_DIR="/data/adb/tricky_store"
echo "**********************************************"
echo "- Staring script..."
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 "\(__All set!__)/"

View File

@@ -1,12 +1,8 @@
#!/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
# 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"
# Config file check
echo "- Checking config files..."
echo " "
if [ ! -f "$MODDIR/EXCLUDE" ]; then
@@ -24,34 +20,26 @@ else
echo " "
fi
# Read exclution and addition config
EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$MODDIR/EXCLUDE" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | tr '\n' '|' | sed 's/|$//')
ADDITION=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$MODDIR/ADDITION")
# Create or overwrite the target.txt file
echo "- Overwritting target.txt"
echo " "
> /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 " "
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
# Add additional apps to the target file if they are not already present
echo "- Adding addition app... "
echo " "
for app in $ADDITION; do
app=$(echo "$app" | tr -d '[:space:]') # Trim any whitespace
if ! grep -Fxq "$app" /data/adb/tricky_store/target.txt; then
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
# 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 " "

View File

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

View File

@@ -1,7 +1,7 @@
id=TA_utl
name=Tricky Addon: Update Target List
version=v1.4.1
versionCode=141
name=Tricky Addon - Update Target List
version=v1.7
versionCode=170
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/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%/*}
TS="/data/adb/modules/tricky_store"
SCRIPT_DIR="/data/adb/tricky_store"
hash_value=$(grep -v '^#' "$MODPATH/boot_hash" | tr -d '[:space:]')
if [ -n "$hash_value" ]; then
@@ -18,10 +19,13 @@ if [ ! -d "$TS" ]; then
elif [ -f "$TS/disable" ]; then
sed -i 's/^description=.*/description=Tricky store is disabled/' "$MODPATH/module.prop"
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
cat "$MODPATH/common/module.prop.orig" > "$MODPATH/module.prop"
until [ "$(getprop sys.boot_completed)" = "1" ]; do
sleep 1
done
. "$MODPATH/UpdateTargetList.sh"
. "$SCRIPT_DIR/UpdateTargetList.sh"
fi

View File

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

View File

@@ -1,6 +1,6 @@
{
"versionCode": 140,
"version": "v1.4",
"zipUrl": "https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/download/v1.4/TrickyAddonModule_UpdateTargetList-v1.4.zip",
"versionCode": 160,
"version": "v1.6",
"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"
}