Skip to content

Commit 4d5dd10

Browse files
authored
Unified install step & install addons (#65)
- Add an install view and allow to circle back to flash a recovery - Enable selecting addons - Enable installing addons - Add download buttons for Google apps, f-droid and microg
2 parents 1f73a79 + 649830e commit 4d5dd10

62 files changed

Lines changed: 989 additions & 520 deletions

Some content is hidden

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

openandroidinstaller/app_state.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# If not, see <https://www.gnu.org/licenses/>."""
1414
# Author: Tobias Sterbak
1515

16+
import copy
1617
from pathlib import Path
1718

1819
from installer_config import _load_config
@@ -37,9 +38,11 @@ def __init__(
3738

3839
# placeholders
3940
self.advanced = False
41+
self.install_addons = False
4042
self.config = None
4143
self.image_path = None
4244
self.recovery_path = None
45+
self.is_ab = None
4346

4447
# is this still needed?
4548
self.steps = None
@@ -48,8 +51,6 @@ def load_config(self, device_code: str):
4851
"""Load the config from file to state by device code."""
4952
self.config = _load_config(device_code, self.config_path)
5053
if self.config:
51-
self.steps = (
52-
self.config.unlock_bootloader
53-
+ self.config.flash_recovery
54-
+ self.config.install_os
54+
self.steps = copy.deepcopy(self.config.unlock_bootloader) + copy.deepcopy(
55+
self.config.flash_recovery
5556
)

openandroidinstaller/assets/configs/FP2.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,4 @@ steps:
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!
21-
With the device powered off, hold 'Volume Up + Power'. Release when boot logo appears.
22-
install_os:
23-
- type: call_button
24-
content: >
25-
In the next steps, you finally flash the selected OS image.
26-
Wait until the TWRP screen appears. Then run the command.
27-
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
28-
in the internal storage. Then the OS image will be installed. This might take a while. At the end your phone will boot into the new OS.
29-
command: adb_twrp_wipe_and_install
21+
With the device powered off, hold 'Volume Up + Power'. Release when boot logo appears.

openandroidinstaller/assets/configs/FP3.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,4 @@ steps:
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!
46-
With the device powered off, hold 'Volume Up + Power'. Release when boot logo appears.
47-
install_os:
48-
- type: call_button
49-
content: >
50-
In the next steps, you finally flash the selected OS image.
51-
Wait until the TWRP screen appears. Then run the command.
52-
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
53-
in the internal storage. Then the OS image will be installed. This might take a while. At the end your phone will boot into the new OS.
54-
command: adb_twrp_wipe_and_install
46+
With the device powered off, hold 'Volume Up + Power'. Release when boot logo appears.

openandroidinstaller/assets/configs/FP4.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,4 @@ steps:
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!
46-
With the device powered off, hold 'Volume Up + Power'. Release when boot logo appears.
47-
install_os:
48-
- type: call_button
49-
content: >
50-
In the next steps, you finally flash the selected OS image.
51-
Wait until the TWRP screen appears. Then run the command.
52-
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
53-
in the internal storage. Then the OS image will be installed. This might take a while. At the end your phone will boot into the new OS.
54-
command: adb_twrp_wipe_and_install
46+
With the device powered off, hold 'Volume Up + Power'. Release when boot logo appears.

openandroidinstaller/assets/configs/a3y17lte.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,4 @@ steps:
2121
content: >
2222
Unplug the USB cable from your device. Then manually reboot into recovery by pressing the *Volume Down* + *Power buttons* for
2323
8~10 seconds until the screen turns black & release the buttons immediately when it does, then boot to recovery with the device powered off,
24-
hold *Volume Up* + *Home* + *Power*. Confirm when the recovery screen appears.
25-
install_os:
26-
- type: call_button
27-
content: >
28-
In the next steps, you finally flash the selected OS image.
29-
Connect your device with your computer with the USB-Cable.
30-
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
31-
in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS.
32-
command: adb_twrp_wipe_and_install
24+
hold *Volume Up* + *Home* + *Power*. Confirm when the recovery screen appears.

openandroidinstaller/assets/configs/a5xelte.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,4 @@ steps:
1919
content: >
2020
Unplug the USB cable from your device. Then manually reboot into recovery by pressing the *Volume Down* + *Power buttons* for 8~10 seconds
2121
until the screen turns black & release the buttons immediately when it does, then boot to recovery with the device powered off,
22-
hold *Volume Up* + *Home* + *Power button*.
23-
install_os:
24-
- type: call_button
25-
content: >
26-
In the next steps, you finally flash the selected OS image.
27-
Connect your device with your computer with the USB-Cable.
28-
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
29-
in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS.
30-
command: adb_twrp_wipe_and_install
22+
hold *Volume Up* + *Home* + *Power button*.

openandroidinstaller/assets/configs/a72q.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,4 @@ steps:
1919
content: >
2020
Unplug the USB cable from your device. Then manually reboot into recovery by pressing the *Volume Down* + *Power* for 8~10 seconds
2121
until the screen turns black & release the buttons immediately when it does, then boot to recovery with the device powered off,
22-
hold *Volume Up* + *Power button*.
23-
install_os:
24-
- type: call_button
25-
content: >
26-
In the next steps, you finally flash the selected OS image.
27-
Connect your device with your computer with the USB-Cable.
28-
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
29-
in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS.
30-
command: adb_twrp_wipe_and_install
22+
hold *Volume Up* + *Power button*.

openandroidinstaller/assets/configs/a7xelte.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,4 @@ steps:
1919
content: >
2020
Unplug the USB cable from your device. Then manually reboot into recovery by pressing the *Volume Down* + *Power buttons* for 8~10 seconds
2121
until the screen turns black & release the buttons immediately when it does, then boot to recovery with the device powered off,
22-
hold *Volume Up* + *Home* + *Power button*.
23-
install_os:
24-
- type: call_button
25-
content: >
26-
In the next steps, you finally flash the selected OS image.
27-
Connect your device with your computer with the USB-Cable.
28-
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
29-
in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS.
30-
command: adb_twrp_wipe_and_install
22+
hold *Volume Up* + *Home* + *Power button*.

openandroidinstaller/assets/configs/akari.yaml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,13 @@ steps:
4242
command: adb_reboot_bootloader
4343
- type: call_button
4444
content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
45-
command: fastboot_flash_recovery
45+
command: fastboot_flash_boot
4646
- type: call_button
4747
command: adb_twrp_copy_partitions
4848
content: >
4949
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.
5050
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.
5151
- type: call_button
52-
command: fastboot_flash_recovery
52+
command: fastboot_flash_boot
5353
content: >
54-
Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue.
55-
install_os:
56-
- type: call_button
57-
content: >
58-
In the next steps, you finally flash the selected OS image.
59-
Connect your device with your computer with the USB-Cable.
60-
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
61-
in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS.
62-
command: adb_twrp_wipe_and_install
54+
Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue.

openandroidinstaller/assets/configs/akatsuki.yaml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,13 @@ steps:
4242
command: adb_reboot_bootloader
4343
- type: call_button
4444
content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
45-
command: fastboot_flash_recovery
45+
command: fastboot_flash_boot
4646
- type: call_button
4747
command: adb_twrp_copy_partitions
4848
content: >
4949
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.
5050
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.
5151
- type: call_button
52-
command: fastboot_flash_recovery
52+
command: fastboot_flash_boot
5353
content: >
54-
Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue.
55-
install_os:
56-
- type: call_button
57-
content: >
58-
In the next steps, you finally flash the selected OS image.
59-
Connect your device with your computer with the USB-Cable.
60-
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
61-
in the internal storage. Then the OS image will be installed. Confirm to run. This might take a while. At the end your phone will boot into the new OS.
62-
command: adb_twrp_wipe_and_install
54+
Now we need to boot into recovery again. Press run and when you see the TWRP screen you can continue.

0 commit comments

Comments
 (0)