manager: fix suggest boot partition if we've root.

Co-authored-by: weishu <twsxtd@gmail.com>
This commit is contained in:
ShirkNeko
2025-11-03 12:10:49 +08:00
parent 696c3059b6
commit d2a3f0fcad

View File

@@ -13,6 +13,7 @@ import android.util.Log
import com.topjohnwu.superuser.CallbackList
import com.topjohnwu.superuser.Shell
import com.topjohnwu.superuser.ShellUtils
import com.topjohnwu.superuser.io.SuFile
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import kotlinx.parcelize.Parcelize
@@ -344,6 +345,10 @@ fun isAbDevice(): Boolean {
}
fun isInitBoot(): Boolean {
val shell = getRootShell();
if (shell.isRoot) {
return SuFile("/dev/block/by-name/init_boot").exists() || SuFile("/dev/block/by-name/init_boot_a").exists()
}
return !Os.uname().release.contains("android12-")
}