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).
This commit is contained in:
KOWX712
2024-11-18 18:36:51 +08:00
parent 2e71b6512b
commit 383a7eeb5f
7 changed files with 168 additions and 54 deletions
+28
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."