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() {
|
install_update() {
|
||||||
|
PATH=/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:$PATH
|
||||||
if command -v magisk >/dev/null 2>&1; then
|
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
|
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
|
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
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
"download_fail": "Fail to download update",
|
"download_fail": "Fail to download update",
|
||||||
"installing": "Installing update...",
|
"installing": "Installing update...",
|
||||||
"installed": "Installed successfully, reboot now.",
|
"installed": "Installed successfully, reboot now.",
|
||||||
"install_fail": "Fail to install, please update manual",
|
"install_fail": "Fail to install, please update manually",
|
||||||
"rebooting": "Rebooting...",
|
"rebooting": "Rebooting...",
|
||||||
"reboot_fail": "Fail to reboot, please reboot manually",
|
"reboot_fail": "Fail to reboot, please reboot manually",
|
||||||
"custom_key_set": "Custom keybox set successfully",
|
"custom_key_set": "Custom keybox set successfully",
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
"download_fail": "Fail to download update",
|
"download_fail": "Fail to download update",
|
||||||
"installing": "Installing update...",
|
"installing": "Installing update...",
|
||||||
"installed": "Installed successfully, reboot now.",
|
"installed": "Installed successfully, reboot now.",
|
||||||
"install_fail": "Fail to install, please update manual",
|
"install_fail": "Fail to install, please update manually",
|
||||||
"rebooting": "Rebooting...",
|
"rebooting": "Rebooting...",
|
||||||
"reboot_fail": "Fail to reboot, please reboot manually",
|
"reboot_fail": "Fail to reboot, please reboot manually",
|
||||||
"custom_key_set": "Custom keybox set successfully",
|
"custom_key_set": "Custom keybox set successfully",
|
||||||
|
|||||||
@@ -160,12 +160,11 @@ function setupUpdateMenu() {
|
|||||||
installButton.addEventListener('click', async () => {
|
installButton.addEventListener('click', async () => {
|
||||||
try {
|
try {
|
||||||
showPrompt("prompt.installing");
|
showPrompt("prompt.installing");
|
||||||
setTimeout(async () => {
|
await new Promise(resolve => setTimeout(resolve, 300));
|
||||||
await execCommand(`sh ${basePath}common/get_extra.sh --install-update`);
|
await execCommand(`sh ${basePath}common/get_extra.sh --install-update`);
|
||||||
showPrompt("prompt.installed");
|
showPrompt("prompt.installed");
|
||||||
installButton.style.display = "none";
|
installButton.style.display = "none";
|
||||||
rebootButton.style.display = "flex";
|
rebootButton.style.display = "flex";
|
||||||
}, 300);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
showPrompt("prompt.install_fail", false);
|
showPrompt("prompt.install_fail", false);
|
||||||
console.error('Fail to execute installation script:', error);
|
console.error('Fail to execute installation script:', error);
|
||||||
@@ -176,9 +175,8 @@ function setupUpdateMenu() {
|
|||||||
rebootButton.addEventListener('click', async () => {
|
rebootButton.addEventListener('click', async () => {
|
||||||
try {
|
try {
|
||||||
showPrompt("prompt.rebooting");
|
showPrompt("prompt.rebooting");
|
||||||
setTimeout(async () => {
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||||
await execCommand("svc power reboot");
|
await execCommand("svc power reboot");
|
||||||
}, 1000);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
showPrompt("prompt.reboot_fail", false);
|
showPrompt("prompt.reboot_fail", false);
|
||||||
console.error('Fail to reboot:', error);
|
console.error('Fail to reboot:', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user