Skip to content

Commit 0f487ce

Browse files
committed
Switched from flashing to booting TWRP
1 parent b17020a commit 0f487ce

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

openandroidinstaller/tooling.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -353,36 +353,32 @@ def fastboot_reboot(bin_path: Path) -> TerminalResponse:
353353
yield line
354354

355355

356-
@add_logging("Flash or boot custom recovery with fastboot.")
356+
@add_logging("Boot custom recovery with fastboot.")
357357
def fastboot_flash_recovery(
358358
bin_path: Path, recovery: str, is_ab: bool = True
359359
) -> TerminalResponse:
360-
"""Temporarily, flash custom recovery with fastboot."""
360+
"""Temporarily, boot custom recovery with fastboot."""
361361
if is_ab:
362362
logger.info("Boot custom recovery with fastboot.")
363363
for line in run_command(
364364
"fastboot boot", target=f"{recovery}", bin_path=bin_path
365365
):
366366
yield line
367+
logger.info("Boot into TWRP with fastboot.")
367368
for line in adb_wait_for_recovery(bin_path=bin_path):
368369
yield line
369370
else:
370-
logger.info("Flash custom recovery with fastboot.")
371+
logger.info("Boot custom recovery with fastboot.")
371372
for line in run_command(
372-
"fastboot flash recovery", target=f"{recovery}", bin_path=bin_path
373+
"fastboot boot", target=f"{recovery}", bin_path=bin_path
373374
):
374375
yield line
375-
for line in adb_wait_for_recovery(bin_path=bin_path):
376-
yield line
377376
if (type(line) == bool) and not line:
378-
logger.error("Flashing recovery failed.")
377+
logger.error("Booting recovery failed.")
379378
yield False
380379
else:
381380
yield True
382-
# reboot
383381
logger.info("Boot into TWRP with fastboot.")
384-
for line in run_command("fastboot reboot recovery", bin_path):
385-
yield line
386382
for line in adb_wait_for_recovery(bin_path=bin_path):
387383
yield line
388384

0 commit comments

Comments
 (0)