Compare commits

30 Commits
v1.3 ... v1.4.1

Author SHA1 Message Date
KOWX712
62f86ceb50 Update README.md 2024-10-31 21:09:27 +08:00
KOWX712
d6fbd0a812 update changelog and version 2024-10-31 21:08:59 +08:00
KOWX712
6043b1de06 Update customize.sh 2024-10-31 21:05:46 +08:00
KOWX712
c7503a2643 fix magisk installation issue 2024-10-31 21:03:19 +08:00
KOWX712
6809b69c6d update description 2024-10-29 02:33:28 +08:00
KOWX712
af8d3a1723 optimize 2024-10-29 02:01:08 +08:00
KOWX712
932648bc5b reduce size 2024-10-29 01:40:59 +08:00
KOWX712
12670d26b0 Update update.json 2024-10-28 22:49:20 +08:00
KOWX712
e19ba37817 Update update.json 2024-10-28 22:48:51 +08:00
KOWX712
7a4fc9d9b5 Update update.json 2024-10-28 22:39:50 +08:00
KOWX712
630cdae303 Update changelog.md 2024-10-28 22:32:46 +08:00
KOWX712
5808080237 fix recognize error 2024-10-28 22:29:50 +08:00
KOWX712
07ab5f92b5 Update module.prop 2024-10-28 21:50:53 +08:00
KOWX712
9e64bde6a8 Update changelog.md 2024-10-28 21:46:43 +08:00
KOWX712
f2b1a0b79c Update UpdateTargetList.sh 2024-10-28 21:42:38 +08:00
KOWX712
ebe9fce938 Update README.md 2024-10-28 21:37:49 +08:00
KOWX712
c0a4dd4128 v1.4 2024-10-28 21:34:42 +08:00
KOWX712
1ebe14c646 refactor code
simplify, bug fix, unify variable name
2024-10-28 21:28:56 +08:00
KOWX712
4a7437705c change ro.boot.vbmeta.digest logic
migrate from system.prop to reset prop due system.prop not working on some device
2024-10-28 19:50:02 +08:00
KOWX712
608f3364af Merge branch 'master' of https://github.com/KOWX712/Tricky-Addon-Update-Target-List 2024-10-28 03:16:19 +08:00
KOWX712
6d56230a99 Update customize.sh 2024-10-28 03:16:15 +08:00
KOWX712
a07ce94b1b Update update.json 2024-10-27 03:00:13 +08:00
KOWX712
a2132bdc3a Update changelog.md 2024-10-27 02:43:02 +08:00
KOWX712
3dbc256230 Update update.json 2024-10-27 02:35:24 +08:00
KOWX712
cf5b4d458d fix recognition issue 2024-10-27 02:24:27 +08:00
KOWX712
dc85dfbe10 fix 2024-10-27 01:34:30 +08:00
KOWX712
c89b112d98 Merge branch 'master' of https://github.com/KOWX712/Tricky-Addon-Update-Target-List 2024-10-27 01:06:08 +08:00
KOWX712
5e790b98f7 1.3.1 initial 2024-10-27 01:06:03 +08:00
KOWX712
bd3362646f Update update.json 2024-10-26 04:38:07 +08:00
KOWX712
35f481c626 Update update.json 2024-10-26 04:37:57 +08:00
17 changed files with 194 additions and 110 deletions

View File

@@ -5,19 +5,28 @@ An addon module for tricky store
## Description
- Automated script to update tricky store target list.
- Custom config: ADDITION and EXCLUDE in `/data/adb/tricky_store/target_list_config`
- System app excluded by default
- This is **not** a necessary module for root hide but for those who lazy to do it manually
## Requirements
- Tricky store module installed
## Instructions
**Module will update taget list on every boot.**
### Automatic update
- On boot
### Manually update
**Action button method**
- If action button feature is available, use action button can update tricky store target list.
- Use action button to update tricky store target list.
- Available for Magisk 27008+, KernelSU 11981+, Apatch 10927+
**Manual script method**
- If action button feature isn't avaliable, you can run `UpdateTargetList.sh` under `/data/adb/tricky_store` manually.
- Run `UpdateTargetList.sh` under `/data/adb/tricky_store` manually.
- MT manager is recommened for this method
## More
- Support to pass Patition Check Fail in Minotaur test
- Put Verfied Boot Hash to `boot_hash` in `/data/adb/modules/TA_utl`, reboot.
## Links
Download: [GitHub release](https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases)

View File

