Skip to content

Commit

Permalink
new script abi part2
Browse files Browse the repository at this point in the history
  • Loading branch information
nift4 committed Jul 31, 2024
1 parent 90a0fbd commit 9b58861
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/org/andbootmgr/app/CreatePartFlow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/andbootmgr/app/DroidBootFlow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/andbootmgr/app/UpdateFlow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 9b58861

Please sign in to comment.