Compare commits

94 Commits
v1.3 ... v2.4

Author SHA1 Message Date
KOWX712
5806ab16d7 v2.4 2024-11-20 00:52:21 +08:00
KOWX712
0736f4ea38 Add app name display
try to display app name in webui
2024-11-20 00:44:28 +08:00
KOWX712
ff8a768a00 Add aapt bianry
prepare for app name feature
2024-11-19 23:26:27 +08:00
KOWX712
af3f8b88c0 Update changelog.md 2024-11-18 22:02:31 +08:00
KOWX712
40f1e8d69e v2.3 2024-11-18 21:59:17 +08:00
KOWX712
82d803c2db v2.3 2024-11-18 21:37:46 +08:00
KOWX712
68158796dc v2.3
update boot_hash path
2024-11-18 21:17:23 +08:00
KOWX712
3015fd44ba finalize 2024-11-18 21:04:30 +08:00
KOWX712
605a4c8c90 Update more-excldue.json 2024-11-18 20:59:09 +08:00
KOWX712
439ae0332a Update UpdateTargetList.sh 2024-11-18 20:54:28 +08:00
KOWX712
6f7108543f cleanup residue
cleanup residue during remove module
2024-11-18 20:33:37 +08:00
KOWX712
596c92ba18 Read app from DenlyList
For Magisk only
2024-11-18 20:19:40 +08:00
KOWX712
1f3c1e960a Migrate boot hash to /data/adb
prevent ksu/apatch overwrite
2024-11-18 18:56:07 +08:00
KOWX712
383a7eeb5f Update action button
Abandon action.sh in KernelSU and Apatch. Magisk: redirect to WebUI with action button if installed KSU WebUI. Add KSU WebUI standalone automated installation script (optional).
2024-11-18 18:36:51 +08:00
KOWX712
2e71b6512b Update more-excldue.json 2024-11-17 00:14:21 +08:00
KOWX712
bcfb8c12ad remove curl binary
use busybox wget binary instead of curl binary to fetch exclude-list
2024-11-14 21:44:31 +08:00
KOWX712
e9346303ac prevent tspa overwrite 2024-11-14 21:37:32 +08:00
KOWX712
cc77b95f5c v2.2 2024-11-13 01:18:25 +08:00
KOWX712
685a6b89ef v2.2
update description, changelog and version code
2024-11-13 00:34:17 +08:00
KOWX712
face2fe644 ui change
no connection prompt, help menu overlay transition. Better readability installation script.
2024-11-13 00:15:38 +08:00
KOWX712
584ad2f2df spacing format 2024-11-10 01:22:32 +08:00
KOWX712
47e383bf69 Update more-excldue.json
add link
2024-11-10 01:19:29 +08:00
KOWX712
a02ed06557 Update index.js
Better unsuccessful prompt
2024-11-10 01:06:55 +08:00
KOWX712
eb8666f79e Update more-excldue.json 2024-11-10 00:57:01 +08:00
KOWX712
9883922927 Add help menu 2024-11-10 00:50:06 +08:00
KOWX712
fcfa723052 better logic
now can show app that excluded by keyword as deselected.
2024-11-09 03:22:48 +08:00
KOWX712
c347392792 fix typo 2024-11-09 02:53:58 +08:00
KOWX712
cfa795034e exclude more than only xposed
added option to exclude more root related app other than xposed module
2024-11-09 02:40:25 +08:00
KOWX712
d16611ddc1 minor UI enhance, new exclude list
introduce new exclude list to exclude unnecessary app from tricky store target.
2024-11-09 02:15:03 +08:00
KOWX712
b1f75d012e Create more-excldue.json
for more exclude package name
2024-11-08 02:10:31 +08:00
KOWX712
3f19e0bee5 Update README.md 2024-11-08 01:34:02 +08:00
KOWX712
bd38e1a615 Update README.md 2024-11-08 01:33:35 +08:00
KOWX712
bfb4c3293e Merge branch 'master' of https://github.com/KOWX712/Tricky-Addon-Update-Target-List 2024-11-08 01:30:08 +08:00
KOWX712
5591a3ed14 Minor UI change
change icon, enhanced UI experience
2024-11-08 01:30:05 +08:00
KOWX712
9d0d1c7e46 Update changelog.md 2024-11-06 20:29:51 +08:00
KOWX712
6bab7df285 Update index.js 2024-11-06 20:24:55 +08:00
KOWX712
5d14680bb9 Update update.json 2024-11-06 20:21:38 +08:00
KOWX712
3201f9ee16 minor fix
search function enhancement
2024-11-06 20:03:00 +08:00
KOWX712
8a0ab7c56d v2.1
Add curl binary to fetch Xposed module package name list. WebUI bug fix and new feature: exclude Xposed module, better ui experience and more user friendly.
2024-11-06 19:39:37 +08:00
KOWX712
55406e377a fine tune UI 2024-11-04 23:42:15 +08:00
KOWX712
4a9650bd54 fix abnormal color in dark mode 2024-11-04 23:37:44 +08:00
KOWX712
1ecdbdd96a Update update.json 2024-11-04 22:02:04 +08:00
KOWX712
6d8f364d17 v2.0 2024-11-04 21:50:35 +08:00
KOWX712
6994d1845e Update README.md 2024-11-04 02:20:20 +08:00
KOWX712
2b023ca1ba KSU WebUI information 2024-11-04 02:18:50 +08:00
KOWX712
a2c062fb32 Add acknowledgement
Thanks for j-hc/zygisk-detach KSU WebUI template
2024-11-04 02:04:32 +08:00
KOWX712
09c7cc27f1 ksu webui - initial
webui template from j-hc/zygisk-detach
2024-11-04 01:59:31 +08:00
KOWX712
d4b48998eb clarify rermark
remove useless code, unify variable,
2024-11-03 17:45:03 +08:00
KOWX712
b410d12e9a Update update.json 2024-11-03 16:32:19 +08:00
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
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
29 changed files with 1663 additions and 218 deletions

View File

