Skip to content

Commit

Permalink
remove BL_BACKUP if it wasnt created
Browse files Browse the repository at this point in the history
  • Loading branch information
nift4 committed Jan 18, 2025
1 parent 6bf314d commit fea7bfd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/src/main/java/org/andbootmgr/app/DeviceInfo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ interface DeviceInfo {
val codename: String
val blBlock: String
val metaonsd: Boolean
/* Environment variables:
* - BOOTED=true SETUP=false BL_BACKUP=<unset> for droidboot update
* - BOOTED=false SETUP=false BL_BACKUP=<path> for droidboot fix
* - BOOTED=false SETUP=true BL_BACKUP=<path> for droidboot install + sd creation
* - BOOTED=true SETUP=true BL_BACKUP=<unset> for sd creation with already installed droidboot
*/
val postInstallScript: Boolean
val havedtbo: Boolean
fun isInstalled(logic: DeviceLogic): Boolean
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/org/andbootmgr/app/DroidBootFlow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ private fun Flash(d: DroidBootFlowDataHolder) {
terminal.add(vm.activity.getString(R.string.term_device_setup))
vm.logic.runShFileWithArgs(
"BOOTED=${vm.deviceInfo.isBooted(vm.logic)} SETUP=true " +
"BL_BACKUP=${vm.logic.lkBackupPrimary.absolutePath} " +
(if (vm.deviceInfo.isBooted(vm.logic)) "" else
"BL_BACKUP=${vm.logic.lkBackupPrimary.absolutePath} ") +
"${tmpFile!!.absolutePath} real"
).to(terminal).exec()
tmpFile.delete()
Expand Down

0 comments on commit fea7bfd

Please sign in to comment.