From 45567806c1264a3d791b48efe2c7813bd9c65174 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Tue, 7 Mar 2023 22:28:17 +0100 Subject: [PATCH 01/39] Added config for bacon --- .../assets/configs/bacon.yaml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 openandroidinstaller/assets/configs/bacon.yaml diff --git a/openandroidinstaller/assets/configs/bacon.yaml b/openandroidinstaller/assets/configs/bacon.yaml new file mode 100644 index 00000000..79cd9870 --- /dev/null +++ b/openandroidinstaller/assets/configs/bacon.yaml @@ -0,0 +1,37 @@ +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. Once it's done, press continue here. + command: fastboot_oem_unlock + - type: confirm_button + content: > + At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader. + Please take whatever actions the device asks you to to proceed. + - type: call_button + content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue. + command: fastboot_reboot + - 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. + flash_recovery: + - type: call_button + content: > + Now you need to flash 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + command: fastboot_flash_recovery \ No newline at end of file From a5d34b101e90c76869760a1a20283261fffed947 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Sat, 11 Mar 2023 18:36:04 +0100 Subject: [PATCH 02/39] Renamed config --- openandroidinstaller/assets/configs/{bacon.yaml => A0001.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename openandroidinstaller/assets/configs/{bacon.yaml => A0001.yaml} (100%) diff --git a/openandroidinstaller/assets/configs/bacon.yaml b/openandroidinstaller/assets/configs/A0001.yaml similarity index 100% rename from openandroidinstaller/assets/configs/bacon.yaml rename to openandroidinstaller/assets/configs/A0001.yaml From 8da1b9023aa5e742aa42e5b2038274de63064242 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Sat, 11 Mar 2023 21:04:39 +0100 Subject: [PATCH 03/39] Removing extra reboot step --- openandroidinstaller/assets/configs/A0001.yaml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/openandroidinstaller/assets/configs/A0001.yaml b/openandroidinstaller/assets/configs/A0001.yaml index 79cd9870..eafc1dbb 100644 --- a/openandroidinstaller/assets/configs/A0001.yaml +++ b/openandroidinstaller/assets/configs/A0001.yaml @@ -14,17 +14,10 @@ steps: 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. Once it's done, press continue here. + 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. command: fastboot_oem_unlock - type: confirm_button - content: > - At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader. - Please take whatever actions the device asks you to to proceed. - - type: call_button - content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue. - command: fastboot_reboot - - 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. + content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. When you are done, press continue. flash_recovery: - type: call_button content: > From 754b7be17122566ff9211350173fbce3c14b75b9 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Sat, 11 Mar 2023 21:17:56 +0100 Subject: [PATCH 04/39] Cosmetic changes to the text elements --- openandroidinstaller/assets/configs/A0001.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openandroidinstaller/assets/configs/A0001.yaml b/openandroidinstaller/assets/configs/A0001.yaml index eafc1dbb..b7c8be22 100644 --- a/openandroidinstaller/assets/configs/A0001.yaml +++ b/openandroidinstaller/assets/configs/A0001.yaml @@ -14,10 +14,14 @@ steps: 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. + 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. 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. When you are done, press continue. + content: > + The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. + When you are done, press continue. flash_recovery: - type: call_button content: > From 51f6c5d01903cc45122c643ec7d85cbd4d559266 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Sat, 11 Mar 2023 21:22:54 +0100 Subject: [PATCH 05/39] Added OnePlus One to list Added OnePlus One to the list of officially supported devices --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 55ffa6db..929a5f65 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,7 @@ Motorola | moto z | [griffin](https://wiki.lineageos.org/devices/griffin/) | | t Vendor | Device Name | CodeName | Models | Status ---|---|---|---|--- +OnePlus | One | [bacon](https://wiki.lineageos.org/devices/bacon/) | A0001 | tested OnePlus | 5 | [cheeseburger](https://wiki.lineageos.org/devices/cheeseburger/) | | tested OnePlus | 5T | [dumpling](https://wiki.lineageos.org/devices/dumpling/) | | tested OnePlus | 6 | [enchilada](https://wiki.lineageos.org/devices/enchilada/) | | tested From 4b616abd35badedab80638ca51da8222d80b5646 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Sat, 11 Mar 2023 21:41:17 +0100 Subject: [PATCH 06/39] Added another config for device code "bacon" Another config is needed, because after installation of a custom ROM the device switches from device code "A0001" to "bacon". --- .../assets/configs/bacon.yaml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 openandroidinstaller/assets/configs/bacon.yaml diff --git a/openandroidinstaller/assets/configs/bacon.yaml b/openandroidinstaller/assets/configs/bacon.yaml new file mode 100644 index 00000000..b7c8be22 --- /dev/null +++ b/openandroidinstaller/assets/configs/bacon.yaml @@ -0,0 +1,34 @@ +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. + 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. + When you are done, press continue. + flash_recovery: + - type: call_button + content: > + Now you need to flash 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + command: fastboot_flash_recovery \ No newline at end of file From 077ea03da7feb50ab5e969c60ae63d25fa8254bd Mon Sep 17 00:00:00 2001 From: MagicLike Date: Sun, 12 Mar 2023 14:00:05 +0100 Subject: [PATCH 07/39] Added notice for custom recoveries --- openandroidinstaller/assets/configs/A0001.yaml | 4 ++++ openandroidinstaller/assets/configs/bacon.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/openandroidinstaller/assets/configs/A0001.yaml b/openandroidinstaller/assets/configs/A0001.yaml index b7c8be22..302cfad8 100644 --- a/openandroidinstaller/assets/configs/A0001.yaml +++ b/openandroidinstaller/assets/configs/A0001.yaml @@ -17,10 +17,14 @@ steps: 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. flash_recovery: - type: call_button diff --git a/openandroidinstaller/assets/configs/bacon.yaml b/openandroidinstaller/assets/configs/bacon.yaml index b7c8be22..9f145c1d 100644 --- a/openandroidinstaller/assets/configs/bacon.yaml +++ b/openandroidinstaller/assets/configs/bacon.yaml @@ -17,10 +17,14 @@ steps: 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. flash_recovery: - type: call_button From ba97efed29060a23d8e265c1ee40650011f69c2a Mon Sep 17 00:00:00 2001 From: MagicLike Date: Sun, 12 Mar 2023 14:12:54 +0100 Subject: [PATCH 08/39] Added notice for launching recovery manually --- openandroidinstaller/assets/configs/A0001.yaml | 6 +++++- openandroidinstaller/assets/configs/bacon.yaml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/openandroidinstaller/assets/configs/A0001.yaml b/openandroidinstaller/assets/configs/A0001.yaml index 302cfad8..85c25d8e 100644 --- a/openandroidinstaller/assets/configs/A0001.yaml +++ b/openandroidinstaller/assets/configs/A0001.yaml @@ -34,5 +34,9 @@ steps: 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: > + Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + Notice: In some cases the bootloader won't boot into the flashed recovery automatically, but rather boot the normal system. + If this happens, please run the following command via adb and wait for a moment: `adb reboot recovery` + Now click 'Continue'. command: fastboot_flash_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/bacon.yaml b/openandroidinstaller/assets/configs/bacon.yaml index 9f145c1d..4fe1c451 100644 --- a/openandroidinstaller/assets/configs/bacon.yaml +++ b/openandroidinstaller/assets/configs/bacon.yaml @@ -34,5 +34,9 @@ steps: 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: > + Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + Notice: In some cases the bootloader won't boot into the flashed recovery automatically, but rather boot the normal system. + If this happens, please run the following command via adb and wait for a moment: `adb reboot recovery` + Now click 'Continue'. command: fastboot_flash_recovery \ No newline at end of file From e3c12e6b04e6b7ef9ea849bd151b87d614b1148d Mon Sep 17 00:00:00 2001 From: MagicLike Date: Sun, 12 Mar 2023 16:48:27 +0100 Subject: [PATCH 09/39] Updated contribute_link --- openandroidinstaller/views/success_view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openandroidinstaller/views/success_view.py b/openandroidinstaller/views/success_view.py index 04016af8..b55860e7 100644 --- a/openandroidinstaller/views/success_view.py +++ b/openandroidinstaller/views/success_view.py @@ -47,7 +47,7 @@ def close_window(e): get_title("Installation completed successfully!"), ] # right view main part - contribute_link = "https://github.com/openandroidinstaller-dev/openandroidinstaller#contributing" + contribute_link = "https://openandroidinstaller.org/#contribute" self.right_view.controls = [ Text( "Now your devices boots into the new OS. Have fun with it!", From 0f487cea502701a5f75394b13cb7c6d6625b45ef Mon Sep 17 00:00:00 2001 From: MagicLike Date: Sun, 12 Mar 2023 18:15:03 +0100 Subject: [PATCH 10/39] Switched from flashing to booting TWRP --- openandroidinstaller/tooling.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/openandroidinstaller/tooling.py b/openandroidinstaller/tooling.py index fc16e7e8..500ca281 100644 --- a/openandroidinstaller/tooling.py +++ b/openandroidinstaller/tooling.py @@ -353,36 +353,32 @@ def fastboot_reboot(bin_path: Path) -> TerminalResponse: yield line -@add_logging("Flash or boot custom recovery with fastboot.") +@add_logging("Boot custom recovery with fastboot.") def fastboot_flash_recovery( bin_path: Path, recovery: str, is_ab: bool = True ) -> TerminalResponse: - """Temporarily, flash custom recovery with fastboot.""" + """Temporarily, boot custom recovery with fastboot.""" if is_ab: logger.info("Boot custom recovery with fastboot.") for line in run_command( "fastboot boot", target=f"{recovery}", bin_path=bin_path ): yield line + logger.info("Boot into TWRP with fastboot.") for line in adb_wait_for_recovery(bin_path=bin_path): yield line else: - logger.info("Flash custom recovery with fastboot.") + logger.info("Boot custom recovery with fastboot.") for line in run_command( - "fastboot flash recovery", target=f"{recovery}", bin_path=bin_path + "fastboot boot", target=f"{recovery}", bin_path=bin_path ): yield line - for line in adb_wait_for_recovery(bin_path=bin_path): - yield line if (type(line) == bool) and not line: - logger.error("Flashing recovery failed.") + logger.error("Booting recovery failed.") yield False else: yield True - # reboot logger.info("Boot into TWRP with fastboot.") - for line in run_command("fastboot reboot recovery", bin_path): - yield line for line in adb_wait_for_recovery(bin_path=bin_path): yield line From 1a99a42a9b513472bd0e501cac74f1b3f29e1bd5 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Sun, 12 Mar 2023 18:45:44 +0100 Subject: [PATCH 11/39] Moved feedback to app header Moved feedback to app header instead of opening it automatically. --- openandroidinstaller/openandroidinstaller.py | 11 +++++++++++ openandroidinstaller/views/success_view.py | 3 --- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/openandroidinstaller/openandroidinstaller.py b/openandroidinstaller/openandroidinstaller.py index f6b26431..258a7db5 100644 --- a/openandroidinstaller/openandroidinstaller.py +++ b/openandroidinstaller/openandroidinstaller.py @@ -247,6 +247,17 @@ def main(page: Page, test: bool = False, test_config: str = "sargo"): padding=15, tooltip="Frequently asked questions and encountered issues.", ), + Container( + content=ElevatedButton( + icon=icons.BUG_REPORT_OUTLINED, + text="Give feedback", + on_click=lambda _: webbrowser.open( + "https://openandroidinstaller.org/feedback.html" + ), + ), + padding=15, + tooltip="Give feedback about your experience with Open Android Installer", + ), Container( content=ElevatedButton( icon=icons.BUG_REPORT_OUTLINED, diff --git a/openandroidinstaller/views/success_view.py b/openandroidinstaller/views/success_view.py index b55860e7..e7f84bf6 100644 --- a/openandroidinstaller/views/success_view.py +++ b/openandroidinstaller/views/success_view.py @@ -36,9 +36,6 @@ def build( ): def close_window(e): logger.success("Success! Close the window.") - # open the feedback page - feedback_url = "https://openandroidinstaller.org/feedback.html" - webbrowser.open(feedback_url) # close the window self.page.window_close() From 3c28998998262640c312a0a5c59c09b96422b76a Mon Sep 17 00:00:00 2001 From: MagicLike Date: Sun, 12 Mar 2023 20:43:48 +0100 Subject: [PATCH 12/39] Added feedback icon and updated tooltip --- openandroidinstaller/openandroidinstaller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openandroidinstaller/openandroidinstaller.py b/openandroidinstaller/openandroidinstaller.py index 258a7db5..92868949 100644 --- a/openandroidinstaller/openandroidinstaller.py +++ b/openandroidinstaller/openandroidinstaller.py @@ -249,14 +249,14 @@ def main(page: Page, test: bool = False, test_config: str = "sargo"): ), Container( content=ElevatedButton( - icon=icons.BUG_REPORT_OUTLINED, + icon=icons.FEEDBACK_OUTLINED, text="Give feedback", on_click=lambda _: webbrowser.open( "https://openandroidinstaller.org/feedback.html" ), ), padding=15, - tooltip="Give feedback about your experience with Open Android Installer", + tooltip="Give feedback about your experience with OpenAndroidInstaller", ), Container( content=ElevatedButton( From 0abb90f45331efe80314a90980dad81bfc4c4c5c Mon Sep 17 00:00:00 2001 From: MagicLike Date: Sun, 12 Mar 2023 20:48:53 +0100 Subject: [PATCH 13/39] Renamed variables, updated configs & updated README --- README.md | 4 ++-- openandroidinstaller/app_state.py | 2 +- openandroidinstaller/assets/configs/FP2.yaml | 8 ++++---- openandroidinstaller/assets/configs/FP3.yaml | 6 +++--- openandroidinstaller/assets/configs/FP4.yaml | 6 +++--- .../assets/configs/a3y17lte.yaml | 4 ++-- openandroidinstaller/assets/configs/a5xelte.yaml | 4 ++-- openandroidinstaller/assets/configs/a72q.yaml | 4 ++-- openandroidinstaller/assets/configs/a7xelte.yaml | 4 ++-- openandroidinstaller/assets/configs/akari.yaml | 6 +++--- .../assets/configs/akatsuki.yaml | 6 +++--- openandroidinstaller/assets/configs/avicii.yaml | 10 +++++----- openandroidinstaller/assets/configs/barbet.yaml | 8 ++++---- .../assets/configs/beyond0lte.yaml | 4 ++-- .../assets/configs/beyond1lte.yaml | 4 ++-- .../assets/configs/beyond2lte.yaml | 4 ++-- .../assets/configs/blueline.yaml | 8 ++++---- openandroidinstaller/assets/configs/bonito.yaml | 8 ++++---- openandroidinstaller/assets/configs/cedric.yaml | 8 ++++---- .../assets/configs/cheeseburger.yaml | 8 ++++---- openandroidinstaller/assets/configs/coral.yaml | 8 ++++---- .../assets/configs/crosshatch.yaml | 8 ++++---- .../assets/configs/crownlte.yaml | 4 ++-- openandroidinstaller/assets/configs/d1.yaml | 4 ++-- openandroidinstaller/assets/configs/d2s.yaml | 4 ++-- openandroidinstaller/assets/configs/dre.yaml | 10 +++++----- .../assets/configs/dumpling.yaml | 8 ++++---- .../assets/configs/enchilada.yaml | 10 +++++----- openandroidinstaller/assets/configs/evert.yaml | 10 +++++----- openandroidinstaller/assets/configs/fajita.yaml | 10 +++++----- openandroidinstaller/assets/configs/flame.yaml | 8 ++++---- .../assets/configs/greatlte.yaml | 4 ++-- openandroidinstaller/assets/configs/griffin.yaml | 8 ++++---- .../assets/configs/guacamole.yaml | 8 ++++---- .../assets/configs/guacamoleb.yaml | 8 ++++---- .../assets/configs/hero2lte.yaml | 4 ++-- openandroidinstaller/assets/configs/herolte.yaml | 4 ++-- .../assets/configs/heroltexx.yaml | 4 ++-- openandroidinstaller/assets/configs/hltetmo.yaml | 4 ++-- openandroidinstaller/assets/configs/hotdog.yaml | 8 ++++---- openandroidinstaller/assets/configs/hotdogb.yaml | 8 ++++---- openandroidinstaller/assets/configs/j7elte.yaml | 4 ++-- openandroidinstaller/assets/configs/kiev.yaml | 10 +++++----- openandroidinstaller/assets/configs/kirin.yaml | 6 +++--- openandroidinstaller/assets/configs/mermaid.yaml | 6 +++--- openandroidinstaller/assets/configs/nairo.yaml | 10 +++++----- openandroidinstaller/assets/configs/ocean.yaml | 10 +++++----- openandroidinstaller/assets/configs/pioneer.yaml | 6 +++--- openandroidinstaller/assets/configs/racer.yaml | 10 +++++----- openandroidinstaller/assets/configs/redfin.yaml | 8 ++++---- openandroidinstaller/assets/configs/s3ve3g.yaml | 4 ++-- openandroidinstaller/assets/configs/sargo.yaml | 8 ++++---- openandroidinstaller/assets/configs/starlte.yaml | 4 ++-- openandroidinstaller/assets/configs/sunfish.yaml | 8 ++++---- openandroidinstaller/assets/configs/taimen.yaml | 8 ++++---- openandroidinstaller/assets/configs/walleye.yaml | 8 ++++---- openandroidinstaller/assets/configs/yuga.yaml | 4 ++-- openandroidinstaller/assets/configs/z3.yaml | 4 ++-- .../assets/configs/zerofltexx.yaml | 4 ++-- .../assets/configs/zeroltexx.yaml | 4 ++-- openandroidinstaller/installer_config.py | 16 ++++++++-------- openandroidinstaller/tooling.py | 8 ++++---- openandroidinstaller/views/start_view.py | 4 ++-- openandroidinstaller/views/step_view.py | 6 +++--- 64 files changed, 210 insertions(+), 210 deletions(-) diff --git a/README.md b/README.md index 55ffa6db..3549ccdd 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,7 @@ If you want to use the tool for a non-supported smartphone, the fastest way is t #### Content of a config file -A config file consists of two parts. The first part are some metadata about the device and the second parts are the steps to unlock the bootloader, flash a recovery and install the ROMs. +A config file consists of two parts. The first part are some metadata about the device and the second parts are the steps to unlock the bootloader, boot a recovery and install the ROMs. ##### How to write Metadata Every config file should have metadata with the following fields: @@ -213,7 +213,7 @@ Every step in the config file corresponds to one view in the application. These - `call_button_with_input`: Display the content text, an input field and a button that runs a given command. The inputtext, can be used in the command by using the `` placeholder in the command field. After the command is run, a confirm button is displayed to allow the user to move to the next step. - `link_button_with_confirm`: Display a button that opens a browser with a given link, confirm afterwards. Link is given in `link`. - `content`: str; The content text displayed alongside the action of the step. Used to inform the user about whats going on. -- `command`: [ONLY for call_button* steps] str; The command to run. One of `adb_reboot`, `adb_reboot_bootloader`, `adb_reboot_download`, `adb_sideload`, `adb_twrp_wipe_and_install`, `adb_twrp_copy_partitions`, `fastboot_flash_recovery`, `fastboot_unlock_with_code`, `fastboot_unlock`, `fastboot_oem_unlock`, `fastboot_get_unlock_data`, `fastboot_reboot`, `heimdall_flash_recovery`. +- `command`: [ONLY for call_button* steps] str; The command to run. One of `adb_reboot`, `adb_reboot_bootloader`, `adb_reboot_download`, `adb_sideload`, `adb_twrp_wipe_and_install`, `adb_twrp_copy_partitions`, `fastboot_boot_recovery`, `fastboot_unlock_with_code`, `fastboot_unlock`, `fastboot_oem_unlock`, `fastboot_get_unlock_data`, `fastboot_reboot`, `heimdall_flash_recovery`. - `img`: [OPTIONAL] Display an image on the left pane of the step view. Images are loaded from `openandroidinstaller/assets/imgs/`. - `allow_skip`: [OPTIONAL] boolean; If a skip button should be displayed to allow skipping this step. Can be useful when the bootloader is already unlocked. - `link`: [OPTIONAL] Link to use for the link button if type is `link_button_with_confirm`. diff --git a/openandroidinstaller/app_state.py b/openandroidinstaller/app_state.py index e81cedd3..40fb427d 100644 --- a/openandroidinstaller/app_state.py +++ b/openandroidinstaller/app_state.py @@ -67,5 +67,5 @@ def load_config(self, device_code: str): self.config = _load_config(device_code, self.config_path) if self.config: self.steps = copy.deepcopy(self.config.unlock_bootloader) + copy.deepcopy( - self.config.flash_recovery + self.config.boot_recovery ) diff --git a/openandroidinstaller/assets/configs/FP2.yaml b/openandroidinstaller/assets/configs/FP2.yaml index 8149c8b4..3f24809a 100644 --- a/openandroidinstaller/assets/configs/FP2.yaml +++ b/openandroidinstaller/assets/configs/FP2.yaml @@ -4,17 +4,17 @@ metadata: devicecode: FP2 steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: confirm_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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. - type: call_button content: 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + command: fastboot_boot_recovery - type: confirm_button content: > Now reboot into recovery to verify the installation. Do not reboot into the existing OS, since it will overwrite the recovery you just installed! diff --git a/openandroidinstaller/assets/configs/FP3.yaml b/openandroidinstaller/assets/configs/FP3.yaml index 5fc45c57..417958e7 100644 --- a/openandroidinstaller/assets/configs/FP3.yaml +++ b/openandroidinstaller/assets/configs/FP3.yaml @@ -29,17 +29,17 @@ steps: command: fastboot_reboot - type: confirm_button content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable USB debugging to continue. - flash_recovery: + boot_recovery: - type: confirm_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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. - type: call_button 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. - command: fastboot_flash_recovery + command: fastboot_boot_recovery - type: confirm_button content: > Now reboot into recovery to verify the installation. Do not reboot into the existing OS, since it will overwrite the recovery you just installed! diff --git a/openandroidinstaller/assets/configs/FP4.yaml b/openandroidinstaller/assets/configs/FP4.yaml index a5f5c436..903b501d 100644 --- a/openandroidinstaller/assets/configs/FP4.yaml +++ b/openandroidinstaller/assets/configs/FP4.yaml @@ -29,17 +29,17 @@ steps: command: fastboot_reboot - type: confirm_button content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable USB debugging to continue. - flash_recovery: + boot_recovery: - type: confirm_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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. - type: call_button 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. - command: fastboot_flash_recovery + command: fastboot_boot_recovery - type: confirm_button content: > Now reboot into recovery to verify the installation. Do not reboot into the existing OS, since it will overwrite the recovery you just installed! diff --git a/openandroidinstaller/assets/configs/a3y17lte.yaml b/openandroidinstaller/assets/configs/a3y17lte.yaml index 940746dc..1814a5a0 100644 --- a/openandroidinstaller/assets/configs/a3y17lte.yaml +++ b/openandroidinstaller/assets/configs/a3y17lte.yaml @@ -4,7 +4,7 @@ metadata: devicecode: a3y17lte steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: call_button content: > As a first step, you need to boot into the bootloader. A bootloader is the piece of software, @@ -13,7 +13,7 @@ steps: command: adb_reboot_download - type: call_button content: > - In this step, you need to flash a custom recovery on your device. + 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. command: heimdall_flash_recovery - type: confirm_button diff --git a/openandroidinstaller/assets/configs/a5xelte.yaml b/openandroidinstaller/assets/configs/a5xelte.yaml index 4d4d40bb..64ebf4b8 100644 --- a/openandroidinstaller/assets/configs/a5xelte.yaml +++ b/openandroidinstaller/assets/configs/a5xelte.yaml @@ -4,7 +4,7 @@ metadata: devicecode: a5xelte steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: call_button content: > As a first step, you need to boot into the bootloader. A bootloader is the piece of software, @@ -12,7 +12,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 flash 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 boot 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 img: samsung-buttons.png diff --git a/openandroidinstaller/assets/configs/a72q.yaml b/openandroidinstaller/assets/configs/a72q.yaml index 3d1290a0..97d4da5d 100644 --- a/openandroidinstaller/assets/configs/a72q.yaml +++ b/openandroidinstaller/assets/configs/a72q.yaml @@ -4,7 +4,7 @@ metadata: devicecode: a72q steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: call_button content: > As a first step, you need to boot into the bootloader. A bootloader is the piece of software, @@ -12,7 +12,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 flash 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 boot 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 img: samsung-buttons.png diff --git a/openandroidinstaller/assets/configs/a7xelte.yaml b/openandroidinstaller/assets/configs/a7xelte.yaml index 4f680c97..3c570247 100644 --- a/openandroidinstaller/assets/configs/a7xelte.yaml +++ b/openandroidinstaller/assets/configs/a7xelte.yaml @@ -4,7 +4,7 @@ metadata: devicecode: a7xelte steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: call_button content: > As a first step, you need to boot into the bootloader. A bootloader is the piece of software, @@ -12,7 +12,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 flash 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 boot 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 img: samsung-buttons.png diff --git a/openandroidinstaller/assets/configs/akari.yaml b/openandroidinstaller/assets/configs/akari.yaml index 8e971d37..b9e40662 100644 --- a/openandroidinstaller/assets/configs/akari.yaml +++ b/openandroidinstaller/assets/configs/akari.yaml @@ -33,15 +33,15 @@ steps: Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB. Then confirm here to continue. command: fastboot_reboot - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_flash_boot - type: call_button command: adb_twrp_copy_partitions diff --git a/openandroidinstaller/assets/configs/akatsuki.yaml b/openandroidinstaller/assets/configs/akatsuki.yaml index ecafe733..ddd02f55 100644 --- a/openandroidinstaller/assets/configs/akatsuki.yaml +++ b/openandroidinstaller/assets/configs/akatsuki.yaml @@ -33,15 +33,15 @@ steps: Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB. Then confirm here to continue. command: fastboot_reboot - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_flash_boot - type: call_button command: adb_twrp_copy_partitions diff --git a/openandroidinstaller/assets/configs/avicii.yaml b/openandroidinstaller/assets/configs/avicii.yaml index 99cc545f..f251610b 100644 --- a/openandroidinstaller/assets/configs/avicii.yaml +++ b/openandroidinstaller/assets/configs/avicii.yaml @@ -24,22 +24,22 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + command: fastboot_boot_recovery - type: call_button command: adb_twrp_copy_partitions 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. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. - type: call_button - command: fastboot_flash_recovery + command: fastboot_boot_recovery content: > Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/barbet.yaml b/openandroidinstaller/assets/configs/barbet.yaml index 8471f0de..e2d4a889 100644 --- a/openandroidinstaller/assets/configs/barbet.yaml +++ b/openandroidinstaller/assets/configs/barbet.yaml @@ -29,10 +29,10 @@ steps: command: fastboot_reboot - type: confirm_button content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable USB debugging to continue. - flash_recovery: + boot_recovery: - type: confirm_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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. - type: call_button content: Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. @@ -40,5 +40,5 @@ steps: - type: confirm_button content: Select 'Restart bootloader' on your smartphone screen. Then confirm to continue. - type: call_button - content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery \ No newline at end of file + 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/beyond0lte.yaml b/openandroidinstaller/assets/configs/beyond0lte.yaml index 01bf3524..3ccdbc7e 100644 --- a/openandroidinstaller/assets/configs/beyond0lte.yaml +++ b/openandroidinstaller/assets/configs/beyond0lte.yaml @@ -21,14 +21,14 @@ steps: content: > The bootloader is now unlocked. Go through Android Setup skipping everything you can, then connect the device to a Wi-Fi network. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. - flash_recovery: + boot_recovery: - type: call_button content: > Now plug the USB-cable to your device. As a first step, you need to boot into download mode. Your device should be turned on. Then press 'Confirm and run' to reboot into download mode. Continue once it's done. command: adb_reboot_download - type: call_button - 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. + 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. command: heimdall_flash_recovery - type: confirm_button img: samsung-buttons-bixby.png diff --git a/openandroidinstaller/assets/configs/beyond1lte.yaml b/openandroidinstaller/assets/configs/beyond1lte.yaml index 914d178e..dfc8a228 100644 --- a/openandroidinstaller/assets/configs/beyond1lte.yaml +++ b/openandroidinstaller/assets/configs/beyond1lte.yaml @@ -21,14 +21,14 @@ steps: content: > The bootloader is now unlocked. Go through Android Setup skipping everything you can, then connect the device to a Wi-Fi network. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. - flash_recovery: + boot_recovery: - type: call_button content: > Now plug the USB-cable to your device. As a first step, you need to boot into download mode. Your device should be turned on. Then press 'Confirm and run' to reboot into download mode. Continue once it's done. command: adb_reboot_download - type: call_button - 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. + 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. command: heimdall_flash_recovery - type: confirm_button img: samsung-buttons-bixby.png diff --git a/openandroidinstaller/assets/configs/beyond2lte.yaml b/openandroidinstaller/assets/configs/beyond2lte.yaml index ff8a529a..62458d98 100644 --- a/openandroidinstaller/assets/configs/beyond2lte.yaml +++ b/openandroidinstaller/assets/configs/beyond2lte.yaml @@ -21,14 +21,14 @@ steps: content: > The bootloader is now unlocked. Go through Android Setup skipping everything you can, then connect the device to a Wi-Fi network. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. - flash_recovery: + boot_recovery: - type: call_button content: > Now plug the USB-cable to your device. As a first step, you need to boot into download mode. Your device should be turned on. Then press 'Confirm and run' to reboot into download mode. Continue once it's done. command: adb_reboot_download - type: call_button - 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. + 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. command: heimdall_flash_recovery - type: confirm_button img: samsung-buttons-bixby.png diff --git a/openandroidinstaller/assets/configs/blueline.yaml b/openandroidinstaller/assets/configs/blueline.yaml index 680d63c5..8c99603f 100644 --- a/openandroidinstaller/assets/configs/blueline.yaml +++ b/openandroidinstaller/assets/configs/blueline.yaml @@ -24,14 +24,14 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once your phone screen looks like the picture on the left, continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once your phone screen looks like the picture on the left, continue. + command: fastboot_boot_recovery img: twrp-start.jpeg \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/bonito.yaml b/openandroidinstaller/assets/configs/bonito.yaml index 694ce1cc..ed771862 100644 --- a/openandroidinstaller/assets/configs/bonito.yaml +++ b/openandroidinstaller/assets/configs/bonito.yaml @@ -24,14 +24,14 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once your phone screen looks like the picture on the left, continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once your phone screen looks like the picture on the left, continue. + command: fastboot_boot_recovery img: twrp-start.jpeg \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/cedric.yaml b/openandroidinstaller/assets/configs/cedric.yaml index bb260c21..7a9195cc 100644 --- a/openandroidinstaller/assets/configs/cedric.yaml +++ b/openandroidinstaller/assets/configs/cedric.yaml @@ -34,13 +34,13 @@ steps: Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB. Then confirm here to continue. command: fastboot_reboot - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery \ No newline at end of file + 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/cheeseburger.yaml b/openandroidinstaller/assets/configs/cheeseburger.yaml index 6a825fa9..55375809 100644 --- a/openandroidinstaller/assets/configs/cheeseburger.yaml +++ b/openandroidinstaller/assets/configs/cheeseburger.yaml @@ -23,13 +23,13 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery \ No newline at end of file + 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/coral.yaml b/openandroidinstaller/assets/configs/coral.yaml index e9647828..476748dd 100644 --- a/openandroidinstaller/assets/configs/coral.yaml +++ b/openandroidinstaller/assets/configs/coral.yaml @@ -29,10 +29,10 @@ steps: command: fastboot_reboot - type: confirm_button content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable USB debugging to continue. - flash_recovery: + boot_recovery: - type: confirm_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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. - type: call_button content: Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. @@ -40,5 +40,5 @@ steps: - type: confirm_button content: Select 'Restart bootloader' on your smartphone screen. Then confirm to continue. - type: call_button - content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery \ No newline at end of file + 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/crosshatch.yaml b/openandroidinstaller/assets/configs/crosshatch.yaml index a4a485a2..33ee81f5 100644 --- a/openandroidinstaller/assets/configs/crosshatch.yaml +++ b/openandroidinstaller/assets/configs/crosshatch.yaml @@ -24,14 +24,14 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once your phone screen looks like the picture on the left, continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once your phone screen looks like the picture on the left, continue. + command: fastboot_boot_recovery img: twrp-start.jpeg \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/crownlte.yaml b/openandroidinstaller/assets/configs/crownlte.yaml index 8b759e6b..fe857f0b 100644 --- a/openandroidinstaller/assets/configs/crownlte.yaml +++ b/openandroidinstaller/assets/configs/crownlte.yaml @@ -6,7 +6,7 @@ requirements: android: 10 steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: call_button content: > As a first step, you need to boot into the bootloader. A bootloader is the piece of software, @@ -14,7 +14,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 flash 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 boot 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 img: samsung-buttons-bixby.png diff --git a/openandroidinstaller/assets/configs/d1.yaml b/openandroidinstaller/assets/configs/d1.yaml index 8ae30aeb..13a34932 100644 --- a/openandroidinstaller/assets/configs/d1.yaml +++ b/openandroidinstaller/assets/configs/d1.yaml @@ -21,14 +21,14 @@ steps: content: > The bootloader is now unlocked. Go through Android Setup skipping everything you can, then connect the device to a Wi-Fi network. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. - flash_recovery: + boot_recovery: - type: call_button content: > Now plug the USB-cable to your device. As a first step, you need to boot into download mode. Your device should be turned on. Then press 'Confirm and run' to reboot into download mode. Continue once it's done. command: adb_reboot_download - type: call_button - 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. + 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. command: heimdall_flash_recovery - type: confirm_button img: samsung-buttons-bixby.png diff --git a/openandroidinstaller/assets/configs/d2s.yaml b/openandroidinstaller/assets/configs/d2s.yaml index 07bd6819..fce89b6b 100644 --- a/openandroidinstaller/assets/configs/d2s.yaml +++ b/openandroidinstaller/assets/configs/d2s.yaml @@ -21,14 +21,14 @@ steps: content: > The bootloader is now unlocked. Go through Android Setup skipping everything you can, then connect the device to a Wi-Fi network. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. - flash_recovery: + boot_recovery: - type: call_button content: > Now plug the USB-cable to your device. As a first step, you need to boot into download mode. Your device should be turned on. Then press 'Confirm and run' to reboot into download mode. Continue once it's done. command: adb_reboot_download - type: call_button - 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. + 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. command: heimdall_flash_recovery - type: confirm_button img: samsung-buttons-bixby.png diff --git a/openandroidinstaller/assets/configs/dre.yaml b/openandroidinstaller/assets/configs/dre.yaml index 1b8be02a..604562b6 100644 --- a/openandroidinstaller/assets/configs/dre.yaml +++ b/openandroidinstaller/assets/configs/dre.yaml @@ -24,22 +24,22 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + command: fastboot_boot_recovery - type: call_button command: adb_twrp_copy_partitions 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. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. - type: call_button - command: fastboot_flash_recovery + command: fastboot_boot_recovery content: > Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/dumpling.yaml b/openandroidinstaller/assets/configs/dumpling.yaml index a2324245..a96e1462 100644 --- a/openandroidinstaller/assets/configs/dumpling.yaml +++ b/openandroidinstaller/assets/configs/dumpling.yaml @@ -23,13 +23,13 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery \ No newline at end of file + 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/enchilada.yaml b/openandroidinstaller/assets/configs/enchilada.yaml index e1da4282..a40742b9 100644 --- a/openandroidinstaller/assets/configs/enchilada.yaml +++ b/openandroidinstaller/assets/configs/enchilada.yaml @@ -24,22 +24,22 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + command: fastboot_boot_recovery - type: call_button command: adb_twrp_copy_partitions 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. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. - type: call_button - command: fastboot_flash_recovery + command: fastboot_boot_recovery content: > Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/evert.yaml b/openandroidinstaller/assets/configs/evert.yaml index 790c1e0f..3acbc970 100644 --- a/openandroidinstaller/assets/configs/evert.yaml +++ b/openandroidinstaller/assets/configs/evert.yaml @@ -34,22 +34,22 @@ steps: Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB. Then confirm here to continue. command: fastboot_reboot - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + command: fastboot_boot_recovery - type: call_button command: adb_twrp_copy_partitions 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. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. - type: call_button - command: fastboot_flash_recovery + command: fastboot_boot_recovery content: > Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/fajita.yaml b/openandroidinstaller/assets/configs/fajita.yaml index 8ce4c1a2..e534a61c 100644 --- a/openandroidinstaller/assets/configs/fajita.yaml +++ b/openandroidinstaller/assets/configs/fajita.yaml @@ -24,22 +24,22 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + command: fastboot_boot_recovery - type: call_button command: adb_twrp_copy_partitions 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. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. - type: call_button - command: fastboot_flash_recovery + command: fastboot_boot_recovery content: > Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/flame.yaml b/openandroidinstaller/assets/configs/flame.yaml index 2bbd5d31..8947ea75 100644 --- a/openandroidinstaller/assets/configs/flame.yaml +++ b/openandroidinstaller/assets/configs/flame.yaml @@ -29,10 +29,10 @@ steps: command: fastboot_reboot - type: confirm_button content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable USB debugging to continue. - flash_recovery: + boot_recovery: - type: confirm_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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. - type: call_button content: Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. @@ -40,5 +40,5 @@ steps: - type: confirm_button content: Select 'Restart bootloader' on your smartphone screen. Then confirm to continue. - type: call_button - content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery \ No newline at end of file + 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/greatlte.yaml b/openandroidinstaller/assets/configs/greatlte.yaml index 01e54325..e2ad394a 100644 --- a/openandroidinstaller/assets/configs/greatlte.yaml +++ b/openandroidinstaller/assets/configs/greatlte.yaml @@ -4,7 +4,7 @@ metadata: devicecode: greatlte steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: call_button content: > As a first step, you need to boot into the bootloader. A bootloader is the piece of software, @@ -12,7 +12,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 flash 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 boot 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 img: samsung-buttons-bixby.png diff --git a/openandroidinstaller/assets/configs/griffin.yaml b/openandroidinstaller/assets/configs/griffin.yaml index 36d18192..0c95d675 100644 --- a/openandroidinstaller/assets/configs/griffin.yaml +++ b/openandroidinstaller/assets/configs/griffin.yaml @@ -34,13 +34,13 @@ steps: Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB. Then confirm here to continue. command: fastboot_reboot - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery \ No newline at end of file + 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/guacamole.yaml b/openandroidinstaller/assets/configs/guacamole.yaml index 129d7b98..1b2c4faf 100644 --- a/openandroidinstaller/assets/configs/guacamole.yaml +++ b/openandroidinstaller/assets/configs/guacamole.yaml @@ -24,13 +24,13 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery \ No newline at end of file + 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/guacamoleb.yaml b/openandroidinstaller/assets/configs/guacamoleb.yaml index e39c9378..0c06236a 100644 --- a/openandroidinstaller/assets/configs/guacamoleb.yaml +++ b/openandroidinstaller/assets/configs/guacamoleb.yaml @@ -24,13 +24,13 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery \ No newline at end of file + 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/hero2lte.yaml b/openandroidinstaller/assets/configs/hero2lte.yaml index 4ec35346..3246e195 100644 --- a/openandroidinstaller/assets/configs/hero2lte.yaml +++ b/openandroidinstaller/assets/configs/hero2lte.yaml @@ -4,7 +4,7 @@ metadata: devicecode: hero2lte steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: call_button content: > As a first step, you need to boot into the bootloader. A bootloader is the piece of software, @@ -12,7 +12,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 flash 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 boot 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 img: samsung-buttons.png diff --git a/openandroidinstaller/assets/configs/herolte.yaml b/openandroidinstaller/assets/configs/herolte.yaml index 4dcf7f8b..73d196cd 100644 --- a/openandroidinstaller/assets/configs/herolte.yaml +++ b/openandroidinstaller/assets/configs/herolte.yaml @@ -4,7 +4,7 @@ metadata: devicecode: herolte steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: call_button content: > As a first step, you need to boot into the bootloader. A bootloader is the piece of software, @@ -12,7 +12,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 flash 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 boot 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 img: samsung-buttons.png diff --git a/openandroidinstaller/assets/configs/heroltexx.yaml b/openandroidinstaller/assets/configs/heroltexx.yaml index 4dcf7f8b..73d196cd 100644 --- a/openandroidinstaller/assets/configs/heroltexx.yaml +++ b/openandroidinstaller/assets/configs/heroltexx.yaml @@ -4,7 +4,7 @@ metadata: devicecode: herolte steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: call_button content: > As a first step, you need to boot into the bootloader. A bootloader is the piece of software, @@ -12,7 +12,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 flash 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 boot 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 img: samsung-buttons.png diff --git a/openandroidinstaller/assets/configs/hltetmo.yaml b/openandroidinstaller/assets/configs/hltetmo.yaml index dc5c6eb1..087f7aab 100644 --- a/openandroidinstaller/assets/configs/hltetmo.yaml +++ b/openandroidinstaller/assets/configs/hltetmo.yaml @@ -4,7 +4,7 @@ metadata: devicecode: hltetmo steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: call_button content: > As a first step, you need to boot into the bootloader. A bootloader is the piece of software, @@ -13,7 +13,7 @@ steps: command: adb_reboot_download - type: call_button content: > - In this step, you need to flash a custom recovery on your device. + 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. command: heimdall_flash_recovery - type: confirm_button diff --git a/openandroidinstaller/assets/configs/hotdog.yaml b/openandroidinstaller/assets/configs/hotdog.yaml index 15cc7015..ec37755c 100644 --- a/openandroidinstaller/assets/configs/hotdog.yaml +++ b/openandroidinstaller/assets/configs/hotdog.yaml @@ -24,13 +24,13 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery \ No newline at end of file + 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/hotdogb.yaml b/openandroidinstaller/assets/configs/hotdogb.yaml index da1c487a..8748a482 100644 --- a/openandroidinstaller/assets/configs/hotdogb.yaml +++ b/openandroidinstaller/assets/configs/hotdogb.yaml @@ -24,13 +24,13 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery \ No newline at end of file + 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/j7elte.yaml b/openandroidinstaller/assets/configs/j7elte.yaml index 99390c17..d4944f3a 100644 --- a/openandroidinstaller/assets/configs/j7elte.yaml +++ b/openandroidinstaller/assets/configs/j7elte.yaml @@ -4,7 +4,7 @@ metadata: devicecode: j7elte steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: call_button content: > As a first step, you need to boot into the bootloader. A bootloader is the piece of software, @@ -12,7 +12,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 flash 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 boot 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 img: samsung-buttons.png diff --git a/openandroidinstaller/assets/configs/kiev.yaml b/openandroidinstaller/assets/configs/kiev.yaml index 607a16a4..05de4fdc 100644 --- a/openandroidinstaller/assets/configs/kiev.yaml +++ b/openandroidinstaller/assets/configs/kiev.yaml @@ -34,22 +34,22 @@ steps: Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB. Then confirm here to continue. command: fastboot_reboot - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + command: fastboot_boot_recovery - type: call_button command: adb_twrp_copy_partitions 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. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. - type: call_button - command: fastboot_flash_recovery + command: fastboot_boot_recovery content: > Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/kirin.yaml b/openandroidinstaller/assets/configs/kirin.yaml index 6418fbaf..27f5ae6c 100644 --- a/openandroidinstaller/assets/configs/kirin.yaml +++ b/openandroidinstaller/assets/configs/kirin.yaml @@ -31,15 +31,15 @@ steps: Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB. Then confirm here to continue. command: fastboot_reboot - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_flash_boot - type: call_button command: adb_twrp_copy_partitions diff --git a/openandroidinstaller/assets/configs/mermaid.yaml b/openandroidinstaller/assets/configs/mermaid.yaml index 8a0861ef..fc4e4b25 100644 --- a/openandroidinstaller/assets/configs/mermaid.yaml +++ b/openandroidinstaller/assets/configs/mermaid.yaml @@ -31,15 +31,15 @@ steps: Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB. Then confirm here to continue. command: fastboot_reboot - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_flash_boot - type: call_button command: adb_twrp_copy_partitions diff --git a/openandroidinstaller/assets/configs/nairo.yaml b/openandroidinstaller/assets/configs/nairo.yaml index 968aafef..7d77d1d5 100644 --- a/openandroidinstaller/assets/configs/nairo.yaml +++ b/openandroidinstaller/assets/configs/nairo.yaml @@ -34,22 +34,22 @@ steps: Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB. Then confirm here to continue. command: fastboot_reboot - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + command: fastboot_boot_recovery - type: call_button command: adb_twrp_copy_partitions 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. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. - type: call_button - command: fastboot_flash_recovery + command: fastboot_boot_recovery content: > Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/ocean.yaml b/openandroidinstaller/assets/configs/ocean.yaml index 0d9dceee..bc575c80 100644 --- a/openandroidinstaller/assets/configs/ocean.yaml +++ b/openandroidinstaller/assets/configs/ocean.yaml @@ -34,22 +34,22 @@ steps: Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB. Then confirm here to continue. command: fastboot_reboot - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + command: fastboot_boot_recovery - type: call_button command: adb_twrp_copy_partitions 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. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. - type: call_button - command: fastboot_flash_recovery + command: fastboot_boot_recovery content: > Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/pioneer.yaml b/openandroidinstaller/assets/configs/pioneer.yaml index a5ea1fbc..cc0222be 100644 --- a/openandroidinstaller/assets/configs/pioneer.yaml +++ b/openandroidinstaller/assets/configs/pioneer.yaml @@ -33,15 +33,15 @@ steps: Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB. Then confirm here to continue. command: fastboot_reboot - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_flash_boot - type: call_button command: adb_twrp_copy_partitions diff --git a/openandroidinstaller/assets/configs/racer.yaml b/openandroidinstaller/assets/configs/racer.yaml index 50d888d8..8fb83dbc 100644 --- a/openandroidinstaller/assets/configs/racer.yaml +++ b/openandroidinstaller/assets/configs/racer.yaml @@ -34,22 +34,22 @@ steps: Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB. Then confirm here to continue. command: fastboot_reboot - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + command: fastboot_boot_recovery - type: call_button command: adb_twrp_copy_partitions 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. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. - type: call_button - command: fastboot_flash_recovery + command: fastboot_boot_recovery content: > Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/redfin.yaml b/openandroidinstaller/assets/configs/redfin.yaml index df12f3b4..7eae2345 100644 --- a/openandroidinstaller/assets/configs/redfin.yaml +++ b/openandroidinstaller/assets/configs/redfin.yaml @@ -29,10 +29,10 @@ steps: command: fastboot_reboot - type: confirm_button content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable USB debugging to continue. - flash_recovery: + boot_recovery: - type: confirm_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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. - type: call_button content: Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. @@ -40,5 +40,5 @@ steps: - type: confirm_button content: Select 'Restart bootloader' on your smartphone screen. Then confirm to continue. - type: call_button - content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery \ No newline at end of file + 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/s3ve3g.yaml b/openandroidinstaller/assets/configs/s3ve3g.yaml index c7c1d67d..4cde7173 100644 --- a/openandroidinstaller/assets/configs/s3ve3g.yaml +++ b/openandroidinstaller/assets/configs/s3ve3g.yaml @@ -4,7 +4,7 @@ metadata: devicecode: s3ve3g steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: confirm_button content: > There are two possible hardware configurations of this phone regardless of model number. Some phones were released with a Sony IMX 175 rear camera sensor, while others with a Samsung s5k4h5yb rear camera sensor. As such, we’ve separated this devices builds into two separate builds. The procedure to distinguish which to use is as follows: @@ -26,7 +26,7 @@ steps: command: adb_reboot_download - type: call_button content: > - In this step, you need to flash a custom recovery on your device. + 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. command: heimdall_flash_recovery - type: confirm_button diff --git a/openandroidinstaller/assets/configs/sargo.yaml b/openandroidinstaller/assets/configs/sargo.yaml index 2e19de38..fe6065fd 100644 --- a/openandroidinstaller/assets/configs/sargo.yaml +++ b/openandroidinstaller/assets/configs/sargo.yaml @@ -24,14 +24,14 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once your phone screen looks like the picture on the left, continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once your phone screen looks like the picture on the left, continue. + command: fastboot_boot_recovery img: twrp-start.jpeg \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/starlte.yaml b/openandroidinstaller/assets/configs/starlte.yaml index 3b09a481..9a922995 100644 --- a/openandroidinstaller/assets/configs/starlte.yaml +++ b/openandroidinstaller/assets/configs/starlte.yaml @@ -6,7 +6,7 @@ requirements: android: 10 steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: call_button content: > As a first step, you need to boot into the bootloader. A bootloader is the piece of software, @@ -14,7 +14,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 flash 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 boot 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: > diff --git a/openandroidinstaller/assets/configs/sunfish.yaml b/openandroidinstaller/assets/configs/sunfish.yaml index b91a734d..2c3ee0be 100644 --- a/openandroidinstaller/assets/configs/sunfish.yaml +++ b/openandroidinstaller/assets/configs/sunfish.yaml @@ -29,10 +29,10 @@ steps: command: fastboot_reboot - type: confirm_button content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable USB debugging to continue. - flash_recovery: + boot_recovery: - type: confirm_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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. - type: call_button content: Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. @@ -40,5 +40,5 @@ steps: - type: confirm_button content: Select 'Restart bootloader' on your smartphone screen. Then confirm to continue. - type: call_button - content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - command: fastboot_flash_recovery \ No newline at end of file + 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/taimen.yaml b/openandroidinstaller/assets/configs/taimen.yaml index 8bed3bbf..5fc02d21 100644 --- a/openandroidinstaller/assets/configs/taimen.yaml +++ b/openandroidinstaller/assets/configs/taimen.yaml @@ -24,14 +24,14 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once your phone screen looks like the picture on the left, continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once your phone screen looks like the picture on the left, continue. + command: fastboot_boot_recovery img: twrp-start.jpeg \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/walleye.yaml b/openandroidinstaller/assets/configs/walleye.yaml index 1daae392..652c2da2 100644 --- a/openandroidinstaller/assets/configs/walleye.yaml +++ b/openandroidinstaller/assets/configs/walleye.yaml @@ -24,14 +24,14 @@ steps: command: fastboot_reboot - 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once your phone screen looks like the picture on the left, continue. - command: fastboot_flash_recovery + content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once your phone screen looks like the picture on the left, continue. + command: fastboot_boot_recovery img: twrp-start.jpeg \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/yuga.yaml b/openandroidinstaller/assets/configs/yuga.yaml index 16409933..09d6005b 100644 --- a/openandroidinstaller/assets/configs/yuga.yaml +++ b/openandroidinstaller/assets/configs/yuga.yaml @@ -31,10 +31,10 @@ steps: Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB. Then confirm here to continue. command: fastboot_reboot - flash_recovery: + boot_recovery: - type: call_button content: Now you have to reboot into bootloader again. With your phone turned on, press the button to do so and continue once it is done. command: adb_reboot_bootloader - type: call_button - content: Next, you need to flash a custom recovery image. Press the button to flash the selected image. Then continue. + content: Next, you need to boot a custom recovery image. Press the button to flash the selected image. Then continue. command: fastboot_flash_boot \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/z3.yaml b/openandroidinstaller/assets/configs/z3.yaml index e9f5c797..8e90bda4 100644 --- a/openandroidinstaller/assets/configs/z3.yaml +++ b/openandroidinstaller/assets/configs/z3.yaml @@ -33,10 +33,10 @@ steps: Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB. Then confirm here to continue. command: fastboot_reboot - flash_recovery: + boot_recovery: - type: call_button content: Now you have to reboot into bootloader again. With your phone turned on, press the button to do so and continue once it is done. command: adb_reboot_bootloader - type: call_button - content: Next, you need to flash a custom recovery image. Press the button to flash the selected image. Then continue. + content: Next, you need to boot a custom recovery image. Press the button to flash the selected image. Then continue. command: fastboot_flash_boot \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/zerofltexx.yaml b/openandroidinstaller/assets/configs/zerofltexx.yaml index ad084e4f..5e9db38c 100644 --- a/openandroidinstaller/assets/configs/zerofltexx.yaml +++ b/openandroidinstaller/assets/configs/zerofltexx.yaml @@ -4,7 +4,7 @@ metadata: devicecode: zerofltexx steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: call_button content: > As a first step, you need to boot into the bootloader. A bootloader is the piece of software, @@ -12,7 +12,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 flash 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 boot 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 img: samsung-buttons.png diff --git a/openandroidinstaller/assets/configs/zeroltexx.yaml b/openandroidinstaller/assets/configs/zeroltexx.yaml index 0830241c..a67b4d55 100644 --- a/openandroidinstaller/assets/configs/zeroltexx.yaml +++ b/openandroidinstaller/assets/configs/zeroltexx.yaml @@ -4,7 +4,7 @@ metadata: devicecode: zeroltexx steps: unlock_bootloader: - flash_recovery: + boot_recovery: - type: call_button content: > As a first step, you need to boot into the bootloader. A bootloader is the piece of software, @@ -12,7 +12,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 flash 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 boot 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 img: samsung-buttons.png diff --git a/openandroidinstaller/installer_config.py b/openandroidinstaller/installer_config.py index 62aa1a01..0158d93a 100644 --- a/openandroidinstaller/installer_config.py +++ b/openandroidinstaller/installer_config.py @@ -70,12 +70,12 @@ class InstallerConfig: def __init__( self, unlock_bootloader: List[Step], - flash_recovery: List[Step], + boot_recovery: List[Step], metadata: dict, requirements: dict, ): self.unlock_bootloader = unlock_bootloader - self.flash_recovery = flash_recovery + self.boot_recovery = boot_recovery self.metadata = metadata self.requirements = requirements self.device_code = metadata.get("devicecode") @@ -111,11 +111,11 @@ def from_file(cls, path): ] else: unlock_bootloader = [] - flash_recovery = [ - Step(**raw_step, title="Flash custom recovery") - for raw_step in raw_steps.get("flash_recovery", []) + boot_recovery = [ + Step(**raw_step, title="Boot custom recovery") + for raw_step in raw_steps.get("boot_recovery", []) ] - return cls(unlock_bootloader, flash_recovery, metadata, requirements) + return cls(unlock_bootloader, boot_recovery, metadata, requirements) def _load_config(device_code: str, config_path: Path) -> Optional[InstallerConfig]: @@ -157,7 +157,7 @@ def validate_config(config: str) -> bool: ), "content": str, schema.Optional("command"): Regex( - r"adb_reboot|adb_reboot_bootloader|adb_reboot_download|adb_sideload|adb_twrp_wipe_and_install|adb_twrp_copy_partitions|fastboot_flash_recovery|fastboot_flash_boot|fastboot_unlock_with_code|fastboot_get_unlock_data|fastboot_unlock|fastboot_oem_unlock|fastboot_reboot|heimdall_flash_recovery" + r"adb_reboot|adb_reboot_bootloader|adb_reboot_download|adb_sideload|adb_twrp_wipe_and_install|adb_twrp_copy_partitions|fastboot_boot_recovery|fastboot_flash_boot|fastboot_unlock_with_code|fastboot_get_unlock_data|fastboot_unlock|fastboot_oem_unlock|fastboot_reboot|heimdall_flash_recovery" ), schema.Optional("allow_skip"): bool, schema.Optional("img"): str, @@ -178,7 +178,7 @@ def validate_config(config: str) -> bool: }, "steps": { "unlock_bootloader": schema.Or(None, [step_schema]), - "flash_recovery": [step_schema], + "boot_recovery": [step_schema], }, } ) diff --git a/openandroidinstaller/tooling.py b/openandroidinstaller/tooling.py index 500ca281..a5e69dd2 100644 --- a/openandroidinstaller/tooling.py +++ b/openandroidinstaller/tooling.py @@ -250,7 +250,7 @@ def adb_twrp_wipe_and_install( for line in adb_reboot_bootloader(bin_path): yield line # boot to TWRP again - for line in fastboot_flash_recovery( + for line in fastboot_boot_recovery( bin_path=bin_path, recovery=recovery, is_ab=is_ab ): yield line @@ -354,7 +354,7 @@ def fastboot_reboot(bin_path: Path) -> TerminalResponse: @add_logging("Boot custom recovery with fastboot.") -def fastboot_flash_recovery( +def fastboot_boot_recovery( bin_path: Path, recovery: str, is_ab: bool = True ) -> TerminalResponse: """Temporarily, boot custom recovery with fastboot.""" @@ -423,8 +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 - ): - yield line + ):boot_recovery + yield line def search_device(platform: str, bin_path: Path) -> Optional[str]: diff --git a/openandroidinstaller/views/start_view.py b/openandroidinstaller/views/start_view.py index 44c6d6c8..724a64b7 100644 --- a/openandroidinstaller/views/start_view.py +++ b/openandroidinstaller/views/start_view.py @@ -99,13 +99,13 @@ def check_bootloader_unlocked(e): """Enable skipping unlocking the bootloader if selected.""" if self.bootloader_switch.value: logger.info("Skipping bootloader unlocking.") - self.state.steps = copy.deepcopy(self.state.config.flash_recovery) + self.state.steps = copy.deepcopy(self.state.config.boot_recovery) self.state.num_total_steps = len(self.state.steps) else: logger.info("Enabled unlocking the bootloader again.") self.state.steps = copy.deepcopy( self.state.config.unlock_bootloader - ) + copy.deepcopy(self.state.config.flash_recovery) + ) + copy.deepcopy(self.state.config.boot_recovery) self.state.num_total_steps = len(self.state.steps) self.bootloader_switch = Switch( diff --git a/openandroidinstaller/views/step_view.py b/openandroidinstaller/views/step_view.py index 86e5ef23..4bc5e38a 100644 --- a/openandroidinstaller/views/step_view.py +++ b/openandroidinstaller/views/step_view.py @@ -38,7 +38,7 @@ adb_reboot_download, adb_sideload, adb_twrp_copy_partitions, - fastboot_flash_recovery, + fastboot_boot_recovery, fastboot_flash_boot, fastboot_oem_unlock, fastboot_reboot, @@ -217,8 +217,8 @@ def call_to_phone(self, e, command: str): ), "fastboot_oem_unlock": fastboot_oem_unlock, "fastboot_get_unlock_data": fastboot_get_unlock_data, - "fastboot_flash_recovery": partial( - fastboot_flash_recovery, + "fastboot_boot_recovery": partial( + fastboot_boot_recovery, recovery=self.state.recovery_path, is_ab=self.state.is_ab, ), From 66d6cbac71f56e36a35c718f7986af174451f203 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Sun, 12 Mar 2023 20:52:06 +0100 Subject: [PATCH 14/39] Updated bacon configs to new TWRP booting --- openandroidinstaller/assets/configs/A0001.yaml | 11 ++++------- openandroidinstaller/assets/configs/bacon.yaml | 11 ++++------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/openandroidinstaller/assets/configs/A0001.yaml b/openandroidinstaller/assets/configs/A0001.yaml index 85c25d8e..9f43951f 100644 --- a/openandroidinstaller/assets/configs/A0001.yaml +++ b/openandroidinstaller/assets/configs/A0001.yaml @@ -26,17 +26,14 @@ steps: 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: > - Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - Notice: In some cases the bootloader won't boot into the flashed recovery automatically, but rather boot the normal system. - If this happens, please run the following command via adb and wait for a moment: `adb reboot recovery` - Now click 'Continue'. - command: fastboot_flash_recovery \ No newline at end of file + 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 4fe1c451..34b2e187 100644 --- a/openandroidinstaller/assets/configs/bacon.yaml +++ b/openandroidinstaller/assets/configs/bacon.yaml @@ -26,17 +26,14 @@ steps: 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. - flash_recovery: + boot_recovery: - type: call_button content: > - Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, + 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: > - Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. - Notice: In some cases the bootloader won't boot into the flashed recovery automatically, but rather boot the normal system. - If this happens, please run the following command via adb and wait for a moment: `adb reboot recovery` - Now click 'Continue'. - command: fastboot_flash_recovery \ No newline at end of file + 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 From 6880808056c2bb4cce6547f56368d2ffd3a835e6 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Sun, 12 Mar 2023 22:30:16 +0100 Subject: [PATCH 15/39] Code formatting --- openandroidinstaller/openandroidinstaller.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openandroidinstaller/openandroidinstaller.py b/openandroidinstaller/openandroidinstaller.py index 92868949..6c1aa578 100644 --- a/openandroidinstaller/openandroidinstaller.py +++ b/openandroidinstaller/openandroidinstaller.py @@ -97,7 +97,10 @@ def __init__(self, state: AppState): ) # create the install view - self.install_view = InstallView(on_confirm=self.to_next_view, state=self.state) + self.install_view = InstallView( + on_confirm=self.to_next_view, + state=self.state, + ) # create the final success view self.final_view = SuccessView(state=self.state) From 13c3500fbc8822b823dce382f387f2d626768c08 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Mon, 13 Mar 2023 11:08:43 +0100 Subject: [PATCH 16/39] Added restart button on final page --- openandroidinstaller/openandroidinstaller.py | 24 +++++++++++++++----- openandroidinstaller/views/success_view.py | 21 ++++++++++++++++- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/openandroidinstaller/openandroidinstaller.py b/openandroidinstaller/openandroidinstaller.py index 6c1aa578..bc239841 100644 --- a/openandroidinstaller/openandroidinstaller.py +++ b/openandroidinstaller/openandroidinstaller.py @@ -76,7 +76,7 @@ def __init__(self, state: AppState): self.view = Column(expand=True, width=1200) # create default starter views - welcome_view = WelcomeView( + self.welcome_view = WelcomeView( on_confirm=self.to_next_view, state=self.state, ) @@ -103,7 +103,10 @@ def __init__(self, state: AppState): ) # create the final success view - self.final_view = SuccessView(state=self.state) + self.success_view = SuccessView( + on_confirm=self.restart, + state=self.state, + ) # initialize the addon view self.select_addon_view = AddonsView( @@ -120,7 +123,7 @@ def __init__(self, state: AppState): select_files_view, requirements_view, start_view, - welcome_view, + self.welcome_view, ] ) self.state.add_addon_views( @@ -132,7 +135,7 @@ def __init__(self, state: AppState): # final default views, ordered to allow to pop self.state.add_final_default_views( views=[ - self.final_view, + self.success_view, self.install_view, ] ) @@ -178,10 +181,19 @@ def to_next_view(self, e): # else: # # display the final view - # self.view.controls.append(self.final_view) + # self.view.controls.append(self.success_view) logger.info("Confirmed and moved to next step.") self.view.update() - + + def restart(self, e): + """Method to display the first view.""" + self.welcome_view.init_visuals() + # clear the current view + self.view.controls = [] + # retrieve the new view and update + self.view.controls.append(self.welcome_view) + logger.info("Restart.") + self.view.update() def configure(page: Page): """Configure the application.""" diff --git a/openandroidinstaller/views/success_view.py b/openandroidinstaller/views/success_view.py index e7f84bf6..fbc88464 100644 --- a/openandroidinstaller/views/success_view.py +++ b/openandroidinstaller/views/success_view.py @@ -13,6 +13,8 @@ # If not, see .""" # Author: Tobias Sterbak +from typing import Callable + import webbrowser from loguru import logger from flet import ( @@ -20,6 +22,7 @@ Row, Text, Markdown, + icons, ) from views import BaseView @@ -28,8 +31,13 @@ class SuccessView(BaseView): - def __init__(self, state: AppState): + def __init__( + self, + state: AppState, + on_confirm: Callable, + ): super().__init__(state=state, image="success.png") + self.on_confirm = on_confirm def build( self, @@ -69,5 +77,16 @@ def close_window(e): ) ] ), + Row( + [ + ElevatedButton( + "Flash new device", + on_click=self.on_confirm, + icon=icons.RESTART_ALT, + disabled=False, + expand=True, + ) + ] + ), ] return self.view From 4222309a5d0bd8362d415f74883b3151e9041bd0 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Mon, 13 Mar 2023 20:19:33 +0100 Subject: [PATCH 17/39] Put restart and finish buttons next to each other --- openandroidinstaller/views/success_view.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/openandroidinstaller/views/success_view.py b/openandroidinstaller/views/success_view.py index fbc88464..38ade88d 100644 --- a/openandroidinstaller/views/success_view.py +++ b/openandroidinstaller/views/success_view.py @@ -68,15 +68,6 @@ def close_window(e): """, on_tap_link=lambda e: self.page.launch_url(e.data), ), - Row( - [ - ElevatedButton( - "Finish and close", - expand=True, - on_click=close_window, - ) - ] - ), Row( [ ElevatedButton( @@ -85,8 +76,14 @@ def close_window(e): icon=icons.RESTART_ALT, disabled=False, expand=True, + ), + ElevatedButton( + "Finish and close", + on_click=close_window, + icon=icons.EXIT_TO_APP_OUTLINED, + expand=True, ) ] - ), + ) ] return self.view From 2d7b0e21533fc025b1e6b4f55745b87bde1cb84c Mon Sep 17 00:00:00 2001 From: MagicLike Date: Mon, 13 Mar 2023 20:22:18 +0100 Subject: [PATCH 18/39] Updated search icon Updated the search icon, due to coming support for other devices than phones. --- openandroidinstaller/views/start_view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openandroidinstaller/views/start_view.py b/openandroidinstaller/views/start_view.py index 44c6d6c8..b7e09487 100644 --- a/openandroidinstaller/views/start_view.py +++ b/openandroidinstaller/views/start_view.py @@ -186,7 +186,7 @@ def build(self): FilledButton( "Search for device", on_click=self.search_devices, - icon=icons.PHONE_ANDROID, + icon=icons.DEVICES_OTHER_OUTLINED, expand=True, tooltip="Search for a connected device.", ), From dd1c897e794684ae095bf8954072653144f16bd3 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Mon, 20 Mar 2023 21:36:26 +0100 Subject: [PATCH 19/39] Fixed image not showing in "Boot custom recovery" --- openandroidinstaller/views/step_view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openandroidinstaller/views/step_view.py b/openandroidinstaller/views/step_view.py index 4bc5e38a..eb484eb3 100644 --- a/openandroidinstaller/views/step_view.py +++ b/openandroidinstaller/views/step_view.py @@ -106,7 +106,7 @@ def check_advanced_switch(e): # main controls steps_indictor_img_lookup = { "Unlock the bootloader": "steps-header-unlock.png", - "Flash custom recovery": "steps-header-recovery.png", + "Boot custom recovery": "steps-header-recovery.png", } self.right_view_header.controls = [ get_title( From c7706b9aa3821580aca1431d432c14bfb22d7457 Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Thu, 23 Mar 2023 11:37:15 +0000 Subject: [PATCH 20/39] Supported device codes for a config are now a list; config is loaded based on this --- .../assets/configs/avicii.yaml | 7 ++- .../assets/configs/cheeseburger.yaml | 7 ++- openandroidinstaller/assets/configs/d2s.yaml | 6 +- openandroidinstaller/assets/configs/dre.yaml | 7 ++- .../assets/configs/dumpling.yaml | 7 ++- .../assets/configs/enchilada.yaml | 7 ++- .../assets/configs/fajita.yaml | 7 ++- .../assets/configs/guacamole.yaml | 7 ++- .../assets/configs/guacamoleb.yaml | 7 ++- .../assets/configs/hotdog.yaml | 7 ++- .../assets/configs/hotdogb.yaml | 7 ++- .../assets/configs/sargo.yaml | 6 +- openandroidinstaller/assets/configs/yuga.yaml | 7 ++- openandroidinstaller/installer_config.py | 55 ++++++++----------- openandroidinstaller/utils.py | 8 +-- openandroidinstaller/views/select_view.py | 9 +-- openandroidinstaller/views/start_view.py | 4 +- 17 files changed, 94 insertions(+), 71 deletions(-) diff --git a/openandroidinstaller/assets/configs/avicii.yaml b/openandroidinstaller/assets/configs/avicii.yaml index 99cc545f..beb9e933 100644 --- a/openandroidinstaller/assets/configs/avicii.yaml +++ b/openandroidinstaller/assets/configs/avicii.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus Nord - devicecode: avicii + device_name: OnePlus Nord + device_code: avicii + supported_device_codes: + - avicii + - Nord requirements: android: 10 steps: diff --git a/openandroidinstaller/assets/configs/cheeseburger.yaml b/openandroidinstaller/assets/configs/cheeseburger.yaml index 6a825fa9..a357ecb1 100644 --- a/openandroidinstaller/assets/configs/cheeseburger.yaml +++ b/openandroidinstaller/assets/configs/cheeseburger.yaml @@ -1,7 +1,10 @@ metadata: maintainer: SirRGB - devicename: OnePlus 5 - devicecode: cheeseburger + device_name: OnePlus 5 + device_code: cheeseburger + supported_device_codes: + - cheeseburger + - OnePlus5 twrp-link: cheeseburger_dumpling steps: unlock_bootloader: diff --git a/openandroidinstaller/assets/configs/d2s.yaml b/openandroidinstaller/assets/configs/d2s.yaml index 07bd6819..08b59a47 100644 --- a/openandroidinstaller/assets/configs/d2s.yaml +++ b/openandroidinstaller/assets/configs/d2s.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy Note 10+ - devicecode: d2s + device_name: Samsung Galaxy Note 10+ + device_code: d2s + supported_device_codes: + - d2s requirements: android: 12 steps: diff --git a/openandroidinstaller/assets/configs/dre.yaml b/openandroidinstaller/assets/configs/dre.yaml index 1b8be02a..f9994757 100644 --- a/openandroidinstaller/assets/configs/dre.yaml +++ b/openandroidinstaller/assets/configs/dre.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus Nord N200 - devicecode: dre + device_name: OnePlus Nord N200 + device_code: dre + supported_device_codes: + - dre + - NordN200 requirements: android: 11 steps: diff --git a/openandroidinstaller/assets/configs/dumpling.yaml b/openandroidinstaller/assets/configs/dumpling.yaml index a2324245..e358b8a7 100644 --- a/openandroidinstaller/assets/configs/dumpling.yaml +++ b/openandroidinstaller/assets/configs/dumpling.yaml @@ -1,7 +1,10 @@ metadata: maintainer: SirRGB - devicename: OnePlus 5T - devicecode: dumpling + device_name: OnePlus 5T + device_code: dumpling + supported_device_codes: + - dumpling + - OnePlus5T twrp-link: cheeseburger_dumpling steps: unlock_bootloader: diff --git a/openandroidinstaller/assets/configs/enchilada.yaml b/openandroidinstaller/assets/configs/enchilada.yaml index e1da4282..e1eeae7f 100644 --- a/openandroidinstaller/assets/configs/enchilada.yaml +++ b/openandroidinstaller/assets/configs/enchilada.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus 6 - devicecode: enchilada + device_name: OnePlus 6 + device_code: enchilada + supported_device_codes: + - enchilada + - OnePlus6 requirements: android: 11 steps: diff --git a/openandroidinstaller/assets/configs/fajita.yaml b/openandroidinstaller/assets/configs/fajita.yaml index 8ce4c1a2..2bfb76f1 100644 --- a/openandroidinstaller/assets/configs/fajita.yaml +++ b/openandroidinstaller/assets/configs/fajita.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus 6T - devicecode: fajita + device_name: OnePlus 6T + device_code: fajita + supported_device_codes: + - fajita + - OnePlus6T requirements: android: 11 steps: diff --git a/openandroidinstaller/assets/configs/guacamole.yaml b/openandroidinstaller/assets/configs/guacamole.yaml index 129d7b98..8aeec6f0 100644 --- a/openandroidinstaller/assets/configs/guacamole.yaml +++ b/openandroidinstaller/assets/configs/guacamole.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus 7 Pro - devicecode: guacamole + device_name: OnePlus 7 Pro + device_code: guacamole + supported_device_codes: + - guacamole + - OnePlus7Pro requirements: android: 12 steps: diff --git a/openandroidinstaller/assets/configs/guacamoleb.yaml b/openandroidinstaller/assets/configs/guacamoleb.yaml index e39c9378..264d5e0d 100644 --- a/openandroidinstaller/assets/configs/guacamoleb.yaml +++ b/openandroidinstaller/assets/configs/guacamoleb.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus 7 - devicecode: guacamoleb + device_name: OnePlus 7 + device_code: guacamoleb + supported_device_codes: + - guacamoleb + - OnePlus7 requirements: android: 12 steps: diff --git a/openandroidinstaller/assets/configs/hotdog.yaml b/openandroidinstaller/assets/configs/hotdog.yaml index 15cc7015..676ecc1e 100644 --- a/openandroidinstaller/assets/configs/hotdog.yaml +++ b/openandroidinstaller/assets/configs/hotdog.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus 7T Pro - devicecode: hotdog + device_name: OnePlus 7T Pro + device_code: hotdog + supported_device_codes: + - hotdog + - OnePlus7TPro requirements: android: 12 steps: diff --git a/openandroidinstaller/assets/configs/hotdogb.yaml b/openandroidinstaller/assets/configs/hotdogb.yaml index da1c487a..be3773aa 100644 --- a/openandroidinstaller/assets/configs/hotdogb.yaml +++ b/openandroidinstaller/assets/configs/hotdogb.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus 7T - devicecode: hotdogb + device_name: OnePlus 7T + device_code: hotdogb + supported_device_codes: + - hotdogb + - OnePlus7T requirements: android: 12 steps: diff --git a/openandroidinstaller/assets/configs/sargo.yaml b/openandroidinstaller/assets/configs/sargo.yaml index 2e19de38..c4515fbd 100644 --- a/openandroidinstaller/assets/configs/sargo.yaml +++ b/openandroidinstaller/assets/configs/sargo.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Pixel 3a - devicecode: sargo + device_name: Pixel 3a + device_code: sargo + supported_device_codes: + - sargo requirements: android: 12.1.0 steps: diff --git a/openandroidinstaller/assets/configs/yuga.yaml b/openandroidinstaller/assets/configs/yuga.yaml index 16409933..00df8601 100644 --- a/openandroidinstaller/assets/configs/yuga.yaml +++ b/openandroidinstaller/assets/configs/yuga.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Sony Xperia Z - devicecode: yuga + device_name: Sony Xperia Z + device_code: yuga + supported_device_codes: + - yuga + - C6603 steps: unlock_bootloader: - type: confirm_button diff --git a/openandroidinstaller/installer_config.py b/openandroidinstaller/installer_config.py index 62aa1a01..520616fc 100644 --- a/openandroidinstaller/installer_config.py +++ b/openandroidinstaller/installer_config.py @@ -50,23 +50,6 @@ def __init__( class InstallerConfig: - # map some detected device codes to their real code. - device_code_mapping: Dict[str, str] = { - # Sony issues - "C6603": "yuga", - # OnePlus issues - "OnePlus5": "cheeseburger", - "OnePlus5T": "dumpling", - "OnePlus6": "enchilada", - "OnePlus6T": "fajita", - "OnePlus7": "guacamoleb", - "OnePlus7Pro": "guacamole", - "OnePlus7T": "hotdogb", - "OnePlus7TPro": "hotdog", - "Nord": "avicii", - "NordN200": "dre", - } - def __init__( self, unlock_bootloader: List[Step], @@ -78,15 +61,10 @@ def __init__( self.flash_recovery = flash_recovery self.metadata = metadata self.requirements = requirements - self.device_code = metadata.get("devicecode") + self.device_code = metadata.get("device_code") + self.supported_device_codes = metadata.get("supported_device_codes") self.twrp_link = metadata.get("twrp-link") - # manage device codes and alternative device codes/names - inverted_mapping: Dict[str, str] = dict(map(reversed, self.device_code_mapping.items())) # type: ignore - self.alternative_device_code = inverted_mapping.get( - self.device_code, self.device_code # type: ignore - ) - @classmethod def from_file(cls, path): with open(path, "r", encoding="utf-8") as stream: @@ -118,17 +96,27 @@ def from_file(cls, path): return cls(unlock_bootloader, flash_recovery, metadata, requirements) +def _find_config_file(device_code: str, config_path: Path) -> Optional[Path]: + """Find the config file which is supported by the given device code.""" + for path in config_path.rglob("*.yaml"): + with open(path, "r", encoding="utf-8") as stream: + try: + raw_config = dict(yaml.safe_load(stream)) + if device_code in raw_config.get("metadata", dict()).get("supported_device_codes", []): + logger.info(f"Device code '{device_code}' is supported by config '{path}'.") + return path + except: + pass + return None + + def _load_config(device_code: str, config_path: Path) -> Optional[InstallerConfig]: """ Function to load a function from given path and directory path. Try to load local file in the same directory as the executable first, then load from assets. """ - # try loading a custom local file first - mapped_device_code = InstallerConfig.device_code_mapping.get( - device_code, device_code - ) - custom_path = Path.cwd().joinpath(Path(f"{mapped_device_code}.yaml")) + custom_path = _find_config_file(device_code, config_path=Path.cwd()) try: config = InstallerConfig.from_file(custom_path) logger.info(f"Loaded custom device config from {custom_path}.") @@ -136,7 +124,9 @@ def _load_config(device_code: str, config_path: Path) -> Optional[InstallerConfi return config except FileNotFoundError: # if no localfile, then try to load a config file from assets - path = config_path.joinpath(Path(f"{mapped_device_code}.yaml")) + path = _find_config_file(device_code, config_path) + + # path = config_path.joinpath(Path(f"{mapped_device_code}.yaml")) try: config = InstallerConfig.from_file(path) logger.info(f"Loaded device config from {path}.") @@ -168,8 +158,9 @@ def validate_config(config: str) -> bool: { "metadata": { "maintainer": str, - "devicename": str, - "devicecode": str, + "device_name": str, + "device_code": str, + "supported_device_codes": [str], schema.Optional("twrp-link"): str, }, schema.Optional("requirements"): { diff --git a/openandroidinstaller/utils.py b/openandroidinstaller/utils.py index 7a83cb83..bc317041 100644 --- a/openandroidinstaller/utils.py +++ b/openandroidinstaller/utils.py @@ -14,7 +14,7 @@ # Author: Tobias Sterbak import zipfile -from typing import Optional +from typing import Optional, List import requests from loguru import logger @@ -40,7 +40,7 @@ def get_download_link(devicecode: str) -> Optional[str]: def image_works_with_device( - device_code: str, alternative_device_code: str, image_path: str + supported_device_codes: List[str], image_path: str ) -> bool: """Determine if an image works for the given device.""" with zipfile.ZipFile(image_path) as image_zip: @@ -51,9 +51,7 @@ def image_works_with_device( supported_devices = str(metadata[-1]).split("=")[-1][:-3].split(",") logger.info(f"Image works with device: {supported_devices}") - if (device_code in supported_devices) or ( - alternative_device_code in supported_devices - ): + if any(code in supported_devices for code in supported_device_codes): logger.success("Device supported by the selected image.") return True else: diff --git a/openandroidinstaller/views/select_view.py b/openandroidinstaller/views/select_view.py index 705880b9..ac65fd5d 100644 --- a/openandroidinstaller/views/select_view.py +++ b/openandroidinstaller/views/select_view.py @@ -115,7 +115,7 @@ def build(self): # download link self.download_link = get_download_link( - self.state.config.metadata.get("devicecode", "ERROR") + self.state.config.metadata.get("device_code", "NOTFOUND") ) # attach hidden dialogues @@ -256,10 +256,8 @@ def pick_image_result(self, e: FilePickerResultEvent): logger.info("No image selected.") # check if the image works with the device and show the filename in different colors accordingly if e.files: - device_code = self.state.config.device_code if image_works_with_device( - device_code=device_code, - alternative_device_code=self.state.config.alternative_device_code, + supported_device_codes=self.state.config.supported_device_codes, image_path=self.state.image_path, ): self.selected_image.color = colors.GREEN @@ -300,8 +298,7 @@ def enable_button_if_ready(self, e): device_code = self.state.config.device_code if not ( image_works_with_device( - device_code=device_code, - alternative_device_code=self.state.config.alternative_device_code, + supported_device_codes=self.state.config.supported_device_codes, image_path=self.state.image_path, ) and recovery_works_with_device( diff --git a/openandroidinstaller/views/start_view.py b/openandroidinstaller/views/start_view.py index 44c6d6c8..57e4d3c5 100644 --- a/openandroidinstaller/views/start_view.py +++ b/openandroidinstaller/views/start_view.py @@ -244,7 +244,7 @@ def search_devices(self, e): self.state.is_ab = is_ab if self.state.config: device_name = self.state.config.metadata.get( - "devicename", "No device name in config." + "device_name", "No device name in config." ) else: device_name = None @@ -254,7 +254,7 @@ def search_devices(self, e): self.continue_button.disabled = False self.bootloader_switch.disabled = False # overwrite the text field with the real name from the config - self.device_name.value = f"{device_name} (code: {InstallerConfig.device_code_mapping.get(device_code, device_code)})" + self.device_name.value = f"{device_name} (code: {self.state.config.device_code})" self.device_name.color = colors.GREEN else: # failed to load config From 13a9751202cb305230b68d2a1a016cd9871fc072 Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Thu, 23 Mar 2023 12:05:58 +0000 Subject: [PATCH 21/39] Update test and fix configs --- README.md | 7 +++--- openandroidinstaller/assets/configs/FP2.yaml | 6 +++-- openandroidinstaller/assets/configs/FP3.yaml | 6 +++-- openandroidinstaller/assets/configs/FP4.yaml | 6 +++-- .../assets/configs/a3y17lte.yaml | 6 +++-- .../assets/configs/a5xelte.yaml | 6 +++-- openandroidinstaller/assets/configs/a72q.yaml | 6 +++-- .../assets/configs/a7xelte.yaml | 6 +++-- .../assets/configs/akari.yaml | 6 +++-- .../assets/configs/akatsuki.yaml | 6 +++-- .../assets/configs/barbet.yaml | 6 +++-- .../assets/configs/beyond0lte.yaml | 6 +++-- .../assets/configs/beyond1lte.yaml | 6 +++-- .../assets/configs/beyond2lte.yaml | 6 +++-- .../assets/configs/blueline.yaml | 6 +++-- .../assets/configs/bonito.yaml | 6 +++-- .../assets/configs/cedric.yaml | 6 +++-- .../assets/configs/coral.yaml | 6 +++-- .../assets/configs/crosshatch.yaml | 6 +++-- .../assets/configs/crownlte.yaml | 6 +++-- openandroidinstaller/assets/configs/d1.yaml | 6 +++-- .../assets/configs/evert.yaml | 6 +++-- .../assets/configs/flame.yaml | 6 +++-- .../assets/configs/greatlte.yaml | 6 +++-- .../assets/configs/griffin.yaml | 6 +++-- .../assets/configs/hero2lte.yaml | 6 +++-- .../assets/configs/herolte.yaml | 7 ++++-- .../assets/configs/heroltexx.yaml | 22 ------------------- .../assets/configs/hltetmo.yaml | 6 +++-- .../assets/configs/j7elte.yaml | 6 +++-- openandroidinstaller/assets/configs/kiev.yaml | 6 +++-- .../assets/configs/kirin.yaml | 6 +++-- .../assets/configs/mermaid.yaml | 6 +++-- .../assets/configs/nairo.yaml | 6 +++-- .../assets/configs/ocean.yaml | 6 +++-- .../assets/configs/pioneer.yaml | 6 +++-- .../assets/configs/racer.yaml | 6 +++-- .../assets/configs/redfin.yaml | 6 +++-- .../assets/configs/s3ve3g.yaml | 6 +++-- .../assets/configs/starlte.yaml | 6 +++-- .../assets/configs/sunfish.yaml | 6 +++-- .../assets/configs/taimen.yaml | 6 +++-- .../assets/configs/walleye.yaml | 6 +++-- openandroidinstaller/assets/configs/z3.yaml | 6 +++-- .../assets/configs/zerofltexx.yaml | 6 +++-- .../assets/configs/zeroltexx.yaml | 6 +++-- openandroidinstaller/installer_config.py | 20 +++++++++-------- openandroidinstaller/utils.py | 4 +--- openandroidinstaller/views/start_view.py | 5 +++-- tests/test_configs.py | 2 +- 50 files changed, 197 insertions(+), 128 deletions(-) delete mode 100644 openandroidinstaller/assets/configs/heroltexx.yaml diff --git a/README.md b/README.md index 55ffa6db..86998452 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ All kinds of contributions are welcome. These include: ### How to contribute your own installation configurations -If you want to use the tool for a non-supported smartphone, the fastest way is to adapt an [existing config file](https://github.com/openandroidinstaller-dev/openandroidinstaller/tree/main/openandroidinstaller/assets/configs). The file should be named after the `device code` of your device. This is in general the output by `adb shell getprop | grep ro.product.device` when the devices is connected to the computer. You can also get the device code by connecting the device to the computer and run OpenAndroidInstaller to detect the device. +If you want to use the tool for a non-supported smartphone, the fastest way is to adapt an [existing config file](https://github.com/openandroidinstaller-dev/openandroidinstaller/tree/main/openandroidinstaller/assets/configs). The file should be named after the official `device code` of the device. Add the code output by `adb shell getprop | grep ro.product.device` (when the devices is connected to the computer) as well as the official device code to the `supported_device_codes` list in the config. You can also get the device code by connecting the device to the computer and run OpenAndroidInstaller to detect the device. **To test your config file with the executable** without using the developer setup, place it in the same directory as the executable. There it will be detected by name. After you created a config file and it works fine, you can open a pull request to make the file available to other users. Please also add the device to the supported devices table above. @@ -196,8 +196,9 @@ A config file consists of two parts. The first part are some metadata about the ##### How to write Metadata Every config file should have metadata with the following fields: - `maintainer`: str; Maintainer and author of the config file. -- `devicename`: str; Name of the device. -- `devicecode`: str; The official device code. +- `device_name`: str; Name of the device. +- `device_code`: str; The official device code. +- `supported_device_codes`: List[str]; A list of supported device codes for the config. The config will be loaded based on this field. - `twrp-link`: [OPTIONAL] str; name of the corresponding twrp page. In addition to these metadata, every config can have optional requirements. If these are set, the user is asked to check if they are meet. diff --git a/openandroidinstaller/assets/configs/FP2.yaml b/openandroidinstaller/assets/configs/FP2.yaml index 8149c8b4..c9be273c 100644 --- a/openandroidinstaller/assets/configs/FP2.yaml +++ b/openandroidinstaller/assets/configs/FP2.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Fairphone 2 - devicecode: FP2 + device_name: Fairphone 2 + device_code: FP2 + supported_device_codes: + - FP2 steps: unlock_bootloader: flash_recovery: diff --git a/openandroidinstaller/assets/configs/FP3.yaml b/openandroidinstaller/assets/configs/FP3.yaml index 5fc45c57..cee65ccb 100644 --- a/openandroidinstaller/assets/configs/FP3.yaml +++ b/openandroidinstaller/assets/configs/FP3.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Fairphone 3 - devicecode: FP3 + device_name: Fairphone 3 + device_code: FP3 + supported_device_codes: + - FP3 steps: unlock_bootloader: - type: link_button_with_confirm diff --git a/openandroidinstaller/assets/configs/FP4.yaml b/openandroidinstaller/assets/configs/FP4.yaml index a5f5c436..172371ea 100644 --- a/openandroidinstaller/assets/configs/FP4.yaml +++ b/openandroidinstaller/assets/configs/FP4.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Fairphone 4 - devicecode: FP4 + device_name: Fairphone 4 + device_code: FP4 + supported_device_codes: + - FP4 steps: unlock_bootloader: - type: link_button_with_confirm diff --git a/openandroidinstaller/assets/configs/a3y17lte.yaml b/openandroidinstaller/assets/configs/a3y17lte.yaml index 940746dc..1c2a49e6 100644 --- a/openandroidinstaller/assets/configs/a3y17lte.yaml +++ b/openandroidinstaller/assets/configs/a3y17lte.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy A3 (2017) - devicecode: a3y17lte + device_name: Samsung Galaxy A3 (2017) + device_code: a3y17lte + supported_device_codes: + - a3y17lte steps: unlock_bootloader: flash_recovery: diff --git a/openandroidinstaller/assets/configs/a5xelte.yaml b/openandroidinstaller/assets/configs/a5xelte.yaml index 4d4d40bb..9042624e 100644 --- a/openandroidinstaller/assets/configs/a5xelte.yaml +++ b/openandroidinstaller/assets/configs/a5xelte.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy A5 (2016) - devicecode: a5xelte + device_name: Samsung Galaxy A5 (2016) + device_code: a5xelte + supported_device_codes: + - a5xelte steps: unlock_bootloader: flash_recovery: diff --git a/openandroidinstaller/assets/configs/a72q.yaml b/openandroidinstaller/assets/configs/a72q.yaml index 3d1290a0..7655294f 100644 --- a/openandroidinstaller/assets/configs/a72q.yaml +++ b/openandroidinstaller/assets/configs/a72q.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy A72 - devicecode: a72q + device_name: Samsung Galaxy A72 + device_code: a72q + supported_device_codes: + - a72q steps: unlock_bootloader: flash_recovery: diff --git a/openandroidinstaller/assets/configs/a7xelte.yaml b/openandroidinstaller/assets/configs/a7xelte.yaml index 4f680c97..873375ff 100644 --- a/openandroidinstaller/assets/configs/a7xelte.yaml +++ b/openandroidinstaller/assets/configs/a7xelte.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy A7 (2016) - devicecode: a7xelte + device_name: Samsung Galaxy A7 (2016) + device_code: a7xelte + supported_device_codes: + - a7xelte steps: unlock_bootloader: flash_recovery: diff --git a/openandroidinstaller/assets/configs/akari.yaml b/openandroidinstaller/assets/configs/akari.yaml index 8e971d37..44561b61 100644 --- a/openandroidinstaller/assets/configs/akari.yaml +++ b/openandroidinstaller/assets/configs/akari.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Sony Xperia XZ2 - devicecode: akari + device_name: Sony Xperia XZ2 + device_code: akari + supported_device_codes: + - akari requirements: android: 10 steps: diff --git a/openandroidinstaller/assets/configs/akatsuki.yaml b/openandroidinstaller/assets/configs/akatsuki.yaml index ecafe733..4226bfdd 100644 --- a/openandroidinstaller/assets/configs/akatsuki.yaml +++ b/openandroidinstaller/assets/configs/akatsuki.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Sony Xperia XZ3 - devicecode: akatsuki + device_name: Sony Xperia XZ3 + device_code: akatsuki + supported_device_codes: + - akatsuki requirements: android: 10 steps: diff --git a/openandroidinstaller/assets/configs/barbet.yaml b/openandroidinstaller/assets/configs/barbet.yaml index 8471f0de..cca4b77b 100644 --- a/openandroidinstaller/assets/configs/barbet.yaml +++ b/openandroidinstaller/assets/configs/barbet.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Pixel 5a - devicecode: barbet + device_name: Pixel 5a + device_code: barbet + supported_device_codes: + - barbet requirements: android: 12.1.0 steps: diff --git a/openandroidinstaller/assets/configs/beyond0lte.yaml b/openandroidinstaller/assets/configs/beyond0lte.yaml index 01bf3524..a80bf3cd 100644 --- a/openandroidinstaller/assets/configs/beyond0lte.yaml +++ b/openandroidinstaller/assets/configs/beyond0lte.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S10e - devicecode: beyond0lte + device_name: Samsung Galaxy S10e + device_code: beyond0lte + supported_device_codes: + - beyond0lte requirements: android: 12 steps: diff --git a/openandroidinstaller/assets/configs/beyond1lte.yaml b/openandroidinstaller/assets/configs/beyond1lte.yaml index 914d178e..8f72c0ea 100644 --- a/openandroidinstaller/assets/configs/beyond1lte.yaml +++ b/openandroidinstaller/assets/configs/beyond1lte.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S10 - devicecode: beyond1lte + device_name: Samsung Galaxy S10 + device_code: beyond1lte + supported_device_codes: + - beyond1lte requirements: android: 12 steps: diff --git a/openandroidinstaller/assets/configs/beyond2lte.yaml b/openandroidinstaller/assets/configs/beyond2lte.yaml index ff8a529a..9d24225c 100644 --- a/openandroidinstaller/assets/configs/beyond2lte.yaml +++ b/openandroidinstaller/assets/configs/beyond2lte.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S10+ - devicecode: beyond2lte + device_name: Samsung Galaxy S10+ + device_code: beyond2lte + supported_device_codes: + - beyond2lte requirements: android: 12 steps: diff --git a/openandroidinstaller/assets/configs/blueline.yaml b/openandroidinstaller/assets/configs/blueline.yaml index 680d63c5..b7b248ce 100644 --- a/openandroidinstaller/assets/configs/blueline.yaml +++ b/openandroidinstaller/assets/configs/blueline.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Google Pixel 3 - devicecode: blueline + device_name: Google Pixel 3 + device_code: blueline + supported_device_codes: + - blueline requirements: android: 12 steps: diff --git a/openandroidinstaller/assets/configs/bonito.yaml b/openandroidinstaller/assets/configs/bonito.yaml index 694ce1cc..ae057412 100644 --- a/openandroidinstaller/assets/configs/bonito.yaml +++ b/openandroidinstaller/assets/configs/bonito.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Google Pixel 3a XL - devicecode: bonito + device_name: Google Pixel 3a XL + device_code: bonito + supported_device_codes: + - bonito requirements: android: 12.1.0 steps: diff --git a/openandroidinstaller/assets/configs/cedric.yaml b/openandroidinstaller/assets/configs/cedric.yaml index bb260c21..3a0a8ea6 100644 --- a/openandroidinstaller/assets/configs/cedric.yaml +++ b/openandroidinstaller/assets/configs/cedric.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Motorola Moto G5 - devicecode: cedric + device_name: Motorola Moto G5 + device_code: cedric + supported_device_codes: + - cedric steps: unlock_bootloader: - type: call_button diff --git a/openandroidinstaller/assets/configs/coral.yaml b/openandroidinstaller/assets/configs/coral.yaml index e9647828..38cfce01 100644 --- a/openandroidinstaller/assets/configs/coral.yaml +++ b/openandroidinstaller/assets/configs/coral.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Google Pixel 4 XL - devicecode: coral + device_name: Google Pixel 4 XL + device_code: coral + supported_device_codes: + - coral requirements: android: 13 steps: diff --git a/openandroidinstaller/assets/configs/crosshatch.yaml b/openandroidinstaller/assets/configs/crosshatch.yaml index a4a485a2..ec65a723 100644 --- a/openandroidinstaller/assets/configs/crosshatch.yaml +++ b/openandroidinstaller/assets/configs/crosshatch.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Google Pixel 3 XL - devicecode: crosshatch + device_name: Google Pixel 3 XL + device_code: crosshatch + supported_device_codes: + - crosshatch requirements: android: 12 steps: diff --git a/openandroidinstaller/assets/configs/crownlte.yaml b/openandroidinstaller/assets/configs/crownlte.yaml index 8b759e6b..5c651007 100644 --- a/openandroidinstaller/assets/configs/crownlte.yaml +++ b/openandroidinstaller/assets/configs/crownlte.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy Note 9 - devicecode: crownlte + device_name: Samsung Galaxy Note 9 + device_code: crownlte + supported_device_codes: + - crownlte requirements: android: 10 steps: diff --git a/openandroidinstaller/assets/configs/d1.yaml b/openandroidinstaller/assets/configs/d1.yaml index 8ae30aeb..277f7921 100644 --- a/openandroidinstaller/assets/configs/d1.yaml +++ b/openandroidinstaller/assets/configs/d1.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy Note 10 - devicecode: d1 + device_name: Samsung Galaxy Note 10 + device_code: d1 + supported_device_codes: + - d1 requirements: android: 12 steps: diff --git a/openandroidinstaller/assets/configs/evert.yaml b/openandroidinstaller/assets/configs/evert.yaml index 790c1e0f..6e858284 100644 --- a/openandroidinstaller/assets/configs/evert.yaml +++ b/openandroidinstaller/assets/configs/evert.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Motorola moto g6 plus - devicecode: evert + device_name: Motorola moto g6 plus + device_code: evert + supported_device_codes: + - evert steps: unlock_bootloader: - type: call_button diff --git a/openandroidinstaller/assets/configs/flame.yaml b/openandroidinstaller/assets/configs/flame.yaml index 2bbd5d31..e0a09057 100644 --- a/openandroidinstaller/assets/configs/flame.yaml +++ b/openandroidinstaller/assets/configs/flame.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Pixel 4 - devicecode: flame + device_name: Pixel 4 + device_code: flame + supported_device_codes: + - flame requirements: android: 13 steps: diff --git a/openandroidinstaller/assets/configs/greatlte.yaml b/openandroidinstaller/assets/configs/greatlte.yaml index 01e54325..b1bb6dcd 100644 --- a/openandroidinstaller/assets/configs/greatlte.yaml +++ b/openandroidinstaller/assets/configs/greatlte.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Michel Memeteau (freechelmi) - devicename: Samsung Galaxy note 8 - devicecode: greatlte + device_name: Samsung Galaxy note 8 + device_code: greatlte + supported_device_codes: + - greatlte steps: unlock_bootloader: flash_recovery: diff --git a/openandroidinstaller/assets/configs/griffin.yaml b/openandroidinstaller/assets/configs/griffin.yaml index 36d18192..216abd1c 100644 --- a/openandroidinstaller/assets/configs/griffin.yaml +++ b/openandroidinstaller/assets/configs/griffin.yaml @@ -1,7 +1,9 @@ metadata: maintainer: SirRGB - devicename: Motorola Moto Z - devicecode: griffin + device_name: Motorola Moto Z + device_code: griffin + supported_device_codes: + - griffin steps: unlock_bootloader: - type: call_button diff --git a/openandroidinstaller/assets/configs/hero2lte.yaml b/openandroidinstaller/assets/configs/hero2lte.yaml index 4ec35346..a5597048 100644 --- a/openandroidinstaller/assets/configs/hero2lte.yaml +++ b/openandroidinstaller/assets/configs/hero2lte.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S7 Edge - devicecode: hero2lte + device_name: Samsung Galaxy S7 Edge + device_code: hero2lte + supported_device_codes: + - hero2lte steps: unlock_bootloader: flash_recovery: diff --git a/openandroidinstaller/assets/configs/herolte.yaml b/openandroidinstaller/assets/configs/herolte.yaml index 4dcf7f8b..a26a5eb8 100644 --- a/openandroidinstaller/assets/configs/herolte.yaml +++ b/openandroidinstaller/assets/configs/herolte.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S7 - devicecode: herolte + device_name: Samsung Galaxy S7 + device_code: herolte + supported_device_codes: + - herolte + - heroltexx steps: unlock_bootloader: flash_recovery: diff --git a/openandroidinstaller/assets/configs/heroltexx.yaml b/openandroidinstaller/assets/configs/heroltexx.yaml deleted file mode 100644 index 4dcf7f8b..00000000 --- a/openandroidinstaller/assets/configs/heroltexx.yaml +++ /dev/null @@ -1,22 +0,0 @@ -metadata: - maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S7 - devicecode: herolte -steps: - unlock_bootloader: - flash_recovery: - - type: call_button - content: > - As a first step, you need to boot into the bootloader. A bootloader is the piece of software, - that tells your phone who to start and run an operating system (like Android). Your device should be turned on. - 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 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 - img: samsung-buttons.png - content: > - Unplug the USB cable from your device. Then manually reboot into recovery by pressing the *Volume Down* + *Power buttons* for 8~10 seconds - until the screen turns black & release the buttons immediately when it does, then boot to recovery with the device powered off, - hold *Volume Up* + *Home* + *Power button*. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/hltetmo.yaml b/openandroidinstaller/assets/configs/hltetmo.yaml index dc5c6eb1..4d7b2947 100644 --- a/openandroidinstaller/assets/configs/hltetmo.yaml +++ b/openandroidinstaller/assets/configs/hltetmo.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy Note 3 LTE (N900T/V/W8) - devicecode: hltetmo + device_name: Samsung Galaxy Note 3 LTE (N900T/V/W8) + device_code: hltetmo + supported_device_codes: + - hltetmo steps: unlock_bootloader: flash_recovery: diff --git a/openandroidinstaller/assets/configs/j7elte.yaml b/openandroidinstaller/assets/configs/j7elte.yaml index 99390c17..afc88f19 100644 --- a/openandroidinstaller/assets/configs/j7elte.yaml +++ b/openandroidinstaller/assets/configs/j7elte.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy J7 (2015) - devicecode: j7elte + device_name: Samsung Galaxy J7 (2015) + device_code: j7elte + supported_device_codes: + - j7elte steps: unlock_bootloader: flash_recovery: diff --git a/openandroidinstaller/assets/configs/kiev.yaml b/openandroidinstaller/assets/configs/kiev.yaml index 607a16a4..4961c85e 100644 --- a/openandroidinstaller/assets/configs/kiev.yaml +++ b/openandroidinstaller/assets/configs/kiev.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Motorola moto g 5G / one 5G ace - devicecode: kiev + device_name: Motorola moto g 5G / one 5G ace + device_code: kiev + supported_device_codes: + - kiev steps: unlock_bootloader: - type: call_button diff --git a/openandroidinstaller/assets/configs/kirin.yaml b/openandroidinstaller/assets/configs/kirin.yaml index 6418fbaf..fe5297a9 100644 --- a/openandroidinstaller/assets/configs/kirin.yaml +++ b/openandroidinstaller/assets/configs/kirin.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Sony Xperia 10 - devicecode: kirin + device_name: Sony Xperia 10 + device_code: kirin + supported_device_codes: + - kirin steps: unlock_bootloader: - type: confirm_button diff --git a/openandroidinstaller/assets/configs/mermaid.yaml b/openandroidinstaller/assets/configs/mermaid.yaml index 8a0861ef..9b9c699e 100644 --- a/openandroidinstaller/assets/configs/mermaid.yaml +++ b/openandroidinstaller/assets/configs/mermaid.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Sony Xperia 10 Plus - devicecode: mermaid + device_name: Sony Xperia 10 Plus + device_code: mermaid + supported_device_codes: + - mermaid steps: unlock_bootloader: - type: confirm_button diff --git a/openandroidinstaller/assets/configs/nairo.yaml b/openandroidinstaller/assets/configs/nairo.yaml index 968aafef..5217ea43 100644 --- a/openandroidinstaller/assets/configs/nairo.yaml +++ b/openandroidinstaller/assets/configs/nairo.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Motorola moto g 5G plus / one 5G - devicecode: nairo + device_name: Motorola moto g 5G plus / one 5G + device_code: nairo + supported_device_codes: + - nairo steps: unlock_bootloader: - type: call_button diff --git a/openandroidinstaller/assets/configs/ocean.yaml b/openandroidinstaller/assets/configs/ocean.yaml index 0d9dceee..8d56935a 100644 --- a/openandroidinstaller/assets/configs/ocean.yaml +++ b/openandroidinstaller/assets/configs/ocean.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Motorola Moto G7 power - devicecode: ocean + device_name: Motorola Moto G7 power + device_code: ocean + supported_device_codes: + - ocean steps: unlock_bootloader: - type: call_button diff --git a/openandroidinstaller/assets/configs/pioneer.yaml b/openandroidinstaller/assets/configs/pioneer.yaml index a5ea1fbc..a12c20ab 100644 --- a/openandroidinstaller/assets/configs/pioneer.yaml +++ b/openandroidinstaller/assets/configs/pioneer.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Sony Xperia XA2 - devicecode: pioneer + device_name: Sony Xperia XA2 + device_code: pioneer + supported_device_codes: + - pioneer requirements: android: 9 steps: diff --git a/openandroidinstaller/assets/configs/racer.yaml b/openandroidinstaller/assets/configs/racer.yaml index 50d888d8..5cd0b258 100644 --- a/openandroidinstaller/assets/configs/racer.yaml +++ b/openandroidinstaller/assets/configs/racer.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Motorola edge - devicecode: racer + device_name: Motorola edge + device_code: racer + supported_device_codes: + - racer steps: unlock_bootloader: - type: call_button diff --git a/openandroidinstaller/assets/configs/redfin.yaml b/openandroidinstaller/assets/configs/redfin.yaml index df12f3b4..7f0d022d 100644 --- a/openandroidinstaller/assets/configs/redfin.yaml +++ b/openandroidinstaller/assets/configs/redfin.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Pixel 5 - devicecode: redfin + device_name: Pixel 5 + device_code: redfin + supported_device_codes: + - redfin requirements: android: 12.1.0 steps: diff --git a/openandroidinstaller/assets/configs/s3ve3g.yaml b/openandroidinstaller/assets/configs/s3ve3g.yaml index c7c1d67d..b9b7db6a 100644 --- a/openandroidinstaller/assets/configs/s3ve3g.yaml +++ b/openandroidinstaller/assets/configs/s3ve3g.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S III Neo - devicecode: s3ve3g + device_name: Samsung Galaxy S III Neo + device_code: s3ve3g + supported_device_codes: + - s3ve3g steps: unlock_bootloader: flash_recovery: diff --git a/openandroidinstaller/assets/configs/starlte.yaml b/openandroidinstaller/assets/configs/starlte.yaml index 3b09a481..3d089885 100644 --- a/openandroidinstaller/assets/configs/starlte.yaml +++ b/openandroidinstaller/assets/configs/starlte.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S9 - devicecode: starlte + device_name: Samsung Galaxy S9 + device_code: starlte + supported_device_codes: + - starlte requirements: android: 10 steps: diff --git a/openandroidinstaller/assets/configs/sunfish.yaml b/openandroidinstaller/assets/configs/sunfish.yaml index b91a734d..eae4b3ea 100644 --- a/openandroidinstaller/assets/configs/sunfish.yaml +++ b/openandroidinstaller/assets/configs/sunfish.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Pixel 4a - devicecode: sunfish + device_name: Pixel 4a + device_code: sunfish + supported_device_codes: + - sunfish requirements: android: 12.1.0 steps: diff --git a/openandroidinstaller/assets/configs/taimen.yaml b/openandroidinstaller/assets/configs/taimen.yaml index 8bed3bbf..e860f22c 100644 --- a/openandroidinstaller/assets/configs/taimen.yaml +++ b/openandroidinstaller/assets/configs/taimen.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Google Pixel 2 XL - devicecode: taimen + device_name: Google Pixel 2 XL + device_code: taimen + supported_device_codes: + - taimen requirements: android: 11 steps: diff --git a/openandroidinstaller/assets/configs/walleye.yaml b/openandroidinstaller/assets/configs/walleye.yaml index 1daae392..695040f7 100644 --- a/openandroidinstaller/assets/configs/walleye.yaml +++ b/openandroidinstaller/assets/configs/walleye.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Google Pixel 2 - devicecode: walleye + device_name: Google Pixel 2 + device_code: walleye + supported_device_codes: + - walleye requirements: android: 11 steps: diff --git a/openandroidinstaller/assets/configs/z3.yaml b/openandroidinstaller/assets/configs/z3.yaml index e9f5c797..044cd23f 100644 --- a/openandroidinstaller/assets/configs/z3.yaml +++ b/openandroidinstaller/assets/configs/z3.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Sony Xperia Z3 - devicecode: z3 + device_name: Sony Xperia Z3 + device_code: z3 + supported_device_codes: + - z3 requirements: firmware: 23.5.A.1.291 steps: diff --git a/openandroidinstaller/assets/configs/zerofltexx.yaml b/openandroidinstaller/assets/configs/zerofltexx.yaml index ad084e4f..2aa7eccb 100644 --- a/openandroidinstaller/assets/configs/zerofltexx.yaml +++ b/openandroidinstaller/assets/configs/zerofltexx.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S6 - devicecode: zerofltexx + device_name: Samsung Galaxy S6 + device_code: zerofltexx + supported_device_codes: + - zerofltexx steps: unlock_bootloader: flash_recovery: diff --git a/openandroidinstaller/assets/configs/zeroltexx.yaml b/openandroidinstaller/assets/configs/zeroltexx.yaml index 0830241c..b4a8957b 100644 --- a/openandroidinstaller/assets/configs/zeroltexx.yaml +++ b/openandroidinstaller/assets/configs/zeroltexx.yaml @@ -1,7 +1,9 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S6 Edge - devicecode: zeroltexx + device_name: Samsung Galaxy S6 Edge + device_code: zeroltexx + supported_device_codes: + - zeroltexx steps: unlock_bootloader: flash_recovery: diff --git a/openandroidinstaller/installer_config.py b/openandroidinstaller/installer_config.py index 520616fc..38e053ac 100644 --- a/openandroidinstaller/installer_config.py +++ b/openandroidinstaller/installer_config.py @@ -14,7 +14,7 @@ # Author: Tobias Sterbak from pathlib import Path -from typing import List, Optional, Dict +from typing import List, Optional import schema import yaml @@ -49,7 +49,6 @@ def __init__( class InstallerConfig: - def __init__( self, unlock_bootloader: List[Step], @@ -102,8 +101,12 @@ def _find_config_file(device_code: str, config_path: Path) -> Optional[Path]: with open(path, "r", encoding="utf-8") as stream: try: raw_config = dict(yaml.safe_load(stream)) - if device_code in raw_config.get("metadata", dict()).get("supported_device_codes", []): - logger.info(f"Device code '{device_code}' is supported by config '{path}'.") + if device_code in raw_config.get("metadata", dict()).get( + "supported_device_codes", [] + ): + logger.info( + f"Device code '{device_code}' is supported by config '{path}'." + ) return path except: pass @@ -117,23 +120,22 @@ def _load_config(device_code: str, config_path: Path) -> Optional[InstallerConfi Try to load local file in the same directory as the executable first, then load from assets. """ custom_path = _find_config_file(device_code, config_path=Path.cwd()) - try: + if custom_path: config = InstallerConfig.from_file(custom_path) logger.info(f"Loaded custom device config from {custom_path}.") logger.info(f"Config metadata: {config.metadata}.") return config - except FileNotFoundError: + else: # if no localfile, then try to load a config file from assets path = _find_config_file(device_code, config_path) - # path = config_path.joinpath(Path(f"{mapped_device_code}.yaml")) - try: + if path: config = InstallerConfig.from_file(path) logger.info(f"Loaded device config from {path}.") if config: logger.info(f"Config metadata: {config.metadata}.") return config - except FileNotFoundError: + else: logger.info(f"No device config found for {path}.") return None diff --git a/openandroidinstaller/utils.py b/openandroidinstaller/utils.py index bc317041..ea34997f 100644 --- a/openandroidinstaller/utils.py +++ b/openandroidinstaller/utils.py @@ -39,9 +39,7 @@ def get_download_link(devicecode: str) -> Optional[str]: return None -def image_works_with_device( - supported_device_codes: List[str], image_path: str -) -> bool: +def image_works_with_device(supported_device_codes: List[str], image_path: str) -> bool: """Determine if an image works for the given device.""" with zipfile.ZipFile(image_path) as image_zip: with image_zip.open( diff --git a/openandroidinstaller/views/start_view.py b/openandroidinstaller/views/start_view.py index 57e4d3c5..0238a802 100644 --- a/openandroidinstaller/views/start_view.py +++ b/openandroidinstaller/views/start_view.py @@ -38,7 +38,6 @@ from app_state import AppState from widgets import get_title from tooling import search_device, check_ab_partition -from installer_config import InstallerConfig class StartView(BaseView): @@ -254,7 +253,9 @@ def search_devices(self, e): self.continue_button.disabled = False self.bootloader_switch.disabled = False # overwrite the text field with the real name from the config - self.device_name.value = f"{device_name} (code: {self.state.config.device_code})" + self.device_name.value = ( + f"{device_name} (code: {self.state.config.device_code})" + ) self.device_name.color = colors.GREEN else: # failed to load config diff --git a/tests/test_configs.py b/tests/test_configs.py index 2230e7d3..ccb6ec08 100644 --- a/tests/test_configs.py +++ b/tests/test_configs.py @@ -38,7 +38,7 @@ def test_load_config_valid(config_path): # assert some properties of the config assert config - assert config.metadata.get("devicecode") == "sargo" + assert config.metadata.get("device_code") == "sargo" def test_load_config_notfound(config_path): From 475cfa357c316f95467f871d3a896ecfad308ac3 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Thu, 23 Mar 2023 19:45:19 +0100 Subject: [PATCH 22/39] Revert "Put restart and finish buttons next to each other" This reverts commit 4222309a5d0bd8362d415f74883b3151e9041bd0. --- openandroidinstaller/views/success_view.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/openandroidinstaller/views/success_view.py b/openandroidinstaller/views/success_view.py index 38ade88d..fbc88464 100644 --- a/openandroidinstaller/views/success_view.py +++ b/openandroidinstaller/views/success_view.py @@ -68,6 +68,15 @@ def close_window(e): """, on_tap_link=lambda e: self.page.launch_url(e.data), ), + Row( + [ + ElevatedButton( + "Finish and close", + expand=True, + on_click=close_window, + ) + ] + ), Row( [ ElevatedButton( @@ -76,14 +85,8 @@ def close_window(e): icon=icons.RESTART_ALT, disabled=False, expand=True, - ), - ElevatedButton( - "Finish and close", - on_click=close_window, - icon=icons.EXIT_TO_APP_OUTLINED, - expand=True, ) ] - ) + ), ] return self.view From f24ed79a36c12d132e5ab007b44fd0ec9b569ef6 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Thu, 23 Mar 2023 19:45:52 +0100 Subject: [PATCH 23/39] Revert "Added restart button on final page" This reverts commit 13c3500fbc8822b823dce382f387f2d626768c08. --- openandroidinstaller/openandroidinstaller.py | 24 +++++--------------- openandroidinstaller/views/success_view.py | 21 +---------------- 2 files changed, 7 insertions(+), 38 deletions(-) diff --git a/openandroidinstaller/openandroidinstaller.py b/openandroidinstaller/openandroidinstaller.py index bc239841..6c1aa578 100644 --- a/openandroidinstaller/openandroidinstaller.py +++ b/openandroidinstaller/openandroidinstaller.py @@ -76,7 +76,7 @@ def __init__(self, state: AppState): self.view = Column(expand=True, width=1200) # create default starter views - self.welcome_view = WelcomeView( + welcome_view = WelcomeView( on_confirm=self.to_next_view, state=self.state, ) @@ -103,10 +103,7 @@ def __init__(self, state: AppState): ) # create the final success view - self.success_view = SuccessView( - on_confirm=self.restart, - state=self.state, - ) + self.final_view = SuccessView(state=self.state) # initialize the addon view self.select_addon_view = AddonsView( @@ -123,7 +120,7 @@ def __init__(self, state: AppState): select_files_view, requirements_view, start_view, - self.welcome_view, + welcome_view, ] ) self.state.add_addon_views( @@ -135,7 +132,7 @@ def __init__(self, state: AppState): # final default views, ordered to allow to pop self.state.add_final_default_views( views=[ - self.success_view, + self.final_view, self.install_view, ] ) @@ -181,19 +178,10 @@ def to_next_view(self, e): # else: # # display the final view - # self.view.controls.append(self.success_view) + # self.view.controls.append(self.final_view) logger.info("Confirmed and moved to next step.") self.view.update() - - def restart(self, e): - """Method to display the first view.""" - self.welcome_view.init_visuals() - # clear the current view - self.view.controls = [] - # retrieve the new view and update - self.view.controls.append(self.welcome_view) - logger.info("Restart.") - self.view.update() + def configure(page: Page): """Configure the application.""" diff --git a/openandroidinstaller/views/success_view.py b/openandroidinstaller/views/success_view.py index fbc88464..e7f84bf6 100644 --- a/openandroidinstaller/views/success_view.py +++ b/openandroidinstaller/views/success_view.py @@ -13,8 +13,6 @@ # If not, see .""" # Author: Tobias Sterbak -from typing import Callable - import webbrowser from loguru import logger from flet import ( @@ -22,7 +20,6 @@ Row, Text, Markdown, - icons, ) from views import BaseView @@ -31,13 +28,8 @@ class SuccessView(BaseView): - def __init__( - self, - state: AppState, - on_confirm: Callable, - ): + def __init__(self, state: AppState): super().__init__(state=state, image="success.png") - self.on_confirm = on_confirm def build( self, @@ -77,16 +69,5 @@ def close_window(e): ) ] ), - Row( - [ - ElevatedButton( - "Flash new device", - on_click=self.on_confirm, - icon=icons.RESTART_ALT, - disabled=False, - expand=True, - ) - ] - ), ] return self.view From faf315f709706a41512b8c27e1b2f49708a61c8e Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Fri, 24 Mar 2023 17:31:45 +0000 Subject: [PATCH 24/39] 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, From 436e4a384544f44c831bf0f1f22fe6d4f940837c Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Fri, 24 Mar 2023 17:35:46 +0000 Subject: [PATCH 25/39] Bump version --- openandroidinstaller/openandroidinstaller.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openandroidinstaller/openandroidinstaller.py b/openandroidinstaller/openandroidinstaller.py index 6c1aa578..a04bea42 100644 --- a/openandroidinstaller/openandroidinstaller.py +++ b/openandroidinstaller/openandroidinstaller.py @@ -57,7 +57,7 @@ logger.add("openandroidinstaller.log") # VERSION number -VERSION = "0.4.1-beta" +VERSION = "0.4.2-beta" # detect platform PLATFORM = sys.platform diff --git a/pyproject.toml b/pyproject.toml index e3b7166a..1dc3d9dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "openandroidinstaller" -version = "0.4.1-beta" +version = "0.4.2-beta" description = "Install lineage OS in a nice and easy way." authors = ["Tobias Sterbak "] license = "GPLv3" From b12f23969beb3a5e622c9a85507510ce8bada1f0 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Fri, 24 Mar 2023 19:05:20 +0100 Subject: [PATCH 26/39] Removed extra reboot step --- openandroidinstaller/assets/configs/avicii.yaml | 11 +++-------- openandroidinstaller/assets/configs/cheeseburger.yaml | 11 +++-------- openandroidinstaller/assets/configs/dre.yaml | 11 +++-------- openandroidinstaller/assets/configs/dumpling.yaml | 11 +++-------- openandroidinstaller/assets/configs/enchilada.yaml | 11 +++-------- openandroidinstaller/assets/configs/fajita.yaml | 11 +++-------- openandroidinstaller/assets/configs/guacamole.yaml | 11 +++-------- openandroidinstaller/assets/configs/guacamoleb.yaml | 11 +++-------- openandroidinstaller/assets/configs/hotdog.yaml | 11 +++-------- openandroidinstaller/assets/configs/hotdogb.yaml | 11 +++-------- 10 files changed, 30 insertions(+), 80 deletions(-) diff --git a/openandroidinstaller/assets/configs/avicii.yaml b/openandroidinstaller/assets/configs/avicii.yaml index 7e2e2cae..5e8443b2 100644 --- a/openandroidinstaller/assets/configs/avicii.yaml +++ b/openandroidinstaller/assets/configs/avicii.yaml @@ -16,15 +16,10 @@ steps: 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. Once it's done, press continue here. - command: fastboot_oem_unlock - - type: confirm_button content: > - At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader. - Please take whatever actions the device asks you to to proceed. - - type: call_button - content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue. - command: fastboot_reboot + 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. + 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. boot_recovery: diff --git a/openandroidinstaller/assets/configs/cheeseburger.yaml b/openandroidinstaller/assets/configs/cheeseburger.yaml index 832ea06f..a04fd467 100644 --- a/openandroidinstaller/assets/configs/cheeseburger.yaml +++ b/openandroidinstaller/assets/configs/cheeseburger.yaml @@ -15,15 +15,10 @@ steps: 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. Once it's done, press continue here. - command: fastboot_oem_unlock - - type: confirm_button content: > - At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader. - Please take whatever actions the device asks you to to proceed. - - type: call_button - content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue. - command: fastboot_reboot + 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. + 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. boot_recovery: diff --git a/openandroidinstaller/assets/configs/dre.yaml b/openandroidinstaller/assets/configs/dre.yaml index fa04addf..528035ce 100644 --- a/openandroidinstaller/assets/configs/dre.yaml +++ b/openandroidinstaller/assets/configs/dre.yaml @@ -16,15 +16,10 @@ steps: 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. Once it's done, press continue here. - command: fastboot_oem_unlock - - type: confirm_button content: > - At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader. - Please take whatever actions the device asks you to to proceed. - - type: call_button - content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue. - command: fastboot_reboot + 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. + 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. boot_recovery: diff --git a/openandroidinstaller/assets/configs/dumpling.yaml b/openandroidinstaller/assets/configs/dumpling.yaml index 329280cf..684f8a62 100644 --- a/openandroidinstaller/assets/configs/dumpling.yaml +++ b/openandroidinstaller/assets/configs/dumpling.yaml @@ -15,15 +15,10 @@ steps: 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. Once it's done, press continue here. - command: fastboot_oem_unlock - - type: confirm_button content: > - At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader. - Please take whatever actions the device asks you to to proceed. - - type: call_button - content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue. - command: fastboot_reboot + 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. + 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. boot_recovery: diff --git a/openandroidinstaller/assets/configs/enchilada.yaml b/openandroidinstaller/assets/configs/enchilada.yaml index 5456fd84..63ae03c3 100644 --- a/openandroidinstaller/assets/configs/enchilada.yaml +++ b/openandroidinstaller/assets/configs/enchilada.yaml @@ -16,15 +16,10 @@ steps: 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. Once it's done, press continue here. - command: fastboot_oem_unlock - - type: confirm_button content: > - At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader. - Please take whatever actions the device asks you to to proceed. - - type: call_button - content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue. - command: fastboot_reboot + 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. + 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. boot_recovery: diff --git a/openandroidinstaller/assets/configs/fajita.yaml b/openandroidinstaller/assets/configs/fajita.yaml index 9eb558d6..bf40e645 100644 --- a/openandroidinstaller/assets/configs/fajita.yaml +++ b/openandroidinstaller/assets/configs/fajita.yaml @@ -16,15 +16,10 @@ steps: 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. Once it's done, press continue here. - command: fastboot_oem_unlock - - type: confirm_button content: > - At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader. - Please take whatever actions the device asks you to to proceed. - - type: call_button - content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue. - command: fastboot_reboot + 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. + 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. boot_recovery: diff --git a/openandroidinstaller/assets/configs/guacamole.yaml b/openandroidinstaller/assets/configs/guacamole.yaml index e6f54988..cafa1880 100644 --- a/openandroidinstaller/assets/configs/guacamole.yaml +++ b/openandroidinstaller/assets/configs/guacamole.yaml @@ -16,15 +16,10 @@ steps: 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. Once it's done, press continue here. - command: fastboot_oem_unlock - - type: confirm_button content: > - At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader. - Please take whatever actions the device asks you to to proceed. - - type: call_button - content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue. - command: fastboot_reboot + 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. + 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. boot_recovery: diff --git a/openandroidinstaller/assets/configs/guacamoleb.yaml b/openandroidinstaller/assets/configs/guacamoleb.yaml index 28c93690..5035a23a 100644 --- a/openandroidinstaller/assets/configs/guacamoleb.yaml +++ b/openandroidinstaller/assets/configs/guacamoleb.yaml @@ -16,15 +16,10 @@ steps: 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. Once it's done, press continue here. - command: fastboot_oem_unlock - - type: confirm_button content: > - At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader. - Please take whatever actions the device asks you to to proceed. - - type: call_button - content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue. - command: fastboot_reboot + 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. + 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. boot_recovery: diff --git a/openandroidinstaller/assets/configs/hotdog.yaml b/openandroidinstaller/assets/configs/hotdog.yaml index cbe7c5bf..a7b652a5 100644 --- a/openandroidinstaller/assets/configs/hotdog.yaml +++ b/openandroidinstaller/assets/configs/hotdog.yaml @@ -16,15 +16,10 @@ steps: 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. Once it's done, press continue here. - command: fastboot_oem_unlock - - type: confirm_button content: > - At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader. - Please take whatever actions the device asks you to to proceed. - - type: call_button - content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue. - command: fastboot_reboot + 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. + 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. boot_recovery: diff --git a/openandroidinstaller/assets/configs/hotdogb.yaml b/openandroidinstaller/assets/configs/hotdogb.yaml index 555b5c0a..ca2bdeda 100644 --- a/openandroidinstaller/assets/configs/hotdogb.yaml +++ b/openandroidinstaller/assets/configs/hotdogb.yaml @@ -16,15 +16,10 @@ steps: 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. Once it's done, press continue here. - command: fastboot_oem_unlock - - type: confirm_button content: > - At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader. - Please take whatever actions the device asks you to to proceed. - - type: call_button - content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue. - command: fastboot_reboot + 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. + 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. boot_recovery: From 69f73dd839751e0fe33b09ba105a13eca4814a28 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Fri, 24 Mar 2023 19:06:20 +0100 Subject: [PATCH 27/39] Code formatting --- openandroidinstaller/assets/configs/avicii.yaml | 12 +++++++----- .../assets/configs/cheeseburger.yaml | 6 ++++-- openandroidinstaller/assets/configs/dre.yaml | 12 +++++++----- openandroidinstaller/assets/configs/dumpling.yaml | 6 ++++-- openandroidinstaller/assets/configs/enchilada.yaml | 12 +++++++----- openandroidinstaller/assets/configs/fajita.yaml | 12 +++++++----- openandroidinstaller/assets/configs/guacamole.yaml | 6 ++++-- openandroidinstaller/assets/configs/guacamoleb.yaml | 6 ++++-- openandroidinstaller/assets/configs/hotdog.yaml | 6 ++++-- openandroidinstaller/assets/configs/hotdogb.yaml | 6 ++++-- 10 files changed, 52 insertions(+), 32 deletions(-) diff --git a/openandroidinstaller/assets/configs/avicii.yaml b/openandroidinstaller/assets/configs/avicii.yaml index 5e8443b2..f9008bcb 100644 --- a/openandroidinstaller/assets/configs/avicii.yaml +++ b/openandroidinstaller/assets/configs/avicii.yaml @@ -21,7 +21,8 @@ steps: Once it's done, press continue here. 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. + content: > + The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. boot_recovery: - type: call_button content: > @@ -30,14 +31,15 @@ steps: 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. + content: > + Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_boot_recovery - type: call_button - command: adb_twrp_copy_partitions 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. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. + command: adb_twrp_copy_partitions - type: call_button - command: fastboot_boot_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file + Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. + command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/cheeseburger.yaml b/openandroidinstaller/assets/configs/cheeseburger.yaml index a04fd467..f24ce440 100644 --- a/openandroidinstaller/assets/configs/cheeseburger.yaml +++ b/openandroidinstaller/assets/configs/cheeseburger.yaml @@ -20,7 +20,8 @@ steps: Once it's done, press continue here. 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. + content: > + The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. boot_recovery: - type: call_button content: > @@ -29,5 +30,6 @@ steps: 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. + 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/dre.yaml b/openandroidinstaller/assets/configs/dre.yaml index 528035ce..ffefc560 100644 --- a/openandroidinstaller/assets/configs/dre.yaml +++ b/openandroidinstaller/assets/configs/dre.yaml @@ -21,7 +21,8 @@ steps: Once it's done, press continue here. 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. + content: > + The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. boot_recovery: - type: call_button content: > @@ -30,14 +31,15 @@ steps: 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. + content: > + Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_boot_recovery - type: call_button - command: adb_twrp_copy_partitions 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. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. + command: adb_twrp_copy_partitions - type: call_button - command: fastboot_boot_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file + Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. + command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/dumpling.yaml b/openandroidinstaller/assets/configs/dumpling.yaml index 684f8a62..289ef905 100644 --- a/openandroidinstaller/assets/configs/dumpling.yaml +++ b/openandroidinstaller/assets/configs/dumpling.yaml @@ -20,7 +20,8 @@ steps: Once it's done, press continue here. 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. + content: > + The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. boot_recovery: - type: call_button content: > @@ -29,5 +30,6 @@ steps: 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. + 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/enchilada.yaml b/openandroidinstaller/assets/configs/enchilada.yaml index 63ae03c3..ad8de76f 100644 --- a/openandroidinstaller/assets/configs/enchilada.yaml +++ b/openandroidinstaller/assets/configs/enchilada.yaml @@ -21,7 +21,8 @@ steps: Once it's done, press continue here. 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. + content: > + The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. boot_recovery: - type: call_button content: > @@ -30,14 +31,15 @@ steps: 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. + content: > + Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_boot_recovery - type: call_button - command: adb_twrp_copy_partitions 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. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. + command: adb_twrp_copy_partitions - type: call_button - command: fastboot_boot_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file + Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. + command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/fajita.yaml b/openandroidinstaller/assets/configs/fajita.yaml index bf40e645..146b8faa 100644 --- a/openandroidinstaller/assets/configs/fajita.yaml +++ b/openandroidinstaller/assets/configs/fajita.yaml @@ -21,7 +21,8 @@ steps: Once it's done, press continue here. 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. + content: > + The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. boot_recovery: - type: call_button content: > @@ -30,14 +31,15 @@ steps: 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. + content: > + Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_boot_recovery - type: call_button - command: adb_twrp_copy_partitions 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. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. + command: adb_twrp_copy_partitions - type: call_button - command: fastboot_boot_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file + Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. + command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/guacamole.yaml b/openandroidinstaller/assets/configs/guacamole.yaml index cafa1880..15735b45 100644 --- a/openandroidinstaller/assets/configs/guacamole.yaml +++ b/openandroidinstaller/assets/configs/guacamole.yaml @@ -21,7 +21,8 @@ steps: Once it's done, press continue here. 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. + content: > + The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. boot_recovery: - type: call_button content: > @@ -30,5 +31,6 @@ steps: 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. + 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/guacamoleb.yaml b/openandroidinstaller/assets/configs/guacamoleb.yaml index 5035a23a..83b93a50 100644 --- a/openandroidinstaller/assets/configs/guacamoleb.yaml +++ b/openandroidinstaller/assets/configs/guacamoleb.yaml @@ -21,7 +21,8 @@ steps: Once it's done, press continue here. 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. + content: > + The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. boot_recovery: - type: call_button content: > @@ -30,5 +31,6 @@ steps: 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. + 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/hotdog.yaml b/openandroidinstaller/assets/configs/hotdog.yaml index a7b652a5..bbf5e103 100644 --- a/openandroidinstaller/assets/configs/hotdog.yaml +++ b/openandroidinstaller/assets/configs/hotdog.yaml @@ -21,7 +21,8 @@ steps: Once it's done, press continue here. 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. + content: > + The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. boot_recovery: - type: call_button content: > @@ -30,5 +31,6 @@ steps: 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. + 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/hotdogb.yaml b/openandroidinstaller/assets/configs/hotdogb.yaml index ca2bdeda..2d55d948 100644 --- a/openandroidinstaller/assets/configs/hotdogb.yaml +++ b/openandroidinstaller/assets/configs/hotdogb.yaml @@ -21,7 +21,8 @@ steps: Once it's done, press continue here. 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. + content: > + The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue. boot_recovery: - type: call_button content: > @@ -30,5 +31,6 @@ steps: 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. + 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 From 1ca341bed17dd092a728c17f2816b7c6facf0542 Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Fri, 24 Mar 2023 18:50:22 +0000 Subject: [PATCH 28/39] minor fixes --- openandroidinstaller/assets/configs/FP4.yaml | 2 +- openandroidinstaller/assets/configs/starlte.yaml | 2 +- openandroidinstaller/tooling.py | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/openandroidinstaller/assets/configs/FP4.yaml b/openandroidinstaller/assets/configs/FP4.yaml index fafeb33a..ebf59f4f 100644 --- a/openandroidinstaller/assets/configs/FP4.yaml +++ b/openandroidinstaller/assets/configs/FP4.yaml @@ -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: > diff --git a/openandroidinstaller/assets/configs/starlte.yaml b/openandroidinstaller/assets/configs/starlte.yaml index d3caa9e0..71c6f7f2 100644 --- a/openandroidinstaller/assets/configs/starlte.yaml +++ b/openandroidinstaller/assets/configs/starlte.yaml @@ -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: > diff --git a/openandroidinstaller/tooling.py b/openandroidinstaller/tooling.py index ecd98115..097c35e6 100644 --- a/openandroidinstaller/tooling.py +++ b/openandroidinstaller/tooling.py @@ -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 @@ -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( @@ -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: @@ -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]: From c800eb422a86aae7277d3310071a3ef52a9b6407 Mon Sep 17 00:00:00 2001 From: MagicLike Date: Fri, 24 Mar 2023 20:02:30 +0100 Subject: [PATCH 29/39] Fix device code issue fixes https://github.com/openandroidinstaller-dev/openandroidinstaller/issues/81 --- openandroidinstaller/assets/configs/zeroltexx.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/openandroidinstaller/assets/configs/zeroltexx.yaml b/openandroidinstaller/assets/configs/zeroltexx.yaml index b33e2e96..f2a080e9 100644 --- a/openandroidinstaller/assets/configs/zeroltexx.yaml +++ b/openandroidinstaller/assets/configs/zeroltexx.yaml @@ -4,6 +4,7 @@ metadata: device_code: zeroltexx supported_device_codes: - zeroltexx + - zerolte steps: unlock_bootloader: boot_recovery: From 41825e9a2c051cf8fabe7e768ea40603738c091e Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Fri, 24 Mar 2023 19:04:58 +0000 Subject: [PATCH 30/39] Update android version requirement for avicii --- openandroidinstaller/assets/configs/avicii.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openandroidinstaller/assets/configs/avicii.yaml b/openandroidinstaller/assets/configs/avicii.yaml index 7e2e2cae..7a828956 100644 --- a/openandroidinstaller/assets/configs/avicii.yaml +++ b/openandroidinstaller/assets/configs/avicii.yaml @@ -6,7 +6,7 @@ metadata: - avicii - Nord requirements: - android: 10 + android: 12 steps: unlock_bootloader: - type: call_button From 2df4a66377b2889efb81994a1d8ff87ffbd2991d Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Mon, 27 Mar 2023 11:09:21 +0200 Subject: [PATCH 31/39] Replace detect_is_ab_device by field in the config --- openandroidinstaller/app_state.py | 1 - .../assets/configs/sargo.yaml | 3 +- openandroidinstaller/installer_config.py | 2 + openandroidinstaller/tooling.py | 40 ----------------- .../views/install_addons_view.py | 2 +- openandroidinstaller/views/install_view.py | 2 +- openandroidinstaller/views/start_view.py | 4 +- openandroidinstaller/views/step_view.py | 2 +- tests/test_tooling.py | 43 +------------------ 9 files changed, 9 insertions(+), 90 deletions(-) diff --git a/openandroidinstaller/app_state.py b/openandroidinstaller/app_state.py index 40fb427d..49f69155 100644 --- a/openandroidinstaller/app_state.py +++ b/openandroidinstaller/app_state.py @@ -43,7 +43,6 @@ def __init__( self.config = None self.image_path = None self.recovery_path = None - self.is_ab = None # store views self.default_views: List = [] diff --git a/openandroidinstaller/assets/configs/sargo.yaml b/openandroidinstaller/assets/configs/sargo.yaml index af1b6da4..68ada457 100644 --- a/openandroidinstaller/assets/configs/sargo.yaml +++ b/openandroidinstaller/assets/configs/sargo.yaml @@ -1,7 +1,8 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Pixel 3a - device_code: sargo + is_ab_device: true + device_code: sargo supported_device_codes: - sargo requirements: diff --git a/openandroidinstaller/installer_config.py b/openandroidinstaller/installer_config.py index 0707423b..70ca5a01 100644 --- a/openandroidinstaller/installer_config.py +++ b/openandroidinstaller/installer_config.py @@ -61,6 +61,7 @@ def __init__( self.metadata = metadata self.requirements = requirements self.device_code = metadata.get("device_code") + self.is_ab = metadata.get("is_ab_device", False) self.supported_device_codes = metadata.get("supported_device_codes") self.twrp_link = metadata.get("twrp-link") @@ -161,6 +162,7 @@ def validate_config(config: str) -> bool: "metadata": { "maintainer": str, "device_name": str, + "is_ab_device": bool, "device_code": str, "supported_device_codes": [str], schema.Optional("twrp-link"): str, diff --git a/openandroidinstaller/tooling.py b/openandroidinstaller/tooling.py index 097c35e6..c8b95dfd 100644 --- a/openandroidinstaller/tooling.py +++ b/openandroidinstaller/tooling.py @@ -468,43 +468,3 @@ def search_device(platform: str, bin_path: Path) -> Optional[str]: except CalledProcessError: logger.error("Failed to detect a device.") return None - - -def check_ab_partition(platform: str, bin_path: Path) -> Optional[bool]: - """Figure out, if its an a/b-partitioned device.""" - logger.info(f"Run on {platform} with {bin_path}...") - try: - # check if ab device - if platform in ("linux", "darwin"): - output = check_output( - [ - str(bin_path.joinpath(Path("adb"))), - "shell", - "getprop", - "|", - "grep", - "ro.boot.slot_suffix", - ], - stderr=STDOUT, - ).decode() - elif platform in ("windows", "win32"): - output = check_output( - [ - str(bin_path.joinpath(Path("adb.exe"))), - "shell", - "getprop", - "|", - "findstr", - "ro.boot.slot_suffix", - ], - stderr=STDOUT, - shell=True, - ).decode() - else: - raise Exception(f"Unknown platform {platform}.") - logger.info(output) - logger.info("This is an a/b-partitioned device.") - return True - except CalledProcessError: - logger.info("This is not an a/b-partitioned device.") - return False diff --git a/openandroidinstaller/views/install_addons_view.py b/openandroidinstaller/views/install_addons_view.py index 7bb71e42..64560fd1 100644 --- a/openandroidinstaller/views/install_addons_view.py +++ b/openandroidinstaller/views/install_addons_view.py @@ -158,7 +158,7 @@ def run_install_addons(self, e): for line in adb_twrp_install_addons( addons=self.state.addon_paths, bin_path=self.state.bin_path, - is_ab=self.state.is_ab, + is_ab=self.state.config.is_ab, ): # write the line to advanced output terminal self.terminal_box.write_line(line) diff --git a/openandroidinstaller/views/install_view.py b/openandroidinstaller/views/install_view.py index 29283fab..22c0372d 100644 --- a/openandroidinstaller/views/install_view.py +++ b/openandroidinstaller/views/install_view.py @@ -189,7 +189,7 @@ def run_install(self, e): config_path=self.state.config_path, bin_path=self.state.bin_path, install_addons=self.state.install_addons, - is_ab=self.state.is_ab, + is_ab=self.state.config.is_ab, recovery=self.state.recovery_path, ): # write the line to advanced output terminal diff --git a/openandroidinstaller/views/start_view.py b/openandroidinstaller/views/start_view.py index abf64064..65bf8f52 100644 --- a/openandroidinstaller/views/start_view.py +++ b/openandroidinstaller/views/start_view.py @@ -213,7 +213,7 @@ def search_devices(self, e): # search the device if self.state.test: # this only happens for testing - device_code, is_ab = self.state.test_config, True + device_code = self.state.test_config logger.info( f"Running search in development mode and loading config {device_code}.yaml." ) @@ -239,8 +239,6 @@ def search_devices(self, e): self.device_name.value = device_code # load config from file self.state.load_config(device_code) - # write ab-info to state - self.state.is_ab = is_ab if self.state.config: device_name = self.state.config.metadata.get( "device_name", "No device name in config." diff --git a/openandroidinstaller/views/step_view.py b/openandroidinstaller/views/step_view.py index eb484eb3..597d069a 100644 --- a/openandroidinstaller/views/step_view.py +++ b/openandroidinstaller/views/step_view.py @@ -220,7 +220,7 @@ def call_to_phone(self, e, command: str): "fastboot_boot_recovery": partial( fastboot_boot_recovery, recovery=self.state.recovery_path, - is_ab=self.state.is_ab, + is_ab=self.state.config.is_ab, ), "fastboot_flash_boot": partial( fastboot_flash_boot, diff --git a/tests/test_tooling.py b/tests/test_tooling.py index c66f6e97..6e666c1e 100644 --- a/tests/test_tooling.py +++ b/tests/test_tooling.py @@ -19,7 +19,6 @@ from openandroidinstaller.tooling import ( adb_reboot, search_device, - check_ab_partition, ) @@ -95,44 +94,4 @@ def patched_check_output(*args, **kwargs): platform="linux", bin_path=Path("openandroidinstaller/bin/") ) - assert device_code == None - - -def test_check_ab_device_is_ab(mocker): - """Test if checking for ab device works fine.""" - mocker.patch( - "openandroidinstaller.tooling.check_output", - return_value=b"[ro.boot.slot_suffix]: [_b]", - ) - - # test linux - is_ab = check_ab_partition( - platform="linux", bin_path=Path("openandroidinstaller/bin/") - ) - - assert is_ab - - # test windows - is_ab = check_ab_partition( - platform="windows", bin_path=Path("openandroidinstaller/bin/") - ) - - assert is_ab - - -def test_check_ab_device_not_ab(mocker): - """Test if checking for ab device returns False if it fails.""" - - def patched_check_output(*args, **kwargs): - raise CalledProcessError(returncode=1, cmd="output is None") - - mocker.patch( - "openandroidinstaller.tooling.check_output", - patched_check_output, - ) - - is_ab = check_ab_partition( - platform="linux", bin_path=Path("openandroidinstaller/bin/") - ) - - assert not is_ab + assert device_code == None \ No newline at end of file From 523b9c74425257f0d99384a5f56db66e25c4d0af Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Mon, 27 Mar 2023 11:13:43 +0200 Subject: [PATCH 32/39] Update configs accordinly --- openandroidinstaller/assets/configs/FP2.yaml | 1 + openandroidinstaller/assets/configs/FP3.yaml | 1 + openandroidinstaller/assets/configs/FP4.yaml | 1 + openandroidinstaller/assets/configs/a3y17lte.yaml | 1 + openandroidinstaller/assets/configs/a5xelte.yaml | 1 + openandroidinstaller/assets/configs/a72q.yaml | 1 + openandroidinstaller/assets/configs/a7xelte.yaml | 1 + openandroidinstaller/assets/configs/akari.yaml | 1 + openandroidinstaller/assets/configs/akatsuki.yaml | 1 + openandroidinstaller/assets/configs/avicii.yaml | 1 + openandroidinstaller/assets/configs/bacon.yaml | 1 + openandroidinstaller/assets/configs/barbet.yaml | 1 + openandroidinstaller/assets/configs/beyond0lte.yaml | 1 + openandroidinstaller/assets/configs/beyond1lte.yaml | 1 + openandroidinstaller/assets/configs/beyond2lte.yaml | 1 + openandroidinstaller/assets/configs/blueline.yaml | 1 + openandroidinstaller/assets/configs/bonito.yaml | 1 + openandroidinstaller/assets/configs/cedric.yaml | 1 + openandroidinstaller/assets/configs/cheeseburger.yaml | 1 + openandroidinstaller/assets/configs/coral.yaml | 1 + openandroidinstaller/assets/configs/crosshatch.yaml | 1 + openandroidinstaller/assets/configs/crownlte.yaml | 1 + openandroidinstaller/assets/configs/d1.yaml | 1 + openandroidinstaller/assets/configs/d2s.yaml | 1 + openandroidinstaller/assets/configs/dre.yaml | 1 + openandroidinstaller/assets/configs/dumpling.yaml | 1 + openandroidinstaller/assets/configs/enchilada.yaml | 1 + openandroidinstaller/assets/configs/evert.yaml | 1 + openandroidinstaller/assets/configs/fajita.yaml | 1 + openandroidinstaller/assets/configs/flame.yaml | 1 + openandroidinstaller/assets/configs/greatlte.yaml | 1 + openandroidinstaller/assets/configs/griffin.yaml | 1 + openandroidinstaller/assets/configs/guacamole.yaml | 1 + openandroidinstaller/assets/configs/guacamoleb.yaml | 1 + openandroidinstaller/assets/configs/hero2lte.yaml | 1 + openandroidinstaller/assets/configs/herolte.yaml | 1 + openandroidinstaller/assets/configs/hltetmo.yaml | 1 + openandroidinstaller/assets/configs/hotdog.yaml | 1 + openandroidinstaller/assets/configs/hotdogb.yaml | 1 + openandroidinstaller/assets/configs/j7elte.yaml | 1 + openandroidinstaller/assets/configs/kiev.yaml | 1 + openandroidinstaller/assets/configs/kirin.yaml | 1 + openandroidinstaller/assets/configs/mermaid.yaml | 1 + openandroidinstaller/assets/configs/nairo.yaml | 1 + openandroidinstaller/assets/configs/ocean.yaml | 1 + openandroidinstaller/assets/configs/pioneer.yaml | 1 + openandroidinstaller/assets/configs/racer.yaml | 1 + openandroidinstaller/assets/configs/redfin.yaml | 1 + openandroidinstaller/assets/configs/s3ve3g.yaml | 1 + openandroidinstaller/assets/configs/starlte.yaml | 1 + openandroidinstaller/assets/configs/sunfish.yaml | 1 + openandroidinstaller/assets/configs/taimen.yaml | 1 + openandroidinstaller/assets/configs/walleye.yaml | 1 + openandroidinstaller/assets/configs/yuga.yaml | 1 + openandroidinstaller/assets/configs/z3.yaml | 1 + openandroidinstaller/assets/configs/zerofltexx.yaml | 1 + openandroidinstaller/assets/configs/zeroltexx.yaml | 1 + openandroidinstaller/views/start_view.py | 5 +---- tests/test_tooling.py | 2 +- 59 files changed, 59 insertions(+), 5 deletions(-) diff --git a/openandroidinstaller/assets/configs/FP2.yaml b/openandroidinstaller/assets/configs/FP2.yaml index c00c70dc..55588617 100644 --- a/openandroidinstaller/assets/configs/FP2.yaml +++ b/openandroidinstaller/assets/configs/FP2.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Fairphone 2 + is_ab_device: true device_code: FP2 supported_device_codes: - FP2 diff --git a/openandroidinstaller/assets/configs/FP3.yaml b/openandroidinstaller/assets/configs/FP3.yaml index 19bdb5a5..b6b775d0 100644 --- a/openandroidinstaller/assets/configs/FP3.yaml +++ b/openandroidinstaller/assets/configs/FP3.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Fairphone 3 + is_ab_device: true device_code: FP3 supported_device_codes: - FP3 diff --git a/openandroidinstaller/assets/configs/FP4.yaml b/openandroidinstaller/assets/configs/FP4.yaml index ebf59f4f..7fdc1fd1 100644 --- a/openandroidinstaller/assets/configs/FP4.yaml +++ b/openandroidinstaller/assets/configs/FP4.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Fairphone 4 + is_ab_device: true device_code: FP4 supported_device_codes: - FP4 diff --git a/openandroidinstaller/assets/configs/a3y17lte.yaml b/openandroidinstaller/assets/configs/a3y17lte.yaml index e0ec7461..5e6f8d83 100644 --- a/openandroidinstaller/assets/configs/a3y17lte.yaml +++ b/openandroidinstaller/assets/configs/a3y17lte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy A3 (2017) + is_ab_device: true device_code: a3y17lte supported_device_codes: - a3y17lte diff --git a/openandroidinstaller/assets/configs/a5xelte.yaml b/openandroidinstaller/assets/configs/a5xelte.yaml index 06b0769c..c9dc541f 100644 --- a/openandroidinstaller/assets/configs/a5xelte.yaml +++ b/openandroidinstaller/assets/configs/a5xelte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy A5 (2016) + is_ab_device: true device_code: a5xelte supported_device_codes: - a5xelte diff --git a/openandroidinstaller/assets/configs/a72q.yaml b/openandroidinstaller/assets/configs/a72q.yaml index 87721275..4b663e48 100644 --- a/openandroidinstaller/assets/configs/a72q.yaml +++ b/openandroidinstaller/assets/configs/a72q.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy A72 + is_ab_device: true device_code: a72q supported_device_codes: - a72q diff --git a/openandroidinstaller/assets/configs/a7xelte.yaml b/openandroidinstaller/assets/configs/a7xelte.yaml index 856ba6b6..8d1d9c8c 100644 --- a/openandroidinstaller/assets/configs/a7xelte.yaml +++ b/openandroidinstaller/assets/configs/a7xelte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy A7 (2016) + is_ab_device: true device_code: a7xelte supported_device_codes: - a7xelte diff --git a/openandroidinstaller/assets/configs/akari.yaml b/openandroidinstaller/assets/configs/akari.yaml index e5bf40d6..20b7ed8d 100644 --- a/openandroidinstaller/assets/configs/akari.yaml +++ b/openandroidinstaller/assets/configs/akari.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia XZ2 + is_ab_device: true device_code: akari supported_device_codes: - akari diff --git a/openandroidinstaller/assets/configs/akatsuki.yaml b/openandroidinstaller/assets/configs/akatsuki.yaml index bc825a25..41b8e7bf 100644 --- a/openandroidinstaller/assets/configs/akatsuki.yaml +++ b/openandroidinstaller/assets/configs/akatsuki.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia XZ3 + is_ab_device: true device_code: akatsuki supported_device_codes: - akatsuki diff --git a/openandroidinstaller/assets/configs/avicii.yaml b/openandroidinstaller/assets/configs/avicii.yaml index 7a828956..a548cfd6 100644 --- a/openandroidinstaller/assets/configs/avicii.yaml +++ b/openandroidinstaller/assets/configs/avicii.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus Nord + is_ab_device: true device_code: avicii supported_device_codes: - avicii diff --git a/openandroidinstaller/assets/configs/bacon.yaml b/openandroidinstaller/assets/configs/bacon.yaml index d1739cfe..fb251e99 100644 --- a/openandroidinstaller/assets/configs/bacon.yaml +++ b/openandroidinstaller/assets/configs/bacon.yaml @@ -1,6 +1,7 @@ metadata: maintainer: MagicLike device_name: OnePlus One + is_ab_device: true device_code: bacon supported_device_codes: - bacon diff --git a/openandroidinstaller/assets/configs/barbet.yaml b/openandroidinstaller/assets/configs/barbet.yaml index cef8f74a..00c14fb5 100644 --- a/openandroidinstaller/assets/configs/barbet.yaml +++ b/openandroidinstaller/assets/configs/barbet.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Pixel 5a + is_ab_device: true device_code: barbet supported_device_codes: - barbet diff --git a/openandroidinstaller/assets/configs/beyond0lte.yaml b/openandroidinstaller/assets/configs/beyond0lte.yaml index e5c6be64..c3d54b1d 100644 --- a/openandroidinstaller/assets/configs/beyond0lte.yaml +++ b/openandroidinstaller/assets/configs/beyond0lte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S10e + is_ab_device: true device_code: beyond0lte supported_device_codes: - beyond0lte diff --git a/openandroidinstaller/assets/configs/beyond1lte.yaml b/openandroidinstaller/assets/configs/beyond1lte.yaml index b915be41..0839f0b8 100644 --- a/openandroidinstaller/assets/configs/beyond1lte.yaml +++ b/openandroidinstaller/assets/configs/beyond1lte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S10 + is_ab_device: true device_code: beyond1lte supported_device_codes: - beyond1lte diff --git a/openandroidinstaller/assets/configs/beyond2lte.yaml b/openandroidinstaller/assets/configs/beyond2lte.yaml index 7df64b5e..239cc07b 100644 --- a/openandroidinstaller/assets/configs/beyond2lte.yaml +++ b/openandroidinstaller/assets/configs/beyond2lte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S10+ + is_ab_device: true device_code: beyond2lte supported_device_codes: - beyond2lte diff --git a/openandroidinstaller/assets/configs/blueline.yaml b/openandroidinstaller/assets/configs/blueline.yaml index ffb418a3..b60ec55a 100644 --- a/openandroidinstaller/assets/configs/blueline.yaml +++ b/openandroidinstaller/assets/configs/blueline.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Google Pixel 3 + is_ab_device: true device_code: blueline supported_device_codes: - blueline diff --git a/openandroidinstaller/assets/configs/bonito.yaml b/openandroidinstaller/assets/configs/bonito.yaml index 219c0daa..d26bfa34 100644 --- a/openandroidinstaller/assets/configs/bonito.yaml +++ b/openandroidinstaller/assets/configs/bonito.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Google Pixel 3a XL + is_ab_device: true device_code: bonito supported_device_codes: - bonito diff --git a/openandroidinstaller/assets/configs/cedric.yaml b/openandroidinstaller/assets/configs/cedric.yaml index 16311c8c..6e63df41 100644 --- a/openandroidinstaller/assets/configs/cedric.yaml +++ b/openandroidinstaller/assets/configs/cedric.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Motorola Moto G5 + is_ab_device: true device_code: cedric supported_device_codes: - cedric diff --git a/openandroidinstaller/assets/configs/cheeseburger.yaml b/openandroidinstaller/assets/configs/cheeseburger.yaml index 832ea06f..5436b439 100644 --- a/openandroidinstaller/assets/configs/cheeseburger.yaml +++ b/openandroidinstaller/assets/configs/cheeseburger.yaml @@ -1,6 +1,7 @@ metadata: maintainer: SirRGB device_name: OnePlus 5 + is_ab_device: true device_code: cheeseburger supported_device_codes: - cheeseburger diff --git a/openandroidinstaller/assets/configs/coral.yaml b/openandroidinstaller/assets/configs/coral.yaml index 4a7f194b..a469e721 100644 --- a/openandroidinstaller/assets/configs/coral.yaml +++ b/openandroidinstaller/assets/configs/coral.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Google Pixel 4 XL + is_ab_device: true device_code: coral supported_device_codes: - coral diff --git a/openandroidinstaller/assets/configs/crosshatch.yaml b/openandroidinstaller/assets/configs/crosshatch.yaml index e42609a9..7ae26231 100644 --- a/openandroidinstaller/assets/configs/crosshatch.yaml +++ b/openandroidinstaller/assets/configs/crosshatch.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Google Pixel 3 XL + is_ab_device: true device_code: crosshatch supported_device_codes: - crosshatch diff --git a/openandroidinstaller/assets/configs/crownlte.yaml b/openandroidinstaller/assets/configs/crownlte.yaml index 19dfbe9b..97e8eb2e 100644 --- a/openandroidinstaller/assets/configs/crownlte.yaml +++ b/openandroidinstaller/assets/configs/crownlte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy Note 9 + is_ab_device: true device_code: crownlte supported_device_codes: - crownlte diff --git a/openandroidinstaller/assets/configs/d1.yaml b/openandroidinstaller/assets/configs/d1.yaml index e28a3906..25c0481b 100644 --- a/openandroidinstaller/assets/configs/d1.yaml +++ b/openandroidinstaller/assets/configs/d1.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy Note 10 + is_ab_device: true device_code: d1 supported_device_codes: - d1 diff --git a/openandroidinstaller/assets/configs/d2s.yaml b/openandroidinstaller/assets/configs/d2s.yaml index 3e0b705f..adb537ff 100644 --- a/openandroidinstaller/assets/configs/d2s.yaml +++ b/openandroidinstaller/assets/configs/d2s.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy Note 10+ + is_ab_device: true device_code: d2s supported_device_codes: - d2s diff --git a/openandroidinstaller/assets/configs/dre.yaml b/openandroidinstaller/assets/configs/dre.yaml index fa04addf..dba46996 100644 --- a/openandroidinstaller/assets/configs/dre.yaml +++ b/openandroidinstaller/assets/configs/dre.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus Nord N200 + is_ab_device: true device_code: dre supported_device_codes: - dre diff --git a/openandroidinstaller/assets/configs/dumpling.yaml b/openandroidinstaller/assets/configs/dumpling.yaml index 329280cf..fff6074f 100644 --- a/openandroidinstaller/assets/configs/dumpling.yaml +++ b/openandroidinstaller/assets/configs/dumpling.yaml @@ -1,6 +1,7 @@ metadata: maintainer: SirRGB device_name: OnePlus 5T + is_ab_device: true device_code: dumpling supported_device_codes: - dumpling diff --git a/openandroidinstaller/assets/configs/enchilada.yaml b/openandroidinstaller/assets/configs/enchilada.yaml index 5456fd84..67a155bc 100644 --- a/openandroidinstaller/assets/configs/enchilada.yaml +++ b/openandroidinstaller/assets/configs/enchilada.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus 6 + is_ab_device: true device_code: enchilada supported_device_codes: - enchilada diff --git a/openandroidinstaller/assets/configs/evert.yaml b/openandroidinstaller/assets/configs/evert.yaml index 24a9e602..5dd98f0f 100644 --- a/openandroidinstaller/assets/configs/evert.yaml +++ b/openandroidinstaller/assets/configs/evert.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Motorola moto g6 plus + is_ab_device: true device_code: evert supported_device_codes: - evert diff --git a/openandroidinstaller/assets/configs/fajita.yaml b/openandroidinstaller/assets/configs/fajita.yaml index 9eb558d6..3c42c730 100644 --- a/openandroidinstaller/assets/configs/fajita.yaml +++ b/openandroidinstaller/assets/configs/fajita.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus 6T + is_ab_device: true device_code: fajita supported_device_codes: - fajita diff --git a/openandroidinstaller/assets/configs/flame.yaml b/openandroidinstaller/assets/configs/flame.yaml index 4e2e38b6..1d41b157 100644 --- a/openandroidinstaller/assets/configs/flame.yaml +++ b/openandroidinstaller/assets/configs/flame.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Pixel 4 + is_ab_device: true device_code: flame supported_device_codes: - flame diff --git a/openandroidinstaller/assets/configs/greatlte.yaml b/openandroidinstaller/assets/configs/greatlte.yaml index c5464fa4..443db5ab 100644 --- a/openandroidinstaller/assets/configs/greatlte.yaml +++ b/openandroidinstaller/assets/configs/greatlte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Michel Memeteau (freechelmi) device_name: Samsung Galaxy note 8 + is_ab_device: true device_code: greatlte supported_device_codes: - greatlte diff --git a/openandroidinstaller/assets/configs/griffin.yaml b/openandroidinstaller/assets/configs/griffin.yaml index b4fb3fb3..ab21f87e 100644 --- a/openandroidinstaller/assets/configs/griffin.yaml +++ b/openandroidinstaller/assets/configs/griffin.yaml @@ -1,6 +1,7 @@ metadata: maintainer: SirRGB device_name: Motorola Moto Z + is_ab_device: true device_code: griffin supported_device_codes: - griffin diff --git a/openandroidinstaller/assets/configs/guacamole.yaml b/openandroidinstaller/assets/configs/guacamole.yaml index e6f54988..86e4f1d4 100644 --- a/openandroidinstaller/assets/configs/guacamole.yaml +++ b/openandroidinstaller/assets/configs/guacamole.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus 7 Pro + is_ab_device: true device_code: guacamole supported_device_codes: - guacamole diff --git a/openandroidinstaller/assets/configs/guacamoleb.yaml b/openandroidinstaller/assets/configs/guacamoleb.yaml index 28c93690..c3a87d1b 100644 --- a/openandroidinstaller/assets/configs/guacamoleb.yaml +++ b/openandroidinstaller/assets/configs/guacamoleb.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus 7 + is_ab_device: true device_code: guacamoleb supported_device_codes: - guacamoleb diff --git a/openandroidinstaller/assets/configs/hero2lte.yaml b/openandroidinstaller/assets/configs/hero2lte.yaml index 44c0101c..b94b7dac 100644 --- a/openandroidinstaller/assets/configs/hero2lte.yaml +++ b/openandroidinstaller/assets/configs/hero2lte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S7 Edge + is_ab_device: true device_code: hero2lte supported_device_codes: - hero2lte diff --git a/openandroidinstaller/assets/configs/herolte.yaml b/openandroidinstaller/assets/configs/herolte.yaml index 4e102e61..bdcf513b 100644 --- a/openandroidinstaller/assets/configs/herolte.yaml +++ b/openandroidinstaller/assets/configs/herolte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S7 + is_ab_device: true device_code: herolte supported_device_codes: - herolte diff --git a/openandroidinstaller/assets/configs/hltetmo.yaml b/openandroidinstaller/assets/configs/hltetmo.yaml index 57776fa1..013aa7f0 100644 --- a/openandroidinstaller/assets/configs/hltetmo.yaml +++ b/openandroidinstaller/assets/configs/hltetmo.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy Note 3 LTE (N900T/V/W8) + is_ab_device: true device_code: hltetmo supported_device_codes: - hltetmo diff --git a/openandroidinstaller/assets/configs/hotdog.yaml b/openandroidinstaller/assets/configs/hotdog.yaml index cbe7c5bf..7faddfc6 100644 --- a/openandroidinstaller/assets/configs/hotdog.yaml +++ b/openandroidinstaller/assets/configs/hotdog.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus 7T Pro + is_ab_device: true device_code: hotdog supported_device_codes: - hotdog diff --git a/openandroidinstaller/assets/configs/hotdogb.yaml b/openandroidinstaller/assets/configs/hotdogb.yaml index 555b5c0a..194d0990 100644 --- a/openandroidinstaller/assets/configs/hotdogb.yaml +++ b/openandroidinstaller/assets/configs/hotdogb.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus 7T + is_ab_device: true device_code: hotdogb supported_device_codes: - hotdogb diff --git a/openandroidinstaller/assets/configs/j7elte.yaml b/openandroidinstaller/assets/configs/j7elte.yaml index fa63cece..1fc0a5d9 100644 --- a/openandroidinstaller/assets/configs/j7elte.yaml +++ b/openandroidinstaller/assets/configs/j7elte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy J7 (2015) + is_ab_device: true device_code: j7elte supported_device_codes: - j7elte diff --git a/openandroidinstaller/assets/configs/kiev.yaml b/openandroidinstaller/assets/configs/kiev.yaml index 743ae743..11b45d54 100644 --- a/openandroidinstaller/assets/configs/kiev.yaml +++ b/openandroidinstaller/assets/configs/kiev.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Motorola moto g 5G / one 5G ace + is_ab_device: true device_code: kiev supported_device_codes: - kiev diff --git a/openandroidinstaller/assets/configs/kirin.yaml b/openandroidinstaller/assets/configs/kirin.yaml index 626df4f4..20a44be8 100644 --- a/openandroidinstaller/assets/configs/kirin.yaml +++ b/openandroidinstaller/assets/configs/kirin.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia 10 + is_ab_device: true device_code: kirin supported_device_codes: - kirin diff --git a/openandroidinstaller/assets/configs/mermaid.yaml b/openandroidinstaller/assets/configs/mermaid.yaml index 3660cb4f..cdaa5a22 100644 --- a/openandroidinstaller/assets/configs/mermaid.yaml +++ b/openandroidinstaller/assets/configs/mermaid.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia 10 Plus + is_ab_device: true device_code: mermaid supported_device_codes: - mermaid diff --git a/openandroidinstaller/assets/configs/nairo.yaml b/openandroidinstaller/assets/configs/nairo.yaml index 422c40fd..214d35a8 100644 --- a/openandroidinstaller/assets/configs/nairo.yaml +++ b/openandroidinstaller/assets/configs/nairo.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Motorola moto g 5G plus / one 5G + is_ab_device: true device_code: nairo supported_device_codes: - nairo diff --git a/openandroidinstaller/assets/configs/ocean.yaml b/openandroidinstaller/assets/configs/ocean.yaml index 7c6c9a7c..975a2432 100644 --- a/openandroidinstaller/assets/configs/ocean.yaml +++ b/openandroidinstaller/assets/configs/ocean.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Motorola Moto G7 power + is_ab_device: true device_code: ocean supported_device_codes: - ocean diff --git a/openandroidinstaller/assets/configs/pioneer.yaml b/openandroidinstaller/assets/configs/pioneer.yaml index 7480b263..bc07d885 100644 --- a/openandroidinstaller/assets/configs/pioneer.yaml +++ b/openandroidinstaller/assets/configs/pioneer.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia XA2 + is_ab_device: true device_code: pioneer supported_device_codes: - pioneer diff --git a/openandroidinstaller/assets/configs/racer.yaml b/openandroidinstaller/assets/configs/racer.yaml index f67ae11c..252e1e7c 100644 --- a/openandroidinstaller/assets/configs/racer.yaml +++ b/openandroidinstaller/assets/configs/racer.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Motorola edge + is_ab_device: true device_code: racer supported_device_codes: - racer diff --git a/openandroidinstaller/assets/configs/redfin.yaml b/openandroidinstaller/assets/configs/redfin.yaml index e40ef553..36c13980 100644 --- a/openandroidinstaller/assets/configs/redfin.yaml +++ b/openandroidinstaller/assets/configs/redfin.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Pixel 5 + is_ab_device: true device_code: redfin supported_device_codes: - redfin diff --git a/openandroidinstaller/assets/configs/s3ve3g.yaml b/openandroidinstaller/assets/configs/s3ve3g.yaml index 19dbf51e..cfe232ea 100644 --- a/openandroidinstaller/assets/configs/s3ve3g.yaml +++ b/openandroidinstaller/assets/configs/s3ve3g.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S III Neo + is_ab_device: true device_code: s3ve3g supported_device_codes: - s3ve3g diff --git a/openandroidinstaller/assets/configs/starlte.yaml b/openandroidinstaller/assets/configs/starlte.yaml index 71c6f7f2..31411a9f 100644 --- a/openandroidinstaller/assets/configs/starlte.yaml +++ b/openandroidinstaller/assets/configs/starlte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S9 + is_ab_device: true device_code: starlte supported_device_codes: - starlte diff --git a/openandroidinstaller/assets/configs/sunfish.yaml b/openandroidinstaller/assets/configs/sunfish.yaml index 53b80d01..2a2baa5f 100644 --- a/openandroidinstaller/assets/configs/sunfish.yaml +++ b/openandroidinstaller/assets/configs/sunfish.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Pixel 4a + is_ab_device: true device_code: sunfish supported_device_codes: - sunfish diff --git a/openandroidinstaller/assets/configs/taimen.yaml b/openandroidinstaller/assets/configs/taimen.yaml index d4a371df..8457584e 100644 --- a/openandroidinstaller/assets/configs/taimen.yaml +++ b/openandroidinstaller/assets/configs/taimen.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Google Pixel 2 XL + is_ab_device: true device_code: taimen supported_device_codes: - taimen diff --git a/openandroidinstaller/assets/configs/walleye.yaml b/openandroidinstaller/assets/configs/walleye.yaml index 88e450ed..d1482869 100644 --- a/openandroidinstaller/assets/configs/walleye.yaml +++ b/openandroidinstaller/assets/configs/walleye.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Google Pixel 2 + is_ab_device: true device_code: walleye supported_device_codes: - walleye diff --git a/openandroidinstaller/assets/configs/yuga.yaml b/openandroidinstaller/assets/configs/yuga.yaml index d2a97434..1d751eb0 100644 --- a/openandroidinstaller/assets/configs/yuga.yaml +++ b/openandroidinstaller/assets/configs/yuga.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia Z + is_ab_device: true device_code: yuga supported_device_codes: - yuga diff --git a/openandroidinstaller/assets/configs/z3.yaml b/openandroidinstaller/assets/configs/z3.yaml index 410c07d2..cb626895 100644 --- a/openandroidinstaller/assets/configs/z3.yaml +++ b/openandroidinstaller/assets/configs/z3.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia Z3 + is_ab_device: true device_code: z3 supported_device_codes: - z3 diff --git a/openandroidinstaller/assets/configs/zerofltexx.yaml b/openandroidinstaller/assets/configs/zerofltexx.yaml index f823b726..9009af85 100644 --- a/openandroidinstaller/assets/configs/zerofltexx.yaml +++ b/openandroidinstaller/assets/configs/zerofltexx.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S6 + is_ab_device: true device_code: zerofltexx supported_device_codes: - zerofltexx diff --git a/openandroidinstaller/assets/configs/zeroltexx.yaml b/openandroidinstaller/assets/configs/zeroltexx.yaml index f2a080e9..f60e8b3a 100644 --- a/openandroidinstaller/assets/configs/zeroltexx.yaml +++ b/openandroidinstaller/assets/configs/zeroltexx.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S6 Edge + is_ab_device: true device_code: zeroltexx supported_device_codes: - zeroltexx diff --git a/openandroidinstaller/views/start_view.py b/openandroidinstaller/views/start_view.py index 65bf8f52..69a70503 100644 --- a/openandroidinstaller/views/start_view.py +++ b/openandroidinstaller/views/start_view.py @@ -37,7 +37,7 @@ from views import BaseView from app_state import AppState from widgets import get_title -from tooling import search_device, check_ab_partition +from tooling import search_device class StartView(BaseView): @@ -221,9 +221,6 @@ def search_devices(self, e): device_code = search_device( platform=self.state.platform, bin_path=self.state.bin_path ) - is_ab = check_ab_partition( - platform=self.state.platform, bin_path=self.state.bin_path - ) if device_code: self.device_name.value = device_code self.device_name.color = colors.BLACK diff --git a/tests/test_tooling.py b/tests/test_tooling.py index 6e666c1e..ffcaeb5a 100644 --- a/tests/test_tooling.py +++ b/tests/test_tooling.py @@ -94,4 +94,4 @@ def patched_check_output(*args, **kwargs): platform="linux", bin_path=Path("openandroidinstaller/bin/") ) - assert device_code == None \ No newline at end of file + assert device_code == None From ece1e2514a0fadb2d02e991d8913428e0f12f9b9 Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Mon, 27 Mar 2023 11:15:30 +0200 Subject: [PATCH 33/39] Update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e2da6142..9b4384a4 100644 --- a/README.md +++ b/README.md @@ -198,6 +198,7 @@ A config file consists of two parts. The first part are some metadata about the Every config file should have metadata with the following fields: - `maintainer`: str; Maintainer and author of the config file. - `device_name`: str; Name of the device. +- `is_ab_device`: bool; A boolean to determine if the device is a/b-partitioned or not. - `device_code`: str; The official device code. - `supported_device_codes`: List[str]; A list of supported device codes for the config. The config will be loaded based on this field. - `twrp-link`: [OPTIONAL] str; name of the corresponding twrp page. From 150700d78b96845eb5cdd97dccdf9c7073e11902 Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Mon, 27 Mar 2023 11:33:51 +0200 Subject: [PATCH 34/39] Make all text and markdown elements selectable --- openandroidinstaller/openandroidinstaller.py | 4 ++- openandroidinstaller/styles.py | 30 +++++++++++++++++++ openandroidinstaller/views/addon_view.py | 6 ++-- .../views/install_addons_view.py | 5 +++- openandroidinstaller/views/install_view.py | 5 +++- .../views/requirements_view.py | 6 ++-- openandroidinstaller/views/select_view.py | 6 ++-- openandroidinstaller/views/start_view.py | 6 ++-- openandroidinstaller/views/step_view.py | 6 +++- openandroidinstaller/views/success_view.py | 4 ++- openandroidinstaller/views/welcome_view.py | 7 +++-- openandroidinstaller/widgets.py | 7 +++-- 12 files changed, 75 insertions(+), 17 deletions(-) create mode 100644 openandroidinstaller/styles.py diff --git a/openandroidinstaller/openandroidinstaller.py b/openandroidinstaller/openandroidinstaller.py index a04bea42..1862c3fd 100644 --- a/openandroidinstaller/openandroidinstaller.py +++ b/openandroidinstaller/openandroidinstaller.py @@ -31,7 +31,6 @@ Icon, Image, Page, - Text, TextButton, UserControl, colors, @@ -39,6 +38,9 @@ ) from loguru import logger +from styles import ( + Text, +) from app_state import AppState from views import ( SelectFilesView, diff --git a/openandroidinstaller/styles.py b/openandroidinstaller/styles.py new file mode 100644 index 00000000..6d8f8aa8 --- /dev/null +++ b/openandroidinstaller/styles.py @@ -0,0 +1,30 @@ +"""This module contains different pre-configured style elements for building the application.""" + +# This file is part of OpenAndroidInstaller. +# OpenAndroidInstaller is free software: you can redistribute it and/or modify it under the terms of +# the GNU General Public License as published by the Free Software Foundation, +# either version 3 of the License, or (at your option) any later version. + +# OpenAndroidInstaller is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License along with OpenAndroidInstaller. +# If not, see .""" +# Author: Tobias Sterbak + +import flet as ft + + +class Text(ft.Text): + """Text element to replace the default text element from flet but is selectable.""" + + def __init__(self, *args, **kwargs): + super().__init__(selectable=True, *args, **kwargs) + + +class Markdown(ft.Markdown): + """Markdown element to replace the markdown element from flet but is selectable.""" + + def __init__(self, *args, **kwargs): + super().__init__(selectable=True, *args, **kwargs) diff --git a/openandroidinstaller/views/addon_view.py b/openandroidinstaller/views/addon_view.py index d9d89333..93171ece 100644 --- a/openandroidinstaller/views/addon_view.py +++ b/openandroidinstaller/views/addon_view.py @@ -23,9 +23,7 @@ ElevatedButton, OutlinedButton, FilledButton, - Markdown, Row, - Text, colors, icons, TextButton, @@ -35,6 +33,10 @@ ) from flet.buttons import CountinuosRectangleBorder +from styles import ( + Text, + Markdown, +) from views import BaseView from app_state import AppState from widgets import get_title, confirm_button diff --git a/openandroidinstaller/views/install_addons_view.py b/openandroidinstaller/views/install_addons_view.py index 7bb71e42..6470a840 100644 --- a/openandroidinstaller/views/install_addons_view.py +++ b/openandroidinstaller/views/install_addons_view.py @@ -21,10 +21,13 @@ Column, ElevatedButton, Row, - Text, icons, Switch, colors, +) + +from styles import ( + Text, Markdown, ) diff --git a/openandroidinstaller/views/install_view.py b/openandroidinstaller/views/install_view.py index 29283fab..54b90e77 100644 --- a/openandroidinstaller/views/install_view.py +++ b/openandroidinstaller/views/install_view.py @@ -21,10 +21,13 @@ Column, ElevatedButton, Row, - Text, icons, Switch, colors, +) + +from styles import ( + Text, Markdown, ) diff --git a/openandroidinstaller/views/requirements_view.py b/openandroidinstaller/views/requirements_view.py index 327649d6..3d3d7efd 100644 --- a/openandroidinstaller/views/requirements_view.py +++ b/openandroidinstaller/views/requirements_view.py @@ -22,17 +22,19 @@ Container, Divider, ElevatedButton, - Markdown, Row, colors, OutlinedButton, - Text, icons, TextButton, AlertDialog, ) from flet.buttons import CountinuosRectangleBorder +from styles import ( + Text, + Markdown, +) from views import BaseView from app_state import AppState from widgets import get_title diff --git a/openandroidinstaller/views/select_view.py b/openandroidinstaller/views/select_view.py index ac65fd5d..0f851241 100644 --- a/openandroidinstaller/views/select_view.py +++ b/openandroidinstaller/views/select_view.py @@ -23,9 +23,7 @@ ElevatedButton, OutlinedButton, FilledButton, - Markdown, Row, - Text, colors, icons, TextButton, @@ -35,6 +33,10 @@ ) from flet.buttons import CountinuosRectangleBorder +from styles import ( + Text, + Markdown, +) from views import BaseView from app_state import AppState from widgets import get_title, confirm_button diff --git a/openandroidinstaller/views/start_view.py b/openandroidinstaller/views/start_view.py index abf64064..31c2d85f 100644 --- a/openandroidinstaller/views/start_view.py +++ b/openandroidinstaller/views/start_view.py @@ -25,15 +25,17 @@ ElevatedButton, OutlinedButton, FilledButton, - Markdown, Row, - Text, TextButton, colors, icons, ) from flet.buttons import CountinuosRectangleBorder +from styles import ( + Text, + Markdown, +) from views import BaseView from app_state import AppState from widgets import get_title diff --git a/openandroidinstaller/views/step_view.py b/openandroidinstaller/views/step_view.py index eb484eb3..03aefe9d 100644 --- a/openandroidinstaller/views/step_view.py +++ b/openandroidinstaller/views/step_view.py @@ -22,13 +22,17 @@ Column, ElevatedButton, Row, - Text, icons, TextField, Switch, colors, ) + +from styles import ( + Text, +) + from views import BaseView from installer_config import Step from app_state import AppState diff --git a/openandroidinstaller/views/success_view.py b/openandroidinstaller/views/success_view.py index 30a1dc8a..697b59d7 100644 --- a/openandroidinstaller/views/success_view.py +++ b/openandroidinstaller/views/success_view.py @@ -17,10 +17,12 @@ from flet import ( ElevatedButton, Row, +) + +from styles import ( Text, Markdown, ) - from views import BaseView from app_state import AppState from widgets import get_title diff --git a/openandroidinstaller/views/welcome_view.py b/openandroidinstaller/views/welcome_view.py index 59de038b..a3560ea7 100644 --- a/openandroidinstaller/views/welcome_view.py +++ b/openandroidinstaller/views/welcome_view.py @@ -18,12 +18,15 @@ from flet import ( Divider, ElevatedButton, - Markdown, Row, - Text, icons, ) +from styles import ( + Text, + Markdown, +) + from views import BaseView from app_state import AppState from widgets import get_title diff --git a/openandroidinstaller/widgets.py b/openandroidinstaller/widgets.py index d57c006f..c488d36c 100644 --- a/openandroidinstaller/widgets.py +++ b/openandroidinstaller/widgets.py @@ -26,7 +26,6 @@ ProgressRing, ProgressBar, Row, - Text, alignment, icons, IconButton, @@ -34,6 +33,10 @@ Column, ) +from styles import ( + Text, +) + class TerminalBox(UserControl): def __init__(self, expand: bool = True, visible: bool = False): @@ -43,7 +46,7 @@ def __init__(self, expand: bool = True, visible: bool = False): def build(self): self._box = Container( content=Column( - controls=[Text("", selectable=True)], + controls=[Text("")], scroll="auto", expand=True, auto_scroll=True, From a9a421dacee6bc67a5e927a35d458aafefd5026f Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Mon, 27 Mar 2023 11:43:02 +0200 Subject: [PATCH 35/39] If there are not instructions to unlock the bootloader, assume that there is nothing to do and toggle the switch by default --- openandroidinstaller/views/start_view.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openandroidinstaller/views/start_view.py b/openandroidinstaller/views/start_view.py index 31c2d85f..e1927816 100644 --- a/openandroidinstaller/views/start_view.py +++ b/openandroidinstaller/views/start_view.py @@ -259,6 +259,8 @@ def search_devices(self, e): f"{device_name} (code: {self.state.config.device_code})" ) self.device_name.color = colors.GREEN + # if there are no steps for bootloader unlocking, assume there is nothing to do and toggle the switch + self.bootloader_switch.value = True else: # failed to load config logger.error(f"Failed to load config for {device_code}.") From 1736ccf0eede78c8f5656ca416a2857dff737384 Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Mon, 27 Mar 2023 12:09:36 +0200 Subject: [PATCH 36/39] Adjust configs for a/b partition info --- openandroidinstaller/assets/configs/FP2.yaml | 2 +- openandroidinstaller/assets/configs/a3y17lte.yaml | 2 +- openandroidinstaller/assets/configs/a5xelte.yaml | 2 +- openandroidinstaller/assets/configs/a72q.yaml | 2 +- openandroidinstaller/assets/configs/a7xelte.yaml | 2 +- openandroidinstaller/assets/configs/bacon.yaml | 2 +- openandroidinstaller/assets/configs/beyond0lte.yaml | 2 +- openandroidinstaller/assets/configs/beyond1lte.yaml | 2 +- openandroidinstaller/assets/configs/beyond2lte.yaml | 2 +- openandroidinstaller/assets/configs/cedric.yaml | 2 +- openandroidinstaller/assets/configs/cheeseburger.yaml | 2 +- openandroidinstaller/assets/configs/crownlte.yaml | 2 +- openandroidinstaller/assets/configs/d1.yaml | 2 +- openandroidinstaller/assets/configs/d2s.yaml | 2 +- openandroidinstaller/assets/configs/dumpling.yaml | 2 +- openandroidinstaller/assets/configs/greatlte.yaml | 2 +- openandroidinstaller/assets/configs/griffin.yaml | 2 +- openandroidinstaller/assets/configs/hero2lte.yaml | 2 +- openandroidinstaller/assets/configs/herolte.yaml | 2 +- openandroidinstaller/assets/configs/hltetmo.yaml | 2 +- openandroidinstaller/assets/configs/j7elte.yaml | 2 +- openandroidinstaller/assets/configs/s3ve3g.yaml | 2 +- openandroidinstaller/assets/configs/starlte.yaml | 2 +- openandroidinstaller/assets/configs/yuga.yaml | 2 +- openandroidinstaller/assets/configs/z3.yaml | 2 +- openandroidinstaller/assets/configs/zerofltexx.yaml | 2 +- openandroidinstaller/assets/configs/zeroltexx.yaml | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/openandroidinstaller/assets/configs/FP2.yaml b/openandroidinstaller/assets/configs/FP2.yaml index 55588617..afcf3976 100644 --- a/openandroidinstaller/assets/configs/FP2.yaml +++ b/openandroidinstaller/assets/configs/FP2.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Fairphone 2 - is_ab_device: true + is_ab_device: false device_code: FP2 supported_device_codes: - FP2 diff --git a/openandroidinstaller/assets/configs/a3y17lte.yaml b/openandroidinstaller/assets/configs/a3y17lte.yaml index 5e6f8d83..27f86cc4 100644 --- a/openandroidinstaller/assets/configs/a3y17lte.yaml +++ b/openandroidinstaller/assets/configs/a3y17lte.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy A3 (2017) - is_ab_device: true + is_ab_device: false device_code: a3y17lte supported_device_codes: - a3y17lte diff --git a/openandroidinstaller/assets/configs/a5xelte.yaml b/openandroidinstaller/assets/configs/a5xelte.yaml index c9dc541f..7f1761b0 100644 --- a/openandroidinstaller/assets/configs/a5xelte.yaml +++ b/openandroidinstaller/assets/configs/a5xelte.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy A5 (2016) - is_ab_device: true + is_ab_device: false device_code: a5xelte supported_device_codes: - a5xelte diff --git a/openandroidinstaller/assets/configs/a72q.yaml b/openandroidinstaller/assets/configs/a72q.yaml index 4b663e48..70a58bf4 100644 --- a/openandroidinstaller/assets/configs/a72q.yaml +++ b/openandroidinstaller/assets/configs/a72q.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy A72 - is_ab_device: true + is_ab_device: false device_code: a72q supported_device_codes: - a72q diff --git a/openandroidinstaller/assets/configs/a7xelte.yaml b/openandroidinstaller/assets/configs/a7xelte.yaml index 8d1d9c8c..ae575de3 100644 --- a/openandroidinstaller/assets/configs/a7xelte.yaml +++ b/openandroidinstaller/assets/configs/a7xelte.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy A7 (2016) - is_ab_device: true + is_ab_device: false device_code: a7xelte supported_device_codes: - a7xelte diff --git a/openandroidinstaller/assets/configs/bacon.yaml b/openandroidinstaller/assets/configs/bacon.yaml index fb251e99..9412527b 100644 --- a/openandroidinstaller/assets/configs/bacon.yaml +++ b/openandroidinstaller/assets/configs/bacon.yaml @@ -1,7 +1,7 @@ metadata: maintainer: MagicLike device_name: OnePlus One - is_ab_device: true + is_ab_device: false device_code: bacon supported_device_codes: - bacon diff --git a/openandroidinstaller/assets/configs/beyond0lte.yaml b/openandroidinstaller/assets/configs/beyond0lte.yaml index c3d54b1d..d357ac95 100644 --- a/openandroidinstaller/assets/configs/beyond0lte.yaml +++ b/openandroidinstaller/assets/configs/beyond0lte.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S10e - is_ab_device: true + is_ab_device: false device_code: beyond0lte supported_device_codes: - beyond0lte diff --git a/openandroidinstaller/assets/configs/beyond1lte.yaml b/openandroidinstaller/assets/configs/beyond1lte.yaml index 0839f0b8..d9952f38 100644 --- a/openandroidinstaller/assets/configs/beyond1lte.yaml +++ b/openandroidinstaller/assets/configs/beyond1lte.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S10 - is_ab_device: true + is_ab_device: false device_code: beyond1lte supported_device_codes: - beyond1lte diff --git a/openandroidinstaller/assets/configs/beyond2lte.yaml b/openandroidinstaller/assets/configs/beyond2lte.yaml index 239cc07b..7a0c0c23 100644 --- a/openandroidinstaller/assets/configs/beyond2lte.yaml +++ b/openandroidinstaller/assets/configs/beyond2lte.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S10+ - is_ab_device: true + is_ab_device: false device_code: beyond2lte supported_device_codes: - beyond2lte diff --git a/openandroidinstaller/assets/configs/cedric.yaml b/openandroidinstaller/assets/configs/cedric.yaml index 6e63df41..5f7e9728 100644 --- a/openandroidinstaller/assets/configs/cedric.yaml +++ b/openandroidinstaller/assets/configs/cedric.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Motorola Moto G5 - is_ab_device: true + is_ab_device: false device_code: cedric supported_device_codes: - cedric diff --git a/openandroidinstaller/assets/configs/cheeseburger.yaml b/openandroidinstaller/assets/configs/cheeseburger.yaml index d3b1cba8..e321a1e7 100644 --- a/openandroidinstaller/assets/configs/cheeseburger.yaml +++ b/openandroidinstaller/assets/configs/cheeseburger.yaml @@ -1,7 +1,7 @@ metadata: maintainer: SirRGB device_name: OnePlus 5 - is_ab_device: true + is_ab_device: false device_code: cheeseburger supported_device_codes: - cheeseburger diff --git a/openandroidinstaller/assets/configs/crownlte.yaml b/openandroidinstaller/assets/configs/crownlte.yaml index 97e8eb2e..27291a6a 100644 --- a/openandroidinstaller/assets/configs/crownlte.yaml +++ b/openandroidinstaller/assets/configs/crownlte.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy Note 9 - is_ab_device: true + is_ab_device: false device_code: crownlte supported_device_codes: - crownlte diff --git a/openandroidinstaller/assets/configs/d1.yaml b/openandroidinstaller/assets/configs/d1.yaml index 25c0481b..feceec7c 100644 --- a/openandroidinstaller/assets/configs/d1.yaml +++ b/openandroidinstaller/assets/configs/d1.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy Note 10 - is_ab_device: true + is_ab_device: false device_code: d1 supported_device_codes: - d1 diff --git a/openandroidinstaller/assets/configs/d2s.yaml b/openandroidinstaller/assets/configs/d2s.yaml index adb537ff..5e1af505 100644 --- a/openandroidinstaller/assets/configs/d2s.yaml +++ b/openandroidinstaller/assets/configs/d2s.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy Note 10+ - is_ab_device: true + is_ab_device: false device_code: d2s supported_device_codes: - d2s diff --git a/openandroidinstaller/assets/configs/dumpling.yaml b/openandroidinstaller/assets/configs/dumpling.yaml index 15bdea7e..c2dd40f4 100644 --- a/openandroidinstaller/assets/configs/dumpling.yaml +++ b/openandroidinstaller/assets/configs/dumpling.yaml @@ -1,7 +1,7 @@ metadata: maintainer: SirRGB device_name: OnePlus 5T - is_ab_device: true + is_ab_device: false device_code: dumpling supported_device_codes: - dumpling diff --git a/openandroidinstaller/assets/configs/greatlte.yaml b/openandroidinstaller/assets/configs/greatlte.yaml index 443db5ab..16b140d4 100644 --- a/openandroidinstaller/assets/configs/greatlte.yaml +++ b/openandroidinstaller/assets/configs/greatlte.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Michel Memeteau (freechelmi) device_name: Samsung Galaxy note 8 - is_ab_device: true + is_ab_device: false device_code: greatlte supported_device_codes: - greatlte diff --git a/openandroidinstaller/assets/configs/griffin.yaml b/openandroidinstaller/assets/configs/griffin.yaml index ab21f87e..8eb80ca6 100644 --- a/openandroidinstaller/assets/configs/griffin.yaml +++ b/openandroidinstaller/assets/configs/griffin.yaml @@ -1,7 +1,7 @@ metadata: maintainer: SirRGB device_name: Motorola Moto Z - is_ab_device: true + is_ab_device: false device_code: griffin supported_device_codes: - griffin diff --git a/openandroidinstaller/assets/configs/hero2lte.yaml b/openandroidinstaller/assets/configs/hero2lte.yaml index b94b7dac..da44a6b5 100644 --- a/openandroidinstaller/assets/configs/hero2lte.yaml +++ b/openandroidinstaller/assets/configs/hero2lte.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S7 Edge - is_ab_device: true + is_ab_device: false device_code: hero2lte supported_device_codes: - hero2lte diff --git a/openandroidinstaller/assets/configs/herolte.yaml b/openandroidinstaller/assets/configs/herolte.yaml index bdcf513b..871f70b0 100644 --- a/openandroidinstaller/assets/configs/herolte.yaml +++ b/openandroidinstaller/assets/configs/herolte.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S7 - is_ab_device: true + is_ab_device: false device_code: herolte supported_device_codes: - herolte diff --git a/openandroidinstaller/assets/configs/hltetmo.yaml b/openandroidinstaller/assets/configs/hltetmo.yaml index 013aa7f0..b9fbc135 100644 --- a/openandroidinstaller/assets/configs/hltetmo.yaml +++ b/openandroidinstaller/assets/configs/hltetmo.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy Note 3 LTE (N900T/V/W8) - is_ab_device: true + is_ab_device: false device_code: hltetmo supported_device_codes: - hltetmo diff --git a/openandroidinstaller/assets/configs/j7elte.yaml b/openandroidinstaller/assets/configs/j7elte.yaml index 1fc0a5d9..05d11897 100644 --- a/openandroidinstaller/assets/configs/j7elte.yaml +++ b/openandroidinstaller/assets/configs/j7elte.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy J7 (2015) - is_ab_device: true + is_ab_device: false device_code: j7elte supported_device_codes: - j7elte diff --git a/openandroidinstaller/assets/configs/s3ve3g.yaml b/openandroidinstaller/assets/configs/s3ve3g.yaml index cfe232ea..7fb97bf4 100644 --- a/openandroidinstaller/assets/configs/s3ve3g.yaml +++ b/openandroidinstaller/assets/configs/s3ve3g.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S III Neo - is_ab_device: true + is_ab_device: false device_code: s3ve3g supported_device_codes: - s3ve3g diff --git a/openandroidinstaller/assets/configs/starlte.yaml b/openandroidinstaller/assets/configs/starlte.yaml index 31411a9f..bfb87684 100644 --- a/openandroidinstaller/assets/configs/starlte.yaml +++ b/openandroidinstaller/assets/configs/starlte.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S9 - is_ab_device: true + is_ab_device: false device_code: starlte supported_device_codes: - starlte diff --git a/openandroidinstaller/assets/configs/yuga.yaml b/openandroidinstaller/assets/configs/yuga.yaml index 1d751eb0..b9f23348 100644 --- a/openandroidinstaller/assets/configs/yuga.yaml +++ b/openandroidinstaller/assets/configs/yuga.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia Z - is_ab_device: true + is_ab_device: false device_code: yuga supported_device_codes: - yuga diff --git a/openandroidinstaller/assets/configs/z3.yaml b/openandroidinstaller/assets/configs/z3.yaml index cb626895..c75fb8a4 100644 --- a/openandroidinstaller/assets/configs/z3.yaml +++ b/openandroidinstaller/assets/configs/z3.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia Z3 - is_ab_device: true + is_ab_device: false device_code: z3 supported_device_codes: - z3 diff --git a/openandroidinstaller/assets/configs/zerofltexx.yaml b/openandroidinstaller/assets/configs/zerofltexx.yaml index 9009af85..3f6cd24e 100644 --- a/openandroidinstaller/assets/configs/zerofltexx.yaml +++ b/openandroidinstaller/assets/configs/zerofltexx.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S6 - is_ab_device: true + is_ab_device: false device_code: zerofltexx supported_device_codes: - zerofltexx diff --git a/openandroidinstaller/assets/configs/zeroltexx.yaml b/openandroidinstaller/assets/configs/zeroltexx.yaml index f60e8b3a..b891d4e9 100644 --- a/openandroidinstaller/assets/configs/zeroltexx.yaml +++ b/openandroidinstaller/assets/configs/zeroltexx.yaml @@ -1,7 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S6 Edge - is_ab_device: true + is_ab_device: false device_code: zeroltexx supported_device_codes: - zeroltexx From c8aaaa0ef9d1cd8a26bd04f197787c58ac35f774 Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Mon, 27 Mar 2023 12:17:27 +0200 Subject: [PATCH 37/39] Support fajita OnePlus6TSingle --- openandroidinstaller/assets/configs/fajita.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/openandroidinstaller/assets/configs/fajita.yaml b/openandroidinstaller/assets/configs/fajita.yaml index 1f9a4050..a19da40e 100644 --- a/openandroidinstaller/assets/configs/fajita.yaml +++ b/openandroidinstaller/assets/configs/fajita.yaml @@ -6,6 +6,7 @@ metadata: supported_device_codes: - fajita - OnePlus6T + - OnePlus6TSingle requirements: android: 11 steps: From c9857269c24ee15ad29e1a02bb7ef991abf2b949 Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Mon, 27 Mar 2023 18:41:58 +0200 Subject: [PATCH 38/39] Fix unlock bootloader toggle when no instructions in cofnig --- openandroidinstaller/views/start_view.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openandroidinstaller/views/start_view.py b/openandroidinstaller/views/start_view.py index 6d177771..b2c912b5 100644 --- a/openandroidinstaller/views/start_view.py +++ b/openandroidinstaller/views/start_view.py @@ -255,7 +255,8 @@ def search_devices(self, e): ) self.device_name.color = colors.GREEN # if there are no steps for bootloader unlocking, assume there is nothing to do and toggle the switch - self.bootloader_switch.value = True + if len(self.state.config.unlock_bootloader) == 0: + self.bootloader_switch.value = True else: # failed to load config logger.error(f"Failed to load config for {device_code}.") From 21a79811ba4fd6590425fddee34d42f9aa0755f9 Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Mon, 27 Mar 2023 19:38:01 +0200 Subject: [PATCH 39/39] Check a different url if lineageos exists --- openandroidinstaller/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openandroidinstaller/utils.py b/openandroidinstaller/utils.py index ea34997f..0c17baf5 100644 --- a/openandroidinstaller/utils.py +++ b/openandroidinstaller/utils.py @@ -22,15 +22,16 @@ def get_download_link(devicecode: str) -> Optional[str]: """Check if a lineageOS version for this device exists on download.lineageos.com and return the respective download link.""" - url = f"https://download.lineageos.org/{devicecode}" + url = f"https://download.lineageos.org/api/v2/devices/{devicecode}" try: logger.info(f"Checking {url}") # Get Url res = requests.get(url, timeout=5) # if the request succeeds if res.status_code == 200: - logger.info(f"{url} exists.") - return url + download_url = f"https://download.lineageos.org/devices/{devicecode}/builds" + logger.info(f"{download_url} exists.") + return download_url else: logger.info(f"{url} doesn't exist, status_code: {res.status_code}") return None