@@ -1,23 +1,39 @@
# **Tricky Addon: Update Target List**
An addon module for tricky store
# **Tricky Addon - Update Target List**
A **KSU WebUI** to configure tricky store target.txt
---
## 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
- [Tricky store](https://github.com/5ec1cff/TrickyStore) module installed
## Custom Configuration
- Configuration target list with **KSU WebUI**
- For Magisk users, first attempt perform action button can install KSU WebUI (optional).
- Advance configure: ADDITION and EXCLUDE in `/data/adb/tricky_store/target_list_config`
## Instructions
**Module will update taget list on every boot.**
### Automatic update
- On boot
**Action button method**
- If action button feature is available, use action button can update tricky store target list.
### Manually update
**KSU WebUI**
- Configure target list
- Save and Update
**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 abnormal boot state**
- Paste Verfied Boot Hash to `boot_hash` in `/data/adb/`, reboot.
## Acknowledgement
- [j-hc/zygisk-detach](https://github.com/j-hc/zygisk-detach) - KSU WebUI template
## Links
Download: [GitHub release](https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases)

View File

@@ -1,13 +1,71 @@
### Tricky Addon: Update Target List
Automated script to update tricky store target.txt
A **KSU WebUI** to configure 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/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
### v2.4
- Added aapt binary for app name display
**KSU WebUI**
- Added app name display
### v2.3
- Removed curl binary
- Moved boot_hash to /data/adb to prevent overwrite
- Stop TSP-A auto target to prevent overwrite
- Abandoned action button in KernelSU and Apatch
- Magisk action button: open WebUI, automatic download if not installed (optional)
**KSU WebUI**
- Option to select app from DenyList (Magisk)
### v2.2
**KSU WebUI:**
- Added help menu
- Added extra [unnecessary app](https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/master/more-excldue.json) exclude option
- Added no Internet connection prompt
### v2.1
- Added curl binary to fetch Xposed module package name from LSPosed webside
- **KSU WebUI:**
- Added feature to exclude Xposed module package name
- Fixed abnormal color in dark mode
- Combined save config and update target.txt button
- Fixed some more known bugs
### v2.0
- Added WebUI for configuration
### 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
### 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,29 @@
## Tricky Addon Lite: Update Target List Script
- Script only, **NOT Module**
- Run with root priviledge
- Recommend to run with MT manager
## Changelog
### v2.1, v2.2, v2.3, v2.4
- Remain same with v2.0
### v2.0
- More clarify remark in code
- Remove useless code
### v1.6, v1.7
- Remain same with v1.5
### v1.5
- Reduced size
- Removed useless code
### v1.4, v1.4.1
- 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,19 +1,23 @@
#!/bin/sh
# by KOW
# Tricky Addon Lite: Update Target List Script v1.3
# Tricky Addon Lite: Update Target List Script v2.4
# GitHub Repository: https://github.com/KOWX712/Tricky-Addon-Update-Target-List/blob/master/lite-script_only/README.md
# Telegram channel: https://t.me/kowchannel
# This script will put all non-system app into /data/adb/tricky_store/target.txt
###################################################
# Configurable exclude and addition list
# DO NOT remove default package names here
###################################################
EXCLUDE="
oneplus
coloros
miui
com.android.patch
me.bmax.apatch"
me.bmax.apatch
me.garfieldhan.apatch.next"
ADDITION="
com.google.android.gms
@@ -21,15 +25,14 @@ io.github.vvb2060.keyattestation
io.github.vvb2060.mahoshojo
icu.nullptr.nativetest"
echo " "
echo " Staring script..."
echo " "
###################################################
# Script
###################################################
# Create or overwrite the target.txt file
> /data/adb/tricky_store/target.txt
echo " Adding apps to target.txt..."
echo " "
echo "- Staring script..."
echo " "
echo "- Adding apps to target.txt..."
EXCLUDE=$(echo "$EXCLUDE" | tr '\n' '|' | sed 's/^|//;s/|$//')
ADDITION=$(echo "$ADDITION" | tr '\n' ' ' | sed 's/^ //;s/ $//')
@@ -45,8 +48,5 @@ 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!"
echo " "
echo "- All done!"

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,33 @@
MODDIR=${0%/*}
echo "**********************************************"
echo "- Staring script..."
echo " "
MODPATH="${0%/*}"
COMPATH="$MODPATH/common"
SCRIPT_DIR="/data/adb/tricky_store"
sh "$MODDIR"/common/UpdateTargetList.sh
. "$COMPATH/util_func.sh"
echo "**********************************************"
echo "\(__All set!__)/"
echo "Exiting in 3 seconds..."
sleep 3
if pm list packages | grep -q "$PACKAGE_NAME"; then
echo "- Launching KSU WebUI..."
am start -n "${PACKAGE_NAME}/.WebUIActivity" -e id "$MODID"
else
SKIP_FILE="$SCRIPT_DIR/target_list_config/skipwebui"
if [ ! -f "$SKIP_FILE" ]; then
echo "**********************************************"
echo "- Do you want to install KSU WebUI standalone?"
echo " VOL [+]: YES"
echo " VOL [-]: NO"
echo "**********************************************"
key_check
if [[ "$keycheck" == "KEY_VOLUMEUP" ]]; then
echo "- Installing KSU WebUI..."
. "$COMPATH/get_WebUI.sh"
else
echo "- Skipping WebUI installation..."
touch "$SKIP_FILE"
echo "- Skip WebUI check until next installation."
echo ""
update_script
fi
else
update_script
fi
fi

BIN
module/bin/arm64-v8a/aapt Normal file

Binary file not shown.

BIN
module/bin/armeabi-v7a/aapt Normal file

Binary file not shown.

View File

@@ -2,8 +2,7 @@
# DO NOT remove the default app here
# You can add your custom addition app's package name here
# Each app package name should be on a new line
com.google.android.gms
io.github.vvb2060.keyattestation
io.github.vvb2060.mahoshojo
icu.nullptr.nativetest
icu.nullptr.nativetest

View File

@@ -2,8 +2,9 @@
# DO NOT remove the default app here
# You can add your custom exclusion app here
# Each app package name should be on a new line
oneplus
coloros
miui
com.android.patch
me.bmax.apatch
me.bmax.apatch
me.garfieldhan.apatch.next

View File

@@ -1,56 +1,49 @@
#!/bin/sh
# by KOW, telegram channel: https://t.me/kowchannel
# This script will put non-system app into /data/adb/tricky_store/target.txt
CONFIG_DIR="/data/adb/tricky_store/target_list_config"
# 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
echo "! Exclude list is missing, please reinstall module"
if [ ! -f "$CONFIG_DIR/EXCLUDE" ]; then
echo "! Exclude list is missing, please install module again"
exit 1
else
echo "- Exclude config file found."
echo "- Exclude config file found"
echo " "
fi
if [ ! -f "$MODDIR/ADDITION" ]; then
echo "! Addition list is missing, please reinstall module"
if [ ! -f "$CONFIG_DIR/ADDITION" ]; then
echo "! Addition list is missing, please install module again"
exit 1
else
echo "- Addition config file found."
echo "- Addition config file found"
echo " "
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:]]*$' "$CONFIG_DIR/EXCLUDE" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
ADDITION=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/ADDITION" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
# Create or overwrite the target.txt file
echo "- Overwritting target.txt"
for app in $ADDITION; do
app=$(echo "$app" | tr -d '[:space:]')
if grep -Fq "$app" "$CONFIG_DIR/EXCLUDE"; then
sed -i "\|^$app$|d" "$CONFIG_DIR/EXCLUDE"
fi
done
EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/EXCLUDE" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | tr '\n' '|' | sed 's/|$//')
echo "- Adding apps into /data/adb/tricky_store/target.txt..."
echo " "
> /data/adb/tricky_store/target.txt
pm list packages -3 </dev/null 2>&1 | awk -F: '{print $2}' | grep -Ev "$EXCLUDE" > /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 "- 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:]')
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 " "

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

@@ -0,0 +1,28 @@
URL="https://github.com/5ec1cff/KsuWebUIStandalone/releases/download/v1.0/KsuWebUI-1.0-34-release.apk"
APK_DIR="$COMPATH"
LOG_FILE="$COMPATH/webuiError.log"
find_busybox
check_wget
echo "- Downloading the WebUI apk..."
download_webui
echo "- Download complete."
APK_PATH=$(find "$APK_DIR" -type f -name "*.apk" | head -n 1)
if [ -z "$APK_PATH" ]; then
echo "Error: No APK file found in $APK_DIR."
exit 1
fi
echo "- Installing..."
install_webui
echo "- Done."
rm -f "$APK_PATH"
echo "- Launching..."
am start -n "${PACKAGE_NAME}/.WebUIActivity" -e id "$MODID" </dev/null 2>&1 | cat
if [ $? -ne 0 ]; then
echo "Error: Failed to start application."
exit 1
fi
echo "- Application launched successfully."

View File

@@ -0,0 +1,24 @@
#!/system/bin/sh
MODPATH=${0%/*}
OUTPUT="$MODPATH/exclude-list"
. $MODPATH/util_func.sh
find_busybox
check_wget
# Fetch Xposed module package names
wget --no-check-certificate -q -O - "https://modules.lsposed.org/modules.json" 2>/dev/null | \
grep -o '"name":"[^"]*","description":' | \
awk -F'"' '{print $4}' > "$OUTPUT"
# Fetch additional package names
wget --no-check-certificate -q -O - "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/master/more-excldue.json" 2>/dev/null | \
grep -o '"package-name": *"[^"]*"' | \
awk -F'"' '{print $4}' >> "$OUTPUT"
if [ ! -s "$OUTPUT" ]; then
echo "Error: Failed to fetch data." > "$OUTPUT"
exit 1
fi

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

@@ -0,0 +1,84 @@
PACKAGE_NAME="io.github.a13e300.ksuwebui"
MODID="set-id"
BBPATH="/data/adb/modules/busybox-ndk/system/*/busybox \
/data/adb/magisk/busybox \
/data/adb/ksu/bin/busybox \
/data/adb/ap/bin/busybox"
find_busybox() {
for path in $BBPATH; do
if [ -f "$path" ]; then
BUSYBOX="$path"
return 0
fi
done
return 1
}
check_wget() {
if ! command -v wget >/dev/null || grep -q "wget-curl" "$(command -v wget)"; then
if find_busybox; then
wget() { "$BUSYBOX" wget "$@"; }
else
echo "Error: busybox not found." > "$OUTPUT"
exit 1
fi
fi
}
download_webui() {
wget --no-check-certificate -P "$APK_DIR" "$URL"
if [ $? -ne 0 ]; then
echo "Error: APK download failed."
exit 1
fi
}
install_webui() {
pm install -r "$APK_PATH" </dev/null 2>&1 | cat
if [ $? -ne 0 ]; then
echo "Error: APK installation failed."
rm -f "$APK_PATH"
exit 1
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
}
update_script() {
echo "**********************************************"
echo "- Starting script..."
echo ""
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 "Exiting in 2 seconds..."
sleep 2
}

View File

@@ -1,109 +1,51 @@
SKIPUNZIP=0
DEBUG=false
if [ "$(which magisk)" ]; then
BM="Magisk:$MAGISK_VER$MAGISK_VER_CODE"
COMPATH="$MODPATH/common"
TS="/data/adb/modules/tricky_store"
SCRIPT_DIR="/data/adb/tricky_store"
CONFIG_DIR="$SCRIPT_DIR/target_list_config"
MODID=`grep_prop id $TMPDIR/module.prop`
ORG_DIR="/data/adb/modules/$MODID"
kb="$COMPATH/.default"
ui_print " ";
if [ "$APATCH" ]; then
ui_print "- APatch:$APATCH_VER$APATCH_VER_CODE"
ACTION=false
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"
ACTION=false
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 "*******************************************************"
}
if [ -d /data/adb/modules/tricky_store ]; then
echo "- Tricky store module installed"
else
echo "! Tricky store module is not installed"
abort " "
if [ ! -d "$TS" ]; then
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
}
. "$MODPATH/install_func.sh"
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 "$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"
elif [ ! -f "$CONFIG_DIR/EXCLUDE" ]; then
mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE"
rm -f "$COMPATH/ADDITION"
else
rm -f "$COMPATH/EXCLUDE"
rm -f "$COMPATH/ADDITION"
fi
fi
initialize
if [ ! -f "/data/adb/modules/$MODNAME/system.prop" ]; then
mv "$COMPATH/system.prop" "$MODPATH/system.prop"
else
rm -f "$COMPATH/system.prop"
mv "/data/adb/modules/$MODNAME/system.prop" "$MODPATH/system.prop"
fi
ui_print "- Creating config directory..."
find_config
migrate_old_boot_hash
kb="$COMPATH/.keybox"
ui_print "*********************************************"
ui_print "- Do you want to replace tricky store keybox?"
ui_print "- Do you want to replace tricky store keybox? (AOSP, no strong)"
ui_print " VOL [+]: YES"
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"
else
rm -f "$kb"
fi
kb_operation
rm -f "$MODPATH/install_func.sh"
ui_print " "
ui_print "- Installation completed successfully! "
ui_print " "
ui_print " "

135
module/install_func.sh Normal file
View File

@@ -0,0 +1,135 @@
initialize() {
if [ -f "$SCRIPT_DIR/UpdateTargetList.sh" ]; then
rm -f "$SCRIPT_DIR/UpdateTargetList.sh"
fi
cp "$MODPATH/module.prop" "$COMPATH/module.prop.orig"
mv "$COMPATH/UpdateTargetList.sh" "$SCRIPT_DIR/UpdateTargetList.sh"
sed -i "s|\"set-path\"|\"/data/adb/modules/$MODID/common/\"|" "$MODPATH/webroot/index.js" || {
ui_print "! Failed to set path"
abort
}
sed -i "s|\"set-id\"|\"$MODID\"|" "$COMPATH/util_func.sh" || {
ui_print "! Failed to set id"
abort
}
mkdir -p "$MODPATH/system/bin"
mv "$MODPATH/bin/$(getprop ro.product.cpu.abi)/aapt" "$COMPATH/aapt"
rm -rf "$MODPATH/bin"
set_perm $COMPATH/aapt 0 2000 0755
set_perm $SCRIPT_DIR/UpdateTargetList.sh 0 2000 0755
set_perm $COMPATH/get_exclude-list.sh 0 2000 0755
set_perm $COMPATH/get_WebUI.sh 0 2000 0755
if [ "$ACTION" = "false" ]; then
rm -f "$MODPATH/action.sh"
rm -f "$COMPATH/get_WebUI.sh"
fi
}
add_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() {
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"
}
find_config() {
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"
add_exclude
elif [ ! -f "$CONFIG_DIR/EXCLUDE" ]; then
mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE"
add_addition
else
add_exclude
add_addition
fi
else
mkdir -p "$CONFIG_DIR"
mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE"
mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION"
fi
}
migrate_old_boot_hash() {
if [ ! -f "/data/adb/boot_hash" ]; then
if [ -f "$ORG_DIR/boot_hash" ]; then
mv "$ORG_DIR/boot_hash" "/data/adb/boot_hash"
fi
mv "$COMPATH/boot_hash" "/data/adb/boot_hash"
else
rm -f "$COMPATH/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" >> "/data/adb/boot_hash"
fi
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
}
kb_operation() {
if [[ "$keycheck" == "KEY_VOLUMEUP" ]]; then
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 "$SCRIPT_DIR/keybox.xml" "$COMPATH/origkeybox"
fi
mv "$kb" "$SCRIPT_DIR/keybox.xml"
else
if [ -f "$ORG_DIR/common/origkeybox" ]; then
mv "$ORG_DIR/common/origkeybox" "$COMPATH/origkeybox"
fi
rm -f "$kb"
fi
}

View File

@@ -1,7 +1,7 @@
id=TA_utl
name=Tricky Addon: Update Target List
version=v1.3
versionCode=13
name=Tricky Addon - Update Target List
version=v2.4
versionCode=240
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
description=A WebUI to conifgure tricky store target.txt
updateJson=https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/master/update.json

View File

@@ -1,20 +1,39 @@
MODDIR=${0%/*}
COMPATH="$MODDIR/common"
MODPATH=${0%/*}
TS="/data/adb/modules/tricky_store"
SCRIPT_DIR="/data/adb/tricky_store"
TSPA="/data/adb/modules/tsupport-advance"
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 '^#' "/data/adb/boot_hash" | tr -d '[:space:]')
if [ -n "$hash_value" ]; then
resetprop -n ro.boot.vbmeta.digest "$hash_value"
fi
# Disable TSupport-A auto update target to prevent overwrite
if [ -d "$TSPA" ]; then
touch "/storage/emulated/0/stop-tspa-auto-target"
elif [ ! -d "$TSPA" ] && [ -f "/storage/emulated/0/stop-tspa-auto-target" ]; then
rm -f "/storage/emulated/0/stop-tspa-auto-target"
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"
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 "$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"
. "$SCRIPT_DIR/UpdateTargetList.sh"
fi

View File

@@ -1,9 +1,16 @@
MODDIR="/data/adb/tricky_store"
# Remove residue and restore original keybox.
MODPATH=${0%/*}
rm -rf "$MODDIR/target_list_config"
rm -f "$MODDIR/UpdateTargetList.sh"
SCRIPT_DIR="/data/adb/tricky_store"
# Enable back TSupport-A auto update
if [ -f "/storage/emulated/0/stop-tspa-auto-target" ]; then
rm -f "/storage/emulated/0/stop-tspa-auto-target"
fi
# Remove residue and restore original keybox.
rm -rf "$SCRIPT_DIR/target_list_config"
rm -f "$SCRIPT_DIR/UpdateTargetList.sh"
rm -f "/data/adb/boot_hash"
if [ -f "$MODPATH/common/origkeybox" ]; then
rm -f "$MODDIR/keybox.xml"
mv "$MODPATH/common/origkeybox" "$MODDIR/keybox.xml"
rm -f "$SCRIPT_DIR/keybox.xml"
mv "$MODPATH/common/origkeybox" "$SCRIPT_DIR/keybox.xml"
fi

110
module/webroot/index.html Normal file
View File

@@ -0,0 +1,110 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/styles.css" type="text/css">
<script type="module" crossorigin src="/index.js"></script>
</head>
<body>
<div class="title-container">
<div id="title">Tricky Addon - Update Target List</div>
<button id="help-button" class="help-button"><i class="fa fa-question-circle"></i></button>
<div class="no-connection">
<img src="wifi-slash.svg" alt="No Connection Icon" class="wifi-icon">
</div>
</div>
<div id="help-overlay" class="help-overlay">
<div class="help-menu">
<button id="close-help" class="close-help">&#x2715;</button>
<div class="help-content">
<p>Instructions</p>
<ul>
<li>Save and Update
<ul>
<li>Save the current configuration and update target.txt immediately.</li>
<li><br></li>
</ul>
</li>
<li>Refresh
<ul>
<li>Refresh app list and exclude list.</li>
<li><br></li>
</ul>
</li>
<li>Select All & Deselect All
<ul>
<li>Select or deselect all apps in the current interface.</li>
<li><br></li>
</ul>
</li>
<li>Select From DenyList
<ul>
<li>Available in Magisk only, select apps that in the DenyList. Recommended.</li>
<li><br></li>
</ul>
</li>
<li>Deselect Unnecessary
<ul>
<li>Unnecessary category: Xposed module, root manager, root-related apps, and general apps
that never check bootloader status.</li>
<ul>
<li>Contribute to <a
href="https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/master/more-excldue.json"
target="_blank">unnecessary app list</a>? Create an <a
href="https://github.com/KOWX712/Tricky-Addon-Update-Target-List/issues"
target="_blank">issue</a> or <a
href="https://github.com/KOWX712/Tricky-Addon-Update-Target-List/pulls"
target="_blank">pull request</a>.</li>
</ul>
<li><br></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="search-menu-container">
<div class="search-card">
<span class="search-icon"><i class="fa fa-search"></i></span>
<input type="text" class="search-input" id="search" placeholder="Search">
<button class="clear-btn" id="clear-btn">&#x2715;</button>
</div>
<div class="menu">
<input type="checkbox" id="menu-toggle" class="menu-toggle">
<label for="menu-toggle" id="menu-button">
<span class="menu-icon"><i class="fa fa-bars"></i></span>
</label>
<div id="menu-options" class="menu-options">
<ul>
<li id="refresh">Refresh</li>
<li id="select-all">Select All</li>
<li id="deselect-all">Deselect All</li>
<li id="select-denylist">Select From DenyList</li>
<li id="deselect-xposed">Deselect Unnecessary</li>
</ul>
</div>
</div>
</div>
<div id="apps-list"></div>
<div class="floating-card">
<button class="floating-btn" id="save">Save and Update</button>
</div>
<template id="app-template">
<div class="card" onclick="toggleCheckbox(event)">
<div class="content" data-package="">
<p class="name"></p>
<input type="checkbox" class="checkbox" checked>
</div>
</div>
</template>
<div class="loading">Loading...</div>
<div class="acknowledgment">Credit to j-hc/zygisk-detach WebUI</div>
<div id="prompt" class="prompt"></div>
</body>
</html>

442
module/webroot/index.js Normal file
View File

@@ -0,0 +1,442 @@
let e = 0;
const appTemplate = document.getElementById("app-template").content;
const appListContainer = document.getElementById("apps-list");
const loadingIndicator = document.querySelector(".loading");
const searchMenuContainer = document.querySelector('.search-menu-container');
const searchInput = document.getElementById("search");
const clearBtn = document.getElementById("clear-btn");
const title = document.querySelector('.title-container');
const noConnection = document.querySelector(".no-connection");
const helpButton = document.getElementById("help-button");
const helpOverlay = document.getElementById("help-overlay");
const closeHelp = document.getElementById("close-help");
const searchCard = document.querySelector('.search-card');
const menu = document.querySelector('.menu');
const selectDenylistElement = document.getElementById("select-denylist");
const floatingBtn = document.querySelector('.floating-btn');
const basePath = "set-path";
let excludeList = [];
let isRefreshing = false;
// Function to execute shell commands
async function execCommand(command) {
return new Promise((resolve, reject) => {
const callbackName = `exec_callback_${Date.now()}_${e++}`;
window[callbackName] = (errno, stdout, stderr) => {
delete window[callbackName];
if (errno === 0) {
resolve(stdout);
} else {
console.error(`Error executing command: ${stderr}`);
reject(stderr);
}
};
try {
ksu.exec(command, "{}", callbackName);
} catch (error) {
console.error(`Execution error: ${error}`);
reject(error);
}
});
}
// Function to read the EXCLUDE file and return its contents as an array
async function readExcludeFile() {
try {
const result = await execCommand('cat /data/adb/tricky_store/target_list_config/EXCLUDE');
excludeList = result.split("\n").filter(app => app.trim() !== ''); // Filter out empty lines
console.log("Current EXCLUDE list:", excludeList);
} catch (error) {
console.error("Failed to read EXCLUDE file:", error);
}
}
// Helper function to check if an app name should be excluded
function isExcluded(appName) {
return excludeList.some(excludeItem => appName.includes(excludeItem));
}
// Function to fetch, sort, and render the app list with app names
async function fetchAppList() {
try {
await readExcludeFile();
const result = await execCommand(`
pm list packages -3 | while read -r line; do
PACKAGE=$(echo "$line" | awk -F: '{print $2}')
APK_PATH=$(pm path "$PACKAGE" | grep "base.apk" | awk -F: '{print $2}' | tr -d '\\r')
if [ -n "$APK_PATH" ]; then
APP_NAME=$( ${basePath}aapt dump badging "$APK_PATH" 2>/dev/null | grep "application-label:" | sed "s/application-label://; s/'//g" )
echo "$APP_NAME|$PACKAGE"
else
echo "Unknown App|$PACKAGE"
fi
done
`);
const appEntries = result.split("\n").map(line => {
const [appName, packageName] = line.split("|").map(item => item.trim());
return { appName, packageName };
}).filter(entry => entry.packageName); // Remove invalid entries
const sortedApps = appEntries.sort((a, b) => {
const aInExclude = isExcluded(a.packageName);
const bInExclude = isExcluded(b.packageName);
return aInExclude === bInExclude ? a.appName.localeCompare(b.appName) : aInExclude ? 1 : -1;
});
appListContainer.innerHTML = ""; // Clear the container before rendering
sortedApps.forEach(({ appName, packageName }) => {
const appElement = document.importNode(appTemplate, true);
const contentElement = appElement.querySelector(".content");
contentElement.setAttribute("data-package", packageName);
const nameElement = appElement.querySelector(".name");
nameElement.innerHTML = `<strong>${appName || "Unknown App"}</strong><br>${packageName}`;
const checkbox = appElement.querySelector(".checkbox");
checkbox.checked = !isExcluded(packageName);
appListContainer.appendChild(appElement);
});
console.log("App list with names and packages rendered successfully.");
} catch (error) {
console.error("Failed to fetch or render app list with names:", error);
}
floatingBtn.style.transform = "translateY(-100px)";
}
// Function to refresh app list
async function refreshAppList() {
isRefreshing = true;
title.style.transform = 'translateY(0)';
searchMenuContainer.style.transform = 'translateY(0)';
floatingBtn.style.transform = 'translateY(0)';
searchInput.value = '';
clearBtn.style.display = "none";
appListContainer.innerHTML = '';
loadingIndicator.style.display = 'flex';
await new Promise(resolve => setTimeout(resolve, 500));
window.scrollTo(0, 0);
if (noConnection.style.display === "flex") {
await runXposedScript();
}
await fetchAppList();[]
loadingIndicator.style.display = 'none';
isRefreshing = false;
}
// Function to run the Xposed script
async function runXposedScript() {
try {
const scriptPath = `${basePath}get_exclude-list.sh`;
await execCommand(scriptPath);
console.log("Xposed script executed successfully.");
noConnection.style.display = "none";
} catch (error) {
console.error("Failed to execute Xposed script:", error);
showPrompt("Please check your Internet connection", false);
noConnection.style.display = "flex";
}
}
// Function to read the Xposed list and uncheck corresponding apps
async function deselectXposedApps() {
try {
const result = await execCommand(`cat ${basePath}exclude-list`);
const xposedApps = result.split("\n").map(app => app.trim()).filter(Boolean);
const apps = document.querySelectorAll(".card");
apps.forEach(app => {
const contentElement = app.querySelector(".content");
const packageName = contentElement.getAttribute("data-package");
const checkbox = app.querySelector(".checkbox");
if (xposedApps.includes(packageName)) {
checkbox.checked = false; // Uncheck if found in Xposed list
}
});
console.log("Xposed apps deselected successfully.");
} catch (error) {
console.error("Failed to deselect Xposed apps:", error);
}
}
// Function to check if Magisk
async function checkMagisk() {
try {
const hasDenylistCondition = await execCommand(`
if [ ! -f "/data/adb/apd" ] && [ ! -f "/data/adb/ksud" ]; then
echo "OK"
else
echo ""
fi
`);
if (hasDenylistCondition.trim() === "OK") {
console.log("Denylist conditions met, displaying element.");
selectDenylistElement.style.display = "flex";
} else {
console.log("ksud or apd detected, leaving denylist element hidden.");
}
} catch (error) {
console.error("Error while checking denylist conditions:", error);
}
}
// Function to read the denylist and check corresponding apps
async function selectDenylistApps() {
try {
const result = await execCommand(`
magisk --denylist ls 2>/dev/null | \
awk -F'|' '{print $1}' | \
grep -v "isolated" | \
sort | uniq
`);
const denylistApps = result.split("\n").map(app => app.trim()).filter(Boolean);
const apps = document.querySelectorAll(".card");
apps.forEach(app => {
const contentElement = app.querySelector(".content");
const packageName = contentElement.getAttribute("data-package");
const checkbox = app.querySelector(".checkbox");
if (denylistApps.includes(packageName)) {
checkbox.checked = true; // Select the app if found in denylist
}
});
console.log("Denylist apps selected successfully.");
} catch (error) {
console.error("Failed to select Denylist apps:", error);
}
}
// Function to select all visible apps
function selectAllApps() {
document.querySelectorAll(".card").forEach(card => {
if (card.style.display !== "none") {
card.querySelector(".checkbox").checked = true;
}
});
}
// Function to deselect all visible apps
function deselectAllApps() {
document.querySelectorAll(".card").forEach(card => {
if (card.style.display !== "none") {
card.querySelector(".checkbox").checked = false;
}
});
}
// Function to show the prompt with a success or error message
function showPrompt(message, isSuccess = true) {
const prompt = document.getElementById('prompt');
prompt.textContent = message;
prompt.classList.toggle('error', !isSuccess);
if (window.promptTimeout) {
clearTimeout(window.promptTimeout);
}
setTimeout(() => {
prompt.classList.add('visible');
prompt.classList.remove('hidden');
window.promptTimeout = setTimeout(() => {
prompt.classList.remove('visible');
prompt.classList.add('hidden');
}, 3000);
}, 500);
}
// Function to toggle menu option
function setupMenuToggle() {
const menuButton = document.getElementById('menu-button');
const menuIcon = menuButton.querySelector('.menu-icon');
const menuOptions = document.getElementById('menu-options');
let menuOpen = false;
let menuAnimating = false;
menuButton.addEventListener('click', (event) => {
if (menuAnimating) return;
event.stopPropagation();
if (menuOptions.classList.contains('visible')) {
closeMenu();
} else {
openMenu();
}
});
document.addEventListener('click', (event) => {
if (!menuOptions.contains(event.target) && event.target !== menuButton) {
closeMenu();
}
});
window.addEventListener('scroll', () => {
if (menuOptions.classList.contains('visible')) {
closeMenu();
}
});
const closeMenuItems = ['refresh', 'select-all', 'deselect-all', 'select-denylist', 'deselect-xposed'];
closeMenuItems.forEach(id => {
const item = document.getElementById(id);
if (item) {
item.addEventListener('click', (event) => {
event.stopPropagation();
closeMenu();
});
}
});
function openMenu() {
menuAnimating = true;
menuOptions.style.display = 'block';
setTimeout(() => {
menuOptions.classList.remove('hidden');
menuOptions.classList.add('visible');
menuIcon.classList.add('menu-open');
menuIcon.classList.remove('menu-closed');
menuOpen = true;
menuAnimating = false;
}, 10);
}
function closeMenu() {
if (menuOptions.classList.contains('visible')) {
menuAnimating = true;
menuOptions.classList.remove('visible');
menuOptions.classList.add('hidden');
menuIcon.classList.remove('menu-open');
menuIcon.classList.add('menu-closed');
setTimeout(() => {
menuOptions.style.display = 'none';
menuOpen = false;
menuAnimating = false;
}, 200);
}
}
}
// Focus on search input when search card is clicked
searchCard.addEventListener("click", () => {
searchInput.focus();
});
// Search functionality
searchInput.addEventListener("input", (e) => {
const searchQuery = e.target.value.toLowerCase();
const apps = appListContainer.querySelectorAll(".card");
apps.forEach(app => {
const name = app.querySelector(".name").textContent.toLowerCase();
app.style.display = name.includes(searchQuery) ? "block" : "none";
window.scrollTo(0, 0);
});
if (searchQuery !== "") {
clearBtn.style.display = "block";
} else {
clearBtn.style.display = "none";
}
});
// Clear search input
clearBtn.addEventListener("click", () => {
searchInput.value = "";
clearBtn.style.display = "none";
window.scrollTo(0, 0);
const apps = appListContainer.querySelectorAll(".card");
apps.forEach(app => {
app.style.display = "block";
});
});
// Add button click event to update EXCLUDE file and run UpdateTargetList.sh
document.getElementById("save").addEventListener("click", async () => {
await readExcludeFile();
const deselectedApps = Array.from(appListContainer.querySelectorAll(".checkbox:not(:checked)"))
.map(checkbox => checkbox.closest(".card").querySelector(".content").getAttribute("data-package"));
const selectedApps = Array.from(appListContainer.querySelectorAll(".checkbox:checked"))
.map(checkbox => checkbox.closest(".card").querySelector(".content").getAttribute("data-package"));
// Add deselected apps to EXCLUDE list
for (const packageName of deselectedApps) {
if (!excludeList.includes(packageName)) {
excludeList.push(packageName);
console.log("Added to EXCLUDE list:", packageName);
} else {
console.log("Package already in EXCLUDE file, skipping:", packageName);
}
}
// Remove selected apps from EXCLUDE list
if (selectedApps.length > 0) {
selectedApps.forEach(packageName => {
excludeList = excludeList.filter(excludedPackage => excludedPackage !== packageName);
console.log("Removed from EXCLUDE list:", packageName);
});
}
try {
// Save the EXCLUDE file
const updatedExcludeContent = excludeList.join("\n");
await execCommand(`echo "${updatedExcludeContent}" > /data/adb/tricky_store/target_list_config/EXCLUDE`);
console.log("EXCLUDE file updated successfully.");
// Execute UpdateTargetList.sh
try {
await execCommand("/data/adb/tricky_store/UpdateTargetList.sh");
showPrompt("Config and target.txt updated");
} catch (error) {
console.error("Failed to update target list:", error);
showPrompt("Config saved, but failed to update target list", false);
}
} catch (error) {
console.error("Failed to update EXCLUDE file:", error);
showPrompt("Failed to save config", false);
}
await readExcludeFile();
await refreshAppList();
});
// Initial load
document.addEventListener('DOMContentLoaded', async () => {
setupMenuToggle();
document.getElementById("refresh").addEventListener("click", refreshAppList);
document.getElementById("select-all").addEventListener("click", selectAllApps);
document.getElementById("deselect-all").addEventListener("click", deselectAllApps);
document.getElementById("select-denylist").addEventListener("click", selectDenylistApps);
document.getElementById("deselect-xposed").addEventListener("click", deselectXposedApps);
await fetchAppList();
checkMagisk();
runXposedScript();
loadingIndicator.style.display = "none";
});
// Scroll event
let lastScrollY = window.scrollY;
const scrollThreshold = 35;
window.addEventListener('scroll', () => {
if (isRefreshing) return;
if (window.scrollY > lastScrollY && window.scrollY > scrollThreshold) {
title.style.transform = 'translateY(-100%)';
searchMenuContainer.style.transform = 'translateY(-35px)';
floatingBtn.style.transform = 'translateY(0)';
} else if (window.scrollY < lastScrollY) {
title.style.transform = 'translateY(0)';
searchMenuContainer.style.transform = 'translateY(0)';
floatingBtn.style.transform = 'translateY(-100px)';
}
lastScrollY = window.scrollY;
});
// Show help overlay
helpButton.addEventListener("click", () => {
helpOverlay.classList.remove("hide");
helpOverlay.style.display = "flex";
requestAnimationFrame(() => {
helpOverlay.classList.add("show");
});
document.body.classList.add("no-scroll");
});
// Hide help overlay
const hideHelpOverlay = () => {
helpOverlay.classList.remove("show");
helpOverlay.classList.add("hide");
document.body.classList.remove("no-scroll");
setTimeout(() => {
helpOverlay.style.display = "none";
}, 200);
};
// Hide when clicking on close button or outside of the overlay content
closeHelp.addEventListener("click", hideHelpOverlay);
helpOverlay.addEventListener("click", (event) => {
if (event.target === helpOverlay) {
hideHelpOverlay();
}
});

424
module/webroot/styles.css Normal file
View File

@@ -0,0 +1,424 @@
body {
background-color: #F5F5F5;
}
.no-scroll {
overflow: hidden;
}
.title-container {
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
top: 0;
height: 40px;
width: calc(100% - 17px);
background-color: #F5F5F5;
transition: transform 0.3s ease;
z-index: 1000;
}
#title {
font-size: 18px;
font-weight: bold;
padding-left: 10px;
}
.no-connection {
display: none;
align-items: center;
color: #7E7E7E;
}
.no-connection .wifi-icon {
width: 20px;
height: 20px;
margin-right: 5px;
filter: invert(0.6) sepia(0) saturate(0) hue-rotate(180deg) brightness(0.8) contrast(1);
}
.help-button {
margin-right: auto;
padding: 0 10px;
background: none;
border: none;
font-size: 24px;
align-items: center;
justify-content: center;
}
.help-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.5);
z-index: 2000;
justify-content: center;
align-items: center;
opacity: 0;
transition: opacity 0.2s ease;
}
.help-overlay.show {
display: flex;
opacity: 1;
}
.help-overlay.hide {
opacity: 0;
}
.help-menu {
position: relative;
width: 75vw;
max-width: 600px;
background-color: white;
padding: 0 10px;
border-radius: 15px;
text-align: left;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.close-help {
position: absolute;
top: 15px;
right: 12px;
background: none;
border: none;
font-size: 20px;
color: #ccc;
}
.help-content {
max-height: 85vh;
padding: 0 20px;
overflow-y: auto;
}
.help-content p {
font-size: 26px;
}
.help-content ul {
padding-left: 0;
list-style-type: none;
}
.help-content ul li {
font-weight: bold;
font-size: 17px;
}
.help-content ul ul li {
font-weight: normal;
font-size: 16px;
}
.help-content ul ul ul li {
color: #777777;
font-weight: normal;
font-size: 14px;
}
.help-content ul ul ul li a {
color: inherit;
}
#apps-list {
margin-top: 100px;
}
.search-menu-container {
display: flex;
position: fixed;
top: 40px;
height: 50px;
width: calc(100% - 17px);
z-index: 1000;
transition: transform 0.3s ease;
}
.search-card {
background-color: white;
border: 1px solid #ccc;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
display: flex;
align-items: center;
border-radius: 50px;
left: 0;
height: calc(100% - 2px);
width: calc(100% - 60px);
position: absolute;
}
.search-icon {
position: absolute;
left: 18px;
font-size: 15px;
z-index: 1000;
}
.search-input {
position: absolute;
border: none;
font-size: 17px;
outline: none;
left: 10px;
padding: 0 30px;
width: calc(100% - 10);
}
.clear-btn {
position: absolute;
color: #ccc;
right: 10px;
border: none;
background: none;
font-size: 18px;
cursor: pointer;
display: none;
z-index: 10;
}
.menu {
display: flex;
right: 0;
position: absolute;
height: 100%;
}
.menu-toggle {
display: none;
}
#menu-button {
background-color: white;
border: 1px solid #ccc;
border-radius: 50%;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
width: 48px;
display: flex;
justify-content: center;
align-items: center;
}
.menu-icon {
display: inline-block;
transition: transform 0.2s ease;
}
.menu-icon.menu-open {
transform: rotate(90deg);
}
.menu-icon.menu-closed {
transform: rotate(0deg);
}
.menu-options {
background-color: white;
border: 1px solid #ccc;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
display: none;
position: absolute;
padding: 5px;
top: 110%;
right: 0;
transform: translateX(120%);
transition: transform 0.2s ease;
width: auto;
white-space: nowrap;
}
#select-denylist {
display: none;
}
.menu-options.visible {
display: block;
transform: translateX(0);
}
.menu-options.hidden {
transform: translateX(140%);
}
.menu-options ul {
list-style: none;
margin: 0;
padding: 0;
}
.menu-options li {
cursor: default;
padding: 15px 12px;
text-align: left;
}
.card {
background-color: white;
border: none;
border-radius: 8px;
margin-bottom: 10px;
outline: none;
padding: 15px;
}
.content {
display: flex;
justify-content: space-between;
align-items: center;
}
.name {
display: inline-block;
margin: 0;
max-width: calc(100% - 30px);
overflow-wrap: break-word;
word-break: break-word;
}
.checkbox {
margin-left: auto;
}
.prompt {
position: fixed;
bottom: 0;
left: 10px;
background-color: #4CAF50;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
color: white;
font-size: 15px;
padding: 5px 15px;
z-index: 1000;
transform: translateY(100%);
transition: transform 0.5s ease;
white-space: nowrap;
}
.prompt.visible {
animation: YbounceIn 0.4s forwards;
}
.prompt.hidden {
animation: YbounceOut 0.4s forwards;
}
.prompt.error {
background-color: #f44336;
}
@keyframes YbounceIn {
0% {
transform: translateY(100%);
}
50% {
transform: translateY(-80%);
}
100% {
transform: translateY(-60%);
}
}
@keyframes YbounceOut {
0% {
transform: translateY(-60%);
}
50% {
transform: translateY(-80%);
}
100% {
transform: translateY(100%);
}
}
.floating-card {
display: flex;
justify-content: center;
position: fixed;
bottom: -50px;
left: 50%;
transform: translateX(-50%);
z-index: 3;
}
.floating-btn {
background-color: #007bff;
border: none;
box-shadow: 0 4px 8px #0003;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
padding: 12px 17px;
font-size: 17px;
transition: transform 0.3s ease-in-out;
border-top-left-radius: 50px;
border-top-right-radius: 50px;
border-bottom-left-radius: 50px;
border-bottom-right-radius: 50px;
}
.loading {
color: #6E6E6E;
display: flex;
justify-content: center;
align-items: center;
height: calc(100vh - 164px);
font-size: 24px;
}
.acknowledgment {
color: #6E6E6E;
padding: 20px;
text-align: center;
font-size: 14px;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #121212;
color: #eee;
}
.title-container {
background-color: #121212;
}
.help-button {
color: #fff;
}
.help-menu,
.card,
.search-input,
.search-card {
background-color: #343434;
}
.search-card {
border: 1px solid #6E6E6E;
}
.search-input {
color: white;
}
.menu-options,
#menu-button {
background-color: #343434;
border: 1px solid #6E6E6E;
}
}

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.92,5.51h0L3.71,2.29A1,1,0,0,0,2.29,3.71L4.56,6A15.21,15.21,0,0,0,1.4,8.39a1,1,0,0,0,0,1.41,1,1,0,0,0,.71.3,1,1,0,0,0,.7-.29A13.07,13.07,0,0,1,6.05,7.46L7.54,9a10.78,10.78,0,0,0-3.32,2.27,1,1,0,1,0,1.42,1.4,8.8,8.8,0,0,1,3.45-2.12l1.62,1.61a7.07,7.07,0,0,0-3.66,1.94,1,1,0,1,0,1.42,1.4A5,5,0,0,1,12,14a4.13,4.13,0,0,1,.63.05l7.66,7.66a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42ZM12,16a3,3,0,1,0,3,3A3,3,0,0,0,12,16Zm0,4a1,1,0,1,1,1-1A1,1,0,0,1,12,20ZM22.61,8.39A15,15,0,0,0,10.29,4.1a1,1,0,1,0,.22,2A13.07,13.07,0,0,1,21.2,9.81a1,1,0,0,0,1.41-1.42Zm-4.25,4.24a1,1,0,0,0,1.42-1.4,10.75,10.75,0,0,0-4.84-2.82,1,1,0,1,0-.52,1.92A8.94,8.94,0,0,1,18.36,12.63Z"/></svg>

After

Width:  |  Height:  |  Size: 725 B

116
more-excldue.json Normal file
View File

@@ -0,0 +1,116 @@
{
"description": "Unnecessary app list",
"repo-link": "https://github.com/KOWX712/Tricky-Addon-Update-Target-List",
"json-link": "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/master/more-excldue.json",
"data": [
{
"info": "Root manager",
"apps": [
{
"name": "Magisk",
"package-name": "com.topjohnwu.magisk"
},
{
"name": "Magisk Alpha",
"package-name": "io.github.vvb2060.magisk"
},
{
"name": "Kitsune Mask",
"package-name": "io.github.huskydg.magisk"
},
{
"name": "KernelSU",
"package-name": "me.weishu.kernelsu"
},
{
"name": "Apatch",
"package-name": "me.bmax.apatch"
},
{
"name": "Apatch Next",
"package-name": "me.garfieldhan.apatch.next"
}
]
},
{
"info": "Root related app that won't detect bootloader",
"apps": [
{
"name": "LSPosed Manager",
"package-name": "org.lsposed.manager"
},
{
"name": "Termux",
"package-name": "com.termux"
},
{
"name": "MT Manager",
"package-name": "bin.mt.plus"
},
{
"name": "MT Manager clone",
"package-name": "bin.mt.plus.canary"
},
{
"name": "KonaBess",
"package-name": "xzr.konabess"
},
{
"name": "KsuWebUI",
"package-name": "io.github.a13e300.ksuwebui"
},
{
"name": "ShortX",
"package-name": "tornaco.apps.shortx"
}
]
},
{
"info": "General app that won't detect bootloader",
"apps": [
{
"name": "Scene",
"package-name": "com.omarea.vtools"
},
{
"name": "Swift Backup",
"package-name": "org.swiftapps.swiftbackup"
},
{
"name": "Google Docs",
"package-name": "com.google.android.apps.docs.editors.docs"
},
{
"name": "Google Sheets",
"package-name": "com.google.android.apps.docs.editors.sheets"
},
{
"name": "Google Slides",
"package-name": "com.google.android.apps.docs.editors.slides"
},
{
"name": "Google Maps",
"package-name": "com.google.android.apps.maps"
},
{
"name": "Google Earth",
"package-name": "com.google.earth"
},
{
"name": "Google Translate",
"package-name": "com.google.android.apps.translate"
},
{
"name": "Chrome",
"package-name": "com.android.chrome"
}
]
}
],
"Add more app into this list?": [
{
"issue": "https://github.com/KOWX712/Tricky-Addon-Update-Target-List/issues",
"pull-request": "https://github.com/KOWX712/Tricky-Addon-Update-Target-List/pulls"
}
]
}

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