diff --git a/openandroidinstaller/app_state.py b/openandroidinstaller/app_state.py index ed0b8eae..9687c535 100644 --- a/openandroidinstaller/app_state.py +++ b/openandroidinstaller/app_state.py @@ -13,6 +13,7 @@ # If not, see .""" # Author: Tobias Sterbak +import copy from pathlib import Path from installer_config import _load_config @@ -37,9 +38,11 @@ def __init__( # placeholders self.advanced = False + self.install_addons = False self.config = None self.image_path = None self.recovery_path = None + self.is_ab = None # is this still needed? self.steps = None @@ -48,8 +51,6 @@ def load_config(self, device_code: str): """Load the config from file to state by device code.""" self.config = _load_config(device_code, self.config_path) if self.config: - self.steps = ( - self.config.unlock_bootloader - + self.config.flash_recovery - + self.config.install_os + self.steps = copy.deepcopy(self.config.unlock_bootloader) + copy.deepcopy( + self.config.flash_recovery ) diff --git a/openandroidinstaller/assets/configs/FP2.yaml b/openandroidinstaller/assets/configs/FP2.yaml index 19f1ded4..8149c8b4 100644 --- a/openandroidinstaller/assets/configs/FP2.yaml +++ b/openandroidinstaller/assets/configs/FP2.yaml @@ -18,12 +18,4 @@ steps: - 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! - With the device powered off, hold 'Volume Up + Power'. Release when boot logo appears. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + With the device powered off, hold 'Volume Up + Power'. Release when boot logo appears. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/FP3.yaml b/openandroidinstaller/assets/configs/FP3.yaml index 31810217..5fc45c57 100644 --- a/openandroidinstaller/assets/configs/FP3.yaml +++ b/openandroidinstaller/assets/configs/FP3.yaml @@ -43,12 +43,4 @@ steps: - 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! - With the device powered off, hold 'Volume Up + Power'. Release when boot logo appears. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + With the device powered off, hold 'Volume Up + Power'. Release when boot logo appears. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/FP4.yaml b/openandroidinstaller/assets/configs/FP4.yaml index 59e5e6ff..a5f5c436 100644 --- a/openandroidinstaller/assets/configs/FP4.yaml +++ b/openandroidinstaller/assets/configs/FP4.yaml @@ -43,12 +43,4 @@ steps: - 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! - With the device powered off, hold 'Volume Up + Power'. Release when boot logo appears. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + With the device powered off, hold 'Volume Up + Power'. Release when boot logo appears. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/a3y17lte.yaml b/openandroidinstaller/assets/configs/a3y17lte.yaml index d21410b1..940746dc 100644 --- a/openandroidinstaller/assets/configs/a3y17lte.yaml +++ b/openandroidinstaller/assets/configs/a3y17lte.yaml @@ -21,12 +21,4 @@ steps: 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*. Confirm when the recovery screen appears. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + hold *Volume Up* + *Home* + *Power*. Confirm when the recovery screen appears. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/a5xelte.yaml b/openandroidinstaller/assets/configs/a5xelte.yaml index 617b7657..4d4d40bb 100644 --- a/openandroidinstaller/assets/configs/a5xelte.yaml +++ b/openandroidinstaller/assets/configs/a5xelte.yaml @@ -19,12 +19,4 @@ steps: 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*. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + hold *Volume Up* + *Home* + *Power button*. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/a72q.yaml b/openandroidinstaller/assets/configs/a72q.yaml index ef470a10..3d1290a0 100644 --- a/openandroidinstaller/assets/configs/a72q.yaml +++ b/openandroidinstaller/assets/configs/a72q.yaml @@ -19,12 +19,4 @@ steps: content: > Unplug the USB cable from your device. Then manually reboot into recovery by pressing the *Volume Down* + *Power* 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* + *Power button*. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + hold *Volume Up* + *Power button*. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/a7xelte.yaml b/openandroidinstaller/assets/configs/a7xelte.yaml index 6b3e383b..4f680c97 100644 --- a/openandroidinstaller/assets/configs/a7xelte.yaml +++ b/openandroidinstaller/assets/configs/a7xelte.yaml @@ -19,12 +19,4 @@ steps: 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*. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + hold *Volume Up* + *Home* + *Power button*. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/akari.yaml b/openandroidinstaller/assets/configs/akari.yaml index cc4ff41b..8e971d37 100644 --- a/openandroidinstaller/assets/configs/akari.yaml +++ b/openandroidinstaller/assets/configs/akari.yaml @@ -42,21 +42,13 @@ steps: 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 + command: fastboot_flash_boot - 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_flash_boot content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ 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. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/akatsuki.yaml b/openandroidinstaller/assets/configs/akatsuki.yaml index ca23c998..ecafe733 100644 --- a/openandroidinstaller/assets/configs/akatsuki.yaml +++ b/openandroidinstaller/assets/configs/akatsuki.yaml @@ -42,21 +42,13 @@ steps: 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 + command: fastboot_flash_boot - 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_flash_boot content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ 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. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/avicii.yaml b/openandroidinstaller/assets/configs/avicii.yaml index 4f849e07..99cc545f 100644 --- a/openandroidinstaller/assets/configs/avicii.yaml +++ b/openandroidinstaller/assets/configs/avicii.yaml @@ -42,12 +42,4 @@ steps: - type: call_button command: fastboot_flash_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. - install_os: - - type: call_button - content: > - In this last step, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ 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. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/barbet.yaml b/openandroidinstaller/assets/configs/barbet.yaml index 94b4dc9e..8471f0de 100644 --- a/openandroidinstaller/assets/configs/barbet.yaml +++ b/openandroidinstaller/assets/configs/barbet.yaml @@ -41,12 +41,4 @@ steps: 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 - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + command: fastboot_flash_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/beyond1lte.yaml b/openandroidinstaller/assets/configs/beyond1lte.yaml index 57d9cb45..6deef617 100644 --- a/openandroidinstaller/assets/configs/beyond1lte.yaml +++ b/openandroidinstaller/assets/configs/beyond1lte.yaml @@ -21,12 +21,4 @@ steps: content: > Unplug the USB cable from your device. Then manually reboot into recovery by pressing the *Volume Down* + *Bixby* 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* + *Bixby* + *Power button*. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + hold *Volume Up* + *Bixby* + *Power button*. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/blueline.yaml b/openandroidinstaller/assets/configs/blueline.yaml index e6570860..680d63c5 100644 --- a/openandroidinstaller/assets/configs/blueline.yaml +++ b/openandroidinstaller/assets/configs/blueline.yaml @@ -34,12 +34,4 @@ steps: - 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 - img: twrp-start.jpeg - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + 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 5c42f26b..694ce1cc 100644 --- a/openandroidinstaller/assets/configs/bonito.yaml +++ b/openandroidinstaller/assets/configs/bonito.yaml @@ -34,12 +34,4 @@ steps: - 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 - img: twrp-start.jpeg - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + 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 2f391028..bb260c21 100644 --- a/openandroidinstaller/assets/configs/cedric.yaml +++ b/openandroidinstaller/assets/configs/cedric.yaml @@ -43,12 +43,4 @@ steps: 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 - install_os: - - type: call_button - content: > - In this last step, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + command: fastboot_flash_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/coral.yaml b/openandroidinstaller/assets/configs/coral.yaml index ccf2dc03..e9647828 100644 --- a/openandroidinstaller/assets/configs/coral.yaml +++ b/openandroidinstaller/assets/configs/coral.yaml @@ -41,12 +41,4 @@ steps: 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 - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + command: fastboot_flash_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/crosshatch.yaml b/openandroidinstaller/assets/configs/crosshatch.yaml index 21176ce1..a4a485a2 100644 --- a/openandroidinstaller/assets/configs/crosshatch.yaml +++ b/openandroidinstaller/assets/configs/crosshatch.yaml @@ -34,12 +34,4 @@ steps: - 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 - img: twrp-start.jpeg - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + 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 5084849b..38a922c4 100644 --- a/openandroidinstaller/assets/configs/crownlte.yaml +++ b/openandroidinstaller/assets/configs/crownlte.yaml @@ -21,12 +21,4 @@ steps: content: > Unplug the USB cable from your device. Then manually reboot into recovery by pressing the *Volume Down* + *Bixby* 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* + *Bixby* + *Power button*. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + hold *Volume Up* + *Bixby* + *Power button*. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/d1.yaml b/openandroidinstaller/assets/configs/d1.yaml index 60bde268..431d49a0 100644 --- a/openandroidinstaller/assets/configs/d1.yaml +++ b/openandroidinstaller/assets/configs/d1.yaml @@ -21,12 +21,4 @@ steps: content: > Unplug the USB cable from your device. Then manually reboot into recovery by pressing the *Volume Down* + *Bixby* 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* + *Bixby* + *Power button*. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + hold *Volume Up* + *Bixby* + *Power button*. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/dre.yaml b/openandroidinstaller/assets/configs/dre.yaml index dc4858ab..1b8be02a 100644 --- a/openandroidinstaller/assets/configs/dre.yaml +++ b/openandroidinstaller/assets/configs/dre.yaml @@ -42,12 +42,4 @@ steps: - type: call_button command: fastboot_flash_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. - install_os: - - type: call_button - content: > - In this last step, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ 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. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/enchilada.yaml b/openandroidinstaller/assets/configs/enchilada.yaml index a55bcb32..e1da4282 100644 --- a/openandroidinstaller/assets/configs/enchilada.yaml +++ b/openandroidinstaller/assets/configs/enchilada.yaml @@ -42,12 +42,4 @@ steps: - type: call_button command: fastboot_flash_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. - install_os: - - type: call_button - content: > - In this last step, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ 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. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/evert.yaml b/openandroidinstaller/assets/configs/evert.yaml index 88c9bbf7..790c1e0f 100644 --- a/openandroidinstaller/assets/configs/evert.yaml +++ b/openandroidinstaller/assets/configs/evert.yaml @@ -52,12 +52,4 @@ steps: - type: call_button command: fastboot_flash_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. - install_os: - - type: call_button - content: > - In this last step, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ 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. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/fajita.yaml b/openandroidinstaller/assets/configs/fajita.yaml index 1660ed4f..8ce4c1a2 100644 --- a/openandroidinstaller/assets/configs/fajita.yaml +++ b/openandroidinstaller/assets/configs/fajita.yaml @@ -42,12 +42,4 @@ steps: - type: call_button command: fastboot_flash_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. - install_os: - - type: call_button - content: > - In this last step, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ 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. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/flame.yaml b/openandroidinstaller/assets/configs/flame.yaml index 08437fad..2bbd5d31 100644 --- a/openandroidinstaller/assets/configs/flame.yaml +++ b/openandroidinstaller/assets/configs/flame.yaml @@ -41,12 +41,4 @@ steps: 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 - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + command: fastboot_flash_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/guacamole.yaml b/openandroidinstaller/assets/configs/guacamole.yaml index a85c5e6e..129d7b98 100644 --- a/openandroidinstaller/assets/configs/guacamole.yaml +++ b/openandroidinstaller/assets/configs/guacamole.yaml @@ -33,12 +33,4 @@ steps: 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 - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + command: fastboot_flash_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/guacamoleb.yaml b/openandroidinstaller/assets/configs/guacamoleb.yaml index 8c8f35d0..e39c9378 100644 --- a/openandroidinstaller/assets/configs/guacamoleb.yaml +++ b/openandroidinstaller/assets/configs/guacamoleb.yaml @@ -33,12 +33,4 @@ steps: 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 - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + command: fastboot_flash_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/hero2lte.yaml b/openandroidinstaller/assets/configs/hero2lte.yaml index 5d411923..4ec35346 100644 --- a/openandroidinstaller/assets/configs/hero2lte.yaml +++ b/openandroidinstaller/assets/configs/hero2lte.yaml @@ -19,12 +19,4 @@ steps: 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*. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + hold *Volume Up* + *Home* + *Power button*. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/herolte.yaml b/openandroidinstaller/assets/configs/herolte.yaml index a14f2028..4dcf7f8b 100644 --- a/openandroidinstaller/assets/configs/herolte.yaml +++ b/openandroidinstaller/assets/configs/herolte.yaml @@ -19,12 +19,4 @@ steps: 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*. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + hold *Volume Up* + *Home* + *Power button*. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/heroltexx.yaml b/openandroidinstaller/assets/configs/heroltexx.yaml new file mode 100644 index 00000000..4dcf7f8b --- /dev/null +++ b/openandroidinstaller/assets/configs/heroltexx.yaml @@ -0,0 +1,22 @@ +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 fc492ae9..dc5c6eb1 100644 --- a/openandroidinstaller/assets/configs/hltetmo.yaml +++ b/openandroidinstaller/assets/configs/hltetmo.yaml @@ -21,12 +21,4 @@ steps: 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*. Confirm when the recovery screen appears. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + hold *Volume Up* + *Home* + *Power*. Confirm when the recovery screen appears. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/hotdog.yaml b/openandroidinstaller/assets/configs/hotdog.yaml index 763b8bc0..15cc7015 100644 --- a/openandroidinstaller/assets/configs/hotdog.yaml +++ b/openandroidinstaller/assets/configs/hotdog.yaml @@ -33,12 +33,4 @@ steps: 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 - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + command: fastboot_flash_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/hotdogb.yaml b/openandroidinstaller/assets/configs/hotdogb.yaml index 879e81e1..da1c487a 100644 --- a/openandroidinstaller/assets/configs/hotdogb.yaml +++ b/openandroidinstaller/assets/configs/hotdogb.yaml @@ -33,12 +33,4 @@ steps: 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 - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + command: fastboot_flash_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/j7elte.yaml b/openandroidinstaller/assets/configs/j7elte.yaml index 8d540b0c..99390c17 100644 --- a/openandroidinstaller/assets/configs/j7elte.yaml +++ b/openandroidinstaller/assets/configs/j7elte.yaml @@ -19,12 +19,4 @@ steps: 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*. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + hold *Volume Up* + *Home* + *Power button*. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/kiev.yaml b/openandroidinstaller/assets/configs/kiev.yaml index bf306f68..607a16a4 100644 --- a/openandroidinstaller/assets/configs/kiev.yaml +++ b/openandroidinstaller/assets/configs/kiev.yaml @@ -52,12 +52,4 @@ steps: - type: call_button command: fastboot_flash_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. - install_os: - - type: call_button - content: > - In this last step, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ 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. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/kirin.yaml b/openandroidinstaller/assets/configs/kirin.yaml index 60f7db1f..6418fbaf 100644 --- a/openandroidinstaller/assets/configs/kirin.yaml +++ b/openandroidinstaller/assets/configs/kirin.yaml @@ -40,21 +40,13 @@ steps: 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 + command: fastboot_flash_boot - 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_flash_boot content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ 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. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/mermaid.yaml b/openandroidinstaller/assets/configs/mermaid.yaml index 80fd8a04..8a0861ef 100644 --- a/openandroidinstaller/assets/configs/mermaid.yaml +++ b/openandroidinstaller/assets/configs/mermaid.yaml @@ -40,21 +40,13 @@ steps: 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 + command: fastboot_flash_boot - 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_flash_boot content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ 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. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/nairo.yaml b/openandroidinstaller/assets/configs/nairo.yaml index 8fc46111..968aafef 100644 --- a/openandroidinstaller/assets/configs/nairo.yaml +++ b/openandroidinstaller/assets/configs/nairo.yaml @@ -52,12 +52,4 @@ steps: - type: call_button command: fastboot_flash_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. - install_os: - - type: call_button - content: > - In this last step, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ 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. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/ocean.yaml b/openandroidinstaller/assets/configs/ocean.yaml index ee5df871..0d9dceee 100644 --- a/openandroidinstaller/assets/configs/ocean.yaml +++ b/openandroidinstaller/assets/configs/ocean.yaml @@ -52,12 +52,4 @@ steps: - type: call_button command: fastboot_flash_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. - install_os: - - type: call_button - content: > - In this last step, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ 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. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/pioneer.yaml b/openandroidinstaller/assets/configs/pioneer.yaml index 85303ed6..a5ea1fbc 100644 --- a/openandroidinstaller/assets/configs/pioneer.yaml +++ b/openandroidinstaller/assets/configs/pioneer.yaml @@ -42,21 +42,13 @@ steps: 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 + command: fastboot_flash_boot - 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_flash_boot content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ 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. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/racer.yaml b/openandroidinstaller/assets/configs/racer.yaml index 81f98251..50d888d8 100644 --- a/openandroidinstaller/assets/configs/racer.yaml +++ b/openandroidinstaller/assets/configs/racer.yaml @@ -52,12 +52,4 @@ steps: - type: call_button command: fastboot_flash_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. - install_os: - - type: call_button - content: > - In this last step, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ 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. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/redfin.yaml b/openandroidinstaller/assets/configs/redfin.yaml index bbf6807a..df12f3b4 100644 --- a/openandroidinstaller/assets/configs/redfin.yaml +++ b/openandroidinstaller/assets/configs/redfin.yaml @@ -41,12 +41,4 @@ steps: 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 - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + command: fastboot_flash_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/sargo.yaml b/openandroidinstaller/assets/configs/sargo.yaml index ed40f9ac..2e19de38 100644 --- a/openandroidinstaller/assets/configs/sargo.yaml +++ b/openandroidinstaller/assets/configs/sargo.yaml @@ -34,12 +34,4 @@ steps: - 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 - img: twrp-start.jpeg - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + 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 e3e8b77f..3b09a481 100644 --- a/openandroidinstaller/assets/configs/starlte.yaml +++ b/openandroidinstaller/assets/configs/starlte.yaml @@ -20,12 +20,4 @@ steps: 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 + Bixby + Power. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + hold Volume Up + Bixby + Power. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/sunfish.yaml b/openandroidinstaller/assets/configs/sunfish.yaml index 75d7b326..b91a734d 100644 --- a/openandroidinstaller/assets/configs/sunfish.yaml +++ b/openandroidinstaller/assets/configs/sunfish.yaml @@ -41,12 +41,4 @@ steps: 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 - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + command: fastboot_flash_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/taimen.yaml b/openandroidinstaller/assets/configs/taimen.yaml index 7c03eca2..64382154 100644 --- a/openandroidinstaller/assets/configs/taimen.yaml +++ b/openandroidinstaller/assets/configs/taimen.yaml @@ -34,12 +34,4 @@ steps: - 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 - img: twrp-start.jpeg - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + 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 f32be2a1..7b95c9ba 100644 --- a/openandroidinstaller/assets/configs/walleye.yaml +++ b/openandroidinstaller/assets/configs/walleye.yaml @@ -34,12 +34,4 @@ steps: - 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 - img: twrp-start.jpeg - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Wait until the TWRP screen appears. Then run the command. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + 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 d7b3a30b..16409933 100644 --- a/openandroidinstaller/assets/configs/yuga.yaml +++ b/openandroidinstaller/assets/configs/yuga.yaml @@ -37,12 +37,4 @@ steps: 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. - command: fastboot_flash_recovery - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + 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 54eb3553..e9f5c797 100644 --- a/openandroidinstaller/assets/configs/z3.yaml +++ b/openandroidinstaller/assets/configs/z3.yaml @@ -39,12 +39,4 @@ steps: 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. - command: fastboot_flash_recovery - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + 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 736839d7..ad084e4f 100644 --- a/openandroidinstaller/assets/configs/zerofltexx.yaml +++ b/openandroidinstaller/assets/configs/zerofltexx.yaml @@ -19,12 +19,4 @@ steps: 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*. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + hold *Volume Up* + *Home* + *Power button*. \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/zeroltexx.yaml b/openandroidinstaller/assets/configs/zeroltexx.yaml index d16d27d4..0830241c 100644 --- a/openandroidinstaller/assets/configs/zeroltexx.yaml +++ b/openandroidinstaller/assets/configs/zeroltexx.yaml @@ -19,12 +19,4 @@ steps: 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*. - install_os: - - type: call_button - content: > - In the next steps, you finally flash the selected OS image. - Connect your device with your computer with the USB-Cable. - This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored - in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS. - command: adb_twrp_wipe_and_install \ No newline at end of file + hold *Volume Up* + *Home* + *Power button*. \ No newline at end of file diff --git a/openandroidinstaller/installer_config.py b/openandroidinstaller/installer_config.py index 2eae535d..3efacf47 100644 --- a/openandroidinstaller/installer_config.py +++ b/openandroidinstaller/installer_config.py @@ -69,13 +69,11 @@ def __init__( self, unlock_bootloader: List[Step], flash_recovery: List[Step], - install_os: List[Step], metadata: dict, requirements: dict, ): self.unlock_bootloader = unlock_bootloader self.flash_recovery = flash_recovery - self.install_os = install_os self.metadata = metadata self.requirements = requirements self.device_code = metadata.get("devicecode") @@ -112,13 +110,7 @@ def from_file(cls, path): Step(**raw_step, title="Flash custom recovery") for raw_step in raw_steps.get("flash_recovery", []) ] - install_os = [ - Step(**raw_step, title="Install OS") - for raw_step in raw_steps.get("install_os", []) - ] - return cls( - unlock_bootloader, flash_recovery, install_os, metadata, requirements - ) + return cls(unlock_bootloader, flash_recovery, metadata, requirements) def _load_config(device_code: str, config_path: Path) -> Optional[InstallerConfig]: @@ -160,7 +152,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_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_flash_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, @@ -181,7 +173,6 @@ def validate_config(config: str) -> bool: "steps": { "unlock_bootloader": schema.Or(None, [step_schema]), "flash_recovery": [step_schema], - "install_os": [step_schema], }, } ) diff --git a/openandroidinstaller/openandroidinstaller.py b/openandroidinstaller/openandroidinstaller.py index 37315448..a6680738 100644 --- a/openandroidinstaller/openandroidinstaller.py +++ b/openandroidinstaller/openandroidinstaller.py @@ -45,7 +45,10 @@ SuccessView, StartView, RequirementsView, + InstallView, WelcomeView, + AddonsView, + InstallAddonsView, ) from tooling import run_command @@ -53,7 +56,7 @@ logger.add("openandroidinstaller.log") # VERSION number -VERSION = "0.3.4-alpha" +VERSION = "0.4.0-beta" # detect platform PLATFORM = sys.platform @@ -98,12 +101,38 @@ def __init__(self, state: AppState): start_view, welcome_view, ] + + # create the install view + 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) + # final default views, ordered to allow to pop + self.final_default_views = [ + self.final_view, + self.install_view, + ] + + self.state.default_views = self.default_views + self.state.final_default_views = self.final_default_views + self.state.final_view = self.final_view + # stack of previous default views for the back-button self.previous_views = [] + # initialize the addon view + self.select_addon_view = AddonsView( + on_confirm=self.to_next_view, state=self.state + ) + self.install_addons_view = InstallAddonsView( + on_confirm=self.to_next_view, state=self.state + ) + self.state.addon_views = [ + self.install_addons_view, + self.select_addon_view, + ] + def build(self): self.view.controls.append(self.default_views.pop()) return self.view @@ -136,9 +165,13 @@ def to_next_view(self, e): on_confirm=self.to_next_view, ) ) - else: - # display the final view - self.view.controls.append(self.final_view) + elif self.final_default_views: + # here we expect the install view to populate the step views again if necessary + self.view.controls.append(self.final_default_views.pop()) + + # else: + # # display the final view + # self.view.controls.append(self.final_view) logger.info("Confirmed and moved to next step.") self.view.update() diff --git a/openandroidinstaller/tooling.py b/openandroidinstaller/tooling.py index 3ecdc936..1c268b00 100644 --- a/openandroidinstaller/tooling.py +++ b/openandroidinstaller/tooling.py @@ -61,7 +61,7 @@ def run_command( for line in p.stdout: if enable_logging: logger.info(line.strip()) - yield line + yield line.strip() yield p.returncode == 0 @@ -82,13 +82,10 @@ def adb_reboot_bootloader(bin_path: Path) -> bool: """Reboot the device into bootloader and return success.""" logger.info("Rebooting device into bootloader with adb.") for line in run_command("adb", ["reboot", "bootloader"], bin_path): + if (type(line) == bool) and not line: + logger.error("Reboot into bootloader failed.") yield line - if (type(line) == bool) and not line: - logger.error("Reboot into bootloader failed.") - yield False - return sleep(1) - yield True def adb_reboot_download(bin_path: Path) -> bool: @@ -154,7 +151,14 @@ def adb_twrp_copy_partitions(bin_path: Path, config_path: Path): return True -def adb_twrp_wipe_and_install(bin_path: Path, target: str, config_path: Path) -> bool: +def adb_twrp_wipe_and_install( + bin_path: Path, + target: str, + config_path: Path, + is_ab: bool, + install_addons=True, + recovery: str = None, +) -> bool: """Wipe and format data with twrp, then flash os image with adb. Only works for twrp recovery. @@ -214,19 +218,119 @@ def adb_twrp_wipe_and_install(bin_path: Path, target: str, config_path: Path) -> sleep(1) if (type(line) == bool) and not line: yield False - return break - # finally reboot into os + # finally reboot into os or to fastboot for flashing addons sleep(7) - logger.info("Reboot into OS.") - for line in run_command("adb", ["reboot"], bin_path): # "shell", "twrp", - yield line - if (type(line) == bool) and not line: - logger.error("Rebooting failed.") - yield False - return + if install_addons: + if is_ab: + # reboot into the bootloader again + logger.info("Rebooting device into bootloader with adb.") + for line in run_command("adb", ["reboot", "bootloader"], bin_path): + yield line + if (type(line) == bool) and not line: + logger.error("Reboot into bootloader failed.") + yield False + return + sleep(3) + # boot to TWRP again + logger.info("Boot custom recovery with fastboot.") + for line in run_command("fastboot", ["boot", f"{recovery}"], bin_path): + yield line + if (type(line) == bool) and not line: + logger.error("Reboot into bootloader failed.") + yield False + return + sleep(7) + else: + # if not an a/b-device just stay in twrp + pass else: - yield True + logger.info("Reboot into OS.") + for line in run_command("adb", ["reboot"], bin_path): + yield line + if (type(line) == bool) and not line: + logger.error("Rebooting failed.") + yield False + return + else: + yield True + + +def adb_twrp_install_addons(bin_path: Path, addons: List[str], is_ab: bool) -> bool: + """Flash addons through adb and twrp. + + Only works for twrp recovery. + """ + logger.info("Install addons with twrp.") + sleep(5) + logger.info("Sideload and install addons.") + for addon in addons: + # activate sideload + logger.info("Activate sideload.") + for line in run_command("adb", ["shell", "twrp", "sideload"], bin_path): + yield line + if (type(line) == bool) and not line: + logger.error("Activating sideload failed.") + yield False + return + sleep(5) + # now flash os image + for line in run_command("adb", ["sideload", f"{addon}"], bin_path): + yield line + if (type(line) == bool) and not line: + logger.error(f"Sideloading {addon} failed.") + # TODO: this might sometimes think it failed, but actually it's fine. So skip for now. + # yield False + # return + sleep(7) + # finally reboot into os + if is_ab: + # reboot into the bootloader again + logger.info("Rebooting device into bootloader with adb.") + for line in run_command("adb", ["reboot", "bootloader"], bin_path): + yield line + if (type(line) == bool) and not line: + logger.error("Reboot into bootloader failed.") + yield False + return + sleep(3) + # switch active boot partition + logger.info("Switch active boot partition") + for line in run_command("fastboot", ["set_active", "other"], bin_path): + yield line + if (type(line) == bool) and not line: + logger.error("Switching boot partition failed.") + yield False + return + sleep(1) + for line in run_command("fastboot", ["set_active", "other"], bin_path): + yield line + if (type(line) == bool) and not line: + logger.error("Switching boot partition failed.") + yield False + return + sleep(1) + # reboot with fastboot + logger.info("Reboot into OS.") + for line in run_command("fastboot", ["reboot"], bin_path): + yield line + if (type(line) == bool) and not line: + logger.error("Rebooting failed.") + yield False + return + else: + yield True + else: + # reboot with adb + logger.info("Reboot into OS.") + for line in run_command("adb", ["reboot"], bin_path): + yield line + if (type(line) == bool) and not line: + logger.error("Rebooting failed.") + yield False + return + else: + yield True def fastboot_unlock_with_code(bin_path: Path, unlock_code: str) -> bool: @@ -289,16 +393,54 @@ def fastboot_reboot(bin_path: Path) -> bool: yield True -def fastboot_flash_recovery(bin_path: Path, recovery: str) -> bool: +def fastboot_flash_recovery(bin_path: Path, recovery: str, is_ab: bool = True) -> bool: """Temporarily, flash custom recovery with fastboot.""" + if is_ab: + logger.info("Boot custom recovery with fastboot.") + for line in run_command("fastboot", ["boot", f"{recovery}"], bin_path): + yield line + else: + logger.info("Flash custom recovery with fastboot.") + for line in run_command( + "fastboot", ["flash", "recovery", f"{recovery}"], bin_path + ): + yield line + if (type(line) == bool) and not line: + logger.error("Flashing 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 + + if (type(line) == bool) and not line: + logger.error("Booting recovery failed.") + yield False + else: + yield True + + +def fastboot_flash_boot(bin_path: Path, recovery: str) -> bool: + """Temporarily, flash custom recovery with fastboot to boot partition.""" logger.info("Flash custom recovery with fastboot.") - for line in run_command("fastboot", ["boot", f"{recovery}"], bin_path): + for line in run_command("fastboot", ["flash", "boot", f"{recovery}"], bin_path): yield line if (type(line) == bool) and not line: logger.error("Flashing recovery failed.") yield False else: yield True + # reboot + logger.info("Boot into TWRP with fastboot.") + for line in run_command("fastboot", ["reboot"], bin_path): + yield line + if (type(line) == bool) and not line: + logger.error("Booting recovery failed.") + yield False + else: + yield True def heimdall_flash_recovery(bin_path: Path, recovery: str) -> bool: @@ -319,7 +461,7 @@ def search_device(platform: str, bin_path: Path) -> Optional[str]: """Search for a connected device.""" logger.info(f"Search devices on {platform} with {bin_path}...") try: - # read device properties + # read device code if platform in ("linux", "darwin"): output = check_output( [ @@ -353,3 +495,43 @@ 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[str]: + """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/__init__.py b/openandroidinstaller/views/__init__.py index 6c564c44..93d8d460 100644 --- a/openandroidinstaller/views/__init__.py +++ b/openandroidinstaller/views/__init__.py @@ -4,4 +4,7 @@ from .requirements_view import RequirementsView # noqa from .select_view import SelectFilesView # noqa from .step_view import StepView # noqa +from .install_view import InstallView # noqa +from .addon_view import AddonsView # noqa +from .install_addons_view import InstallAddonsView # noqa from .success_view import SuccessView # noqa diff --git a/openandroidinstaller/views/addon_view.py b/openandroidinstaller/views/addon_view.py new file mode 100644 index 00000000..2de88587 --- /dev/null +++ b/openandroidinstaller/views/addon_view.py @@ -0,0 +1,228 @@ +"""Contains the select addons view.""" + +# 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 webbrowser +from loguru import logger +from typing import Callable + +from flet import ( + Column, + Divider, + ElevatedButton, + OutlinedButton, + FilledButton, + Markdown, + Row, + Text, + colors, + icons, + TextButton, + AlertDialog, + FilePicker, + FilePickerResultEvent, +) +from flet.buttons import CountinuosRectangleBorder + +from views import BaseView +from app_state import AppState +from widgets import get_title, confirm_button + + +class AddonsView(BaseView): + def __init__( + self, + state: AppState, + on_confirm: Callable, + ): + super().__init__(state=state) + self.on_confirm = on_confirm + + def build(self): + # dialog box to explain OS images and recovery + self.dlg_explain_addons = AlertDialog( + modal=True, + title=Text("What kind of addons are supported?"), + content=Markdown( + """## Google Apps: +There are different packages of Google Apps available. Most notable +- [MindTheGapps](https://wiki.lineageos.org/gapps#downloads) and +- [NikGApps](https://nikgapps.com/). + +These packages are only dependent on your OS version and processor architecture, which can be found on each device specific info page. +Filenames on MindTheGApps are of the format `MindTheGapps---_