Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tsterbak committed Mar 24, 2023
1 parent 436e4a3 commit 1ca341b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion openandroidinstaller/assets/configs/FP4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ steps:
content: Turn on your device. Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
command: adb_reboot_bootloader
- type: call_button
content: Once the device is in fastboot mode, flash the custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
content: Once the device is in fastboot mode, boot the custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
command: fastboot_boot_recovery
- type: confirm_button
content: >
Expand Down
2 changes: 1 addition & 1 deletion openandroidinstaller/assets/configs/starlte.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ steps:
Then press 'Confirm and run' to reboot into the bootloader. Continue once it's done.
command: adb_reboot_download
- type: call_button
content: In this step, you need to boot a custom recovery on your device. Press 'Confirm and run' to start the process. Confirm afterwards to continue.
content: In this step, you need to flash a custom recovery on your device. Press 'Confirm and run' to start the process. Confirm afterwards to continue.
command: heimdall_flash_recovery
- type: confirm_button
content: >
Expand Down
8 changes: 5 additions & 3 deletions openandroidinstaller/tooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ def adb_twrp_install_addons(
"""
logger.info("Install addons with twrp.")
sleep(0.5)
if is_ab:
adb_wait_for_recovery(bin_path=bin_path)
logger.info("Sideload and install addons.")
for addon in addons:
# activate sideload
Expand Down Expand Up @@ -358,6 +360,7 @@ def fastboot_boot_recovery(
bin_path: Path, recovery: str, is_ab: bool = True
) -> TerminalResponse:
"""Temporarily, boot custom recovery with fastboot."""
# TODO: this can be unified now
if is_ab:
logger.info("Boot custom recovery with fastboot.")
for line in run_command(
Expand Down Expand Up @@ -387,7 +390,7 @@ def fastboot_flash_boot(bin_path: Path, recovery: str) -> TerminalResponse:
"""Temporarily, flash custom recovery with fastboot to boot partition."""
logger.info("Flash custom recovery with fastboot.")
for line in run_command(
"fastboot flash boot", target="f{recovery}", bin_path=bin_path
"fastboot flash boot", target=f"{recovery}", bin_path=bin_path
):
yield line
if (type(line) == bool) and not line:
Expand Down Expand Up @@ -424,8 +427,7 @@ def heimdall_flash_recovery(bin_path: Path, recovery: str) -> TerminalResponse:
for line in run_command(
"heimdall flash --no-reboot --RECOVERY", target=f"{recovery}", bin_path=bin_path
):
boot_recovery
yield line
yield line


def search_device(platform: str, bin_path: Path) -> Optional[str]:
Expand Down

0 comments on commit 1ca341b

Please sign in to comment.