Compare commits

15 Commits
v1.6 ... v2.1

Author SHA1 Message Date
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
21 changed files with 760 additions and 61 deletions

View File

@@ -1,15 +1,20 @@
# **Tricky Addon: Update Target List**
# **Tricky Addon - Update Target List**
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
- [Tricky store](https://github.com/5ec1cff/TrickyStore) module installed
## Custom Configuration
- ADDITION and EXCLUDE in `/data/adb/tricky_store/target_list_config`
- EXCLUDE for removing unnecessary apps
- ADDITION for adding back system app excluded by default
- Configuration list with **KSU WebUI** (KernelSU & Apatch, For Magisk users: [KSU WebUI standalone](https://github.com/5ec1cff/KsuWebUIStandalone))
## Instructions
### Automatic update
@@ -25,9 +30,12 @@ An addon module for tricky store
- MT manager is recommened for this method
## More
**Support to pass Patition Check Fail in Minotaur test**
**Support to pass abnormal boot state**
- Put Verfied Boot Hash to `boot_hash` in `/data/adb/modules/TA_utl`, 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

@@ -10,6 +10,21 @@ GitHub release: [Tricky Addon: Update Target List](https://github.com/KOWX712/Tr
Telegram channel: [KOW's Little World](https://t.me/kowchannel)
## Changelog
### 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

View File

@@ -4,17 +4,18 @@
- Recommend to run with MT manager
## Changelog
### v1.6
### v2.0, v2.1
- 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.1
- Remain same with v1.3.1
### v1.4
### v1.4, v1.4.1
- Remain same with v1.3.1
### v1.3.1

View File

@@ -1,14 +1,16 @@
#!/bin/sh
# by KOW
# Tricky Addon Lite: Update Target List Script v1.6 (v1.5)
# Tricky Addon Lite: Update Target List Script v2.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
# 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
@@ -22,14 +24,14 @@ io.github.vvb2060.keyattestation
io.github.vvb2060.mahoshojo
icu.nullptr.nativetest"
echo " "
echo " Staring script..."
echo " "
###################################################
# Script
###################################################
> /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,4 +47,5 @@ for app in $ADDITION; do
fi
done
echo " All done!"
echo " "
echo "- All done!"

View File

@@ -1,14 +1,15 @@
TS="/data/adb/tricky_store"
SCRIPT_DIR="/data/adb/tricky_store"
echo "**********************************************"
echo "- Staring script..."
echo " "
if [ ! -f "$TS/UpdateTargetList.sh" ]; then
if [ ! -f "$SCRIPT_DIR/UpdateTargetList.sh" ]; then
echo "! Script missing, please install module again"
echo "**********************************************"
exit 1
else
. "$TS/UpdateTargetList.sh"
. "$SCRIPT_DIR/UpdateTargetList.sh"
fi
echo "**********************************************"

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

Binary file not shown.

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

Binary file not shown.

BIN
module/bin/x86/curl Normal file

Binary file not shown.

BIN
module/bin/x86_64/curl Normal file

Binary file not shown.

View File

@@ -2,7 +2,6 @@
# 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

View File

@@ -2,7 +2,6 @@
# 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
com.android.patch

View File

@@ -1,36 +1,31 @@
#!/bin/sh
# This script will put all non-system app into /data/adb/tricky_store/target.txt
MODDIR="/data/adb/tricky_store/target_list_config"
CONFIG_DIR="/data/adb/tricky_store/target_list_config"
echo "- Checking config files..."
echo " "
if [ ! -f "$MODDIR/EXCLUDE" ]; then
echo "! Exclude list is missing!"
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"
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
EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$MODDIR/EXCLUDE" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | tr '\n' '|' | sed 's/|$//')
ADDITION=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$MODDIR/ADDITION")
EXCLUDE=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/EXCLUDE" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | tr '\n' '|' | sed 's/|$//')
ADDITION=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' "$CONFIG_DIR/ADDITION")
echo "- Overwritting target.txt"
echo " "
> /data/adb/tricky_store/target.txt
echo "- Adding apps into /data/adb/tricky_store/target.txt"
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
echo "- Adding addition app... "
echo " "

View File

@@ -0,0 +1,9 @@
#!/system/bin/sh
# Get all xposed app package name
MODPATH=${0%/*}
OUTPUT="$MODPATH/xposed-list"
curl -s "https://modules.lsposed.org/modules.json" | \
grep -o '"name":"[^"]*","description":' | \
awk -F'"' '{print $4}' > "$OUTPUT"

View File

@@ -1,5 +1,6 @@
SKIPUNZIP=0
DEBUG=false
ui_print " ";
if [ "$APATCH" ]; then
ui_print "- APatch:$APATCH_VER$APATCH_VER_CODE"
@@ -14,15 +15,15 @@ else
fi
COMPATH="$MODPATH/common"
TS="/data/adb/tricky_store"
CONFIG_DIR="$TS/target_list_config"
TS="/data/adb/modules/tricky_store"
SCRIPT_DIR="/data/adb/tricky_store"
CONFIG_DIR="$SCRIPT_DIR/target_list_config"
MODNAME=$(grep '^id=' "$MODPATH/module.prop" | awk -F= '{print $2}' | xargs)
ORG_DIR="/data/adb/modules/$MODNAME"
kb="$COMPATH/.default"
if [ -d "$TS" ]; then
ui_print "- Tricky store module installed"
ui_print " "
else
ui_print "! Tricky store module is not installed"
abort " "
@@ -72,11 +73,24 @@ add_addition() {
ui_print "- Installing..."
if [ -f "$TS/UpdateTargetList.sh" ]; then
rm -f "$TS/UpdateTargetList.sh"
if [ -f "$SCRIPT_DIR/UpdateTargetList.sh" ]; then
rm -f "$SCRIPT_DIR/UpdateTargetList.sh"
fi
mv "$COMPATH/UpdateTargetList.sh" "$TS/UpdateTargetList.sh"
cp "$MODPATH/module.prop" "$COMPATH/module.prop.orig"
mv "$COMPATH/UpdateTargetList.sh" "$SCRIPT_DIR/UpdateTargetList.sh"
sed -i "s|\"set-path\"|\"/data/adb/modules/$MODNAME/common/\"|" "$MODPATH/webroot/index.js" || ui_print "! fail to replace path"
# Curl binary is used to fetch xposed module package name list from https://modules.lsposed.org/modules.json
if [ ! -f "/system/bin/curl" ]; then
mkdir -p "$MODPATH/system/bin"
mv "$MODPATH/bin/$(getprop ro.product.cpu.abi)/curl" "$MODPATH/system/bin/curl"
set_perm "$MODPATH/system/bin/curl" 0 2000 0777
fi
rm -rf "$MODPATH/bin"
set_perm $SCRIPT_DIR/UpdateTargetList.sh 0 2000 0755
set_perm $COMPATH/get_xposed.sh 0 2000 0755
if [ -d "$CONFIG_DIR" ]; then
if [ ! -f "$CONFIG_DIR/EXCLUDE" ] && [ ! -f "$CONFIG_DIR/ADDITION" ]; then
@@ -129,9 +143,9 @@ if [[ "$keycheck" == "KEY_VOLUMEUP" ]]; then
if [ -f "$ORG_DIR/common/origkeybox" ]; then
mv "$ORG_DIR/common/origkeybox" "$COMPATH/origkeybox"
else
mv "$TS/keybox.xml" "$COMPATH/origkeybox"
mv "$SCRIPT_DIR/keybox.xml" "$COMPATH/origkeybox"
fi
mv "$kb" "$TS/keybox.xml"
mv "$kb" "$SCRIPT_DIR/keybox.xml"
else
if [ -f "$ORG_DIR/common/origkeybox" ]; then
mv "$ORG_DIR/common/origkeybox" "$COMPATH/origkeybox"
@@ -140,6 +154,5 @@ else
fi
fi
ui_print " "
ui_print "- Installation completed successfully! "
ui_print " "

View File

@@ -1,7 +1,7 @@
id=TA_utl
name=Tricky Addon: Update Target List
version=v1.6
versionCode=160
name=Tricky Addon - Update Target List
version=v2.1
versionCode=210
author=KOWX712
description=Update tricky store target list with action button. Custom config: ADDITION and EXCLUDE in /data/adb/tricky_store/target_list_config
updateJson=https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/master/update.json
description=Update tricky store target.txt. Custom config: ADDITION and EXCLUDE in /data/adb/tricky_store/target_list_config
updateJson=https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/master/update.json

View File

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

View File

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

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

@@ -0,0 +1,46 @@
<!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="/styles.css" type="text/css">
<script type="module" crossorigin src="/index.js"></script>
</head>
<body>
<div id="title">Tricky Addon - Update Target List</div>
<div class="search-card">
<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" style="display: none;">
<label for="menu-toggle" id="menu-button">
<span class="menu-icon">&#9776;</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="deselect-xposed">Deselect Xposed</li>
</ul>
</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">
<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>

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

@@ -0,0 +1,322 @@
let e = 0;
const appTemplate = document.getElementById("app-template").content;
const appListContainer = document.getElementById("apps-list");
const loadingIndicator = document.querySelector(".loading");
const searchInput = document.getElementById("search");
const clearBtn = document.getElementById("clear-btn");
const title = document.getElementById('title');
const searchCard = document.querySelector('.search-card');
const menu = document.querySelector('.menu');
const floatingBtn = document.querySelector('.floating-btn');
const basePath = "set-path";
let excludeList = [];
// 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);
}
}
// Function to fetch, sort, and render the app list
async function fetchAppList() {
try {
await readExcludeFile();
const result = await execCommand("pm list packages -3 </dev/null 2>&1 | cat");
const packageList = result.split("\n").map(line => line.replace("package:", "").trim()).filter(Boolean);
const sortedApps = packageList.sort((a, b) => {
const aInExclude = excludeList.includes(a);
const bInExclude = excludeList.includes(b);
return aInExclude === bInExclude ? a.localeCompare(b) : aInExclude ? 1 : -1;
});
appListContainer.innerHTML = "";
sortedApps.forEach(appName => {
const appElement = document.importNode(appTemplate, true);
appElement.querySelector(".name").textContent = appName;
const checkbox = appElement.querySelector(".checkbox");
checkbox.checked = !excludeList.includes(appName);
appListContainer.appendChild(appElement);
});
console.log("App list fetched, sorted, and rendered successfully.");
} catch (error) {
console.error("Failed to fetch or render app list:", error);
}
floatingBtn.style.transform = 'translateY(-100px)';
}
// Function to refresh app list
let isRefreshing = false;
async function refreshAppList() {
isRefreshing = true;
title.style.transform = 'translateY(0)';
searchCard.style.transform = 'translateY(0)';
menu.style.transform = 'translateY(0)';
floatingBtn.style.transform = 'translateY(0)';
const searchInput = document.getElementById("search");
searchInput.value = '';
clearBtn.style.display = "none";
appListContainer.innerHTML = '';
loadingIndicator.style.display = 'flex';
await new Promise(resolve => setTimeout(resolve, 500));
loadingIndicator.style.display = 'none';
window.scrollTo(0, 0);
await fetchAppList();
isRefreshing = false;
}
// Function to run the Xposed script
async function runXposedScript() {
try {
const scriptPath = `${basePath}get_xposed.sh`;
await execCommand(scriptPath);
console.log("Xposed script executed successfully.");
} catch (error) {
console.error("Failed to execute Xposed script:", error);
}
}
// Function to read the xposed list and uncheck corresponding apps
async function deselectXposedApps() {
try {
const result = await execCommand(`cat ${basePath}xposed-list`);
const xposedApps = result.split("\n").map(app => app.trim()).filter(Boolean);
const apps = document.querySelectorAll(".card");
apps.forEach(app => {
const appName = app.querySelector(".name").textContent.trim();
const checkbox = app.querySelector(".checkbox");
if (xposedApps.includes(appName)) {
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 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);
}
// Menu toggle functionality
function setupMenuToggle() {
const menuButton = document.getElementById('menu-button');
const menuIcon = menuButton.querySelector('.menu-icon');
const menuOptions = document.getElementById('menu-options');
let menuOpen = false;
menuButton.addEventListener('click', (event) => {
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', 'deselect-xposed'];
closeMenuItems.forEach(id => {
const item = document.getElementById(id);
if (item) {
item.addEventListener('click', (event) => {
event.stopPropagation();
closeMenu();
});
}
});
function openMenu() {
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;
}, 10);
}
function closeMenu() {
if (menuOptions.classList.contains('visible')) {
menuOptions.classList.remove('visible');
menuOptions.classList.add('hidden');
menuIcon.classList.remove('menu-open');
menuIcon.classList.add('menu-closed');
setTimeout(() => {
menuOptions.style.display = 'none';
}, 400);
menuOpen = false;
}
}
}
// 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";
});
if (searchQuery !== "") {
clearBtn.style.display = "block";
} else {
clearBtn.style.display = "none";
}
});
// Clear search input
clearBtn.addEventListener("click", () => {
searchInput.value = "";
clearBtn.style.display = "none";
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(".name").textContent);
const selectedApps = Array.from(appListContainer.querySelectorAll(".checkbox:checked"))
.map(checkbox => checkbox.closest(".card").querySelector(".name").textContent);
for (const app of deselectedApps) {
if (!excludeList.includes(app)) {
excludeList.push(app);
console.log("Added to EXCLUDE list:", app);
} else {
console.log("App already in EXCLUDE file, skipping:", app);
}
}
if (selectedApps.length > 0) {
selectedApps.forEach(app => {
excludeList = excludeList.filter(excludedApp => excludedApp !== app);
console.log("Removed from EXCLUDE list:", app);
});
}
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("deselect-xposed").addEventListener("click", deselectXposedApps);
await runXposedScript();
await fetchAppList();
loadingIndicator.style.display = "none";
});
// Scroll event
let lastScrollY = window.scrollY;
window.addEventListener('scroll', () => {
if (isRefreshing) return;
if (window.scrollY > lastScrollY) {
title.style.transform = 'translateY(-100%)';
searchCard.style.transform = 'translateY(-35px)';
menu.style.transform = 'translateY(-35px)';
floatingBtn.style.transform = 'translateY(0)';
} else {
title.style.transform = 'translateY(0)';
searchCard.style.transform = 'translateY(0)';
menu.style.transform = 'translateY(0)';
floatingBtn.style.transform = 'translateY(-100px)';
}
lastScrollY = window.scrollY;
});

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

@@ -0,0 +1,283 @@
body {
background-color: #F5F5F5;
}
#title {
background-color: #F5F5F5;
border: none;
font-size: 18px;
font-weight: bold;
left: 0;
padding: 10px 25px;
position: fixed;
text-align: left;
top: 0;
transition: transform 0.3s ease;
width: 100%;
z-index: 1000;
}
#apps-list {
margin-top: 100px;
}
.search-card {
background-color: white;
border: 1px solid #ccc;
border-radius: 25px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
display: flex;
align-items: center;
padding: 10px;
position: fixed;
top: 40px;
transition: transform 0.3s ease;
width: calc(100% - 100px);
z-index: 1000;
}
.search-input {
background-color: #fff;
border: none;
box-sizing: border-box;
font-size: 14px;
outline: none;
padding: 5px 15px;
text-align: left;
width: 100%;
}
.clear-btn {
position: absolute;
right: 10px;
border: none;
background: none;
color: #ccc;
font-size: 18px;
cursor: pointer;
display: none;
z-index: 10;
}
.menu {
display: flex;
position: fixed;
top: 40px;
right: 10px;
z-index: 1000;
transition: transform 0.3s ease;
}
.menu-toggle {
display: none;
}
#menu-button {
background-color: white;
border: 1px solid #ccc;
border-radius: 25px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
padding: 13px 17px;
text-align: center;
position: relative;
z-index: 1000;
}
.menu-icon {
display: inline-block;
transition: transform 0.3s 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;
top: 110%;
right: 0;
transform: translateX(120%);
transition: transform 0.3s ease;
width: auto;
white-space: nowrap;
}
.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: pointer;
padding: 15px 18px;
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;
border-radius: 24px;
box-shadow: 0 4px 8px #0003;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
padding: 10px 20px;
font-size: 16px;
transition: transform 0.3s ease-in-out;
}
.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 {
background-color: #121212;
}
.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

@@ -1,6 +1,6 @@
{
"versionCode": 141,
"version": "v1.4.1",
"zipUrl": "https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/download/v1.5/TrickyAddonModule-v1.5.zip",
"versionCode": 200,
"version": "v2.0",
"zipUrl": "https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/download/v2.0/TrickyAddonModule-v2.0.zip",
"changelog": "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/refs/heads/master/changelog.md"
}