From fe76f01439315c53e363831346e61084f9208f62 Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Tue, 25 Feb 2025 19:28:57 +0800 Subject: [PATCH] fix: remove su -c fix problem with disable sucompat --- module/webui/scripts/boot_hash.js | 5 ++++- module/webui/scripts/update.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/module/webui/scripts/boot_hash.js b/module/webui/scripts/boot_hash.js index 1370d87..ba6e997 100644 --- a/module/webui/scripts/boot_hash.js +++ b/module/webui/scripts/boot_hash.js @@ -45,7 +45,10 @@ document.getElementById("boot-hash").addEventListener("click", async () => { const inputValue = inputBox.value.trim(); try { await execCommand(`echo "${inputValue}" > /data/adb/boot_hash`); - await execCommand(`su -c resetprop -n ro.boot.vbmeta.digest ${inputValue}`); + await execCommand(` + PATH=/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:$PATH + resetprop -n ro.boot.vbmeta.digest ${inputValue} + `); showPrompt("prompt.boot_hash_set"); closeCard(); } catch (error) { diff --git a/module/webui/scripts/update.js b/module/webui/scripts/update.js index 4294669..6f0d023 100644 --- a/module/webui/scripts/update.js +++ b/module/webui/scripts/update.js @@ -161,7 +161,7 @@ function setupUpdateMenu() { try { showPrompt("prompt.installing"); setTimeout(async () => { - await execCommand(`su -c 'sh ${basePath}common/get_extra.sh --install-update'`); + await execCommand(`sh ${basePath}common/get_extra.sh --install-update`); showPrompt("prompt.installed"); installButton.style.display = "none"; rebootButton.style.display = "flex";