Skip to content

Commit

Permalink
Fix configs with addintion flash step and add vendor_boot to tooling …
Browse files Browse the repository at this point in the history
…and steps
  • Loading branch information
tsterbak committed Oct 7, 2023
1 parent a2f3621 commit b9ebd60
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion openandroidinstaller/assets/configs/Mi439.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ steps:
content: >
Install additional partitions selected before by pressing 'Confirm and run'. Once it's done continue.
Note : If you have not selected this partition, it will do nothing.
Note : If you have not selected additional partitions it will do nothing and is save to continue.
command: fastboot_flash_additional_partitions
- type: call_button
content: >
Expand Down
6 changes: 6 additions & 0 deletions openandroidinstaller/assets/configs/avicii.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ steps:
adapting and repairing of the operating system.
Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
command: adb_reboot_bootloader
- type: call_button
content: >
Install additional partitions selected before by pressing 'Confirm and run'. Once it's done continue.
Note : If you have not selected additional partitions it will do nothing and is save to continue.
command: fastboot_flash_additional_partitions
- type: call_button
img: twrp-start.jpeg
content: >
Expand Down
6 changes: 6 additions & 0 deletions openandroidinstaller/assets/configs/dre.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ steps:
content: >
Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
command: fastboot_boot_recovery
- type: call_button
content: >
Install additional partitions selected before by pressing 'Confirm and run'. Once it's done continue.
Note : If you have not selected additional partitions it will do nothing and is save to continue.
command: fastboot_flash_additional_partitions
- type: call_button
content: >
In some cases, the inactive slot can be unpopulated or contain much older firmware than the active slot, leading to various issues including a potential hard-brick.
Expand Down
6 changes: 6 additions & 0 deletions openandroidinstaller/assets/configs/guacamole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ steps:
adapting and repairing of the operating system.
Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
command: adb_reboot_bootloader
- type: call_button
content: >
Install additional partitions selected before by pressing 'Confirm and run'. Once it's done continue.
Note : If you have not selected additional partitions it will do nothing and is save to continue.
command: fastboot_flash_additional_partitions
- type: call_button
img: twrp-start.jpeg
content: >
Expand Down
6 changes: 6 additions & 0 deletions openandroidinstaller/assets/configs/hotdog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ steps:
adapting and repairing of the operating system.
Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
command: adb_reboot_bootloader
- type: call_button
content: >
Install additional partitions selected before by pressing 'Confirm and run'. Once it's done continue.
Note : If you have not selected additional partitions it will do nothing and is save to continue.
command: fastboot_flash_additional_partitions
- type: call_button
img: twrp-start.jpeg
content: >
Expand Down
6 changes: 6 additions & 0 deletions openandroidinstaller/assets/configs/hotdogb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ steps:
adapting and repairing of the operating system.
Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
command: adb_reboot_bootloader
- type: call_button
content: >
Install additional partitions selected before by pressing 'Confirm and run'. Once it's done continue.
Note : If you have not selected additional partitions it will do nothing and is save to continue.
command: fastboot_flash_additional_partitions
- type: call_button
img: twrp-start.jpeg
content: >
Expand Down
14 changes: 14 additions & 0 deletions openandroidinstaller/tooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ def fastboot_flash_additional_partitions(
dtbo: Optional[str],
vbmeta: Optional[str],
super_empty: Optional[str],
vendor_boot: Optional[str],
is_ab: bool = True,
) -> TerminalResponse:
"""Flash additional partitions (dtbo, vbmeta, super_empty) with fastboot."""
Expand Down Expand Up @@ -527,6 +528,19 @@ def fastboot_flash_additional_partitions(
else:
yield True

if vendor_boot:
logger.info("vendor_boot selected. Flashing vendor_boot partition.")
for line in run_command(
"fastboot flash vendor_boot ", target=f"{vendor_boot}", bin_path=bin_path
):
yield line
if not is_ab:
if (type(line) == bool) and not line:
logger.error("Flashing vendor_boot failed.")
yield False
else:
yield True


def heimdall_wait_for_download_available(bin_path: Path) -> bool:
"""Use heimdall detect to wait for download mode to become available on the device."""
Expand Down
1 change: 1 addition & 0 deletions openandroidinstaller/views/step_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ def call_to_phone(self, e, command: str):
dtbo=self.state.dtbo_path,
vbmeta=self.state.vbmeta_path,
super_empty=self.state.super_empty_path,
vendor_boot=self.state.vendor_boot_path,
is_ab=self.state.config.is_ab,
),
"fastboot_reboot": fastboot_reboot,
Expand Down

0 comments on commit b9ebd60

Please sign in to comment.