diff --git a/.github/ISSUE_TEMPLATE/device-support-request.yaml b/.github/ISSUE_TEMPLATE/device-support-request.yaml index 59323439..2d35be61 100644 --- a/.github/ISSUE_TEMPLATE/device-support-request.yaml +++ b/.github/ISSUE_TEMPLATE/device-support-request.yaml @@ -59,17 +59,16 @@ body: - type: textarea attributes: label: Device images - description: "Please provide links to any available images for the device, such as official stock firmware, Custom ROMs and Recoveries you would like to install." + description: "Please provide links to at least one Custom ROM and TWRP build. This is mandatory for OpenAndroidInstaller support." placeholder: | - Custom ROM: https://wiki.lineageos.org/devices/sargo - Recovery: https://twrp.me/google/googlepixel3a.html #value: | # - Custom ROM: # - Recovery: - # - Stock firmware (if needed & existing): render: Markdown validations: - required: false + required: true - type: markdown attributes: value: "---" diff --git a/.gitignore b/.gitignore index eb4c282e..2e111a14 100644 --- a/.gitignore +++ b/.gitignore @@ -104,10 +104,13 @@ Control.ca-bundle Control.system-ca-bundle GitHub.sublime-settings -# Visual Studio Code # +# Visual Studio Code .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json .history + +# Fleet +.fleet diff --git a/README.md b/README.md index c8096d94..a3d172df 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ ## Usage -Linux is currently the best supported platform (tested with Ubuntu 20.04/22.04 LTS). Windows and macOS are also supported, but you might experience more issues. +Linux is currently the best supported platform (tested with Ubuntu 24.04 LTS). Windows and macOS are also supported, but you might experience more issues. ### 1. Download OpenAndroidInstaller @@ -197,13 +197,23 @@ Samsung | Galaxy Note 10+ | [d2s](https://wiki.lineageos.org/devices/d2s) | | te Vendor | Device Name | CodeName | Models | Status ---|---|---|---|--- Sony | Xperia Z | [yuga](https://wiki.lineageos.org/devices/yuga) | C6603 | tested -Sony | Xperia Z3 | [z3](https://wiki.lineageos.org/devices/z3) | | tested -Sony | Xperia 10 | [kirin](https://wiki.lineageos.org/devices/kirin) | | tested -Sony | Xperia 10 Plus | [mermaid](https://wiki.lineageos.org/devices/mermaid) | | tested -Sony | Xperia XA2 | [pioneer](https://wiki.lineageos.org/devices/pioneer) | | tested -Sony | Xperia XZ2 | [akari](https://wiki.lineageos.org/devices/akari) | | tested -Sony | Xperia XZ3 | [akatsuki](https://wiki.lineageos.org/devices/akatsuki) | | tested -Sony | Xperia XZ | kagura | | planned +Sony | Xperia Z3 | [z3](https://wiki.lineageos.org/devices/z3) | D6603 | tested +Sony | Xperia Z3 Compact | [z3c](https://wiki.lineageos.org/devices/z3c) | D5803, D5833 | untested +Sony | Xperia 10 | [kirin](https://wiki.lineageos.org/devices/kirin) | I3113, I3123, I4113, I4193 | tested +Sony | Xperia 10 Plus | [mermaid](https://wiki.lineageos.org/devices/mermaid) | I3213, I3223, I4213, I4293 | tested +Sony | Xperia XA2 | [pioneer](https://wiki.lineageos.org/devices/pioneer) | H3113, H4113, H3133, H4133, H3123 | tested +Sony | Xperia XZ Premium | maple | G8141 | untested +Sony | Xperia XZ Premium Dual Sim | maple_dsds | G8142 | untested +Sony | Xperia XZ1 | poplar | G8341 | tested +Sony | Xperia XZ1 Dual Sim | poplar_dsds | G8342 | untested +Sony | Xperia XZ1 Canada | poplar_canada | G8343 | untested +Sony | Xperia XZ1 KDDI | poplar_kddi | SOV36 | untested +Sony | Xperia XZ1 Compact | lilac | G8441, G8442 | untested +Sony | Xperia XZ2 | [akari](https://wiki.lineageos.org/devices/akari) | H8216, H8266, H8276, H8296 | tested +Sony | Xperia XZ2 Compact | [xz2c](https://wiki.lineageos.org/devices/xz2c) | H8314, H8324 | untested +Sony | Xperia XZ2 Premium | [aurora](https://wiki.lineageos.org/devices/aurora) | H8116, H8166 | untested +Sony | Xperia XZ3 | [akatsuki](https://wiki.lineageos.org/devices/akatsuki) | H8416, H9436, H9493 | tested +Sony | Xperia XZ | kagura | F8331 | planned diff --git a/docs/building_the_application_for_your_platform.md b/docs/building_the_application_for_your_platform.md index 08c9d628..a65544fb 100644 --- a/docs/building_the_application_for_your_platform.md +++ b/docs/building_the_application_for_your_platform.md @@ -9,5 +9,6 @@ If you build the application for your platform and want to contribute the build, Currently development is mainly done on Ubuntu Linux. MacOS, Windows, as well as other Linux distributions like Fedora should also work well. You might need to install additional USB-drivers on Windows. 1. Clone the main branch of this repository -2. Run `make poetry` and `make install` to install poetry to manage python and install the required dependencies like adb, fastboot and heimdall. -3. Run `make app` to start the desktop app from the source. +2. Set up [venv](https://docs.python.org/3/library/venv.html) +3. Run `make poetry` and `make install` to install poetry to manage python and install the required dependencies like adb, fastboot and heimdall. +4. Run `make app` to start the desktop app from the source. diff --git a/openandroidinstaller/assets/configs/FP3.yaml b/openandroidinstaller/assets/configs/FP3.yaml index 60bd304a..7ca9d9da 100644 --- a/openandroidinstaller/assets/configs/FP3.yaml +++ b/openandroidinstaller/assets/configs/FP3.yaml @@ -13,7 +13,7 @@ steps: how to start and run an operating system (like Android). Your device should be turned on. Click on the button to open the instructions on the Fairphone Support official unlocking website to generate an unlock code for your device. Once you've done that, continue. - link: https://www.fairphone.com/en/bootloader-unlocking-code-for-fairphone-3/ + link: https://www.fairphone.com/en/bootloader-unlocking-code-for-fairphone - type: call_button content: > Press 'Confirm and run' to reboot into the bootloader. diff --git a/openandroidinstaller/assets/configs/FP4.yaml b/openandroidinstaller/assets/configs/FP4.yaml index 6ef41026..ddd6d56c 100644 --- a/openandroidinstaller/assets/configs/FP4.yaml +++ b/openandroidinstaller/assets/configs/FP4.yaml @@ -13,7 +13,7 @@ steps: how to start and run an operating system (like Android). Your device should be turned on. Click on the button to open the instructions on the Fairphone Support official unlocking website to generate an unlock code for your device. Once you've done that, continue. - link: https://www.fairphone.com/en/bootloader-unlocking-code-for-fairphone-3/ + link: https://www.fairphone.com/en/bootloader-unlocking-code-for-fairphone - type: call_button content: > Press 'Confirm and run' to reboot into the bootloader. diff --git a/openandroidinstaller/assets/configs/akari.yaml b/openandroidinstaller/assets/configs/akari.yaml index b781b0b4..64d4a79c 100644 --- a/openandroidinstaller/assets/configs/akari.yaml +++ b/openandroidinstaller/assets/configs/akari.yaml @@ -22,7 +22,7 @@ steps: content: > Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. Once you got the code write it down somewhere and continue to input the code. - link: https://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader - type: confirm_button content: > Connect the device to your PC via USB. And confirm to continue. diff --git a/openandroidinstaller/assets/configs/akatsuki.yaml b/openandroidinstaller/assets/configs/akatsuki.yaml index daaa1fcc..2e0322b4 100644 --- a/openandroidinstaller/assets/configs/akatsuki.yaml +++ b/openandroidinstaller/assets/configs/akatsuki.yaml @@ -22,7 +22,7 @@ steps: content: > Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. Once you got the code write it down somewhere and continue to input the code. - link: https://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader - type: confirm_button content: > Connect the device to your PC via USB. And confirm to continue. diff --git a/openandroidinstaller/assets/configs/aurora.yaml b/openandroidinstaller/assets/configs/aurora.yaml new file mode 100644 index 00000000..08b8ff0c --- /dev/null +++ b/openandroidinstaller/assets/configs/aurora.yaml @@ -0,0 +1,63 @@ +metadata: + maintainer: Tobias Sterbak (tsterbak)/SirRGB + device_name: Sony Xperia XZ2 Premium + is_ab_device: true + device_code: aurora + supported_device_codes: + - aurora + untested: true +requirements: + android: 10 +steps: + unlock_bootloader: + - type: confirm_button + content: > + As a first step, you need to unlock the bootloader of your device. On the device, dial *#*#7378423#*#* (*#*#SERVICE#*#*) to launch the service menu. + - type: confirm_button + content: > + Go to service info > configuration and check rooting status - you can only continue if it says 'Bootloader unlock allowed":" Yes.' + - type: confirm_button + content: > + Now go to Settings 'About the phone' and then Status. Write down the IMEI of your device. You will need it in the next step. + - type: link_button_with_confirm + content: > + Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. + Once you got the code write it down somewhere and continue to input the code. + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader + - type: confirm_button + content: > + Connect the device to your PC via USB. And confirm to continue. + - type: call_button + content: > + Press the button to reboot into the bootloader now. When the notification light turns blue, confirm to continue. + command: adb_reboot_bootloader + - type: call_button_with_input + content: > + Use your code to unlock the bootloader of your device. Type in the full 18 character code starting with 0x (Example: 0x3EC4F7AD6E0B32B6). + If you already did that, you can skip this step. + command: fastboot_unlock_with_code + - type: call_button + content: > + 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 + 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_flash_boot + - type: call_button + 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 + content: > + Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. + command: fastboot_flash_boot diff --git a/openandroidinstaller/assets/configs/kirin.yaml b/openandroidinstaller/assets/configs/kirin.yaml index 566d3f4d..adf9475e 100644 --- a/openandroidinstaller/assets/configs/kirin.yaml +++ b/openandroidinstaller/assets/configs/kirin.yaml @@ -20,7 +20,7 @@ steps: content: > Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. Once you got the code write it down somewhere and continue to input the code. - link: https://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader - type: confirm_button content: > Connect the device to your PC via USB. And confirm to continue. diff --git a/openandroidinstaller/assets/configs/lilac.yaml b/openandroidinstaller/assets/configs/lilac.yaml new file mode 100644 index 00000000..b4a99671 --- /dev/null +++ b/openandroidinstaller/assets/configs/lilac.yaml @@ -0,0 +1,54 @@ +metadata: + maintainer: Tobias Sterbak (tsterbak)/SirRGB + device_name: Sony Xperia XZ1 Compact + is_ab_device: false + device_code: lilac + supported_device_codes: + - lilac + - G8441 + twrp-link: lilac + untested: true +requirements: + android: 9 +steps: + unlock_bootloader: + - type: confirm_button + content: > + As a first step, you need to unlock the bootloader of your device. On the device, dial *#*#7378423#*#* (*#*#SERVICE#*#*) to launch the service menu. + - type: confirm_button + content: > + Go to service info > configuration and check rooting status - you can only continue if it says 'Bootloader unlock allowed":" Yes.' + - type: confirm_button + content: > + Now go to Settings 'About the phone' and then Status. Write down the IMEI of your device. You will need it in the next step. + - type: link_button_with_confirm + content: > + Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. + Once you got the code write it down somewhere and continue to input the code. + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader + - type: confirm_button + content: > + Connect the device to your PC via USB. And confirm to continue. + - type: call_button + content: > + Press the button to reboot into the bootloader now. When the notification light turns blue, confirm to continue. + command: adb_reboot_bootloader + - type: call_button_with_input + content: > + Use your code to unlock the bootloader of your device. Type in the full 18 character code starting with 0x (Example: 0x3EC4F7AD6E0B32B6). + If you already did that, you can skip this step. + command: fastboot_unlock_with_code + - type: call_button + content: > + 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 + 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 boot a custom recovery image. Press the button to flash the selected image. Then continue. + command: fastboot_flash_boot diff --git a/openandroidinstaller/assets/configs/maple.yaml b/openandroidinstaller/assets/configs/maple.yaml new file mode 100644 index 00000000..53f57321 --- /dev/null +++ b/openandroidinstaller/assets/configs/maple.yaml @@ -0,0 +1,54 @@ +metadata: + maintainer: Tobias Sterbak (tsterbak)/SirRGB + device_name: Sony Xperia XZ Premium + is_ab_device: false + device_code: maple + supported_device_codes: + - maple + - G8141 + twrp-link: maple + untested: true +requirements: + android: 9 +steps: + unlock_bootloader: + - type: confirm_button + content: > + As a first step, you need to unlock the bootloader of your device. On the device, dial *#*#7378423#*#* (*#*#SERVICE#*#*) to launch the service menu. + - type: confirm_button + content: > + Go to service info > configuration and check rooting status - you can only continue if it says 'Bootloader unlock allowed":" Yes.' + - type: confirm_button + content: > + Now go to Settings 'About the phone' and then Status. Write down the IMEI of your device. You will need it in the next step. + - type: link_button_with_confirm + content: > + Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. + Once you got the code write it down somewhere and continue to input the code. + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader + - type: confirm_button + content: > + Connect the device to your PC via USB. And confirm to continue. + - type: call_button + content: > + Press the button to reboot into the bootloader now. When the notification light turns blue, confirm to continue. + command: adb_reboot_bootloader + - type: call_button_with_input + content: > + Use your code to unlock the bootloader of your device. Type in the full 18 character code starting with 0x (Example: 0x3EC4F7AD6E0B32B6). + If you already did that, you can skip this step. + command: fastboot_unlock_with_code + - type: call_button + content: > + 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 + 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 boot a custom recovery image. Press the button to flash the selected image. Then continue. + command: fastboot_flash_boot diff --git a/openandroidinstaller/assets/configs/maple_dsds.yaml b/openandroidinstaller/assets/configs/maple_dsds.yaml new file mode 100644 index 00000000..89956d24 --- /dev/null +++ b/openandroidinstaller/assets/configs/maple_dsds.yaml @@ -0,0 +1,54 @@ +metadata: + maintainer: Tobias Sterbak (tsterbak)/SirRGB + device_name: Sony Xperia XZ Premium Dual Sim + is_ab_device: false + device_code: maple_dsds + supported_device_codes: + - maple_dsds + - G8142 + twrp-link: maple_dsds + untested: true +requirements: + android: 9 +steps: + unlock_bootloader: + - type: confirm_button + content: > + As a first step, you need to unlock the bootloader of your device. On the device, dial *#*#7378423#*#* (*#*#SERVICE#*#*) to launch the service menu. + - type: confirm_button + content: > + Go to service info > configuration and check rooting status - you can only continue if it says 'Bootloader unlock allowed":" Yes.' + - type: confirm_button + content: > + Now go to Settings 'About the phone' and then Status. Write down the IMEI of your device. You will need it in the next step. + - type: link_button_with_confirm + content: > + Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. + Once you got the code write it down somewhere and continue to input the code. + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader + - type: confirm_button + content: > + Connect the device to your PC via USB. And confirm to continue. + - type: call_button + content: > + Press the button to reboot into the bootloader now. When the notification light turns blue, confirm to continue. + command: adb_reboot_bootloader + - type: call_button_with_input + content: > + Use your code to unlock the bootloader of your device. Type in the full 18 character code starting with 0x (Example: 0x3EC4F7AD6E0B32B6). + If you already did that, you can skip this step. + command: fastboot_unlock_with_code + - type: call_button + content: > + 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 + 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 boot a custom recovery image. Press the button to flash the selected image. Then continue. + command: fastboot_flash_boot diff --git a/openandroidinstaller/assets/configs/mermaid.yaml b/openandroidinstaller/assets/configs/mermaid.yaml index 59cac632..2c739f0b 100644 --- a/openandroidinstaller/assets/configs/mermaid.yaml +++ b/openandroidinstaller/assets/configs/mermaid.yaml @@ -20,7 +20,7 @@ steps: content: > Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. Once you got the code write it down somewhere and continue to input the code. - link: https://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader - type: confirm_button content: > Connect the device to your PC via USB. And confirm to continue. diff --git a/openandroidinstaller/assets/configs/pioneer.yaml b/openandroidinstaller/assets/configs/pioneer.yaml index 17a3458f..47d2298f 100644 --- a/openandroidinstaller/assets/configs/pioneer.yaml +++ b/openandroidinstaller/assets/configs/pioneer.yaml @@ -22,7 +22,7 @@ steps: content: > Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. Once you got the code write it down somewhere and continue to input the code. - link: https://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader - type: confirm_button content: > Connect the device to your PC via USB. And confirm to continue. diff --git a/openandroidinstaller/assets/configs/poplar.yaml b/openandroidinstaller/assets/configs/poplar.yaml new file mode 100644 index 00000000..ab426fac --- /dev/null +++ b/openandroidinstaller/assets/configs/poplar.yaml @@ -0,0 +1,53 @@ +metadata: + maintainer: Tobias Sterbak (tsterbak)/SirRGB + device_name: Sony Xperia XZ1 + is_ab_device: false + device_code: poplar + supported_device_codes: + - poplar + - G8341 + twrp-link: poplar +requirements: + android: 9 +steps: + unlock_bootloader: + - type: confirm_button + content: > + As a first step, you need to unlock the bootloader of your device. On the device, dial *#*#7378423#*#* (*#*#SERVICE#*#*) to launch the service menu. + - type: confirm_button + content: > + Go to service info > configuration and check rooting status - you can only continue if it says 'Bootloader unlock allowed":" Yes.' + - type: confirm_button + content: > + Now go to Settings 'About the phone' and then Status. Write down the IMEI of your device. You will need it in the next step. + - type: link_button_with_confirm + content: > + Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. + Once you got the code write it down somewhere and continue to input the code. + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader + - type: confirm_button + content: > + Connect the device to your PC via USB. And confirm to continue. + - type: call_button + content: > + Press the button to reboot into the bootloader now. When the notification light turns blue, confirm to continue. + command: adb_reboot_bootloader + - type: call_button_with_input + content: > + Use your code to unlock the bootloader of your device. Type in the full 18 character code starting with 0x (Example: 0x3EC4F7AD6E0B32B6). + If you already did that, you can skip this step. + command: fastboot_unlock_with_code + - type: call_button + content: > + 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 + 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 boot a custom recovery image. Press the button to flash the selected image. Then continue. + command: fastboot_flash_boot diff --git a/openandroidinstaller/assets/configs/poplar_canada.yaml b/openandroidinstaller/assets/configs/poplar_canada.yaml new file mode 100644 index 00000000..91bed1d4 --- /dev/null +++ b/openandroidinstaller/assets/configs/poplar_canada.yaml @@ -0,0 +1,54 @@ +metadata: + maintainer: Tobias Sterbak (tsterbak)/SirRGB + device_name: Sony Xperia XZ1 Canada + is_ab_device: false + device_code: poplar_canada + supported_device_codes: + - poplar_canada + - G8343 + twrp-link: poplar_canada + untested: true +requirements: + android: 9 +steps: + unlock_bootloader: + - type: confirm_button + content: > + As a first step, you need to unlock the bootloader of your device. On the device, dial *#*#7378423#*#* (*#*#SERVICE#*#*) to launch the service menu. + - type: confirm_button + content: > + Go to service info > configuration and check rooting status - you can only continue if it says 'Bootloader unlock allowed":" Yes.' + - type: confirm_button + content: > + Now go to Settings 'About the phone' and then Status. Write down the IMEI of your device. You will need it in the next step. + - type: link_button_with_confirm + content: > + Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. + Once you got the code write it down somewhere and continue to input the code. + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader + - type: confirm_button + content: > + Connect the device to your PC via USB. And confirm to continue. + - type: call_button + content: > + Press the button to reboot into the bootloader now. When the notification light turns blue, confirm to continue. + command: adb_reboot_bootloader + - type: call_button_with_input + content: > + Use your code to unlock the bootloader of your device. Type in the full 18 character code starting with 0x (Example: 0x3EC4F7AD6E0B32B6). + If you already did that, you can skip this step. + command: fastboot_unlock_with_code + - type: call_button + content: > + 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 + 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 boot a custom recovery image. Press the button to flash the selected image. Then continue. + command: fastboot_flash_boot diff --git a/openandroidinstaller/assets/configs/poplar_dsds.yaml b/openandroidinstaller/assets/configs/poplar_dsds.yaml new file mode 100644 index 00000000..c4c2eed2 --- /dev/null +++ b/openandroidinstaller/assets/configs/poplar_dsds.yaml @@ -0,0 +1,54 @@ +metadata: + maintainer: Tobias Sterbak (tsterbak)/SirRGB + device_name: Sony Xperia XZ1 Dual Sim + is_ab_device: false + device_code: poplar_dsds + supported_device_codes: + - poplar_dsds + - G8342 + twrp-link: poplar_dsds + untested: true +requirements: + android: 9 +steps: + unlock_bootloader: + - type: confirm_button + content: > + As a first step, you need to unlock the bootloader of your device. On the device, dial *#*#7378423#*#* (*#*#SERVICE#*#*) to launch the service menu. + - type: confirm_button + content: > + Go to service info > configuration and check rooting status - you can only continue if it says 'Bootloader unlock allowed":" Yes.' + - type: confirm_button + content: > + Now go to Settings 'About the phone' and then Status. Write down the IMEI of your device. You will need it in the next step. + - type: link_button_with_confirm + content: > + Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. + Once you got the code write it down somewhere and continue to input the code. + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader + - type: confirm_button + content: > + Connect the device to your PC via USB. And confirm to continue. + - type: call_button + content: > + Press the button to reboot into the bootloader now. When the notification light turns blue, confirm to continue. + command: adb_reboot_bootloader + - type: call_button_with_input + content: > + Use your code to unlock the bootloader of your device. Type in the full 18 character code starting with 0x (Example: 0x3EC4F7AD6E0B32B6). + If you already did that, you can skip this step. + command: fastboot_unlock_with_code + - type: call_button + content: > + 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 + 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 boot a custom recovery image. Press the button to flash the selected image. Then continue. + command: fastboot_flash_boot diff --git a/openandroidinstaller/assets/configs/poplar_kddi.yaml b/openandroidinstaller/assets/configs/poplar_kddi.yaml new file mode 100644 index 00000000..38351f59 --- /dev/null +++ b/openandroidinstaller/assets/configs/poplar_kddi.yaml @@ -0,0 +1,54 @@ +metadata: + maintainer: Tobias Sterbak (tsterbak)/SirRGB + device_name: Sony Xperia XZ1 KDDI + is_ab_device: false + device_code: poplar_kddi + supported_device_codes: + - poplar_kddi + - G8341 + twrp-link: poplar_kddi + untested: true +requirements: + android: 9 +steps: + unlock_bootloader: + - type: confirm_button + content: > + As a first step, you need to unlock the bootloader of your device. On the device, dial *#*#7378423#*#* (*#*#SERVICE#*#*) to launch the service menu. + - type: confirm_button + content: > + Go to service info > configuration and check rooting status - you can only continue if it says 'Bootloader unlock allowed":" Yes.' + - type: confirm_button + content: > + Now go to Settings 'About the phone' and then Status. Write down the IMEI of your device. You will need it in the next step. + - type: link_button_with_confirm + content: > + Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. + Once you got the code write it down somewhere and continue to input the code. + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader + - type: confirm_button + content: > + Connect the device to your PC via USB. And confirm to continue. + - type: call_button + content: > + Press the button to reboot into the bootloader now. When the notification light turns blue, confirm to continue. + command: adb_reboot_bootloader + - type: call_button_with_input + content: > + Use your code to unlock the bootloader of your device. Type in the full 18 character code starting with 0x (Example: 0x3EC4F7AD6E0B32B6). + If you already did that, you can skip this step. + command: fastboot_unlock_with_code + - type: call_button + content: > + 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 + 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 boot a custom recovery image. Press the button to flash the selected image. Then continue. + command: fastboot_flash_boot diff --git a/openandroidinstaller/assets/configs/xz2c.yaml b/openandroidinstaller/assets/configs/xz2c.yaml new file mode 100644 index 00000000..5fbb634f --- /dev/null +++ b/openandroidinstaller/assets/configs/xz2c.yaml @@ -0,0 +1,63 @@ +metadata: + maintainer: Tobias Sterbak (tsterbak)/SirRGB + device_name: Sony Xperia XZ2 compact + is_ab_device: true + device_code: xz2c + supported_device_codes: + - xz2c + untested: true +requirements: + android: 10 +steps: + unlock_bootloader: + - type: confirm_button + content: > + As a first step, you need to unlock the bootloader of your device. On the device, dial *#*#7378423#*#* (*#*#SERVICE#*#*) to launch the service menu. + - type: confirm_button + content: > + Go to service info > configuration and check rooting status - you can only continue if it says 'Bootloader unlock allowed":" Yes.' + - type: confirm_button + content: > + Now go to Settings 'About the phone' and then Status. Write down the IMEI of your device. You will need it in the next step. + - type: link_button_with_confirm + content: > + Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. + Once you got the code write it down somewhere and continue to input the code. + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader + - type: confirm_button + content: > + Connect the device to your PC via USB. And confirm to continue. + - type: call_button + content: > + Press the button to reboot into the bootloader now. When the notification light turns blue, confirm to continue. + command: adb_reboot_bootloader + - type: call_button_with_input + content: > + Use your code to unlock the bootloader of your device. Type in the full 18 character code starting with 0x (Example: 0x3EC4F7AD6E0B32B6). + If you already did that, you can skip this step. + command: fastboot_unlock_with_code + - type: call_button + content: > + 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 + 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_flash_boot + - type: call_button + 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 + content: > + Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue. + command: fastboot_flash_boot diff --git a/openandroidinstaller/assets/configs/yuga.yaml b/openandroidinstaller/assets/configs/yuga.yaml index b385d663..4f25a228 100644 --- a/openandroidinstaller/assets/configs/yuga.yaml +++ b/openandroidinstaller/assets/configs/yuga.yaml @@ -21,7 +21,7 @@ steps: content: > Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. Once you got the code write it down somewhere and continue to input the code. - link: https://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader - type: confirm_button content: > Connect the device to your PC via USB. And confirm to continue. diff --git a/openandroidinstaller/assets/configs/z3.yaml b/openandroidinstaller/assets/configs/z3.yaml index 0e907cd7..103679ab 100644 --- a/openandroidinstaller/assets/configs/z3.yaml +++ b/openandroidinstaller/assets/configs/z3.yaml @@ -22,7 +22,7 @@ steps: content: > Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. Once you got the code write it down somewhere and continue to input the code. - link: https://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader - type: confirm_button content: > Connect the device to your PC via USB. And confirm to continue. diff --git a/openandroidinstaller/assets/configs/z3c.yaml b/openandroidinstaller/assets/configs/z3c.yaml new file mode 100644 index 00000000..4f5d6cca --- /dev/null +++ b/openandroidinstaller/assets/configs/z3c.yaml @@ -0,0 +1,52 @@ +metadata: + maintainer: Tobias Sterbak (tsterbak)/SirRGB + device_name: Sony Xperia Z3 compact + is_ab_device: false + device_code: z3c + supported_device_codes: + - z3c + untested: true +requirements: + firmware: 23.5.A.1.291 +steps: + unlock_bootloader: + - type: confirm_button + content: > + As a first step, you need to unlock the bootloader of your device. On the device, dial *#*#7378423#*#* (*#*#SERVICE#*#*) to launch the service menu. + - type: confirm_button + content: > + Go to service info > configuration and check rooting status - you can only continue if it says 'Bootloader unlock allowed":" Yes.' + - type: confirm_button + content: > + Now go to Settings 'About the phone' and then Status. Write down the IMEI of your device. You will need it in the next step. + - type: link_button_with_confirm + content: > + Click on the button to open the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. + Once you got the code write it down somewhere and continue to input the code. + link: https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader + - type: confirm_button + content: > + Connect the device to your PC via USB. And confirm to continue. + - type: call_button + content: > + Press the button to reboot into the bootloader now. When the notification light turns blue, confirm to continue. + command: adb_reboot_bootloader + - type: call_button_with_input + content: > + Use your code to unlock the bootloader of your device. Type in the full 18 character code starting with 0x (Example: 0x3EC4F7AD6E0B32B6). + If you already did that, you can skip this step. + command: fastboot_unlock_with_code + - type: call_button + content: > + 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 + 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 boot a custom recovery image. Press the button to flash the selected image. Then continue. + command: fastboot_flash_boot diff --git a/openandroidinstaller/openandroidinstaller.py b/openandroidinstaller/openandroidinstaller.py index 3372e8fa..df68b69d 100644 --- a/openandroidinstaller/openandroidinstaller.py +++ b/openandroidinstaller/openandroidinstaller.py @@ -49,7 +49,7 @@ ) # VERSION number -VERSION = "0.5.5-beta" +VERSION = "0.5.6-beta" # detect platform PLATFORM = sys.platform diff --git a/openandroidinstaller/views/addon_view.py b/openandroidinstaller/views/addon_view.py index 29b48211..c136b696 100644 --- a/openandroidinstaller/views/addon_view.py +++ b/openandroidinstaller/views/addon_view.py @@ -75,7 +75,9 @@ def build(self): """, ), actions=[ - TextButton("Close", on_click=self.close_close_explain_addons_dlg), + TextButton( + "Close", on_click=lambda _: self.page.close(self.dlg_explain_addons) + ), ], actions_alignment="end", shape=ContinuousRectangleBorder(radius=0), @@ -98,7 +100,7 @@ def build(self): # create help/info button to show the help dialog info_button = OutlinedButton( "What kind of addons?", - on_click=self.open_explain_addons_dlg, + on_click=lambda _: self.page.open(self.dlg_explain_addons), expand=True, icon=Icons.HELP_OUTLINE_OUTLINED, icon_color=Colors.DEEP_ORANGE_500, @@ -192,17 +194,6 @@ def build(self): ) return self.view - def open_explain_addons_dlg(self, e): - """Open the dialog to explain addons.""" - self.page.dialog = self.dlg_explain_addons - self.dlg_explain_addons.open = True - self.page.update() - - def close_close_explain_addons_dlg(self, e): - """Close the dialog to explain addons.""" - self.dlg_explain_addons.open = False - self.page.update() - def pick_addons_result(self, e: FilePickerResultEvent): path = ", ".join(map(lambda f: f.name, e.files)) if e.files else "Cancelled!" # update the textfield with the name of the file diff --git a/openandroidinstaller/views/requirements_view.py b/openandroidinstaller/views/requirements_view.py index 6eb546a4..e95515a0 100644 --- a/openandroidinstaller/views/requirements_view.py +++ b/openandroidinstaller/views/requirements_view.py @@ -91,7 +91,10 @@ def init_visuals( On some devices, the build version is basically the firmware version.""", ), actions=[ - TextButton("Close", on_click=self.close_find_version_dlg), + TextButton( + "Close", + on_click=lambda _: self.page.close(self.dlg_howto_find_versions), + ), ], actions_alignment="end", shape=ContinuousRectangleBorder(radius=0), @@ -103,7 +106,7 @@ def build(self): # create help/info button to show the help dialog info_button = OutlinedButton( "How to Find the version", - on_click=self.open_find_version_dlg, + on_click=lambda _: self.page.open(self.dlg_howto_find_versions), expand=False, icon=Icons.HELP_OUTLINE_OUTLINED, icon_color=Colors.DEEP_ORANGE_500, @@ -306,14 +309,3 @@ def enable_continue_button(self, e): logger.info("All requirements ticked. Allow to continue") self.continue_button.disabled = False self.right_view.update() - - def open_find_version_dlg(self, e): - """Open the dialog to explain how to find the android and firmware version.""" - self.page.dialog = self.dlg_howto_find_versions - self.dlg_howto_find_versions.open = True - self.page.update() - - def close_find_version_dlg(self, e): - """Close the dialog to explain how to find the android and firmware version.""" - self.dlg_howto_find_versions.open = False - self.page.update() diff --git a/openandroidinstaller/views/select_view.py b/openandroidinstaller/views/select_view.py index 7998d071..3b4ae597 100644 --- a/openandroidinstaller/views/select_view.py +++ b/openandroidinstaller/views/select_view.py @@ -88,7 +88,9 @@ def init_visuals( OpenAndroidInstaller works with the [TWRP recovery project](https://twrp.me/about).""", ), actions=[ - TextButton("Close", on_click=self.close_close_explain_images_dlg), + TextButton( + "Close", on_click=lambda _: self.page.close(self.dlg_explain_images) + ), ], actions_alignment="end", shape=ContinuousRectangleBorder(radius=0), @@ -172,7 +174,7 @@ def build(self): # create help/info button to show the help dialog for the image and recovery selection explain_images_button = OutlinedButton( "What is this?", - on_click=self.open_explain_images_dlg, + on_click=lambda _: self.page.open(self.dlg_explain_images), expand=True, icon=Icons.HELP_OUTLINE_OUTLINED, icon_color=Colors.DEEP_ORANGE_500, @@ -248,7 +250,7 @@ def build(self): Text("Select an OS image:", style="titleSmall"), Markdown( f""" -The image file should look something like `lineage-22.1-20241101-nightly-{self.state.config.device_code}-signed.zip`.""" +The image file should look something like `lineage-22.2-20241101-nightly-{self.state.config.device_code}-signed.zip`.""" ), Row( [ @@ -374,7 +376,10 @@ def toggle_additional_image_selection(self): ), actions=[ TextButton( - "Close", on_click=self.close_close_explain_additional_images_dlg + "Close", + on_click=lambda _: self.page.close( + self.dlg_explain_additional_images + ), ), ], actions_alignment="end", @@ -384,7 +389,7 @@ def toggle_additional_image_selection(self): # create help/info button to show the help dialog for the image and recovery selection explain_additional_images_button = OutlinedButton( "Why do I need this and where do I get it?", - on_click=self.open_explain_additional_images_dlg, + on_click=lambda _: self.page.open(self.dlg_explain_additional_images), expand=True, icon=Icons.HELP_OUTLINE_OUTLINED, icon_color=Colors.DEEP_ORANGE_500, @@ -500,28 +505,6 @@ def toggle_additional_image_selection(self): self.additional_image_selection.controls = additional_image_selection self.additional_image_selection.update() - def open_explain_images_dlg(self, e): - """Open the dialog to explain OS and recovery image.""" - self.page.dialog = self.dlg_explain_images - self.dlg_explain_images.open = True - self.page.update() - - def close_close_explain_images_dlg(self, e): - """Close the dialog to explain OS and recovery image.""" - self.dlg_explain_images.open = False - self.page.update() - - def open_explain_additional_images_dlg(self, e): - """Open the dialog to explain additional images.""" - self.page.dialog = self.dlg_explain_additional_images - self.dlg_explain_additional_images.open = True - self.page.update() - - def close_close_explain_additional_images_dlg(self, e): - """Close the dialog to explain additional images.""" - self.dlg_explain_additional_images.open = False - self.page.update() - def pick_image_result(self, e: FilePickerResultEvent): logger.info(f"Selected image: {e.files}") path = ", ".join(map(lambda f: f.name, e.files)) if e.files else "Cancelled!" diff --git a/openandroidinstaller/views/start_view.py b/openandroidinstaller/views/start_view.py index bb8a083d..120672c7 100644 --- a/openandroidinstaller/views/start_view.py +++ b/openandroidinstaller/views/start_view.py @@ -84,7 +84,10 @@ def init_visuals( """ ), actions=[ - TextButton("Close", on_click=self.close_developer_options_dlg), + TextButton( + "Close", + on_click=lambda _: self.page.close(self.dlg_help_developer_options), + ), ], actions_alignment="end", shape=ContinuousRectangleBorder(radius=0), @@ -156,7 +159,9 @@ def build(self): [ OutlinedButton( "How do I enable developer options?", - on_click=self.open_developer_options_dlg, + on_click=lambda _: self.page.open( + self.dlg_help_developer_options + ), expand=True, icon=Icons.HELP_OUTLINE_OUTLINED, icon_color=Colors.DEEP_ORANGE_500, @@ -204,17 +209,6 @@ def build(self): ) return self.view - def open_developer_options_dlg(self, e): - """Open the dialog for help to developer mode.""" - self.page.dialog = self.dlg_help_developer_options - self.dlg_help_developer_options.open = True - self.page.update() - - def close_developer_options_dlg(self, e): - """Close the dialog for help to developer mode.""" - self.dlg_help_developer_options.open = False - self.page.update() - def search_devices_clicked(self, e): """Search the device when the button is clicked.""" self.device_request_row.controls.clear()