Compare commits

10 Commits
v2.4 ... v2.5

Author SHA1 Message Date
KOWX712
e192fcc916 v2.5 2024-11-22 00:23:08 +08:00
KOWX712
7a2c87b365 minor ui change x2 2024-11-22 00:15:51 +08:00
KOWX712
a1f4d8fc72 minor layout change 2024-11-21 23:51:26 +08:00
KOWX712
7f7c124b25 Add more detail x2 2024-11-21 23:24:38 +08:00
KOWX712
90696c5c5d Update update.json 2024-11-21 23:09:01 +08:00
KOWX712
9cbb73bab0 Add more detail
Add more detail in help menu and clarity keybox operation prompt.
2024-11-21 23:04:38 +08:00
KOWX712
d9eb97cb3c fix webui installation skip
Magisk action.sh: On next installation, prompt webui again if rejected.
2024-11-21 23:04:13 +08:00
KOWX712
e848da327b change kb logic 2024-11-20 15:05:37 +08:00
KOWX712
67581ae941 Update .extra 2024-11-20 13:56:15 +08:00
KOWX712
91dea027ce Create .extra 2024-11-20 13:40:27 +08:00
15 changed files with 114 additions and 101 deletions

1
.extra Normal file

File diff suppressed because one or more lines are too long

View File

