manager: avoid factory data reset popup when rebooting into recovery

This commit is contained in:
rifsxd
2025-02-13 20:08:32 +06:00
parent b18f89b434
commit 623f5e3f64

View File

@@ -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")
}