Skip to content

Commit 3dbf9a3

Browse files
committed
Use twrp for sargo; some fixes
1 parent 7fc29e7 commit 3dbf9a3

File tree

5 files changed

+11
-20
lines changed

5 files changed

+11
-20
lines changed

openandroidinstaller/assets/configs/a3y17lte.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ steps:
2525
install_os:
2626
- type: call_button
2727
content: >
28+
In the next steps, you finally flash the selected OS image.
2829
Connect your device with your computer with the USB-Cable.
2930
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
3031
in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS.

openandroidinstaller/assets/configs/sargo.yaml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,10 @@ steps:
4141
content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
4242
command: fastboot_flash_recovery
4343
install_os:
44-
- type: confirm_button
45-
content: >
46-
In the next steps, you finally flash LineageOS.
47-
Select 'Recovery Mode' on your smartphone screen and press the Start-Button to confirm. Then confirm here.
48-
- type: confirm_button
49-
content: >
50-
Now tap Factory Reset, then Format data / Factory reset on your phone screen and continue with the formatting process.
51-
This will remove encryption and delete all files stored in the internal storage, as well as format your cache partition (if you have one).
52-
- type: confirm_button
53-
content: >
54-
Return to the main menu on the phone by pressing the back button.
55-
On the device, select “Apply Update”, then “Apply from ADB” to begin sideload. Then confirm here.
56-
- type: call_button
44+
- type: call_button
5745
content: >
58-
Now it's time to flash the LineageOS image. Don't remove the USB-Cable and press 'Confirm and run' to start!
59-
This might take a while. Confirm after it's done.
60-
command: adb_sideload
61-
- type: confirm_button
62-
content: Flashing finished. Now press 'back' (arrow) and then 'Reboot system now' on the phone screen to finish the installation.
46+
In the next steps, you finally flash the selected OS image.
47+
Connect your device with your computer with the USB-Cable.
48+
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
49+
in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS.
50+
command: adb_twrp_wipe_and_install

openandroidinstaller/installer_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def validate_config(config: str) -> bool:
119119
r"text|confirm_button|call_button|call_button_with_input|link_button_with_confirm"
120120
),
121121
"content": str,
122-
schema.Optional("command"): Regex(r"adb_reboot|adb_reboot_bootloader|adb_reboot_download|adb_sideload|adb_twrp_wipe_and_install|fastboot_unlock_with_code|fastboot_unlock|fastboot_reboot|heimdall_flash_recovery"),
122+
schema.Optional("command"): Regex(r"adb_reboot|adb_reboot_bootloader|adb_reboot_download|adb_sideload|adb_twrp_wipe_and_install|fastboot_flash_recovery|fastboot_unlock_with_code|fastboot_unlock|fastboot_reboot|heimdall_flash_recovery"),
123123
schema.Optional("allow_skip"): bool,
124124
schema.Optional("img"): str,
125125
schema.Optional("link"): str,

openandroidinstaller/openandroidinstaller.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,8 @@ def call_to_phone(self, e, command: str):
653653
success = adb_sideload(bin_path=BIN_PATH, target=self.image_path)
654654
elif command == "adb_twrp_wipe_and_install":
655655
success = adb_twrp_wipe_and_install(bin_path=BIN_PATH, target=self.image_path)
656+
elif command == "fastboot_flash_recovery":
657+
success = fastboot_flash_recovery(bin_path=BIN_PATH, recovery=self.recovery_path)
656658
elif command == "fastboot_unlock_with_code":
657659
success = fastboot_unlock_with_code(bin_path=BIN_PATH, unlock_code=self.inputtext.value)
658660
elif command == "fastboot_unlock":

openandroidinstaller/tool_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def fastboot_reboot(bin_path: Path) -> bool:
173173
def fastboot_flash_recovery(bin_path: Path, recovery: str) -> bool:
174174
"""Temporarily, flash custom recovery with fastboot."""
175175
logger.info(f"Flash custom recovery with fastboot.")
176-
result = run_command("fastboot", ["flash", "boot", f"{recovery}"] , bin_path)
176+
result = run_command("fastboot", ["boot", f"{recovery}"] , bin_path)
177177
if result.returncode != 0:
178178
logger.info(f"Flashing recovery failed.")
179179
return False

0 commit comments

Comments
 (0)