You've already forked Tricky-Addon-Update-Target-List
mirror of
https://github.com/KOWX712/Tricky-Addon-Update-Target-List.git
synced 2025-09-06 06:37:09 +00:00
fix: installation fail
you can use apd to install module in kernelsu O_O
This commit is contained in:
@@ -68,12 +68,13 @@ get_update() {
|
||||
}
|
||||
|
||||
install_update() {
|
||||
PATH=/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:$PATH
|
||||
if command -v magisk >/dev/null 2>&1; then
|
||||
magisk --install-module "$MODPATH/tmp/module.zip"
|
||||
magisk --install-module "$MODPATH/tmp/module.zip" || exit 1
|
||||
elif command -v apd >/dev/null 2>&1; then
|
||||
apd module install "$MODPATH/tmp/module.zip"
|
||||
apd module install "$MODPATH/tmp/module.zip" || exit 1
|
||||
elif command -v ksud >/dev/null 2>&1; then
|
||||
ksud module install "$MODPATH/tmp/module.zip"
|
||||
ksud module install "$MODPATH/tmp/module.zip" || exit 1
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
"download_fail": "Fail to download update",
|
||||
"installing": "Installing update...",
|
||||
"installed": "Installed successfully, reboot now.",
|
||||
"install_fail": "Fail to install, please update manual",
|
||||
"install_fail": "Fail to install, please update manually",
|
||||
"rebooting": "Rebooting...",
|
||||
"reboot_fail": "Fail to reboot, please reboot manually",
|
||||
"custom_key_set": "Custom keybox set successfully",
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
"download_fail": "Fail to download update",
|
||||
"installing": "Installing update...",
|
||||
"installed": "Installed successfully, reboot now.",
|
||||
"install_fail": "Fail to install, please update manual",
|
||||
"install_fail": "Fail to install, please update manually",
|
||||
"rebooting": "Rebooting...",
|
||||
"reboot_fail": "Fail to reboot, please reboot manually",
|
||||
"custom_key_set": "Custom keybox set successfully",
|
||||
|
||||
@@ -160,12 +160,11 @@ function setupUpdateMenu() {
|
||||
installButton.addEventListener('click', async () => {
|
||||
try {
|
||||
showPrompt("prompt.installing");
|
||||
setTimeout(async () => {
|
||||
await execCommand(`sh ${basePath}common/get_extra.sh --install-update`);
|
||||
showPrompt("prompt.installed");
|
||||
installButton.style.display = "none";
|
||||
rebootButton.style.display = "flex";
|
||||
}, 300);
|
||||
await new Promise(resolve => setTimeout(resolve, 300));
|
||||
await execCommand(`sh ${basePath}common/get_extra.sh --install-update`);
|
||||
showPrompt("prompt.installed");
|
||||
installButton.style.display = "none";
|
||||
rebootButton.style.display = "flex";
|
||||
} catch (error) {
|
||||
showPrompt("prompt.install_fail", false);
|
||||
console.error('Fail to execute installation script:', error);
|
||||
@@ -176,9 +175,8 @@ function setupUpdateMenu() {
|
||||
rebootButton.addEventListener('click', async () => {
|
||||
try {
|
||||
showPrompt("prompt.rebooting");
|
||||
setTimeout(async () => {
|
||||
await execCommand("svc power reboot");
|
||||
}, 1000);
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
await execCommand("svc power reboot");
|
||||
} catch (error) {
|
||||
showPrompt("prompt.reboot_fail", false);
|
||||
console.error('Fail to reboot:', error);
|
||||
|
||||
Reference in New Issue
Block a user