Compare commits

8 Commits
v3.2 ... v3.3

Author SHA1 Message Date
KOWX712
d9a00b9540 v3.3 release
changelog: fix typo
2025-02-07 14:35:19 +08:00
KOWX712
ed77c72a79 update with tricky store 1.2.1 2025-02-07 14:27:42 +08:00
KOWX712
b5370ad088 script opt 2025-02-07 10:55:54 +08:00
KOWX712
bb7573f5dd add denylist to target on boot
choose "Select from DenyList" in WebUI once to enable this feature
2025-02-06 22:32:36 +08:00
KOWX712
ccffd2eaed update username 2025-02-05 22:23:44 +08:00
KOWX712
d9c1cdc11d Update README.md 2025-02-05 14:57:01 +08:00
KOWX712
e1f9c8904a Update .extra 2025-02-05 14:49:43 +08:00
KOWX712
3b98a88c77 typo 2025-02-02 13:03:36 +08:00
12 changed files with 104 additions and 54 deletions

2
.extra

File diff suppressed because one or more lines are too long

3
.gitattributes vendored
View File

@@ -3,8 +3,9 @@
*.prop text eol=lf
*.md text eol=lf
*.xml text eol=lf
*.json text eol=lf
.extra text eol=lf
META-INF/** text eol=lf
# Denote all files that are truly binary and should not be modified.
common/addon/**/tools/** binary
module/bin/**/** binary

View File

