diff --git a/app/src/main/java/org/andbootmgr/app/CreatePartFlow.kt b/app/src/main/java/org/andbootmgr/app/CreatePartFlow.kt index f013fc26..653c74ec 100644 --- a/app/src/main/java/org/andbootmgr/app/CreatePartFlow.kt +++ b/app/src/main/java/org/andbootmgr/app/CreatePartFlow.kt @@ -967,7 +967,7 @@ private fun Flash(c: CreatePartDataHolder) { for (i in parts) { cmd += " " + i.value } - val result = Shell.cmd(cmd).to(terminal).exec() + val result = vm.logic.runShFileWithArgs(cmd).to(terminal).exec() if (!result.isSuccess) { terminal.add(vm.activity.getString(R.string.term_failure)) return diff --git a/app/src/main/java/org/andbootmgr/app/DroidBootFlow.kt b/app/src/main/java/org/andbootmgr/app/DroidBootFlow.kt index c09dbcaf..330eb4eb 100644 --- a/app/src/main/java/org/andbootmgr/app/DroidBootFlow.kt +++ b/app/src/main/java/org/andbootmgr/app/DroidBootFlow.kt @@ -281,7 +281,7 @@ private fun Flash(vm: WizardActivityState) { } if (vm.deviceInfo.postInstallScript) { terminal.add(vm.activity.getString(R.string.term_device_setup)) - Shell.cmd( + vm.logic.runShFileWithArgs( "BOOTED=${vm.deviceInfo.isBooted(vm.logic)} " + "${File(vm.logic.assetDir, "Scripts/install/${vm.deviceInfo.codename}.sh").absolutePath} real" ).to(terminal).exec() diff --git a/app/src/main/java/org/andbootmgr/app/UpdateFlow.kt b/app/src/main/java/org/andbootmgr/app/UpdateFlow.kt index f326f92a..7d43576b 100644 --- a/app/src/main/java/org/andbootmgr/app/UpdateFlow.kt +++ b/app/src/main/java/org/andbootmgr/app/UpdateFlow.kt @@ -317,7 +317,7 @@ private fun Flash(u: UpdateFlowDataHolder) { for (i in sp) { cmd += " $i" } - val r = Shell.cmd(cmd).to(terminal).exec() + val r = u.vm.logic.runShFileWithArgs(cmd).to(terminal).exec() bootfile.forEach { it.delete() } if (!r.isSuccess) { throw IllegalStateException(u.vm.activity.getString(R.string.term_script_fail)) @@ -350,7 +350,7 @@ private fun Flash(u: UpdateFlowDataHolder) { for (i in sp) { cmd += " $i" } - val r = Shell.cmd(cmd).to(terminal).exec() + val r = u.vm.logic.runShFileWithArgs(cmd).to(terminal).exec() bootfile.forEach { it.delete() } if (!r.isSuccess) { throw IllegalStateException(u.vm.activity.getString(R.string.term_script_fail))