Skip to content

Commit

Permalink
update tool version
Browse files Browse the repository at this point in the history
  • Loading branch information
cfig committed Sep 15, 2024
1 parent bdadd58 commit af6aa00
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bbootimg/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion lazybox/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
11 changes: 9 additions & 2 deletions lazybox/src/main/kotlin/cfig/lazybox/sysinfo/SysInfo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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()
Expand All @@ -147,4 +154,4 @@ makeTar("%s", "%s")
companion object {
private val log = LoggerFactory.getLogger(SysInfo::class.java)
}
}
}

0 comments on commit af6aa00

Please sign in to comment.