From 623f5e3f643e4e93aecf4452cd6994edf674961a Mon Sep 17 00:00:00 2001 From: rifsxd Date: Thu, 13 Feb 2025 20:08:32 +0600 Subject: [PATCH] manager: avoid factory data reset popup when rebooting into recovery --- manager/app/src/main/java/com/rifsxd/ksunext/ui/util/KsuCli.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manager/app/src/main/java/com/rifsxd/ksunext/ui/util/KsuCli.kt b/manager/app/src/main/java/com/rifsxd/ksunext/ui/util/KsuCli.kt index 28ee73a3..61179db9 100644 --- a/manager/app/src/main/java/com/rifsxd/ksunext/ui/util/KsuCli.kt +++ b/manager/app/src/main/java/com/rifsxd/ksunext/ui/util/KsuCli.kt @@ -342,7 +342,7 @@ fun reboot(reason: String = "") { val shell = getRootShell() if (reason == "recovery") { // KEYCODE_POWER = 26, hide incorrect "Factory data reset" message - ShellUtils.fastCmd(shell, "/system/bin/input keyevent 26") + ShellUtils.fastCmd(shell, "/system/bin/reboot $reason") } ShellUtils.fastCmd(shell, "/system/bin/svc power reboot $reason || /system/bin/reboot $reason") }