@@ -3,11 +3,25 @@ Automated script to update tricky store target.txt
Requirement: Tricky Store module installed
GitHub release: https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/latest
Manually add VerifiedBootHash to /data/adb/modules/TA_utl/boot_hash (optional)
Telegram channel: https://t.me/kowchannel
GitHub release: [Tricky Addon: Update Target List](https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/latest)
Telegram channel: [KOW's Little World](https://t.me/kowchannel)
## Changelog
### v1.4.1
- Fixed Magisk installation issue
### v1.4
- Migrate ro.boot.vbmeta.digest from system.prop to resetprop
- Fix config list recognize error on some device
- Refactor code
### 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
- Overwrite protection: won't remove previous setup when updating module

View File

@@ -1,8 +1,18 @@
## Tricky Addon Lite: Update Target List Script
- Script only, **NOT Module**
- Run with root priviledge
- Recommend to run with MT manager
## Changelog
### v1.4.1
- Remain same with v1.3.1
### v1.4
- Remain same with v1.3.1
### v1.3.1
- Added Apatch Next package name to exclude list
### v1.3
- More user friendly exclude and addition list config

View File

@@ -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.4.1 (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

View File

@@ -1,33 +1,33 @@
#!/sbin/sh
#################
# Initialization
#################
umask 022
# echo before loading util_functions
ui_print() { echo "$1"; }
require_new_magisk() {
ui_print "*******************************"
ui_print " Please install Magisk v20.4+! "
ui_print "*******************************"
exit 1
}
#########################
# Load util_functions.sh
#########################
OUTFD=$2
ZIPFILE=$3
mount /data 2>/dev/null
[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
. /data/adb/magisk/util_functions.sh
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
install_module
exit 0
#!/sbin/sh
#################
# Initialization
#################
umask 022
# echo before loading util_functions
ui_print() { echo "$1"; }
require_new_magisk() {
ui_print "*******************************"
ui_print " Please install Magisk v20.4+! "
ui_print "*******************************"
exit 1
}
#########################
# Load util_functions.sh
#########################
OUTFD=$2
ZIPFILE=$3
mount /data 2>/dev/null
[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
. /data/adb/magisk/util_functions.sh
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
install_module
exit 0

View File

@@ -1 +1 @@
#MAGISK
#MAGISK

View File

@@ -1,11 +1,11 @@
MODDIR=${0%/*}
TS="/data/adb/tricky_store"
echo "**********************************************"
echo "- Staring script..."
echo " "
sh "$MODDIR"/common/UpdateTargetList.sh
sh "$TS"/UpdateTargetList.sh
echo "**********************************************"
echo "\(__All set!__)/"
echo "Exiting in 3 seconds..."
sleep 3
echo "Exiting in 2 seconds..."
sleep 2

View File

@@ -6,4 +6,4 @@
com.google.android.gms
io.github.vvb2060.keyattestation
io.github.vvb2060.mahoshojo
icu.nullptr.nativetest
icu.nullptr.nativetest

View File

@@ -6,4 +6,5 @@
oneplus
coloros
com.android.patch
me.bmax.apatch
me.bmax.apatch
me.garfieldhan.apatch.next

View File

@@ -10,14 +10,14 @@ MODDIR="/data/adb/tricky_store/target_list_config"
echo "- Checking config files..."
echo " "
if [ ! -f "$MODDIR/EXCLUDE" ]; then
echo "! Exclude list is missing, please reinstall module"
echo "! Exclude list is missing!"
exit 1
else
echo "- Exclude config file found."
echo " "
fi
if [ ! -f "$MODDIR/ADDITION" ]; then
echo "! Addition list is missing, please reinstall module"
echo "! Addition list is missing"
exit 1
else
echo "- Addition config file found."
@@ -25,8 +25,8 @@ else
fi
# Read exclution and addition config
EXCLUDE=$(grep -vE '^#|^$' "$MODDIR/EXCLUDE" | tr '\n' '|' | sed 's/|$//')
ADDITION=$(grep -vE '^#|^$' "$MODDIR/ADDITION")
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"
@@ -43,7 +43,8 @@ sleep 1
echo "- Adding addition app... "
echo " "
for app in $ADDITION; do
if ! grep -qx "$app" /data/adb/tricky_store/target.txt; then
app=$(echo "$app" | tr -d '[:space:]') # Trim any whitespace
if ! grep -Fxq "$app" /data/adb/tricky_store/target.txt; then
echo "$app" >> /data/adb/tricky_store/target.txt
fi
done

6
module/common/boot_hash Normal file
View File

@@ -0,0 +1,6 @@
# This file is to pass Minotaur native test 'Partition Check Fail'
# Download Key Attestation (chiteroman fork recommended)
# Link: https://github.com/chiteroman/KeyAttestation/releases
# Get your VerifiedBootHash value from Key Attestation app
# Ask here if you don't know how to do: https://t.me/kowchannelchat
# Paste verifiedBootHash value on next line and save

View File

@@ -1,3 +0,0 @@
# To pass Minotaur native test Conventional Test (8), you can get your VerifiedBootHash from KeyAttestation app
# Put verifiedBootHash after 'ro.boot.vbmeta.digest=' and remove the '#' infront of it.
#ro.boot.vbmeta.digest=

View File

@@ -1,6 +1,6 @@
SKIPUNZIP=0
DEBUG=false
if [ "$(which magisk)" ]; then
if [ "$MAGISK_VER_CODE" ]; then
BM="Magisk:$MAGISK_VER$MAGISK_VER_CODE"
elif [ "$KSU" ]; then
BM="KSU:$KSU_KERNEL_VER_CODE$KSU_VER_CODE"
@@ -19,7 +19,15 @@ print_modname() {
ui_print "*******************************************************"
}
if [ -d /data/adb/modules/tricky_store ]; then
COMPATH="$MODPATH/common"
TS="/data/adb/tricky_store"
CONFIG_DIR="$TS/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")
if [ -d "$TS" ]; then
echo "- Tricky store module installed"
else
echo "! Tricky store module is not installed"
@@ -46,43 +54,65 @@ key_check() {
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"
}
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"
}
ui_print "- Installing..."
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)
for status in normal ninstalled disabled; do
cp "$MODPATH/module.prop" "$COMPATH/$status"
done
sed -i 's/^description=.*/description=Tricky store is not installed/' "$COMPATH/ninstalled"
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"
mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION"
elif [ -d "$CONFIG_DIR" ]; then
if [ -f "$TS/UpdateTargetList.sh" ]
rm -f "$TS/UpdateTargetList.sh"
fi
mv "$COMPATH/UpdateTargetList.sh" "$TS/UpdateTargetList.sh"
cp "$MODPATH/module.prop" "$COMPATH/module.prop.orig"
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"
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
else
mkdir -p "$CONFIG_DIR"
mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE"
mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION"
fi
if [ ! -f "/data/adb/modules/$MODNAME/system.prop" ]; then
mv "$COMPATH/system.prop" "$MODPATH/system.prop"
if [ ! -f "$ORG_DIR/boot_hash" ]; then
mv "$COMPATH/boot_hash" "$MODPATH/boot_hash"
else
rm -f "$COMPATH/system.prop"
mv "/data/adb/modules/$MODNAME/system.prop" "$MODPATH/system.prop"
rm -f "$COMPATH/boot_hash"
mv "$ORG_DIR/boot_hash" "$MODPATH/boot_hash"
fi
# Migrate from old version setup
if [ -f "$ORG_DIR/system.prop" ]; then
hash_value=$(sed -n 's/^ro.boot.vbmeta.digest=//p' "$ORG_DIR/system.prop")
if [ -n "$hash_value" ]; then
echo -e "\n$hash_value" >> "$MODPATH/boot_hash"
fi
fi
kb="$COMPATH/.keybox"
@@ -93,15 +123,23 @@ ui_print " VOL [-]: NO"
ui_print "*********************************************"
key_check
if [[ "$keycheck" == "KEY_VOLUMEUP" ]]; then
ui_print "*********************************************"
ui_print "- Replacing keybox..."
ui_print "*********************************************"
if [ ! -f "/data/adb/modules/$MODNAME/common/origkeybox" ]; then
mv "$SCRIPT_DIR/keybox.xml" "$COMPATH/origkeybox"
fi
mv "$kb" "$SCRIPT_DIR/keybox.xml"
ui_print "*********************************************"
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"
fi
mv "$kb" "$TS/keybox.xml"
else
rm -f "$kb"
if [ -f "$ORG_DIR/common/origkeybox" ]; then
mv "$ORG_DIR/common/origkeybox" "$COMPATH/origkeybox"
else
rm -f "$kb"
fi
fi
ui_print " "

View File

@@ -1,7 +1,7 @@
id=TA_utl
name=Tricky Addon: Update Target List
version=v1.3
versionCode=13
version=v1.4.1
versionCode=141
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
updateJson=https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/master/update.json

View File

@@ -1,20 +1,27 @@
MODDIR=${0%/*}
COMPATH="$MODDIR/common"
MODPATH=${0%/*}
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
hash_value=$(grep -v '^#' "$MODPATH/boot_hash" | tr -d '[:space:]')
if [ -n "$hash_value" ]; then
resetprop -n ro.boot.vbmeta.digest "$hash_value"
fi
if [ ! -f "$MODPATH/common/module.prop.orig" ]; then
sed -i 's/^description=.*/description=Module is corrupted, please reinstall module./' "$MODPATH/module.prop"
touch "$MODPATH/disable"
exit 1
fi
if [ ! -d "$TS" ]; then
cat "$COMPATH/ninstalled" > "$MODDIR/module.prop"
sed -i 's/^description=.*/description=Tricky store is not installed/' "$MODPATH/module.prop"
touch "$MODPATH/disable"
elif [ -f "$TS/disable" ]; then
cat "$COMPATH/disabled" > "$MODDIR/module.prop"
sed -i 's/^description=.*/description=Tricky store is disabled/' "$MODPATH/module.prop"
touch "$MODPATH/disable"
else
cat "$COMPATH/normal" > "$MODDIR/module.prop"
cat "$MODPATH/common/module.prop.orig" > "$MODPATH/module.prop"
until [ "$(getprop sys.boot_completed)" = "1" ]; do
sleep 1
done
. "$COMPATH/common/UpdateTargetList.sh"
. "$MODPATH/UpdateTargetList.sh"
fi

View File

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

View File

@@ -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",
"versionCode": 140,
"version": "v1.4",
"zipUrl": "https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/download/v1.4/TrickyAddonModule_UpdateTargetList-v1.4.zip",
"changelog": "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/refs/heads/master/changelog.md"
}