From faf315f709706a41512b8c27e1b2f49708a61c8e Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Fri, 24 Mar 2023 17:31:45 +0000 Subject: [PATCH] Align configs --- .../assets/configs/A0001.yaml | 39 ------------------- .../assets/configs/bacon.yaml | 7 +++- .../assets/configs/zeroltexx.yaml | 2 +- openandroidinstaller/tooling.py | 3 +- openandroidinstaller/views/success_view.py | 1 - 5 files changed, 8 insertions(+), 44 deletions(-) delete mode 100644 openandroidinstaller/assets/configs/A0001.yaml diff --git a/openandroidinstaller/assets/configs/A0001.yaml b/openandroidinstaller/assets/configs/A0001.yaml deleted file mode 100644 index 9f43951f..00000000 --- a/openandroidinstaller/assets/configs/A0001.yaml +++ /dev/null @@ -1,39 +0,0 @@ -metadata: - maintainer: MagicLike - devicename: OnePlus One - devicecode: bacon - twrp-link: bacon -requirements: - android: 6.0.1 -steps: - unlock_bootloader: - - type: call_button - content: > - As a first step, you need to unlock the bootloader. A bootloader is the piece of software, that tells your phone - how to start and run an operating system (like Android). Your device should be turned on. - Press 'Confirm and run' to reboot into the bootloader. - command: adb_reboot_bootloader - - type: call_button - content: > - In this step you actually unlock the bootloader. Just press 'Confirm and run' here. The phone will automatically reboot and reformat. - Once it's done, press continue here. - - Notice: If you don't have the stock OnePlus One recovery, your device might boot into your custom recovery, but don't do anything / throw an error. - If this appears, reboot you device through your bootloader and just continue normally. (Your bootloader will be unlocked.) - command: fastboot_oem_unlock - - type: confirm_button - content: > - The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. - You don't need to re-enable those options, if you have a custom recovery. (See last step.) - When you are done, press continue. - boot_recovery: - - type: call_button - content: > - Now you need to boot a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, - 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: > - Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/bacon.yaml b/openandroidinstaller/assets/configs/bacon.yaml index 34b2e187..d1739cfe 100644 --- a/openandroidinstaller/assets/configs/bacon.yaml +++ b/openandroidinstaller/assets/configs/bacon.yaml @@ -1,7 +1,10 @@ metadata: maintainer: MagicLike - devicename: OnePlus One - devicecode: bacon + device_name: OnePlus One + device_code: bacon + supported_device_codes: + - bacon + - A0001 twrp-link: bacon requirements: android: 6.0.1 diff --git a/openandroidinstaller/assets/configs/zeroltexx.yaml b/openandroidinstaller/assets/configs/zeroltexx.yaml index 157649c6..b33e2e96 100644 --- a/openandroidinstaller/assets/configs/zeroltexx.yaml +++ b/openandroidinstaller/assets/configs/zeroltexx.yaml @@ -3,7 +3,7 @@ metadata: device_name: Samsung Galaxy S6 Edge device_code: zeroltexx supported_device_codes: - - zeroltexx + - zeroltexx steps: unlock_bootloader: boot_recovery: diff --git a/openandroidinstaller/tooling.py b/openandroidinstaller/tooling.py index a5e69dd2..ecd98115 100644 --- a/openandroidinstaller/tooling.py +++ b/openandroidinstaller/tooling.py @@ -423,7 +423,8 @@ def heimdall_flash_recovery(bin_path: Path, recovery: str) -> TerminalResponse: """Temporarily, flash custom recovery with heimdall.""" for line in run_command( "heimdall flash --no-reboot --RECOVERY", target=f"{recovery}", bin_path=bin_path - ):boot_recovery + ): + boot_recovery yield line diff --git a/openandroidinstaller/views/success_view.py b/openandroidinstaller/views/success_view.py index e7f84bf6..30a1dc8a 100644 --- a/openandroidinstaller/views/success_view.py +++ b/openandroidinstaller/views/success_view.py @@ -13,7 +13,6 @@ # If not, see .""" # Author: Tobias Sterbak -import webbrowser from loguru import logger from flet import ( ElevatedButton,