From edf8423353413fdb704edebb304f1410dcfd95fb Mon Sep 17 00:00:00 2001 From: nift4 Date: Mon, 26 Aug 2024 13:34:55 +0200 Subject: [PATCH] oops --- .../java/org/andbootmgr/app/DeviceInfo.kt | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/org/andbootmgr/app/DeviceInfo.kt b/app/src/main/java/org/andbootmgr/app/DeviceInfo.kt index f86b0f14..7e9069a2 100644 --- a/app/src/main/java/org/andbootmgr/app/DeviceInfo.kt +++ b/app/src/main/java/org/andbootmgr/app/DeviceInfo.kt @@ -59,7 +59,15 @@ abstract class MetaOnSdDeviceInfo : DeviceInfo { return !SuFile.open(logic.abmDb, "db.conf").exists() } override fun getAbmSettings(logic: DeviceLogic): String? { - return logic.dmPath.absolutePath + if (SuFile.open(bdev).exists()) + SDUtils.generateMeta(this)?.let { meta -> + if (meta.p.isNotEmpty()) { + val part = meta.dumpKernelPartition(1) + if (part.type == SDUtils.PartitionType.RESERVED) + return part.path + } + } + return null } } @@ -72,15 +80,7 @@ abstract class SdLessDeviceInfo : DeviceInfo { return !SuFile.open(logic.abmDb, "db.conf").exists() } override fun getAbmSettings(logic: DeviceLogic): String? { - if (SuFile.open(bdev).exists()) - SDUtils.generateMeta(this)?.let { meta -> - if (meta.p.isNotEmpty()) { - val part = meta.dumpKernelPartition(1) - if (part.type == SDUtils.PartitionType.RESERVED) - return part.path - } - } - return null + return logic.dmPath.absolutePath } }