@@ -382,30 +382,19 @@ def fastboot_boot_recovery(
382
382
bin_path : Path , recovery : str , is_ab : bool = True
383
383
) -> TerminalResponse :
384
384
"""Temporarily, boot custom recovery with fastboot."""
385
- # TODO: this can be unified now
386
- if is_ab :
387
- logger .info ("Boot custom recovery with fastboot." )
388
- for line in run_command (
389
- "fastboot boot" , target = f"{ recovery } " , bin_path = bin_path
390
- ):
391
- yield line
392
- logger .info ("Boot into TWRP with fastboot." )
393
- for line in adb_wait_for_recovery (bin_path = bin_path ):
394
- yield line
395
- else :
396
- logger .info ("Boot custom recovery with fastboot." )
397
- for line in run_command (
398
- "fastboot boot" , target = f"{ recovery } " , bin_path = bin_path
399
- ):
400
- yield line
385
+ logger .info ("Boot custom recovery with fastboot." )
386
+ for line in run_command (
387
+ "fastboot boot" , target = f"{ recovery } " , bin_path = bin_path
388
+ ):
389
+ yield line
390
+ if not is_ab :
401
391
if (type (line ) == bool ) and not line :
402
392
logger .error ("Booting recovery failed." )
403
393
yield False
404
394
else :
405
395
yield True
406
- logger .info ("Boot into TWRP with fastboot." )
407
- for line in adb_wait_for_recovery (bin_path = bin_path ):
408
- yield line
396
+ for line in adb_wait_for_recovery (bin_path = bin_path ):
397
+ yield line
409
398
410
399
411
400
def fastboot_flash_boot (bin_path : Path , recovery : str ) -> TerminalResponse :
0 commit comments