diff --git a/README.md b/README.md index 55ffa6db..15c5963b 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Linux is currently the best supported platform (tested with Ubuntu 20.04/22.04 L ## Officially supported devices -Currently, the **we support 56 devices** by various vendors and working on adding more soon! +Currently, the **we support 57 devices** by various vendors and working on adding more soon! Support for these devices is provided as best effort, but things might still go wrong. @@ -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 @@ -185,19 +186,21 @@ 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. #### 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: - `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. +- `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. 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. @@ -213,7 +216,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..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 = [] @@ -67,5 +66,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..afcf3976 100644 --- a/openandroidinstaller/assets/configs/FP2.yaml +++ b/openandroidinstaller/assets/configs/FP2.yaml @@ -1,20 +1,23 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Fairphone 2 - devicecode: FP2 + device_name: Fairphone 2 + is_ab_device: false + device_code: FP2 + supported_device_codes: + - 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..b6b775d0 100644 --- a/openandroidinstaller/assets/configs/FP3.yaml +++ b/openandroidinstaller/assets/configs/FP3.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Fairphone 3 - devicecode: FP3 + device_name: Fairphone 3 + is_ab_device: true + device_code: FP3 + supported_device_codes: + - FP3 steps: unlock_bootloader: - type: link_button_with_confirm @@ -29,17 +32,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..7fdc1fd1 100644 --- a/openandroidinstaller/assets/configs/FP4.yaml +++ b/openandroidinstaller/assets/configs/FP4.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Fairphone 4 - devicecode: FP4 + device_name: Fairphone 4 + is_ab_device: true + device_code: FP4 + supported_device_codes: + - FP4 steps: unlock_bootloader: - type: link_button_with_confirm @@ -29,17 +32,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 + 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: > 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..27f86cc4 100644 --- a/openandroidinstaller/assets/configs/a3y17lte.yaml +++ b/openandroidinstaller/assets/configs/a3y17lte.yaml @@ -1,10 +1,13 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy A3 (2017) - devicecode: a3y17lte + device_name: Samsung Galaxy A3 (2017) + is_ab_device: false + device_code: a3y17lte + supported_device_codes: + - 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 +16,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..7f1761b0 100644 --- a/openandroidinstaller/assets/configs/a5xelte.yaml +++ b/openandroidinstaller/assets/configs/a5xelte.yaml @@ -1,10 +1,13 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy A5 (2016) - devicecode: a5xelte + device_name: Samsung Galaxy A5 (2016) + is_ab_device: false + device_code: a5xelte + supported_device_codes: + - 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 +15,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..70a58bf4 100644 --- a/openandroidinstaller/assets/configs/a72q.yaml +++ b/openandroidinstaller/assets/configs/a72q.yaml @@ -1,10 +1,13 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy A72 - devicecode: a72q + device_name: Samsung Galaxy A72 + is_ab_device: false + device_code: a72q + supported_device_codes: + - 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 +15,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..ae575de3 100644 --- a/openandroidinstaller/assets/configs/a7xelte.yaml +++ b/openandroidinstaller/assets/configs/a7xelte.yaml @@ -1,10 +1,13 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy A7 (2016) - devicecode: a7xelte + device_name: Samsung Galaxy A7 (2016) + is_ab_device: false + device_code: a7xelte + supported_device_codes: + - 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 +15,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..20b7ed8d 100644 --- a/openandroidinstaller/assets/configs/akari.yaml +++ b/openandroidinstaller/assets/configs/akari.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Sony Xperia XZ2 - devicecode: akari + device_name: Sony Xperia XZ2 + is_ab_device: true + device_code: akari + supported_device_codes: + - akari requirements: android: 10 steps: @@ -33,15 +36,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..41b8e7bf 100644 --- a/openandroidinstaller/assets/configs/akatsuki.yaml +++ b/openandroidinstaller/assets/configs/akatsuki.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Sony Xperia XZ3 - devicecode: akatsuki + device_name: Sony Xperia XZ3 + is_ab_device: true + device_code: akatsuki + supported_device_codes: + - akatsuki requirements: android: 10 steps: @@ -33,15 +36,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..c87efdbb 100644 --- a/openandroidinstaller/assets/configs/avicii.yaml +++ b/openandroidinstaller/assets/configs/avicii.yaml @@ -1,9 +1,13 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus Nord - devicecode: avicii + device_name: OnePlus Nord + is_ab_device: true + device_code: avicii + supported_device_codes: + - avicii + - Nord requirements: - android: 10 + android: 12 steps: unlock_bootloader: - type: call_button @@ -13,33 +17,30 @@ 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. - flash_recovery: + 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: > - 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. + command: adb_twrp_copy_partitions - 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. \ 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/bacon.yaml b/openandroidinstaller/assets/configs/bacon.yaml new file mode 100644 index 00000000..9412527b --- /dev/null +++ b/openandroidinstaller/assets/configs/bacon.yaml @@ -0,0 +1,43 @@ +metadata: + maintainer: MagicLike + device_name: OnePlus One + is_ab_device: false + device_code: bacon + supported_device_codes: + - bacon + - A0001 + 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/barbet.yaml b/openandroidinstaller/assets/configs/barbet.yaml index 8471f0de..00c14fb5 100644 --- a/openandroidinstaller/assets/configs/barbet.yaml +++ b/openandroidinstaller/assets/configs/barbet.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Pixel 5a - devicecode: barbet + device_name: Pixel 5a + is_ab_device: true + device_code: barbet + supported_device_codes: + - barbet requirements: android: 12.1.0 steps: @@ -29,10 +32,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 +43,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..d357ac95 100644 --- a/openandroidinstaller/assets/configs/beyond0lte.yaml +++ b/openandroidinstaller/assets/configs/beyond0lte.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S10e - devicecode: beyond0lte + device_name: Samsung Galaxy S10e + is_ab_device: false + device_code: beyond0lte + supported_device_codes: + - beyond0lte requirements: android: 12 steps: @@ -21,14 +24,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..d9952f38 100644 --- a/openandroidinstaller/assets/configs/beyond1lte.yaml +++ b/openandroidinstaller/assets/configs/beyond1lte.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S10 - devicecode: beyond1lte + device_name: Samsung Galaxy S10 + is_ab_device: false + device_code: beyond1lte + supported_device_codes: + - beyond1lte requirements: android: 12 steps: @@ -21,14 +24,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..7a0c0c23 100644 --- a/openandroidinstaller/assets/configs/beyond2lte.yaml +++ b/openandroidinstaller/assets/configs/beyond2lte.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S10+ - devicecode: beyond2lte + device_name: Samsung Galaxy S10+ + is_ab_device: false + device_code: beyond2lte + supported_device_codes: + - beyond2lte requirements: android: 12 steps: @@ -21,14 +24,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..b60ec55a 100644 --- a/openandroidinstaller/assets/configs/blueline.yaml +++ b/openandroidinstaller/assets/configs/blueline.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Google Pixel 3 - devicecode: blueline + device_name: Google Pixel 3 + is_ab_device: true + device_code: blueline + supported_device_codes: + - blueline requirements: android: 12 steps: @@ -24,14 +27,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..d26bfa34 100644 --- a/openandroidinstaller/assets/configs/bonito.yaml +++ b/openandroidinstaller/assets/configs/bonito.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Google Pixel 3a XL - devicecode: bonito + device_name: Google Pixel 3a XL + is_ab_device: true + device_code: bonito + supported_device_codes: + - bonito requirements: android: 12.1.0 steps: @@ -24,14 +27,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..5f7e9728 100644 --- a/openandroidinstaller/assets/configs/cedric.yaml +++ b/openandroidinstaller/assets/configs/cedric.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Motorola Moto G5 - devicecode: cedric + device_name: Motorola Moto G5 + is_ab_device: false + device_code: cedric + supported_device_codes: + - cedric steps: unlock_bootloader: - type: call_button @@ -34,13 +37,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..e321a1e7 100644 --- a/openandroidinstaller/assets/configs/cheeseburger.yaml +++ b/openandroidinstaller/assets/configs/cheeseburger.yaml @@ -1,7 +1,11 @@ metadata: maintainer: SirRGB - devicename: OnePlus 5 - devicecode: cheeseburger + device_name: OnePlus 5 + is_ab_device: false + device_code: cheeseburger + supported_device_codes: + - cheeseburger + - OnePlus5 twrp-link: cheeseburger_dumpling steps: unlock_bootloader: @@ -12,24 +16,21 @@ 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. - flash_recovery: + 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: > - 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..a469e721 100644 --- a/openandroidinstaller/assets/configs/coral.yaml +++ b/openandroidinstaller/assets/configs/coral.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Google Pixel 4 XL - devicecode: coral + device_name: Google Pixel 4 XL + is_ab_device: true + device_code: coral + supported_device_codes: + - coral requirements: android: 13 steps: @@ -29,10 +32,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 +43,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..7ae26231 100644 --- a/openandroidinstaller/assets/configs/crosshatch.yaml +++ b/openandroidinstaller/assets/configs/crosshatch.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Google Pixel 3 XL - devicecode: crosshatch + device_name: Google Pixel 3 XL + is_ab_device: true + device_code: crosshatch + supported_device_codes: + - crosshatch requirements: android: 12 steps: @@ -24,14 +27,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..27291a6a 100644 --- a/openandroidinstaller/assets/configs/crownlte.yaml +++ b/openandroidinstaller/assets/configs/crownlte.yaml @@ -1,12 +1,15 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy Note 9 - devicecode: crownlte + device_name: Samsung Galaxy Note 9 + is_ab_device: false + device_code: crownlte + supported_device_codes: + - crownlte 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 +17,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..feceec7c 100644 --- a/openandroidinstaller/assets/configs/d1.yaml +++ b/openandroidinstaller/assets/configs/d1.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy Note 10 - devicecode: d1 + device_name: Samsung Galaxy Note 10 + is_ab_device: false + device_code: d1 + supported_device_codes: + - d1 requirements: android: 12 steps: @@ -21,14 +24,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..5e1af505 100644 --- a/openandroidinstaller/assets/configs/d2s.yaml +++ b/openandroidinstaller/assets/configs/d2s.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy Note 10+ - devicecode: d2s + device_name: Samsung Galaxy Note 10+ + is_ab_device: false + device_code: d2s + supported_device_codes: + - d2s requirements: android: 12 steps: @@ -21,14 +24,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..900eb668 100644 --- a/openandroidinstaller/assets/configs/dre.yaml +++ b/openandroidinstaller/assets/configs/dre.yaml @@ -1,7 +1,11 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus Nord N200 - devicecode: dre + device_name: OnePlus Nord N200 + is_ab_device: true + device_code: dre + supported_device_codes: + - dre + - NordN200 requirements: android: 11 steps: @@ -13,33 +17,30 @@ 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. - flash_recovery: + 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: > - 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. + command: adb_twrp_copy_partitions - 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. \ 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 a2324245..c2dd40f4 100644 --- a/openandroidinstaller/assets/configs/dumpling.yaml +++ b/openandroidinstaller/assets/configs/dumpling.yaml @@ -1,7 +1,11 @@ metadata: maintainer: SirRGB - devicename: OnePlus 5T - devicecode: dumpling + device_name: OnePlus 5T + is_ab_device: false + device_code: dumpling + supported_device_codes: + - dumpling + - OnePlus5T twrp-link: cheeseburger_dumpling steps: unlock_bootloader: @@ -12,24 +16,21 @@ 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. - flash_recovery: + 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: > - 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..290b5605 100644 --- a/openandroidinstaller/assets/configs/enchilada.yaml +++ b/openandroidinstaller/assets/configs/enchilada.yaml @@ -1,7 +1,11 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus 6 - devicecode: enchilada + device_name: OnePlus 6 + is_ab_device: true + device_code: enchilada + supported_device_codes: + - enchilada + - OnePlus6 requirements: android: 11 steps: @@ -13,33 +17,30 @@ 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. - flash_recovery: + 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: > - 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. + command: adb_twrp_copy_partitions - 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. \ 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/evert.yaml b/openandroidinstaller/assets/configs/evert.yaml index 790c1e0f..5dd98f0f 100644 --- a/openandroidinstaller/assets/configs/evert.yaml +++ b/openandroidinstaller/assets/configs/evert.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Motorola moto g6 plus - devicecode: evert + device_name: Motorola moto g6 plus + is_ab_device: true + device_code: evert + supported_device_codes: + - evert steps: unlock_bootloader: - type: call_button @@ -34,22 +37,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..a19da40e 100644 --- a/openandroidinstaller/assets/configs/fajita.yaml +++ b/openandroidinstaller/assets/configs/fajita.yaml @@ -1,7 +1,12 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus 6T - devicecode: fajita + device_name: OnePlus 6T + is_ab_device: true + device_code: fajita + supported_device_codes: + - fajita + - OnePlus6T + - OnePlus6TSingle requirements: android: 11 steps: @@ -13,33 +18,30 @@ 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. - flash_recovery: + 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: > - 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. + command: adb_twrp_copy_partitions - 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. \ 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/flame.yaml b/openandroidinstaller/assets/configs/flame.yaml index 2bbd5d31..1d41b157 100644 --- a/openandroidinstaller/assets/configs/flame.yaml +++ b/openandroidinstaller/assets/configs/flame.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Pixel 4 - devicecode: flame + device_name: Pixel 4 + is_ab_device: true + device_code: flame + supported_device_codes: + - flame requirements: android: 13 steps: @@ -29,10 +32,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 +43,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..16b140d4 100644 --- a/openandroidinstaller/assets/configs/greatlte.yaml +++ b/openandroidinstaller/assets/configs/greatlte.yaml @@ -1,10 +1,13 @@ metadata: maintainer: Michel Memeteau (freechelmi) - devicename: Samsung Galaxy note 8 - devicecode: greatlte + device_name: Samsung Galaxy note 8 + is_ab_device: false + device_code: greatlte + supported_device_codes: + - 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 +15,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..8eb80ca6 100644 --- a/openandroidinstaller/assets/configs/griffin.yaml +++ b/openandroidinstaller/assets/configs/griffin.yaml @@ -1,7 +1,10 @@ metadata: maintainer: SirRGB - devicename: Motorola Moto Z - devicecode: griffin + device_name: Motorola Moto Z + is_ab_device: false + device_code: griffin + supported_device_codes: + - griffin steps: unlock_bootloader: - type: call_button @@ -34,13 +37,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..ccff40f1 100644 --- a/openandroidinstaller/assets/configs/guacamole.yaml +++ b/openandroidinstaller/assets/configs/guacamole.yaml @@ -1,7 +1,11 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus 7 Pro - devicecode: guacamole + device_name: OnePlus 7 Pro + is_ab_device: true + device_code: guacamole + supported_device_codes: + - guacamole + - OnePlus7Pro requirements: android: 12 steps: @@ -13,24 +17,21 @@ 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. - flash_recovery: + 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: > - 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..3f9af13d 100644 --- a/openandroidinstaller/assets/configs/guacamoleb.yaml +++ b/openandroidinstaller/assets/configs/guacamoleb.yaml @@ -1,7 +1,11 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus 7 - devicecode: guacamoleb + device_name: OnePlus 7 + is_ab_device: true + device_code: guacamoleb + supported_device_codes: + - guacamoleb + - OnePlus7 requirements: android: 12 steps: @@ -13,24 +17,21 @@ 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. - flash_recovery: + 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: > - 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..da44a6b5 100644 --- a/openandroidinstaller/assets/configs/hero2lte.yaml +++ b/openandroidinstaller/assets/configs/hero2lte.yaml @@ -1,10 +1,13 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S7 Edge - devicecode: hero2lte + device_name: Samsung Galaxy S7 Edge + is_ab_device: false + device_code: hero2lte + supported_device_codes: + - 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 +15,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..871f70b0 100644 --- a/openandroidinstaller/assets/configs/herolte.yaml +++ b/openandroidinstaller/assets/configs/herolte.yaml @@ -1,10 +1,14 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S7 - devicecode: herolte + device_name: Samsung Galaxy S7 + is_ab_device: false + device_code: herolte + supported_device_codes: + - herolte + - heroltexx 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 +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 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 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..b9fbc135 100644 --- a/openandroidinstaller/assets/configs/hltetmo.yaml +++ b/openandroidinstaller/assets/configs/hltetmo.yaml @@ -1,10 +1,13 @@ 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) + is_ab_device: false + device_code: hltetmo + supported_device_codes: + - 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 +16,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..bbb8aabb 100644 --- a/openandroidinstaller/assets/configs/hotdog.yaml +++ b/openandroidinstaller/assets/configs/hotdog.yaml @@ -1,7 +1,11 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus 7T Pro - devicecode: hotdog + device_name: OnePlus 7T Pro + is_ab_device: true + device_code: hotdog + supported_device_codes: + - hotdog + - OnePlus7TPro requirements: android: 12 steps: @@ -13,24 +17,21 @@ 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. - flash_recovery: + 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: > - 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..00a0e68e 100644 --- a/openandroidinstaller/assets/configs/hotdogb.yaml +++ b/openandroidinstaller/assets/configs/hotdogb.yaml @@ -1,7 +1,11 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: OnePlus 7T - devicecode: hotdogb + device_name: OnePlus 7T + is_ab_device: true + device_code: hotdogb + supported_device_codes: + - hotdogb + - OnePlus7T requirements: android: 12 steps: @@ -13,24 +17,21 @@ 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. - flash_recovery: + 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: > - 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..05d11897 100644 --- a/openandroidinstaller/assets/configs/j7elte.yaml +++ b/openandroidinstaller/assets/configs/j7elte.yaml @@ -1,10 +1,13 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy J7 (2015) - devicecode: j7elte + device_name: Samsung Galaxy J7 (2015) + is_ab_device: false + device_code: j7elte + supported_device_codes: + - 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 +15,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..11b45d54 100644 --- a/openandroidinstaller/assets/configs/kiev.yaml +++ b/openandroidinstaller/assets/configs/kiev.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Motorola moto g 5G / one 5G ace - devicecode: kiev + device_name: Motorola moto g 5G / one 5G ace + is_ab_device: true + device_code: kiev + supported_device_codes: + - kiev steps: unlock_bootloader: - type: call_button @@ -34,22 +37,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..20a44be8 100644 --- a/openandroidinstaller/assets/configs/kirin.yaml +++ b/openandroidinstaller/assets/configs/kirin.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Sony Xperia 10 - devicecode: kirin + device_name: Sony Xperia 10 + is_ab_device: true + device_code: kirin + supported_device_codes: + - kirin steps: unlock_bootloader: - type: confirm_button @@ -31,15 +34,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..cdaa5a22 100644 --- a/openandroidinstaller/assets/configs/mermaid.yaml +++ b/openandroidinstaller/assets/configs/mermaid.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Sony Xperia 10 Plus - devicecode: mermaid + device_name: Sony Xperia 10 Plus + is_ab_device: true + device_code: mermaid + supported_device_codes: + - mermaid steps: unlock_bootloader: - type: confirm_button @@ -31,15 +34,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..214d35a8 100644 --- a/openandroidinstaller/assets/configs/nairo.yaml +++ b/openandroidinstaller/assets/configs/nairo.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Motorola moto g 5G plus / one 5G - devicecode: nairo + device_name: Motorola moto g 5G plus / one 5G + is_ab_device: true + device_code: nairo + supported_device_codes: + - nairo steps: unlock_bootloader: - type: call_button @@ -34,22 +37,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..975a2432 100644 --- a/openandroidinstaller/assets/configs/ocean.yaml +++ b/openandroidinstaller/assets/configs/ocean.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Motorola Moto G7 power - devicecode: ocean + device_name: Motorola Moto G7 power + is_ab_device: true + device_code: ocean + supported_device_codes: + - ocean steps: unlock_bootloader: - type: call_button @@ -34,22 +37,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..bc07d885 100644 --- a/openandroidinstaller/assets/configs/pioneer.yaml +++ b/openandroidinstaller/assets/configs/pioneer.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Sony Xperia XA2 - devicecode: pioneer + device_name: Sony Xperia XA2 + is_ab_device: true + device_code: pioneer + supported_device_codes: + - pioneer requirements: android: 9 steps: @@ -33,15 +36,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..252e1e7c 100644 --- a/openandroidinstaller/assets/configs/racer.yaml +++ b/openandroidinstaller/assets/configs/racer.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Motorola edge - devicecode: racer + device_name: Motorola edge + is_ab_device: true + device_code: racer + supported_device_codes: + - racer steps: unlock_bootloader: - type: call_button @@ -34,22 +37,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..36c13980 100644 --- a/openandroidinstaller/assets/configs/redfin.yaml +++ b/openandroidinstaller/assets/configs/redfin.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Pixel 5 - devicecode: redfin + device_name: Pixel 5 + is_ab_device: true + device_code: redfin + supported_device_codes: + - redfin requirements: android: 12.1.0 steps: @@ -29,10 +32,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 +43,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..7fb97bf4 100644 --- a/openandroidinstaller/assets/configs/s3ve3g.yaml +++ b/openandroidinstaller/assets/configs/s3ve3g.yaml @@ -1,10 +1,13 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S III Neo - devicecode: s3ve3g + device_name: Samsung Galaxy S III Neo + is_ab_device: false + device_code: s3ve3g + supported_device_codes: + - 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 +29,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..68ada457 100644 --- a/openandroidinstaller/assets/configs/sargo.yaml +++ b/openandroidinstaller/assets/configs/sargo.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Pixel 3a - devicecode: sargo + device_name: Pixel 3a + is_ab_device: true + device_code: sargo + supported_device_codes: + - sargo requirements: android: 12.1.0 steps: @@ -24,14 +27,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..bfb87684 100644 --- a/openandroidinstaller/assets/configs/starlte.yaml +++ b/openandroidinstaller/assets/configs/starlte.yaml @@ -1,12 +1,15 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S9 - devicecode: starlte + device_name: Samsung Galaxy S9 + is_ab_device: false + device_code: starlte + supported_device_codes: + - starlte 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, diff --git a/openandroidinstaller/assets/configs/sunfish.yaml b/openandroidinstaller/assets/configs/sunfish.yaml index b91a734d..2a2baa5f 100644 --- a/openandroidinstaller/assets/configs/sunfish.yaml +++ b/openandroidinstaller/assets/configs/sunfish.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Pixel 4a - devicecode: sunfish + device_name: Pixel 4a + is_ab_device: true + device_code: sunfish + supported_device_codes: + - sunfish requirements: android: 12.1.0 steps: @@ -29,10 +32,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 +43,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..8457584e 100644 --- a/openandroidinstaller/assets/configs/taimen.yaml +++ b/openandroidinstaller/assets/configs/taimen.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Google Pixel 2 XL - devicecode: taimen + device_name: Google Pixel 2 XL + is_ab_device: true + device_code: taimen + supported_device_codes: + - taimen requirements: android: 11 steps: @@ -24,14 +27,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..d1482869 100644 --- a/openandroidinstaller/assets/configs/walleye.yaml +++ b/openandroidinstaller/assets/configs/walleye.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Google Pixel 2 - devicecode: walleye + device_name: Google Pixel 2 + is_ab_device: true + device_code: walleye + supported_device_codes: + - walleye requirements: android: 11 steps: @@ -24,14 +27,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..b9f23348 100644 --- a/openandroidinstaller/assets/configs/yuga.yaml +++ b/openandroidinstaller/assets/configs/yuga.yaml @@ -1,7 +1,11 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Sony Xperia Z - devicecode: yuga + device_name: Sony Xperia Z + is_ab_device: false + device_code: yuga + supported_device_codes: + - yuga + - C6603 steps: unlock_bootloader: - type: confirm_button @@ -31,10 +35,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..c75fb8a4 100644 --- a/openandroidinstaller/assets/configs/z3.yaml +++ b/openandroidinstaller/assets/configs/z3.yaml @@ -1,7 +1,10 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Sony Xperia Z3 - devicecode: z3 + device_name: Sony Xperia Z3 + is_ab_device: false + device_code: z3 + supported_device_codes: + - z3 requirements: firmware: 23.5.A.1.291 steps: @@ -33,10 +36,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..3f6cd24e 100644 --- a/openandroidinstaller/assets/configs/zerofltexx.yaml +++ b/openandroidinstaller/assets/configs/zerofltexx.yaml @@ -1,10 +1,13 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S6 - devicecode: zerofltexx + device_name: Samsung Galaxy S6 + is_ab_device: false + device_code: zerofltexx + supported_device_codes: + - 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 +15,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..b891d4e9 100644 --- a/openandroidinstaller/assets/configs/zeroltexx.yaml +++ b/openandroidinstaller/assets/configs/zeroltexx.yaml @@ -1,10 +1,14 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - devicename: Samsung Galaxy S6 Edge - devicecode: zeroltexx + device_name: Samsung Galaxy S6 Edge + is_ab_device: false + device_code: zeroltexx + supported_device_codes: + - zeroltexx + - zerolte 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 +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 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..70ca5a01 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,44 +49,22 @@ 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], - 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") + 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") - # 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: @@ -111,11 +89,29 @@ 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 _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]: @@ -124,26 +120,23 @@ 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. """ - # 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")) - try: + custom_path = _find_config_file(device_code, config_path=Path.cwd()) + 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 = config_path.joinpath(Path(f"{mapped_device_code}.yaml")) - try: + path = _find_config_file(device_code, config_path) + + 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 @@ -157,7 +150,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, @@ -168,8 +161,10 @@ def validate_config(config: str) -> bool: { "metadata": { "maintainer": str, - "devicename": str, - "devicecode": str, + "device_name": str, + "is_ab_device": bool, + "device_code": str, + "supported_device_codes": [str], schema.Optional("twrp-link"): str, }, schema.Optional("requirements"): { @@ -178,7 +173,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/openandroidinstaller.py b/openandroidinstaller/openandroidinstaller.py index f6b26431..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, @@ -57,7 +59,7 @@ logger.add("openandroidinstaller.log") # VERSION number -VERSION = "0.4.1-beta" +VERSION = "0.4.2-beta" # detect platform PLATFORM = sys.platform @@ -97,7 +99,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) @@ -247,6 +252,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.FEEDBACK_OUTLINED, + text="Give feedback", + on_click=lambda _: webbrowser.open( + "https://openandroidinstaller.org/feedback.html" + ), + ), + padding=15, + tooltip="Give feedback about your experience with OpenAndroidInstaller", + ), Container( content=ElevatedButton( icon=icons.BUG_REPORT_OUTLINED, 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/tooling.py b/openandroidinstaller/tooling.py index fc16e7e8..c8b95dfd 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 @@ -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 @@ -353,36 +355,33 @@ def fastboot_reboot(bin_path: Path) -> TerminalResponse: yield line -@add_logging("Flash or boot custom recovery with fastboot.") -def fastboot_flash_recovery( +@add_logging("Boot custom recovery with fastboot.") +def fastboot_boot_recovery( bin_path: Path, recovery: str, is_ab: bool = True ) -> TerminalResponse: - """Temporarily, flash custom recovery with fastboot.""" + """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( "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 @@ -391,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: @@ -469,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/utils.py b/openandroidinstaller/utils.py index 7a83cb83..0c17baf5 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 @@ -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 @@ -39,9 +40,7 @@ def get_download_link(devicecode: str) -> Optional[str]: return None -def image_works_with_device( - device_code: str, alternative_device_code: 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( @@ -51,9 +50,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/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..547ea540 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, ) @@ -158,7 +161,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..fca0e728 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, ) @@ -189,7 +192,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/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 705880b9..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 @@ -115,7 +117,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 +258,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 +300,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..b2c912b5 100644 --- a/openandroidinstaller/views/start_view.py +++ b/openandroidinstaller/views/start_view.py @@ -25,20 +25,21 @@ 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 -from tooling import search_device, check_ab_partition -from installer_config import InstallerConfig +from tooling import search_device class StartView(BaseView): @@ -99,13 +100,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( @@ -186,7 +187,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.", ), @@ -214,7 +215,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." ) @@ -222,9 +223,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 @@ -240,11 +238,9 @@ 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( - "devicename", "No device name in config." + "device_name", "No device name in config." ) else: device_name = None @@ -254,8 +250,13 @@ 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 + # if there are no steps for bootloader unlocking, assume there is nothing to do and toggle the switch + 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}.") diff --git a/openandroidinstaller/views/step_view.py b/openandroidinstaller/views/step_view.py index 86e5ef23..0fd5966a 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 @@ -38,7 +42,7 @@ adb_reboot_download, adb_sideload, adb_twrp_copy_partitions, - fastboot_flash_recovery, + fastboot_boot_recovery, fastboot_flash_boot, fastboot_oem_unlock, fastboot_reboot, @@ -106,7 +110,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( @@ -217,10 +221,10 @@ 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, + is_ab=self.state.config.is_ab, ), "fastboot_flash_boot": partial( fastboot_flash_boot, diff --git a/openandroidinstaller/views/success_view.py b/openandroidinstaller/views/success_view.py index 04016af8..697b59d7 100644 --- a/openandroidinstaller/views/success_view.py +++ b/openandroidinstaller/views/success_view.py @@ -13,15 +13,16 @@ # If not, see .""" # Author: Tobias Sterbak -import webbrowser from loguru import logger from flet import ( ElevatedButton, Row, +) + +from styles import ( Text, Markdown, ) - from views import BaseView from app_state import AppState from widgets import get_title @@ -36,9 +37,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() @@ -47,7 +45,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!", 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, 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" 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): diff --git a/tests/test_tooling.py b/tests/test_tooling.py index c66f6e97..ffcaeb5a 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, ) @@ -96,43 +95,3 @@ def patched_check_output(*args, **kwargs): ) 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