Skip to content

Commit ecd5019

Browse files
authored
Switched from flashing to booting TWRP (#111)
OAI now only boots into TWRP instead of flashing and overwriting the existing recovery, which can cause problems with the bootloader not being able to communicate with the recovery. related to #98 (comment)
2 parents 306c789 + dd1c897 commit ecd5019

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+217
-221
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ If you want to use the tool for a non-supported smartphone, the fastest way is t
191191

192192
#### Content of a config file
193193

194-
A config file consists of two parts. The first part are some metadata about the device and the second parts are the steps to unlock the bootloader, flash a recovery and install the ROMs.
194+
A config file consists of two parts. The first part are some metadata about the device and the second parts are the steps to unlock the bootloader, boot a recovery and install the ROMs.
195195

196196
##### How to write Metadata
197197
Every config file should have metadata with the following fields:
@@ -213,7 +213,7 @@ Every step in the config file corresponds to one view in the application. These
213213
- `call_button_with_input`: Display the content text, an input field and a button that runs a given command. The inputtext, can be used in the command by using the `<inputtext>` placeholder in the command field. After the command is run, a confirm button is displayed to allow the user to move to the next step.
214214
- `link_button_with_confirm`: Display a button that opens a browser with a given link, confirm afterwards. Link is given in `link`.
215215
- `content`: str; The content text displayed alongside the action of the step. Used to inform the user about whats going on.
216-
- `command`: [ONLY for call_button* steps] str; The command to run. One of `adb_reboot`, `adb_reboot_bootloader`, `adb_reboot_download`, `adb_sideload`, `adb_twrp_wipe_and_install`, `adb_twrp_copy_partitions`, `fastboot_flash_recovery`, `fastboot_unlock_with_code`, `fastboot_unlock`, `fastboot_oem_unlock`, `fastboot_get_unlock_data`, `fastboot_reboot`, `heimdall_flash_recovery`.
216+
- `command`: [ONLY for call_button* steps] str; The command to run. One of `adb_reboot`, `adb_reboot_bootloader`, `adb_reboot_download`, `adb_sideload`, `adb_twrp_wipe_and_install`, `adb_twrp_copy_partitions`, `fastboot_boot_recovery`, `fastboot_unlock_with_code`, `fastboot_unlock`, `fastboot_oem_unlock`, `fastboot_get_unlock_data`, `fastboot_reboot`, `heimdall_flash_recovery`.
217217
- `img`: [OPTIONAL] Display an image on the left pane of the step view. Images are loaded from `openandroidinstaller/assets/imgs/`.
218218
- `allow_skip`: [OPTIONAL] boolean; If a skip button should be displayed to allow skipping this step. Can be useful when the bootloader is already unlocked.
219219
- `link`: [OPTIONAL] Link to use for the link button if type is `link_button_with_confirm`.

openandroidinstaller/app_state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@ def load_config(self, device_code: str):
6767
self.config = _load_config(device_code, self.config_path)
6868
if self.config:
6969
self.steps = copy.deepcopy(self.config.unlock_bootloader) + copy.deepcopy(
70-
self.config.flash_recovery
70+
self.config.boot_recovery
7171
)

openandroidinstaller/assets/configs/FP2.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ metadata:
44
devicecode: FP2
55
steps:
66
unlock_bootloader:
7-
flash_recovery:
7+
boot_recovery:
88
- type: confirm_button
99
content: >
10-
Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating,
10+
Now you need to boot a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating,
1111
adapting and repairing of the operating system.
1212
- type: call_button
1313
content: Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
1414
command: adb_reboot_bootloader
1515
- type: call_button
16-
content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
17-
command: fastboot_flash_recovery
16+
content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
17+
command: fastboot_boot_recovery
1818
- type: confirm_button
1919
content: >
2020
Now reboot into recovery to verify the installation. Do not reboot into the existing OS, since it will overwrite the recovery you just installed!

openandroidinstaller/assets/configs/FP3.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ steps:
2929
command: fastboot_reboot
3030
- type: confirm_button
3131
content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable USB debugging to continue.
32-
flash_recovery:
32+
boot_recovery:
3333
- type: confirm_button
3434
content: >
35-
Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating,
35+
Now you need to boot a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating,
3636
adapting and repairing of the operating system.
3737
- type: call_button
3838
content: Turn on your device. Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
3939
command: adb_reboot_bootloader
4040
- type: call_button
4141
content: Once the device is in fastboot mode, flash the custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
42-
command: fastboot_flash_recovery
42+
command: fastboot_boot_recovery
4343
- type: confirm_button
4444
content: >
4545
Now reboot into recovery to verify the installation. Do not reboot into the existing OS, since it will overwrite the recovery you just installed!

openandroidinstaller/assets/configs/FP4.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ steps:
2929
command: fastboot_reboot
3030
- type: confirm_button
3131
content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable USB debugging to continue.
32-
flash_recovery:
32+
boot_recovery:
3333
- type: confirm_button
3434
content: >
35-
Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating,
35+
Now you need to boot a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating,
3636
adapting and repairing of the operating system.
3737
- type: call_button
3838
content: Turn on your device. Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
3939
command: adb_reboot_bootloader
4040
- type: call_button
4141
content: Once the device is in fastboot mode, flash the custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
42-
command: fastboot_flash_recovery
42+
command: fastboot_boot_recovery
4343
- type: confirm_button
4444
content: >
4545
Now reboot into recovery to verify the installation. Do not reboot into the existing OS, since it will overwrite the recovery you just installed!

openandroidinstaller/assets/configs/a3y17lte.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
devicecode: a3y17lte
55
steps:
66
unlock_bootloader:
7-
flash_recovery:
7+
boot_recovery:
88
- type: call_button
99
content: >
1010
As a first step, you need to boot into the bootloader. A bootloader is the piece of software,
@@ -13,7 +13,7 @@ steps:
1313
command: adb_reboot_download
1414
- type: call_button
1515
content: >
16-
In this step, you need to flash a custom recovery on your device.
16+
In this step, you need to boot a custom recovery on your device.
1717
Press 'Confirm and run' to start the process. Confirm afterwards to continue.
1818
command: heimdall_flash_recovery
1919
- type: confirm_button

openandroidinstaller/assets/configs/a5xelte.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ metadata:
44
devicecode: a5xelte
55
steps:
66
unlock_bootloader:
7-
flash_recovery:
7+
boot_recovery:
88
- type: call_button
99
content: >
1010
As a first step, you need to boot into the bootloader. A bootloader is the piece of software,
1111
that tells your phone who to start and run an operating system (like Android). Your device should be turned on.
1212
Then press 'Confirm and run' to reboot into the bootloader. Continue once it's done.
1313
command: adb_reboot_download
1414
- type: call_button
15-
content: In this step, you need to flash a custom recovery on your device. Press 'Confirm and run' to start the process. Confirm afterwards to continue.
15+
content: In this step, you need to boot a custom recovery on your device. Press 'Confirm and run' to start the process. Confirm afterwards to continue.
1616
command: heimdall_flash_recovery
1717
- type: confirm_button
1818
img: samsung-buttons.png

openandroidinstaller/assets/configs/a72q.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ metadata:
44
devicecode: a72q
55
steps:
66
unlock_bootloader:
7-
flash_recovery:
7+
boot_recovery:
88
- type: call_button
99
content: >
1010
As a first step, you need to boot into the bootloader. A bootloader is the piece of software,
1111
that tells your phone who to start and run an operating system (like Android). Your device should be turned on.
1212
Then press 'Confirm and run' to reboot into the bootloader. Continue once it's done.
1313
command: adb_reboot_download
1414
- type: call_button
15-
content: In this step, you need to flash a custom recovery on your device. Press 'Confirm and run' to start the process. Confirm afterwards to continue.
15+
content: In this step, you need to boot a custom recovery on your device. Press 'Confirm and run' to start the process. Confirm afterwards to continue.
1616
command: heimdall_flash_recovery
1717
- type: confirm_button
1818
img: samsung-buttons.png

openandroidinstaller/assets/configs/a7xelte.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ metadata:
44
devicecode: a7xelte
55
steps:
66
unlock_bootloader:
7-
flash_recovery:
7+
boot_recovery:
88
- type: call_button
99
content: >
1010
As a first step, you need to boot into the bootloader. A bootloader is the piece of software,
1111
that tells your phone who to start and run an operating system (like Android). Your device should be turned on.
1212
Then press 'Confirm and run' to reboot into the bootloader. Continue once it's done.
1313
command: adb_reboot_download
1414
- type: call_button
15-
content: In this step, you need to flash a custom recovery on your device. Press 'Confirm and run' to start the process. Confirm afterwards to continue.
15+
content: In this step, you need to boot a custom recovery on your device. Press 'Confirm and run' to start the process. Confirm afterwards to continue.
1616
command: heimdall_flash_recovery
1717
- type: confirm_button
1818
img: samsung-buttons.png

openandroidinstaller/assets/configs/akari.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ steps:
3333
Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue.
3434
Connect your device to your PC via USB. Then confirm here to continue.
3535
command: fastboot_reboot
36-
flash_recovery:
36+
boot_recovery:
3737
- type: call_button
3838
content: >
39-
Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating,
39+
Now you need to boot a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating,
4040
adapting and repairing of the operating system.
4141
Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
4242
command: adb_reboot_bootloader
4343
- type: call_button
44-
content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
44+
content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
4545
command: fastboot_flash_boot
4646
- type: call_button
4747
command: adb_twrp_copy_partitions

0 commit comments

Comments
 (0)