更新一段时间就太监了。
fun main(){
val (isSuccess,message) = adb shell {"echo hello motherfucker"}
println(message)
if (isSuccess){
keepGoing
}
}
fun main(){
fun doSthWithResult(cr:CommandResult,dosth:()->Unit){
if (rr.isSuccesss){
dosth()
}
……
}
doSthWithResult(adb reboot bootloader){
doSthWithResult(fastboot flash pair("boot_a","path/to/boot")){
println("yeeeeeeaaah")
}
}
}