From c454edad361214da8bba4755008cedd50767981f Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Thu, 19 Oct 2023 13:55:36 +0200 Subject: [PATCH 1/3] Add support for Xiaomi 9 Mi Lite (pyxis) --- .../assets/configs/pyxis.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 openandroidinstaller/assets/configs/pyxis.yaml diff --git a/openandroidinstaller/assets/configs/pyxis.yaml b/openandroidinstaller/assets/configs/pyxis.yaml new file mode 100644 index 00000000..a900bec4 --- /dev/null +++ b/openandroidinstaller/assets/configs/pyxis.yaml @@ -0,0 +1,53 @@ +metadata: + maintainer: Tobias Sterbak (tsterbak) + brand: Xiaomi + device_name: Xiaomi Mi 9 Lite + is_ab_device: true + device_code: pyxis + additional_steps: + - super_empty + supported_device_codes: + - pyxis +requirements: + android: 11 +steps: + unlock_bootloader: + - type: confirm_button + content: > + As a first step, you need to unlock the bootloader. A bootloader is the piece of software, that tells your phone + how to start and run an operating system (like Android). Your device should be turned on. This will reset your phone. + - type: link_button_with_confirm + content: > + - Create a Mi account on Xiaomi’s website. Beware that one account is only allowed to unlock one unique device every 30 days. + + - Add a phone number to your Mi account, insert a SIM into your phone. + + - Enable developer options in `Settings` > `About Phone` by repeatedly tapping MIUI Version. + + - Link the device to your Mi account in `Settings` > `Additional settings` > `Developer options` > `Mi Unlock status`. + + - Download the Mi Unlock app with the link bellow (Windows is required to run the app), and follow the instructions provided by the app. It may tell you that you have to wait, usually 7 days. If it does so, please wait the quoted amount of time before continuing to the next step! + + - After device and Mi account are successfully verified, the bootloader should be unlocked. + + - Since the device resets completely, you will need to re-enable USB debugging to continue : `Settings` > `Additional settings` > `Developer options` > `USB debugging` + link: https://en.miui.com/unlock/download_en.html + boot_recovery: + - type: call_button + content: > + Now you need to install 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. + + Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. + command: adb_reboot_bootloader + - type: call_button + content: > + Install the recovery you chosen before by pressing 'Confirm and run'. Once it's done continue. + command: fastboot_flash_recovery + - type: call_button + img: twrp-start.jpeg + content: > + Reboot to recovery by pressing 'Confirm and run', and hold the Vol+ button of your phone UNTIL you see the recovery. + If MiUI starts, you have to start the process again, since MiUI delete the recovery you just flashed. + Once it's done continue. + command: fastboot_reboot_recovery \ No newline at end of file From ef3eb7ca22441c252c41ca1dad6d814e531921c6 Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Thu, 19 Oct 2023 14:49:55 +0200 Subject: [PATCH 2/3] add support for pyxis --- openandroidinstaller/assets/configs/pyxis.yaml | 7 +++---- openandroidinstaller/views/select_view.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/openandroidinstaller/assets/configs/pyxis.yaml b/openandroidinstaller/assets/configs/pyxis.yaml index a900bec4..912dee59 100644 --- a/openandroidinstaller/assets/configs/pyxis.yaml +++ b/openandroidinstaller/assets/configs/pyxis.yaml @@ -44,10 +44,9 @@ steps: content: > Install the recovery you chosen before by pressing 'Confirm and run'. Once it's done continue. command: fastboot_flash_recovery - - type: call_button + - type: confirm_button img: twrp-start.jpeg content: > - Reboot to recovery by pressing 'Confirm and run', and hold the Vol+ button of your phone UNTIL you see the recovery. + Reboot to recovery by holding the Vol+ button of your phone UNTIL you see the Mi logo and then release it. Now wait until you see TWRP, then continue. If MiUI starts, you have to start the process again, since MiUI delete the recovery you just flashed. - Once it's done continue. - command: fastboot_reboot_recovery \ No newline at end of file + Once it's done continue. \ No newline at end of file diff --git a/openandroidinstaller/views/select_view.py b/openandroidinstaller/views/select_view.py index 45322291..0e31d6e3 100644 --- a/openandroidinstaller/views/select_view.py +++ b/openandroidinstaller/views/select_view.py @@ -544,7 +544,7 @@ def pick_image_result(self, e: FilePickerResultEvent): if self.state.flash_recovery: if ( self.selected_image.color == colors.GREEN - and image_sdk_level(self.state.image_path) >= 33 + # and image_sdk_level(self.state.image_path) >= 33 ): self.toggle_additional_image_selection() else: From bacadc117c66637541553b573c482dfaf1a064a6 Mon Sep 17 00:00:00 2001 From: Tobias Sterbak Date: Tue, 27 Feb 2024 16:18:52 +0000 Subject: [PATCH 3/3] Try pyxis again --- .../assets/configs/pyxis.yaml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/openandroidinstaller/assets/configs/pyxis.yaml b/openandroidinstaller/assets/configs/pyxis.yaml index 912dee59..d19c9e4c 100644 --- a/openandroidinstaller/assets/configs/pyxis.yaml +++ b/openandroidinstaller/assets/configs/pyxis.yaml @@ -1,8 +1,8 @@ metadata: maintainer: Tobias Sterbak (tsterbak) - brand: Xiaomi + brand: Xiaomi device_name: Xiaomi Mi 9 Lite - is_ab_device: true + is_ab_device: true device_code: pyxis additional_steps: - super_empty @@ -19,17 +19,17 @@ steps: - type: link_button_with_confirm content: > - Create a Mi account on Xiaomi’s website. Beware that one account is only allowed to unlock one unique device every 30 days. - + - Add a phone number to your Mi account, insert a SIM into your phone. - + - Enable developer options in `Settings` > `About Phone` by repeatedly tapping MIUI Version. - + - Link the device to your Mi account in `Settings` > `Additional settings` > `Developer options` > `Mi Unlock status`. - + - Download the Mi Unlock app with the link bellow (Windows is required to run the app), and follow the instructions provided by the app. It may tell you that you have to wait, usually 7 days. If it does so, please wait the quoted amount of time before continuing to the next step! - + - After device and Mi account are successfully verified, the bootloader should be unlocked. - + - Since the device resets completely, you will need to re-enable USB debugging to continue : `Settings` > `Additional settings` > `Developer options` > `USB debugging` link: https://en.miui.com/unlock/download_en.html boot_recovery: @@ -37,7 +37,7 @@ steps: content: > Now you need to install 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. - + Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue. command: adb_reboot_bootloader - type: call_button @@ -47,6 +47,6 @@ steps: - type: confirm_button img: twrp-start.jpeg content: > - Reboot to recovery by holding the Vol+ button of your phone UNTIL you see the Mi logo and then release it. Now wait until you see TWRP, then continue. + Reboot to recovery by holding the 'Vol+' and the 'Power' button of your phone UNTIL you see the Mi logo and then release it. Now wait until you see TWRP, then continue. If MiUI starts, you have to start the process again, since MiUI delete the recovery you just flashed. - Once it's done continue. \ No newline at end of file + Once it's done continue.