manager: install: do not always recommended to select boot partition if not rooted
Co-authored-by: YuKongA <70465933+YuKongA@users.noreply.github.com>
This commit is contained in:
@@ -371,8 +371,12 @@ suspend fun isAbDevice(): Boolean = withContext(Dispatchers.IO) {
|
|||||||
|
|
||||||
suspend fun getDefaultPartition(): String = withContext(Dispatchers.IO) {
|
suspend fun getDefaultPartition(): String = withContext(Dispatchers.IO) {
|
||||||
val shell = getRootShell()
|
val shell = getRootShell()
|
||||||
|
if (shell.isRoot) {
|
||||||
val cmd = "boot-info default-partition"
|
val cmd = "boot-info default-partition"
|
||||||
ShellUtils.fastCmd(shell, "${getKsuDaemonPath()} $cmd").trim()
|
ShellUtils.fastCmd(shell, "${getKsuDaemonPath()} $cmd").trim()
|
||||||
|
} else {
|
||||||
|
if (!Os.uname().release.contains("android12-")) "init_boot" else "boot"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun getSlotSuffix(ota: Boolean): String = withContext(Dispatchers.IO) {
|
suspend fun getSlotSuffix(ota: Boolean): String = withContext(Dispatchers.IO) {
|
||||||
|
|||||||
Reference in New Issue
Block a user