@@ -16,8 +16,8 @@ Configure Tricky Store target.txt with KSU WebUI.
### Magisk
- Action button to open WebUI
- Support KSUWebUIStandalone and latest MMRL
- Automatic install [KSUWebUIStandalone](https://github.com/5ec1cff/KsuWebUIStandalone) if none of them are installed.
- Support [KSUWebUIStandalone](https://github.com/5ec1cff/KsuWebUIStandalone) and [MMRL](https://github.com/MMRLApp/MMRL)
- Automatic KSUWebUIStandalone install if none of them are installed.
### What Can This Module Do
| Feature | Status |

View File

@@ -8,11 +8,16 @@ GitHub release: [Tricky Addon: Update Target List](https://github.com/KOWX712/Tr
Telegram channel: [KOW's Little World](https://t.me/kowchannel)
## Changelog
### v3.3
- Support auto config `security_patch.txt` for Tricky Store v1.2.1 or higher.
- No longer need to add `!` to Play Store for devices that have security patch older than one year to get strong integrity in new A13+ check.
- **Magisk:** automatically add apps from DenyList to `target.txt` on boot. To enable this feature, click "Select from DenyList" once in WebUI after update.
### v3.2
- Add `android` and `com.android.vending` by default.
- Handle `ro.vendor.build.security_patch` if the value is different.
- Updated Japanese translation (#11, @reindex-ot)
- Addded Turkish translation (@berkmirsat)
- Added Turkish translation (@berkmirsatk)
### v3.1
- Added `com.google.android.gsf` and `com.android.vending` into WebUI app list. (#10, @ChiseWaguri)
@@ -34,7 +39,7 @@ Telegram channel: [KOW's Little World](https://t.me/kowchannel)
- Optimized scripts, thanks to @backslashxx.
- Fixed freeze in weak connection.
- Added Spanish, thanks to @Keinta15.
- Removed rescriction on installation but module will still be removed if tricky store is not found after reboot.
- Removed restriction on installation but module will still be removed if Tricky Store is not found after reboot.
### v2.8
- Fixed all KSUWebUIStandalone freeze issue, removed visible option.
@@ -52,7 +57,7 @@ Telegram channel: [KOW's Little World](https://t.me/kowchannel)
- Press any position of app card to select/deselct.
### v2.6
- Invisible module, intergrate action button & webui on tricky store card. You can stil use visible option if you found any issue with invisble module. Thanks for idea from @backslashxx.
- Invisible module, integrate action button & WebUI on Tricky Store card. You can still use visible option if you found any issue with invisible module. Thanks for idea from @backslashxx.
- To uninstall invisble module, scroll down to the bottom of WebUI and press Uninstall WebUI.
- Add update prompt if found new version in webui, and show module if found an update. (invisible)
- Reduced WebUI loading time

View File

@@ -14,22 +14,22 @@ abort() {
}
download() {
local type=${1#--}
local url=$2
local output=$3
download_type=${1#--}
download_url=$2
download_output=$3
PATH=/data/adb/magisk:/data/data/com.termux/files/usr/bin:$PATH
if command -v curl >/dev/null 2>&1; then
if [ "$type" = "output" ]; then
timeout 10 curl -Lo "$output" "$url"
if [ "$download_type" = "output" ]; then
timeout 10 curl -Lo "$download_output" "$download_url"
else
timeout 2 curl -s "$url"
timeout 2 curl -s "$download_url"
fi
else
if [ "$type" = "output" ]; then
timeout 10 busybox wget --no-check-certificate -qO "$output" "$url"
if [ "$download_type" = "output" ]; then
timeout 10 busybox wget --no-check-certificate -qO "$download_output" "$download_url"
else
timeout 2 busybox wget --no-check-certificate -qO- "$url"
timeout 2 busybox wget --no-check-certificate -qO- "$download_url"
fi
fi
PATH="$ORG_PATH"

View File

@@ -5,28 +5,35 @@ SKIPLIST="$MODPATH/tmp/skiplist"
OUTPUT="$MODPATH/tmp/exclude-list"
KBOUTPUT="$MODPATH/tmp/.extra"
if [ "$MODPATH" = "/data/adb/modules/.TA_utl/common" ]; then
MODDIR="/data/adb/modules/.TA_utl"
MAGISK="true"
else
MODDIR="/data/adb/modules/TA_utl"
fi
aapt() { "$MODPATH/aapt" "$@"; }
# probe for downloaders
# wget = low pref, no ssl.
# curl, has ssl on android, we use it if found
download() {
local type=${1#--}
local url=$2
local output=$3
download_type=${1#--}
download_url=$2
download_output=$3
PATH=/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:/data/data/com.termux/files/usr/bin:$PATH
if command -v curl >/dev/null 2>&1; then
if [ "$type" = "output" ]; then
timeout 10 curl -Lo "$output" "$url"
if [ "$download_type" = "output" ]; then
timeout 10 curl -Lo "$download_output" "$download_url"
else
timeout 3 curl -s "$url"
timeout 3 curl -s "$download_url"
fi
else
if [ "$type" = "output" ]; then
timeout 10 busybox wget --no-check-certificate -qO "$output" "$url"
if [ "$download_type" = "output" ]; then
timeout 10 busybox wget --no-check-certificate -qO "$download_output" "$download_url"
else
timeout 3 busybox wget --no-check-certificate -qO- "$url"
timeout 3 busybox wget --no-check-certificate -qO- "$download_url"
fi
fi
PATH="$ORG_PATH"
@@ -57,11 +64,12 @@ get_unnecessary() {
}
check_update() {
[ -f "$MODDIR/disable" ] && rm -f "$MODDIR/disable"
JSON=$(download --fetch "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/main/update.json") || exit 1
REMOTE_VERSION=$(echo "$JSON" | grep -o '"versionCode": *[0-9]*' | awk -F: '{print $2}' | tr -d ' ')
LOCAL_VERSION=$(grep -o 'versionCode=[0-9]*' "$MODPATH/update/module.prop" | awk -F= '{print $2}')
if [ "$REMOTE_VERSION" -gt "$LOCAL_VERSION" ] && [ ! -f "/data/adb/modules/TA_utl/update" ]; then
if [ "$MODPATH" = "/data/adb/modules/.TA_utl/common" ]; then
if [ "$MAGISK" = "true" ]; then
[ -d "/data/adb/modules/TA_utl" ] && rm -rf "/data/adb/modules/TA_utl"
cp -rf "$MODPATH/update" "/data/adb/modules/TA_utl"
else
@@ -72,8 +80,7 @@ check_update() {
}
uninstall() {
if [ "$MODPATH" = "/data/adb/modules/.TA_utl/common" ]; then
[ -d "/data/adb/modules/TA_utl" ] && rm -rf "/data/adb/modules/TA_utl"
if [ "$MAGISK" = "true" ]; then
cp -rf "$MODPATH/update" "/data/adb/modules/TA_utl"
else
cp -f "$MODPATH/update/module.prop" "/data/adb/modules/TA_utl/module.prop"
@@ -90,15 +97,14 @@ get_update() {
}
install_update() {
if command -v magisk >/dev/null 2>&1; then
command -v magisk >/dev/null 2>&1 && {
magisk --install-module "$MODPATH/tmp/module.zip"
elif command -v apd >/dev/null 2>&1; then
} || command -v apd >/dev/null 2>&1 && {
apd module install "$MODPATH/tmp/module.zip"
elif command -v ksud >/dev/null 2>&1; then
} || command -v ksud >/dev/null 2>&1 && {
ksud module install "$MODPATH/tmp/module.zip"
else
exit 1
fi
} || exit 1
rm -f "$MODPATH/tmp/module.zip"
rm -f "$MODPATH/tmp/changelog.md"
}

View File

@@ -1,7 +1,7 @@
id=TA_utl
name=Tricky Addon - Update Target List
version=v3.2
versionCode=320
version=v3.3
versionCode=330
author=KOWX712
description=A WebUI to conifgure tricky store target.txt
updateJson=https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/main/update.json

View File

@@ -1,11 +1,28 @@
MODPATH=${0%/*}
HIDE_DIR="/data/adb/modules/.TA_utl"
TS="/data/adb/modules/tricky_store"
SCRIPT_DIR="/data/adb/tricky_store"
TARGET_DIR="/data/adb/tricky_store"
TSPA="/data/adb/modules/tsupport-advance"
aapt() { "$MODPATH/common/aapt" "$@"; }
add_denylist_to_target() {
exclamation_target=$(grep '!' "/data/adb/tricky_store/target.txt" | sed 's/!$//')
question_target=$(grep '?' "/data/adb/tricky_store/target.txt" | sed 's/?$//')
target=$(sed 's/[!?]$//' /data/adb/tricky_store/target.txt)
denylist=$(magisk --denylist ls 2>/dev/null | awk -F'|' '{print $1}' | grep -v "isolated")
printf "%s\n" "$target" "$denylist" | sort -u > "/data/adb/tricky_store/target.txt"
for target in $exclamation_target; do
sed -i "s/^$target$/$target!/" "/data/adb/tricky_store/target.txt"
done
for target in $question_target; do
sed -i "s/^$target$/$target?/" "/data/adb/tricky_store/target.txt"
done
}
# Reset verified Boot Hash
hash_value=$(grep -v '^#' "/data/adb/boot_hash" | tr -d '[:space:]')
if [ -n "$hash_value" ]; then
@@ -15,9 +32,13 @@ fi
# Reset vendor patch if different with security patch
security_patch=$(getprop ro.build.version.security_patch)
vendor_patch=$(getprop ro.vendor.build.security_patch)
if [ "$vendor_patch" != "$security_patch" ]; then
resetprop ro.vendor.build.security_patch "$security_patch"
TS_version=$(grep "versionCode=" "$TS/module.prop" | cut -d'=' -f2)
if [ "$TS_version" -lt 158 ]; then
resetprop -n ro.vendor.build.security_patch "$security_patch"
else
printf "boot=%s\nvendor=%s\n" "$security_patch" "$security_patch" > "$TARGET_DIR/security_patch.txt"
fi
fi
# Disable TSupport-A auto update target to prevent overwrite
@@ -27,16 +48,23 @@ elif [ ! -d "$TSPA" ] && [ -f "/storage/emulated/0/stop-tspa-auto-target" ]; the
rm -f "/storage/emulated/0/stop-tspa-auto-target"
fi
# Hide module
# Magisk operation
if [ -f "$MODPATH/action.sh" ]; then
# Hide module from Magisk manager
if [ "$MODPATH" != "$HIDE_DIR" ]; then
rm -rf "$HIDE_DIR"
mv "$MODPATH" "$HIDE_DIR"
fi
MODPATH="$HIDE_DIR"
elif [ -d "$HIDE_DIR" ]; then
rm -rf "$HIDE_DIR"
# Add target from denylist
# To trigger this, choose "Select from DenyList" in WebUI once
[ -f "/data/adb/tricky_store/target_from_denylist" ] && add_denylist_to_target
else
[ -d "$HIDE_DIR" ] && rm -rf "$HIDE_DIR"
fi
# Hide module from APatch, KernelSU, KSUWebUIStandalone, MMRL
rm -f "$MODPATH/module.prop"
# Symlink tricky store
@@ -50,32 +78,41 @@ fi
# Optimization
OUTPUT_APP="$MODPATH/common/tmp/applist"
OUTPUT_SKIP="$MODPATH/common/tmp/skiplist"
OUTPUT_TMP="$MODPATH/common/tmp/tmp_applist"
until [ "$(getprop sys.boot_completed)" = "1" ]; do
sleep 1
done
# Create temporary directory
mkdir -p "$MODPATH/common/tmp"
pm list packages -3 2>/dev/null | awk -F: '{print $2}' > "$OUTPUT_TMP"
# Additional system apps
SYSTEM_APP="com.google.android.gms|com.google.android.gsf|com.android.vending"
pm list package -s | awk -F: '{print $2}' | grep -Ex "$SYSTEM_APP" >> "$OUTPUT_TMP"
# Initialize cache files to save app list and skip list
echo "# This file is generated from service.sh to speed up load time" > "$OUTPUT_APP"
echo "# This file is generated from service.sh to speed up load time" > "$OUTPUT_SKIP"
cat "$OUTPUT_TMP" | while read -r PACKAGE; do
# Get list of third party apps and specific system apps, then cache app name
# Check Xposed module
{
pm list packages -3 2>/dev/null
pm list package -s | grep -E "$SYSTEM_APP"
} | awk -F: '{print $2}' | while read -r PACKAGE; do
# Get APK path for the package
APK_PATH=$(pm path "$PACKAGE" 2>/dev/null | grep "base.apk" | awk -F: '{print $2}' | tr -d '\r')
[ -z "$APK_PATH" ] && APK_PATH=$(pm path "$PACKAGE" 2>/dev/null | grep ".apk" | awk -F: '{print $2}' | tr -d '\r')
if [ -n "$APK_PATH" ]; then
# Extract app name and save package info
APP_NAME=$(aapt dump badging "$APK_PATH" 2>/dev/null | grep "application-label:" | sed "s/application-label://g; s/'//g")
echo "app-name: $APP_NAME, package-name: $PACKAGE" >> "$OUTPUT_APP"
else
echo "app-name: Unknown App package-name: $PACKAGE" >> "$OUTPUT_APP"
fi
# Check if app is Xposed module and add to skip list if not
if ! aapt dump xmltree "$APK_PATH" AndroidManifest.xml 2>/dev/null | grep -qE "xposed.category|xposeddescription"; then
echo "$PACKAGE" >> "$OUTPUT_SKIP"
fi
done
rm -f "$OUTPUT_TMP"

View File

@@ -10,6 +10,7 @@ fi
# Remove residue and restore aosp keybox.
rm -rf "/data/adb/modules/.TA_utl"
rm -f "/data/adb/boot_hash"
rm -f "/data/adb/tricky_store/target_from_denylist"
if [ -d "$TS" ]; then
[ -L "$TS/webroot" ] && rm -f "$TS/webroot"
[ -L "$TS/action.sh" ] && rm -f "$TS/action.sh"

View File

@@ -132,7 +132,7 @@ document.getElementById("save").addEventListener("click", async () => {
return app;
});
const updatedTargetContent = modifiedAppsList.join("\n");
await execCommand(`echo "${updatedTargetContent}" > /data/adb/tricky_store/target.txt`);
await execCommand(`echo "${updatedTargetContent}" | sort -u > /data/adb/tricky_store/target.txt`);
console.log("target.txt updated successfully.");
showPrompt("prompt.saved_target");
for (const app of appsWithExclamation) {

View File

@@ -18,10 +18,9 @@ document.getElementById("deselect-all").addEventListener("click", () => toggleCh
// Function to read the denylist and check corresponding apps
document.getElementById("select-denylist").addEventListener("click", async () => {
try {
const result = await execCommand(`magisk --denylist ls 2>/dev/null | awk -F'|' '{print $1}' | grep -v "isolated" | sort | uniq`);
const result = await execCommand(`magisk --denylist ls 2>/dev/null | awk -F'|' '{print $1}' | grep -v "isolated" | sort -u`);
const denylistApps = result.split("\n").map(app => app.trim()).filter(Boolean);
const apps = document.querySelectorAll(".card");
toggleCheckboxes(false);
apps.forEach(app => {
const contentElement = app.querySelector(".content");
const packageName = contentElement.getAttribute("data-package");
@@ -30,6 +29,7 @@ document.getElementById("select-denylist").addEventListener("click", async () =>
checkbox.checked = true;
}
});
await execCommand('touch "/data/adb/tricky_store/target_from_denylist"');
console.log("Denylist apps selected successfully.");
} catch (error) {
toast("Failed to read DenyList!");

View File

@@ -1,6 +1,6 @@
{
"versionCode": 320,
"version": "v3.2",
"zipUrl": "https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/download/v3.2/TrickyAddonModule-v3.2.zip",
"versionCode": 330,
"version": "v3.3",
"zipUrl": "https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/download/v3.3/TrickyAddonModule-v3.3.zip",
"changelog": "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/main/changelog.md"
}