diff --git a/bbootimg/build.gradle.kts b/bbootimg/build.gradle.kts index bc7a469b..9e7c3e7d 100644 --- a/bbootimg/build.gradle.kts +++ b/bbootimg/build.gradle.kts @@ -15,7 +15,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "2.0.0" + kotlin("jvm") version "2.0.20" application } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0d184210..d642e7f8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/lazybox/build.gradle.kts b/lazybox/build.gradle.kts index 48ab0e41..cfab2363 100644 --- a/lazybox/build.gradle.kts +++ b/lazybox/build.gradle.kts @@ -8,7 +8,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "2.0.0" + kotlin("jvm") version "2.0.20" application } diff --git a/lazybox/src/main/kotlin/cfig/lazybox/sysinfo/SysInfo.kt b/lazybox/src/main/kotlin/cfig/lazybox/sysinfo/SysInfo.kt index d776583c..59c55181 100644 --- a/lazybox/src/main/kotlin/cfig/lazybox/sysinfo/SysInfo.kt +++ b/lazybox/src/main/kotlin/cfig/lazybox/sysinfo/SysInfo.kt @@ -14,6 +14,7 @@ import java.util.* import kotlin.io.path.Path import kotlin.io.path.deleteIfExists import kotlin.io.path.writeText +import java.io.ByteArrayOutputStream class SysInfo { private fun runAndWrite(cmd: String, outStream: OutputStream, check: Boolean) { @@ -138,7 +139,13 @@ makeTar("%s", "%s") Files.move(Paths.get("$prefix/device-tree"), Paths.get("$prefix/device_tree")) if (theSlot.isNotBlank()) { - "adb pull /dev/block/by-name/vbmeta$theSlot".check_call(prefix) + val uid = ByteArrayOutputStream().use { + runAndWrite("adb shell id -u", it, false) + it + }.toString(Charsets.UTF_8).trim() + if (uid != "2000") { + "adb pull /dev/block/by-name/vbmeta$theSlot".check_call(prefix) + } } makeTar("sysinfo.tar.xz", "sysinfo") File("sysinfo").deleteRecursively() @@ -147,4 +154,4 @@ makeTar("%s", "%s") companion object { private val log = LoggerFactory.getLogger(SysInfo::class.java) } -} \ No newline at end of file +}