diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..0bf5e19c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,36 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. Windows 10] + - Version [e.g. 0.4.2] + +**Smartphone (please complete the following information):** + - Device: [e.g. Samsung Galaxy S10] + - OS: [e.g. LineageOS] + - Version [e.g. 0.4.2] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/device-support-request.md b/.github/ISSUE_TEMPLATE/device-support-request.md new file mode 100644 index 00000000..325b5f8e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/device-support-request.md @@ -0,0 +1,21 @@ +--- +name: Device support request +about: Request support for a new device +title: '' +labels: '' +assignees: '' + +--- + +**Device name** +Please enter the name of the device you would like to request support for. +If you know the device code, please also add it here. + +**Device images** +Please provide links to any available images of the device, such as official stock firmware or custom ROMs you would like to install. + +**Do you own the device and would be willing to test the installer?** +- [ ] + +**Additional context** +Please provide any additional context or information that may be helpful in adding support for this device. diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 00000000..bbcbbe7d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/README.md b/README.md index a1c79cf9..d0e9fe80 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. @@ -200,6 +200,7 @@ A config file consists of two parts. The first part are some metadata about the Every config file should have metadata with the following fields: - `maintainer`: str; Maintainer and author of the config file. - `device_name`: str; Name of the device. +- `is_ab_device`: bool; A boolean to determine if the device is a/b-partitioned or not. - `device_code`: str; The official device code. - `supported_device_codes`: List[str]; A list of supported device codes for the config. The config will be loaded based on this field. - `twrp-link`: [OPTIONAL] str; name of the corresponding twrp page. diff --git a/openandroidinstaller/app_state.py b/openandroidinstaller/app_state.py index 40fb427d..49f69155 100644 --- a/openandroidinstaller/app_state.py +++ b/openandroidinstaller/app_state.py @@ -43,7 +43,6 @@ def __init__( self.config = None self.image_path = None self.recovery_path = None - self.is_ab = None # store views self.default_views: List = [] diff --git a/openandroidinstaller/assets/configs/FP2.yaml b/openandroidinstaller/assets/configs/FP2.yaml index c00c70dc..afcf3976 100644 --- a/openandroidinstaller/assets/configs/FP2.yaml +++ b/openandroidinstaller/assets/configs/FP2.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Fairphone 2 + is_ab_device: false device_code: FP2 supported_device_codes: - FP2 diff --git a/openandroidinstaller/assets/configs/FP3.yaml b/openandroidinstaller/assets/configs/FP3.yaml index 19bdb5a5..b6b775d0 100644 --- a/openandroidinstaller/assets/configs/FP3.yaml +++ b/openandroidinstaller/assets/configs/FP3.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Fairphone 3 + is_ab_device: true device_code: FP3 supported_device_codes: - FP3 diff --git a/openandroidinstaller/assets/configs/FP4.yaml b/openandroidinstaller/assets/configs/FP4.yaml index ebf59f4f..7fdc1fd1 100644 --- a/openandroidinstaller/assets/configs/FP4.yaml +++ b/openandroidinstaller/assets/configs/FP4.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Fairphone 4 + is_ab_device: true device_code: FP4 supported_device_codes: - FP4 diff --git a/openandroidinstaller/assets/configs/a3y17lte.yaml b/openandroidinstaller/assets/configs/a3y17lte.yaml index e0ec7461..27f86cc4 100644 --- a/openandroidinstaller/assets/configs/a3y17lte.yaml +++ b/openandroidinstaller/assets/configs/a3y17lte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy A3 (2017) + is_ab_device: false device_code: a3y17lte supported_device_codes: - a3y17lte diff --git a/openandroidinstaller/assets/configs/a5xelte.yaml b/openandroidinstaller/assets/configs/a5xelte.yaml index 06b0769c..7f1761b0 100644 --- a/openandroidinstaller/assets/configs/a5xelte.yaml +++ b/openandroidinstaller/assets/configs/a5xelte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy A5 (2016) + is_ab_device: false device_code: a5xelte supported_device_codes: - a5xelte diff --git a/openandroidinstaller/assets/configs/a72q.yaml b/openandroidinstaller/assets/configs/a72q.yaml index 87721275..70a58bf4 100644 --- a/openandroidinstaller/assets/configs/a72q.yaml +++ b/openandroidinstaller/assets/configs/a72q.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy A72 + is_ab_device: false device_code: a72q supported_device_codes: - a72q diff --git a/openandroidinstaller/assets/configs/a7xelte.yaml b/openandroidinstaller/assets/configs/a7xelte.yaml index 856ba6b6..ae575de3 100644 --- a/openandroidinstaller/assets/configs/a7xelte.yaml +++ b/openandroidinstaller/assets/configs/a7xelte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy A7 (2016) + is_ab_device: false device_code: a7xelte supported_device_codes: - a7xelte diff --git a/openandroidinstaller/assets/configs/akari.yaml b/openandroidinstaller/assets/configs/akari.yaml index e5bf40d6..20b7ed8d 100644 --- a/openandroidinstaller/assets/configs/akari.yaml +++ b/openandroidinstaller/assets/configs/akari.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia XZ2 + is_ab_device: true device_code: akari supported_device_codes: - akari diff --git a/openandroidinstaller/assets/configs/akatsuki.yaml b/openandroidinstaller/assets/configs/akatsuki.yaml index bc825a25..41b8e7bf 100644 --- a/openandroidinstaller/assets/configs/akatsuki.yaml +++ b/openandroidinstaller/assets/configs/akatsuki.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia XZ3 + is_ab_device: true device_code: akatsuki supported_device_codes: - akatsuki diff --git a/openandroidinstaller/assets/configs/avicii.yaml b/openandroidinstaller/assets/configs/avicii.yaml index 7a828956..c87efdbb 100644 --- a/openandroidinstaller/assets/configs/avicii.yaml +++ b/openandroidinstaller/assets/configs/avicii.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus Nord + is_ab_device: true device_code: avicii supported_device_codes: - avicii @@ -16,17 +17,13 @@ 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. + 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: > @@ -35,14 +32,15 @@ steps: Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. command: adb_reboot_bootloader - type: call_button - content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: > + Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_boot_recovery - type: call_button - command: adb_twrp_copy_partitions content: > In some cases, the inactive slot can be unpopulated or contain much older firmware than the active slot, leading to various issues including a potential hard-brick. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. + command: adb_twrp_copy_partitions - type: call_button - command: fastboot_boot_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file + Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. + command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/bacon.yaml b/openandroidinstaller/assets/configs/bacon.yaml index d1739cfe..9412527b 100644 --- a/openandroidinstaller/assets/configs/bacon.yaml +++ b/openandroidinstaller/assets/configs/bacon.yaml @@ -1,6 +1,7 @@ metadata: maintainer: MagicLike device_name: OnePlus One + is_ab_device: false device_code: bacon supported_device_codes: - bacon diff --git a/openandroidinstaller/assets/configs/barbet.yaml b/openandroidinstaller/assets/configs/barbet.yaml index cef8f74a..00c14fb5 100644 --- a/openandroidinstaller/assets/configs/barbet.yaml +++ b/openandroidinstaller/assets/configs/barbet.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Pixel 5a + is_ab_device: true device_code: barbet supported_device_codes: - barbet diff --git a/openandroidinstaller/assets/configs/beyond0lte.yaml b/openandroidinstaller/assets/configs/beyond0lte.yaml index e5c6be64..d357ac95 100644 --- a/openandroidinstaller/assets/configs/beyond0lte.yaml +++ b/openandroidinstaller/assets/configs/beyond0lte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S10e + is_ab_device: false device_code: beyond0lte supported_device_codes: - beyond0lte diff --git a/openandroidinstaller/assets/configs/beyond1lte.yaml b/openandroidinstaller/assets/configs/beyond1lte.yaml index b915be41..d9952f38 100644 --- a/openandroidinstaller/assets/configs/beyond1lte.yaml +++ b/openandroidinstaller/assets/configs/beyond1lte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S10 + is_ab_device: false device_code: beyond1lte supported_device_codes: - beyond1lte diff --git a/openandroidinstaller/assets/configs/beyond2lte.yaml b/openandroidinstaller/assets/configs/beyond2lte.yaml index 7df64b5e..7a0c0c23 100644 --- a/openandroidinstaller/assets/configs/beyond2lte.yaml +++ b/openandroidinstaller/assets/configs/beyond2lte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S10+ + is_ab_device: false device_code: beyond2lte supported_device_codes: - beyond2lte diff --git a/openandroidinstaller/assets/configs/blueline.yaml b/openandroidinstaller/assets/configs/blueline.yaml index ffb418a3..b60ec55a 100644 --- a/openandroidinstaller/assets/configs/blueline.yaml +++ b/openandroidinstaller/assets/configs/blueline.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Google Pixel 3 + is_ab_device: true device_code: blueline supported_device_codes: - blueline diff --git a/openandroidinstaller/assets/configs/bonito.yaml b/openandroidinstaller/assets/configs/bonito.yaml index 219c0daa..d26bfa34 100644 --- a/openandroidinstaller/assets/configs/bonito.yaml +++ b/openandroidinstaller/assets/configs/bonito.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Google Pixel 3a XL + is_ab_device: true device_code: bonito supported_device_codes: - bonito diff --git a/openandroidinstaller/assets/configs/cedric.yaml b/openandroidinstaller/assets/configs/cedric.yaml index 16311c8c..5f7e9728 100644 --- a/openandroidinstaller/assets/configs/cedric.yaml +++ b/openandroidinstaller/assets/configs/cedric.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Motorola Moto G5 + is_ab_device: false device_code: cedric supported_device_codes: - cedric diff --git a/openandroidinstaller/assets/configs/cheeseburger.yaml b/openandroidinstaller/assets/configs/cheeseburger.yaml index 832ea06f..e321a1e7 100644 --- a/openandroidinstaller/assets/configs/cheeseburger.yaml +++ b/openandroidinstaller/assets/configs/cheeseburger.yaml @@ -1,6 +1,7 @@ metadata: maintainer: SirRGB device_name: OnePlus 5 + is_ab_device: false device_code: cheeseburger supported_device_codes: - cheeseburger @@ -15,17 +16,13 @@ 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. + 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: > @@ -34,5 +31,6 @@ steps: Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. command: adb_reboot_bootloader - type: call_button - content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: > + Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/coral.yaml b/openandroidinstaller/assets/configs/coral.yaml index 4a7f194b..a469e721 100644 --- a/openandroidinstaller/assets/configs/coral.yaml +++ b/openandroidinstaller/assets/configs/coral.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Google Pixel 4 XL + is_ab_device: true device_code: coral supported_device_codes: - coral diff --git a/openandroidinstaller/assets/configs/crosshatch.yaml b/openandroidinstaller/assets/configs/crosshatch.yaml index e42609a9..7ae26231 100644 --- a/openandroidinstaller/assets/configs/crosshatch.yaml +++ b/openandroidinstaller/assets/configs/crosshatch.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Google Pixel 3 XL + is_ab_device: true device_code: crosshatch supported_device_codes: - crosshatch diff --git a/openandroidinstaller/assets/configs/crownlte.yaml b/openandroidinstaller/assets/configs/crownlte.yaml index 19dfbe9b..27291a6a 100644 --- a/openandroidinstaller/assets/configs/crownlte.yaml +++ b/openandroidinstaller/assets/configs/crownlte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy Note 9 + is_ab_device: false device_code: crownlte supported_device_codes: - crownlte diff --git a/openandroidinstaller/assets/configs/d1.yaml b/openandroidinstaller/assets/configs/d1.yaml index e28a3906..feceec7c 100644 --- a/openandroidinstaller/assets/configs/d1.yaml +++ b/openandroidinstaller/assets/configs/d1.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy Note 10 + is_ab_device: false device_code: d1 supported_device_codes: - d1 diff --git a/openandroidinstaller/assets/configs/d2s.yaml b/openandroidinstaller/assets/configs/d2s.yaml index 3e0b705f..5e1af505 100644 --- a/openandroidinstaller/assets/configs/d2s.yaml +++ b/openandroidinstaller/assets/configs/d2s.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy Note 10+ + is_ab_device: false device_code: d2s supported_device_codes: - d2s diff --git a/openandroidinstaller/assets/configs/dre.yaml b/openandroidinstaller/assets/configs/dre.yaml index fa04addf..900eb668 100644 --- a/openandroidinstaller/assets/configs/dre.yaml +++ b/openandroidinstaller/assets/configs/dre.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus Nord N200 + is_ab_device: true device_code: dre supported_device_codes: - dre @@ -16,17 +17,13 @@ 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. + 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: > @@ -35,14 +32,15 @@ steps: Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. command: adb_reboot_bootloader - type: call_button - content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: > + Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_boot_recovery - type: call_button - command: adb_twrp_copy_partitions content: > In some cases, the inactive slot can be unpopulated or contain much older firmware than the active slot, leading to various issues including a potential hard-brick. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. + command: adb_twrp_copy_partitions - type: call_button - command: fastboot_boot_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file + Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. + command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/dumpling.yaml b/openandroidinstaller/assets/configs/dumpling.yaml index 329280cf..c2dd40f4 100644 --- a/openandroidinstaller/assets/configs/dumpling.yaml +++ b/openandroidinstaller/assets/configs/dumpling.yaml @@ -1,6 +1,7 @@ metadata: maintainer: SirRGB device_name: OnePlus 5T + is_ab_device: false device_code: dumpling supported_device_codes: - dumpling @@ -15,17 +16,13 @@ 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. + 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: > @@ -34,5 +31,6 @@ steps: Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. command: adb_reboot_bootloader - type: call_button - content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: > + Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/enchilada.yaml b/openandroidinstaller/assets/configs/enchilada.yaml index 5456fd84..290b5605 100644 --- a/openandroidinstaller/assets/configs/enchilada.yaml +++ b/openandroidinstaller/assets/configs/enchilada.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus 6 + is_ab_device: true device_code: enchilada supported_device_codes: - enchilada @@ -16,17 +17,13 @@ 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. + 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: > @@ -35,14 +32,15 @@ steps: Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. command: adb_reboot_bootloader - type: call_button - content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: > + Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_boot_recovery - type: call_button - command: adb_twrp_copy_partitions content: > In some cases, the inactive slot can be unpopulated or contain much older firmware than the active slot, leading to various issues including a potential hard-brick. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. + command: adb_twrp_copy_partitions - type: call_button - command: fastboot_boot_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file + Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. + command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/evert.yaml b/openandroidinstaller/assets/configs/evert.yaml index 24a9e602..5dd98f0f 100644 --- a/openandroidinstaller/assets/configs/evert.yaml +++ b/openandroidinstaller/assets/configs/evert.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Motorola moto g6 plus + is_ab_device: true device_code: evert supported_device_codes: - evert diff --git a/openandroidinstaller/assets/configs/fajita.yaml b/openandroidinstaller/assets/configs/fajita.yaml index 9eb558d6..a19da40e 100644 --- a/openandroidinstaller/assets/configs/fajita.yaml +++ b/openandroidinstaller/assets/configs/fajita.yaml @@ -1,10 +1,12 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus 6T + is_ab_device: true device_code: fajita supported_device_codes: - fajita - OnePlus6T + - OnePlus6TSingle requirements: android: 11 steps: @@ -16,17 +18,13 @@ 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. + 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: > @@ -35,14 +33,15 @@ steps: Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. command: adb_reboot_bootloader - type: call_button - content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: > + Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_boot_recovery - type: call_button - command: adb_twrp_copy_partitions content: > In some cases, the inactive slot can be unpopulated or contain much older firmware than the active slot, leading to various issues including a potential hard-brick. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. Press 'confirm and run' to to this. Once you are in the bootloader again, continue. + command: adb_twrp_copy_partitions - type: call_button - command: fastboot_boot_recovery content: > - Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. \ No newline at end of file + Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. + command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/flame.yaml b/openandroidinstaller/assets/configs/flame.yaml index 4e2e38b6..1d41b157 100644 --- a/openandroidinstaller/assets/configs/flame.yaml +++ b/openandroidinstaller/assets/configs/flame.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Pixel 4 + is_ab_device: true device_code: flame supported_device_codes: - flame diff --git a/openandroidinstaller/assets/configs/greatlte.yaml b/openandroidinstaller/assets/configs/greatlte.yaml index c5464fa4..16b140d4 100644 --- a/openandroidinstaller/assets/configs/greatlte.yaml +++ b/openandroidinstaller/assets/configs/greatlte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Michel Memeteau (freechelmi) device_name: Samsung Galaxy note 8 + is_ab_device: false device_code: greatlte supported_device_codes: - greatlte diff --git a/openandroidinstaller/assets/configs/griffin.yaml b/openandroidinstaller/assets/configs/griffin.yaml index b4fb3fb3..8eb80ca6 100644 --- a/openandroidinstaller/assets/configs/griffin.yaml +++ b/openandroidinstaller/assets/configs/griffin.yaml @@ -1,6 +1,7 @@ metadata: maintainer: SirRGB device_name: Motorola Moto Z + is_ab_device: false device_code: griffin supported_device_codes: - griffin diff --git a/openandroidinstaller/assets/configs/guacamole.yaml b/openandroidinstaller/assets/configs/guacamole.yaml index e6f54988..ccff40f1 100644 --- a/openandroidinstaller/assets/configs/guacamole.yaml +++ b/openandroidinstaller/assets/configs/guacamole.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus 7 Pro + is_ab_device: true device_code: guacamole supported_device_codes: - guacamole @@ -16,17 +17,13 @@ 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. + 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: > @@ -35,5 +32,6 @@ steps: Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. command: adb_reboot_bootloader - type: call_button - content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: > + Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/guacamoleb.yaml b/openandroidinstaller/assets/configs/guacamoleb.yaml index 28c93690..3f9af13d 100644 --- a/openandroidinstaller/assets/configs/guacamoleb.yaml +++ b/openandroidinstaller/assets/configs/guacamoleb.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus 7 + is_ab_device: true device_code: guacamoleb supported_device_codes: - guacamoleb @@ -16,17 +17,13 @@ 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. + 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: > @@ -35,5 +32,6 @@ steps: Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. command: adb_reboot_bootloader - type: call_button - content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: > + Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/hero2lte.yaml b/openandroidinstaller/assets/configs/hero2lte.yaml index 44c0101c..da44a6b5 100644 --- a/openandroidinstaller/assets/configs/hero2lte.yaml +++ b/openandroidinstaller/assets/configs/hero2lte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S7 Edge + is_ab_device: false device_code: hero2lte supported_device_codes: - hero2lte diff --git a/openandroidinstaller/assets/configs/herolte.yaml b/openandroidinstaller/assets/configs/herolte.yaml index 4e102e61..871f70b0 100644 --- a/openandroidinstaller/assets/configs/herolte.yaml +++ b/openandroidinstaller/assets/configs/herolte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S7 + is_ab_device: false device_code: herolte supported_device_codes: - herolte diff --git a/openandroidinstaller/assets/configs/hltetmo.yaml b/openandroidinstaller/assets/configs/hltetmo.yaml index 57776fa1..b9fbc135 100644 --- a/openandroidinstaller/assets/configs/hltetmo.yaml +++ b/openandroidinstaller/assets/configs/hltetmo.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy Note 3 LTE (N900T/V/W8) + is_ab_device: false device_code: hltetmo supported_device_codes: - hltetmo diff --git a/openandroidinstaller/assets/configs/hotdog.yaml b/openandroidinstaller/assets/configs/hotdog.yaml index cbe7c5bf..bbb8aabb 100644 --- a/openandroidinstaller/assets/configs/hotdog.yaml +++ b/openandroidinstaller/assets/configs/hotdog.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus 7T Pro + is_ab_device: true device_code: hotdog supported_device_codes: - hotdog @@ -16,17 +17,13 @@ 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. + 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: > @@ -35,5 +32,6 @@ steps: Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. command: adb_reboot_bootloader - type: call_button - content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: > + Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/hotdogb.yaml b/openandroidinstaller/assets/configs/hotdogb.yaml index 555b5c0a..00a0e68e 100644 --- a/openandroidinstaller/assets/configs/hotdogb.yaml +++ b/openandroidinstaller/assets/configs/hotdogb.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: OnePlus 7T + is_ab_device: true device_code: hotdogb supported_device_codes: - hotdogb @@ -16,17 +17,13 @@ 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. + 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: > @@ -35,5 +32,6 @@ steps: Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. command: adb_reboot_bootloader - type: call_button - content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. + content: > + Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue. command: fastboot_boot_recovery \ No newline at end of file diff --git a/openandroidinstaller/assets/configs/j7elte.yaml b/openandroidinstaller/assets/configs/j7elte.yaml index fa63cece..05d11897 100644 --- a/openandroidinstaller/assets/configs/j7elte.yaml +++ b/openandroidinstaller/assets/configs/j7elte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy J7 (2015) + is_ab_device: false device_code: j7elte supported_device_codes: - j7elte diff --git a/openandroidinstaller/assets/configs/kiev.yaml b/openandroidinstaller/assets/configs/kiev.yaml index 743ae743..11b45d54 100644 --- a/openandroidinstaller/assets/configs/kiev.yaml +++ b/openandroidinstaller/assets/configs/kiev.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Motorola moto g 5G / one 5G ace + is_ab_device: true device_code: kiev supported_device_codes: - kiev diff --git a/openandroidinstaller/assets/configs/kirin.yaml b/openandroidinstaller/assets/configs/kirin.yaml index 626df4f4..20a44be8 100644 --- a/openandroidinstaller/assets/configs/kirin.yaml +++ b/openandroidinstaller/assets/configs/kirin.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia 10 + is_ab_device: true device_code: kirin supported_device_codes: - kirin diff --git a/openandroidinstaller/assets/configs/mermaid.yaml b/openandroidinstaller/assets/configs/mermaid.yaml index 3660cb4f..cdaa5a22 100644 --- a/openandroidinstaller/assets/configs/mermaid.yaml +++ b/openandroidinstaller/assets/configs/mermaid.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia 10 Plus + is_ab_device: true device_code: mermaid supported_device_codes: - mermaid diff --git a/openandroidinstaller/assets/configs/nairo.yaml b/openandroidinstaller/assets/configs/nairo.yaml index 422c40fd..214d35a8 100644 --- a/openandroidinstaller/assets/configs/nairo.yaml +++ b/openandroidinstaller/assets/configs/nairo.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Motorola moto g 5G plus / one 5G + is_ab_device: true device_code: nairo supported_device_codes: - nairo diff --git a/openandroidinstaller/assets/configs/ocean.yaml b/openandroidinstaller/assets/configs/ocean.yaml index 7c6c9a7c..975a2432 100644 --- a/openandroidinstaller/assets/configs/ocean.yaml +++ b/openandroidinstaller/assets/configs/ocean.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Motorola Moto G7 power + is_ab_device: true device_code: ocean supported_device_codes: - ocean diff --git a/openandroidinstaller/assets/configs/pioneer.yaml b/openandroidinstaller/assets/configs/pioneer.yaml index 7480b263..bc07d885 100644 --- a/openandroidinstaller/assets/configs/pioneer.yaml +++ b/openandroidinstaller/assets/configs/pioneer.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia XA2 + is_ab_device: true device_code: pioneer supported_device_codes: - pioneer diff --git a/openandroidinstaller/assets/configs/racer.yaml b/openandroidinstaller/assets/configs/racer.yaml index f67ae11c..252e1e7c 100644 --- a/openandroidinstaller/assets/configs/racer.yaml +++ b/openandroidinstaller/assets/configs/racer.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Motorola edge + is_ab_device: true device_code: racer supported_device_codes: - racer diff --git a/openandroidinstaller/assets/configs/redfin.yaml b/openandroidinstaller/assets/configs/redfin.yaml index e40ef553..36c13980 100644 --- a/openandroidinstaller/assets/configs/redfin.yaml +++ b/openandroidinstaller/assets/configs/redfin.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Pixel 5 + is_ab_device: true device_code: redfin supported_device_codes: - redfin diff --git a/openandroidinstaller/assets/configs/s3ve3g.yaml b/openandroidinstaller/assets/configs/s3ve3g.yaml index 19dbf51e..7fb97bf4 100644 --- a/openandroidinstaller/assets/configs/s3ve3g.yaml +++ b/openandroidinstaller/assets/configs/s3ve3g.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S III Neo + is_ab_device: false device_code: s3ve3g supported_device_codes: - s3ve3g diff --git a/openandroidinstaller/assets/configs/sargo.yaml b/openandroidinstaller/assets/configs/sargo.yaml index af1b6da4..68ada457 100644 --- a/openandroidinstaller/assets/configs/sargo.yaml +++ b/openandroidinstaller/assets/configs/sargo.yaml @@ -1,7 +1,8 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Pixel 3a - device_code: sargo + is_ab_device: true + device_code: sargo supported_device_codes: - sargo requirements: diff --git a/openandroidinstaller/assets/configs/starlte.yaml b/openandroidinstaller/assets/configs/starlte.yaml index 71c6f7f2..bfb87684 100644 --- a/openandroidinstaller/assets/configs/starlte.yaml +++ b/openandroidinstaller/assets/configs/starlte.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S9 + is_ab_device: false device_code: starlte supported_device_codes: - starlte diff --git a/openandroidinstaller/assets/configs/sunfish.yaml b/openandroidinstaller/assets/configs/sunfish.yaml index 53b80d01..2a2baa5f 100644 --- a/openandroidinstaller/assets/configs/sunfish.yaml +++ b/openandroidinstaller/assets/configs/sunfish.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Pixel 4a + is_ab_device: true device_code: sunfish supported_device_codes: - sunfish diff --git a/openandroidinstaller/assets/configs/taimen.yaml b/openandroidinstaller/assets/configs/taimen.yaml index d4a371df..8457584e 100644 --- a/openandroidinstaller/assets/configs/taimen.yaml +++ b/openandroidinstaller/assets/configs/taimen.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Google Pixel 2 XL + is_ab_device: true device_code: taimen supported_device_codes: - taimen diff --git a/openandroidinstaller/assets/configs/walleye.yaml b/openandroidinstaller/assets/configs/walleye.yaml index 88e450ed..d1482869 100644 --- a/openandroidinstaller/assets/configs/walleye.yaml +++ b/openandroidinstaller/assets/configs/walleye.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Google Pixel 2 + is_ab_device: true device_code: walleye supported_device_codes: - walleye diff --git a/openandroidinstaller/assets/configs/yuga.yaml b/openandroidinstaller/assets/configs/yuga.yaml index d2a97434..b9f23348 100644 --- a/openandroidinstaller/assets/configs/yuga.yaml +++ b/openandroidinstaller/assets/configs/yuga.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia Z + is_ab_device: false device_code: yuga supported_device_codes: - yuga diff --git a/openandroidinstaller/assets/configs/z3.yaml b/openandroidinstaller/assets/configs/z3.yaml index 410c07d2..c75fb8a4 100644 --- a/openandroidinstaller/assets/configs/z3.yaml +++ b/openandroidinstaller/assets/configs/z3.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Sony Xperia Z3 + is_ab_device: false device_code: z3 supported_device_codes: - z3 diff --git a/openandroidinstaller/assets/configs/zerofltexx.yaml b/openandroidinstaller/assets/configs/zerofltexx.yaml index f823b726..3f6cd24e 100644 --- a/openandroidinstaller/assets/configs/zerofltexx.yaml +++ b/openandroidinstaller/assets/configs/zerofltexx.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S6 + is_ab_device: false device_code: zerofltexx supported_device_codes: - zerofltexx diff --git a/openandroidinstaller/assets/configs/zeroltexx.yaml b/openandroidinstaller/assets/configs/zeroltexx.yaml index f2a080e9..b891d4e9 100644 --- a/openandroidinstaller/assets/configs/zeroltexx.yaml +++ b/openandroidinstaller/assets/configs/zeroltexx.yaml @@ -1,6 +1,7 @@ metadata: maintainer: Tobias Sterbak (tsterbak) device_name: Samsung Galaxy S6 Edge + is_ab_device: false device_code: zeroltexx supported_device_codes: - zeroltexx diff --git a/openandroidinstaller/installer_config.py b/openandroidinstaller/installer_config.py index 0707423b..70ca5a01 100644 --- a/openandroidinstaller/installer_config.py +++ b/openandroidinstaller/installer_config.py @@ -61,6 +61,7 @@ def __init__( self.metadata = metadata self.requirements = requirements self.device_code = metadata.get("device_code") + self.is_ab = metadata.get("is_ab_device", False) self.supported_device_codes = metadata.get("supported_device_codes") self.twrp_link = metadata.get("twrp-link") @@ -161,6 +162,7 @@ def validate_config(config: str) -> bool: "metadata": { "maintainer": str, "device_name": str, + "is_ab_device": bool, "device_code": str, "supported_device_codes": [str], schema.Optional("twrp-link"): str, diff --git a/openandroidinstaller/openandroidinstaller.py b/openandroidinstaller/openandroidinstaller.py index a04bea42..1862c3fd 100644 --- a/openandroidinstaller/openandroidinstaller.py +++ b/openandroidinstaller/openandroidinstaller.py @@ -31,7 +31,6 @@ Icon, Image, Page, - Text, TextButton, UserControl, colors, @@ -39,6 +38,9 @@ ) from loguru import logger +from styles import ( + Text, +) from app_state import AppState from views import ( SelectFilesView, diff --git a/openandroidinstaller/styles.py b/openandroidinstaller/styles.py new file mode 100644 index 00000000..6d8f8aa8 --- /dev/null +++ b/openandroidinstaller/styles.py @@ -0,0 +1,30 @@ +"""This module contains different pre-configured style elements for building the application.""" + +# This file is part of OpenAndroidInstaller. +# OpenAndroidInstaller is free software: you can redistribute it and/or modify it under the terms of +# the GNU General Public License as published by the Free Software Foundation, +# either version 3 of the License, or (at your option) any later version. + +# OpenAndroidInstaller is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License along with OpenAndroidInstaller. +# If not, see .""" +# Author: Tobias Sterbak + +import flet as ft + + +class Text(ft.Text): + """Text element to replace the default text element from flet but is selectable.""" + + def __init__(self, *args, **kwargs): + super().__init__(selectable=True, *args, **kwargs) + + +class Markdown(ft.Markdown): + """Markdown element to replace the markdown element from flet but is selectable.""" + + def __init__(self, *args, **kwargs): + super().__init__(selectable=True, *args, **kwargs) diff --git a/openandroidinstaller/tooling.py b/openandroidinstaller/tooling.py index 097c35e6..c8b95dfd 100644 --- a/openandroidinstaller/tooling.py +++ b/openandroidinstaller/tooling.py @@ -468,43 +468,3 @@ def search_device(platform: str, bin_path: Path) -> Optional[str]: except CalledProcessError: logger.error("Failed to detect a device.") return None - - -def check_ab_partition(platform: str, bin_path: Path) -> Optional[bool]: - """Figure out, if its an a/b-partitioned device.""" - logger.info(f"Run on {platform} with {bin_path}...") - try: - # check if ab device - if platform in ("linux", "darwin"): - output = check_output( - [ - str(bin_path.joinpath(Path("adb"))), - "shell", - "getprop", - "|", - "grep", - "ro.boot.slot_suffix", - ], - stderr=STDOUT, - ).decode() - elif platform in ("windows", "win32"): - output = check_output( - [ - str(bin_path.joinpath(Path("adb.exe"))), - "shell", - "getprop", - "|", - "findstr", - "ro.boot.slot_suffix", - ], - stderr=STDOUT, - shell=True, - ).decode() - else: - raise Exception(f"Unknown platform {platform}.") - logger.info(output) - logger.info("This is an a/b-partitioned device.") - return True - except CalledProcessError: - logger.info("This is not an a/b-partitioned device.") - return False diff --git a/openandroidinstaller/utils.py b/openandroidinstaller/utils.py index ea34997f..0c17baf5 100644 --- a/openandroidinstaller/utils.py +++ b/openandroidinstaller/utils.py @@ -22,15 +22,16 @@ def get_download_link(devicecode: str) -> Optional[str]: """Check if a lineageOS version for this device exists on download.lineageos.com and return the respective download link.""" - url = f"https://download.lineageos.org/{devicecode}" + url = f"https://download.lineageos.org/api/v2/devices/{devicecode}" try: logger.info(f"Checking {url}") # Get Url res = requests.get(url, timeout=5) # if the request succeeds if res.status_code == 200: - logger.info(f"{url} exists.") - return url + download_url = f"https://download.lineageos.org/devices/{devicecode}/builds" + logger.info(f"{download_url} exists.") + return download_url else: logger.info(f"{url} doesn't exist, status_code: {res.status_code}") return None diff --git a/openandroidinstaller/views/addon_view.py b/openandroidinstaller/views/addon_view.py index 748a6e4e..7b9e7b95 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 7cec409b..b981e293 100644 --- a/openandroidinstaller/views/select_view.py +++ b/openandroidinstaller/views/select_view.py @@ -23,9 +23,7 @@ ElevatedButton, OutlinedButton, FilledButton, - Markdown, Row, - Text, colors, icons, TextButton, @@ -35,6 +33,10 @@ ) from flet.buttons import CountinuosRectangleBorder +from styles import ( + Text, + Markdown, +) from views import BaseView from app_state import AppState from widgets import get_title, confirm_button diff --git a/openandroidinstaller/views/start_view.py b/openandroidinstaller/views/start_view.py index abf64064..b2c912b5 100644 --- a/openandroidinstaller/views/start_view.py +++ b/openandroidinstaller/views/start_view.py @@ -25,19 +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 tooling import search_device class StartView(BaseView): @@ -213,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." ) @@ -221,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 @@ -239,8 +238,6 @@ def search_devices(self, e): self.device_name.value = device_code # load config from file self.state.load_config(device_code) - # write ab-info to state - self.state.is_ab = is_ab if self.state.config: device_name = self.state.config.metadata.get( "device_name", "No device name in config." @@ -257,6 +254,9 @@ def search_devices(self, e): f"{device_name} (code: {self.state.config.device_code})" ) self.device_name.color = colors.GREEN + # if there are no steps for bootloader unlocking, assume there is nothing to do and toggle the switch + 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 eb484eb3..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 @@ -220,7 +224,7 @@ def call_to_phone(self, e, command: str): "fastboot_boot_recovery": partial( fastboot_boot_recovery, recovery=self.state.recovery_path, - is_ab=self.state.is_ab, + is_ab=self.state.config.is_ab, ), "fastboot_flash_boot": partial( fastboot_flash_boot, diff --git a/openandroidinstaller/views/success_view.py b/openandroidinstaller/views/success_view.py index 30a1dc8a..697b59d7 100644 --- a/openandroidinstaller/views/success_view.py +++ b/openandroidinstaller/views/success_view.py @@ -17,10 +17,12 @@ from flet import ( ElevatedButton, Row, +) + +from styles import ( Text, Markdown, ) - from views import BaseView from app_state import AppState from widgets import get_title diff --git a/openandroidinstaller/views/welcome_view.py b/openandroidinstaller/views/welcome_view.py index 59de038b..a3560ea7 100644 --- a/openandroidinstaller/views/welcome_view.py +++ b/openandroidinstaller/views/welcome_view.py @@ -18,12 +18,15 @@ from flet import ( Divider, ElevatedButton, - Markdown, Row, - Text, icons, ) +from styles import ( + Text, + Markdown, +) + from views import BaseView from app_state import AppState from widgets import get_title diff --git a/openandroidinstaller/widgets.py b/openandroidinstaller/widgets.py index d57c006f..c488d36c 100644 --- a/openandroidinstaller/widgets.py +++ b/openandroidinstaller/widgets.py @@ -26,7 +26,6 @@ ProgressRing, ProgressBar, Row, - Text, alignment, icons, IconButton, @@ -34,6 +33,10 @@ Column, ) +from styles import ( + Text, +) + class TerminalBox(UserControl): def __init__(self, expand: bool = True, visible: bool = False): @@ -43,7 +46,7 @@ def __init__(self, expand: bool = True, visible: bool = False): def build(self): self._box = Container( content=Column( - controls=[Text("", selectable=True)], + controls=[Text("")], scroll="auto", expand=True, auto_scroll=True, 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