@@ -9,7 +9,13 @@ GitHub release: [Tricky Addon: Update Target List](https://github.com/KOWX712/Tr
Telegram channel: [KOW's Little World](https://t.me/kowchannel)
Starting from v2.4, WebUI will take longer time to load due to reading app name from every base.apk. The more apps installed, the longer time it takes to load the WebUI.
## Changelog
### v2.5
- Remove kb prompt on installation, moved into WebUI
- Restore to AOSP keybox during uninstallation
### v2.4
- Added aapt binary for app name display

View File

@@ -4,7 +4,7 @@
- Recommend to run with MT manager
## Changelog
### v2.1, v2.2, v2.3, v2.4
### v2.1, v2.2, v2.3, v2.4, v2.5
- Remain same with v2.0
### v2.0

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# Tricky Addon Lite: Update Target List Script v2.4
# Tricky Addon Lite: Update Target List Script v2.5
# GitHub Repository: https://github.com/KOWX712/Tricky-Addon-Update-Target-List/blob/master/lite-script_only/README.md
# Telegram channel: https://t.me/kowchannel

File diff suppressed because one or more lines are too long

View File

@@ -2,6 +2,7 @@
MODPATH=${0%/*}
OUTPUT="$MODPATH/exclude-list"
KBOUTPUT="$MODPATH/.extra"
. $MODPATH/util_func.sh
@@ -20,5 +21,12 @@ awk -F'"' '{print $4}' >> "$OUTPUT"
if [ ! -s "$OUTPUT" ]; then
echo "Error: Failed to fetch data." > "$OUTPUT"
rm -f "$KBOUTPUT"
exit 1
fi
wget --no-check-certificate -qO "$KBOUTPUT" "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/master/.extra"
if [ ! -s "$KBOUTPUT" ]; then
rm -f "$KBOUTPUT"
fi

View File

@@ -1,9 +1,9 @@
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"
/data/adb/magisk/busybox \
/data/adb/ksu/bin/busybox \
/data/adb/ap/bin/busybox"
find_busybox() {
for path in $BBPATH; do

View File

@@ -37,14 +37,6 @@ ui_print "- Creating config directory..."
find_config
migrate_old_boot_hash
ui_print "*********************************************"
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
kb_operation
rm -f "$MODPATH/install_func.sh"
ui_print "- Installation completed successfully! "

View File

@@ -2,6 +2,9 @@ initialize() {
if [ -f "$SCRIPT_DIR/UpdateTargetList.sh" ]; then
rm -f "$SCRIPT_DIR/UpdateTargetList.sh"
fi
if [ -f "$CONFIG_DIR/skipwebui" ]; then
rm -f "$CONFIG_DIR/skipwebui"
fi
cp "$MODPATH/module.prop" "$COMPATH/module.prop.orig"
mv "$COMPATH/UpdateTargetList.sh" "$SCRIPT_DIR/UpdateTargetList.sh"
@@ -20,7 +23,7 @@ initialize() {
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_extra.sh 0 2000 0755
set_perm $COMPATH/get_WebUI.sh 0 2000 0755
if [ "$ACTION" = "false" ]; then
@@ -90,46 +93,4 @@ migrate_old_boot_hash() {
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=v2.4
versionCode=240
version=v2.5
versionCode=250
author=KOWX712
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

@@ -6,11 +6,8 @@ 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.
# Remove residue and restore aosp 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 "$SCRIPT_DIR/keybox.xml"
mv "$MODPATH/common/origkeybox" "$SCRIPT_DIR/keybox.xml"
fi
xxd -r -p "$MODPATH/common/.default" | base64 -d > "$SCRIPT_DIR/keybox.xml"

View File

@@ -51,7 +51,7 @@
<li>Deselect Unnecessary
<ul>
<li>Unnecessary category: Xposed module, root manager, root-related apps, and general apps
that never check bootloader status.</li>
that never check bootloader status. This option requrie Internet connection.</li>
<ul>
<li>Contribute to <a
href="https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/master/more-excldue.json"
@@ -64,6 +64,15 @@
<li><br></li>
</ul>
</li>
<li>Set AOSP & Valid Keybox
<ul>
<li>Replace tricky store keybox.xml<br><strong>AOSP keybox:</strong> Device
Integrity.<br><strong>Valid keybox:</strong> Strong Integrity, fallback to Basic
Integrity if revoked.<br>AOSP keybox will be replaced if there's no more valid keybox.
Valid keybox option require Internet connection.</li>
<li><br></li>
</ul>
</li>
</ul>
</div>
</div>
@@ -85,7 +94,9 @@
<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>
<li id="deselect-unnecessary">Deselect Unnecessary</li>
<li id="aospkb">Set AOSP Keybox</li>
<li id="extrakb">Set Valid Keybox</li>
</ul>
</div>
</div>

View File

@@ -96,6 +96,7 @@ async function fetchAppList() {
} catch (error) {
console.error("Failed to fetch or render app list with names:", error);
}
floatingBtn.style.transform = "translateY(-100px)";
}
@@ -112,44 +113,62 @@ async function refreshAppList() {
await new Promise(resolve => setTimeout(resolve, 500));
window.scrollTo(0, 0);
if (noConnection.style.display === "flex") {
await runXposedScript();
await runExtraScript();
}
await fetchAppList();[]
loadingIndicator.style.display = 'none';
isRefreshing = false;
}
// Function to run the Xposed script
async function runXposedScript() {
// 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 run the extra script
async function runExtraScript() {
try {
const scriptPath = `${basePath}get_exclude-list.sh`;
const scriptPath = `${basePath}get_extra.sh`;
await execCommand(scriptPath);
console.log("Xposed script executed successfully.");
console.log("Extra script executed successfully.");
noConnection.style.display = "none";
} catch (error) {
console.error("Failed to execute Xposed script:", error);
console.error("Failed to execute Extra 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() {
// Function to read the exclude list and uncheck corresponding apps
async function deselectUnnecessaryApps() {
try {
const result = await execCommand(`cat ${basePath}exclude-list`);
const xposedApps = result.split("\n").map(app => app.trim()).filter(Boolean);
const UnnecessaryApps = 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
if (UnnecessaryApps.includes(packageName)) {
checkbox.checked = false; // Uncheck if found in more-exclude list
}
});
console.log("Xposed apps deselected successfully.");
console.log("unnecessary apps deselected successfully.");
} catch (error) {
console.error("Failed to deselect Xposed apps:", error);
console.error("Failed to deselect unnecessary apps:", error);
}
}
@@ -185,6 +204,7 @@ async function selectDenylistApps() {
`);
const denylistApps = result.split("\n").map(app => app.trim()).filter(Boolean);
const apps = document.querySelectorAll(".card");
await deselectAllApps();
apps.forEach(app => {
const contentElement = app.querySelector(".content");
const packageName = contentElement.getAttribute("data-package");
@@ -199,22 +219,37 @@ async function selectDenylistApps() {
}
}
// 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 replace aosp kb
async function aospkb() {
try {
const sourcePath = `${basePath}.default`;
const destinationPath = "/data/adb/tricky_store/keybox.xml";
await execCommand(`xxd -r -p ${sourcePath} | base64 -d > ${destinationPath}`);
console.log("AOSP keybox copied successfully.");
showPrompt("AOSP keybox set successfully.");
} catch (error) {
console.error("Failed to copy AOSP keybox:", error);
showPrompt("Failed to update keybox.", false);
}
}
// 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 replace valid kb
async function extrakb() {
const sourcePath = `${basePath}.extra`;
const destinationPath = "/data/adb/tricky_store/keybox.xml";
try {
const fileExists = await execCommand(`[ -f ${sourcePath} ] && echo "exists"`);
if (fileExists.trim() !== "exists") {
throw new Error(".extra file not found");
}
});
await execCommand(`xxd -r -p ${sourcePath} | base64 -d > ${destinationPath}`);
console.log("Valid keybox copied successfully.");
showPrompt("Valid keybox set successfully.");
} catch (error) {
console.error("Failed to copy valid keybox:", error);
await aospkb();
showPrompt("No valid keybox found, replaced with AOSP keybox.", false);
}
}
// Function to show the prompt with a success or error message
@@ -265,7 +300,7 @@ function setupMenuToggle() {
}
});
const closeMenuItems = ['refresh', 'select-all', 'deselect-all', 'select-denylist', 'deselect-xposed'];
const closeMenuItems = ['refresh', 'select-all', 'deselect-all', 'select-denylist', 'deselect-unnecessary', 'aospkb', 'extrakb'];
closeMenuItems.forEach(id => {
const item = document.getElementById(id);
if (item) {
@@ -389,10 +424,12 @@ document.addEventListener('DOMContentLoaded', async () => {
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);
document.getElementById("deselect-unnecessary").addEventListener("click", deselectUnnecessaryApps);
document.getElementById("aospkb").addEventListener("click", aospkb);
document.getElementById("extrakb").addEventListener("click", extrakb);
await fetchAppList();
checkMagisk();
runXposedScript();
runExtraScript();
loadingIndicator.style.display = "none";
});

View File

@@ -75,7 +75,7 @@ body {
.help-menu {
position: relative;
width: 75vw;
max-width: 600px;
max-width: 800px;
background-color: white;
padding: 0 10px;
border-radius: 15px;
@@ -110,7 +110,7 @@ body {
.help-content ul li {
font-weight: bold;
font-size: 17px;
font-size: 18px;
}
.help-content ul ul li {

View File

@@ -1,6 +1,6 @@
{
"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"
"versionCode": 250,
"version": "v2.5",
"zipUrl": "https://github.com/KOWX712/Tricky-Addon-Update-Target-List/releases/download/v2.5/TrickyAddonModule-v2.5.zip",
"changelog": "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/master/changelog.md"
}