Skip to content

Commit bbc46f7

Browse files
authored
Rewrite the application GUI (#9)
Rewrite the GUI
2 parents d1ae39c + 086266f commit bbc46f7

18 files changed

+751
-305
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</p>
2121
</div>
2222

23-
> **Warning**: This application is currently in alpha state, so use at your own risk! I take no responsibility for bricked devices or dead SD cards.
23+
> **Warning**: This application is currently in early alpha state, so use at your own risk! I take no responsibility for bricked devices or dead SD cards.
2424
2525
> **Note**: Unlocking the bootloader will erase all data on your device!
2626
This also includes your DRM keys, which are stored in the Trim Area partition (also called TA).
@@ -33,9 +33,11 @@ Vendor | Device Name | CodeName | Models | Status
3333
Samsung | Galaxy A3 2017 | a3y17lte | SM-A320FL | tested
3434
Samsung | Galaxy A5 2016 | a5xelte | | under development
3535
Google | Pixel 3a | sargo | sargo | tested
36-
Sony | Xperia Z | yuga | | tested
36+
Sony | Xperia Z | yuga | C6603 | tested
37+
Sony | Xperia Z3 | z3 | | under development
3738

3839
## Installation
40+
Currently, only linux is supported.
3941

4042
1. Download the AppImage, .exe or appropriate file for your OS.
4143
2. Install `adb` and `fastboot` by running `sudo apt install android-tools-adb android-tools-fastboot`
@@ -54,8 +56,9 @@ Start the desktop app and follow the instructions.
5456
## Run OpenAndroidInstaller for development
5557

5658
1. Clone the main branch of this repository
57-
2. Run `make poetry` and `make install` to setup poetry and the relevant requirements
58-
3. Clone this Run `make app` to start the desktop app from the source code.
59+
2. Follow the steps 2. and 3. from 'Installation' above.
60+
3. Run `make poetry` and `make install` to setup poetry and the relevant requirements
61+
4. Run `make app` to start the desktop app from the source.
5962

6063
## Contribute your own installation configurations
6164

@@ -73,6 +76,7 @@ Every step in the config file corresponds to one view in the application. These
7376
- `<image>`: The path of the image file.
7477
- `<recovery>`: The path of the recovery file.
7578
- `<inputtext>`: Text from the user input from `call_button_with_input` views.
79+
- `img`: Display an image on the left pane of the step view. Images are loaded from `openandroidinstaller/assets/imgs/`.
7680
- `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.
7781

7882
After you created a config file, you can open a pull request to make the file available to other users. The file should be named after device name output by `adb shell dumpsys bluetooth_manager | grep 'name:' | cut -c9-` when the devices is connected to the computer. Please also add the device to the supported devices table above.
Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,62 @@
11
steps:
22
- title: "Unlock the bootloader"
33
type: confirm_button
4-
content: "Turn on your device and wait until its fully booted."
4+
content: "As a first step, you need to unlock the bootloader. A bootloader is the piece of software, that tells your phone who to start and run an operating system (like Android). Your device should be turned on."
55
- title: "Unlock the bootloader"
66
type: call_button
7-
content: "Reboot into bootloader"
7+
content: "Press 'Confirm and run' to reboot into the bootloader."
88
command: "adb reboot bootloader"
99
- title: "Unlock the bootloader"
1010
type: confirm_button
11-
content: "Select 'Restart bootloader' on your smartphone screen. Then confirm"
11+
content: "Select 'Restart bootloader' on your smartphone screen by pressing the volume button and the confirm by pushing the power button. Then press 'Confirm and continue' here."
1212
- title: "Unlock the bootloader"
1313
type: call_button
14-
content: "Unlock the bootloader now:"
14+
content: "In this step you actually unlock the bootloader. Just press 'Confirm and run' here. Once it's done, press continue here."
1515
command: "fastboot flashing unlock"
1616
allow_skip: True
1717
- title: "Unlock the bootloader"
1818
type: confirm_button
1919
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."
2020
- title: "Unlock the bootloader"
2121
type: call_button
22-
content: "Reboot the phone"
22+
content: "To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue."
2323
command: "fastboot reboot"
2424
- title: "Unlock the bootloader"
2525
type: confirm_button
2626
content: "The bootloader is now unlocked. Since the device resets completely, you will need to re-enable USB debugging to continue."
27-
- title: "Flash custom recovery"
27+
- title: "Flash a custom recovery"
28+
type: confirm_button
29+
content: "Now you need to flash 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."
30+
- title: "Flash a custom recovery"
2831
type: call_button
29-
content: "Once the device is fully booted, reboot into bootloader"
32+
content: "Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue."
3033
command: "adb reboot bootloader"
31-
- title: "Flash custom recovery"
34+
- title: "Flash a custom recovery"
3235
type: confirm_button
33-
content: "Select 'Restart bootloader' on your smartphone screen. Then confirm"
34-
- title: "Flash custom recovery"
36+
content: "Select 'Restart bootloader' on your smartphone screen. Then confirm to continue."
37+
- title: "Flash a custom recovery"
3538
type: call_button
36-
content: "Flash custom recovery (temporarily)"
39+
content: "Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue."
3740
command: "fastboot flash boot <recovery>"
41+
- title: "Flash LineageOS"
42+
type: confirm_button
43+
content: "In this step, you finally flash LineageOS. Confirm to continue."
3844
- title: "Flash LineageOS"
3945
type: confirm_button
40-
content: "Select 'Recovery Mode' on your smartphone screen. Then confirm"
46+
content: "Select 'Recovery Mode' on your smartphone screen and press the Start-Button to confirm. Then confirm here."
4147
- title: "Flash LineageOS"
4248
type: confirm_button
43-
content: "Now tap Factory Reset, then Format data / factory reset and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage, as well as format your cache partition (if you have one)."
49+
content: "Now tap Factory Reset, then Format data / Factory reset on your phone screen and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage, as well as format your cache partition (if you have one)."
4450
- title: "Flash LineageOS"
4551
type: confirm_button
46-
content: "Return to the main menu."
52+
content: "Return to the main menu on the phone."
4753
- title: "Flash LineageOS"
4854
type: confirm_button
49-
content: "On the device, select “Apply Update”, then “Apply from ADB” to begin sideload. Then confirm here"
55+
content: "On the device, select “Apply Update”, then “Apply from ADB” to begin sideload. Then confirm here."
5056
- title: "Flash LineageOS"
5157
type: call_button
52-
content: "Flash lineageOS image. Don't remove the USB-Cable!"
58+
content: "Now it's time to flash the LineageOS image. Don't remove the USB-Cable and press 'Confirm and run' to start! This might take a while. Confirm after it's done."
5359
command: "adb sideload <image>"
5460
- title: "Flash LineageOS"
5561
type: confirm_button
56-
content: "Flashing finished. Now press 'back' (arrow) and then 'Reboot system now' to finish the installation."
57-
- title: "Successfully finished flashing"
58-
type: text
59-
content: "Have fun with LineageOS!"
62+
content: "Flashing finished. Now press 'back' (arrow) and then 'Reboot system now' on the phone screen to finish the installation."
Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,29 @@
11
steps:
2-
- title: "Boot into recovery"
3-
type: confirm_button
4-
content: "Turn on your device and wait until its fully booted."
5-
- title: "Boot into recovery"
2+
- title: "Boot into bootloader"
63
type: call_button
7-
content: "Reboot into bootloader"
4+
content: "As a first step, you need to boot into the bootloader. A bootloader is the piece of software, that tells your phone who to start and run an operating system (like Android). Your device should be turned on. Then press 'Confirm and run' to reboot into the bootloader. Continue once it's done."
85
command: "adb reboot download"
9-
- title: "Boot into recovery"
6+
- title: "Flash custom recovery"
107
type: call_button
11-
content: "Flash custom recovery"
8+
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."
129
command: "heimdall flash --no-reboot --RECOVERY <recovery>"
1310
- title: "Boot into recovery"
1411
type: confirm_button
15-
content: "Unplug the USB cable from your device. Manually reboot into recovery. Press the Volume Down + Power buttons for 8~10 seconds until the screen turns black & release the buttons immediately when it does, then boot to recovery with the device powered off, hold Volume Up + Home + Power."
12+
content: "Unplug the USB cable from your device. Then manually reboot into recovery by pressing the Volume Down + Power buttons for 8~10 seconds until the screen turns black & release the buttons immediately when it does, then boot to recovery with the device powered off, hold Volume Up + Home + Power."
1613
- title: "Flash LineageOS"
1714
type: confirm_button
18-
content: "Now tap 'Wipe'. Then tap 'Format Data' and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage."
15+
content: "Now tap 'Wipe' on your phone. Then tap 'Format Data' and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage. Confirm to continue once you are done."
1916
- title: "Flash LineageOS"
2017
type: confirm_button
21-
content: "Return to the previous menu and tap 'Advanced Wipe', then select the 'Cache' and 'System' partitions and then 'Swipe to Wipe'."
18+
content: "Return to the previous menu on your phone and tap 'Advanced Wipe', then select the 'Cache' and 'System' partitions and then 'Swipe to Wipe'. Confirm to continue once you are done."
2219
- title: "Flash LineageOS"
2320
type: confirm_button
24-
content: "Now connect the phone to the computer again with the USB-cable. On the device, go back and select “Advanced”, “ADB Sideload”, then swipe to begin sideload. Then confirm here"
21+
content: "Now connect the phone to the computer again with the USB-cable. On the device, go back and select “Advanced”, “ADB Sideload”, then swipe to begin sideload. Then confirm here."
2522
- title: "Flash LineageOS"
2623
type: call_button
27-
content: "Flash lineageOS image. Don't remove the USB-Cable!"
24+
content: "Now it's time to flash the LineageOS image. Don't remove the USB-Cable and press 'Confirm and run' to start! This might take a while. Confirm after it's done."
2825
command: "adb sideload <image>"
29-
- title: "Reboot"
26+
- title: "Reboot into LineageOS"
3027
type: call_button
31-
content: "Reboot into OS"
32-
command: "adb reboot"
33-
- title: "Successfully finished flashing"
34-
type: text
35-
content: "Have fun with LineageOS!"
28+
content: "As a final step, reboot into LineageOS to finish the installation by pressing the button."
29+
command: "adb reboot"
Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,56 @@
11
steps:
22
- title: "Unlock the bootloader"
33
type: confirm_button
4-
content: "On the device, dial *#*#7378423#*#* (*#*#SERVICE#*#*) to launch the service menu."
4+
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."
55
- title: "Unlock the bootloader"
66
type: confirm_button
7-
content: "Go to service info > configuration and check rooting status you can only continue if it says Bootloader unlock allowed: Yes."
7+
content: "Go to service info > configuration and check rooting status - you can only continue if it says 'Bootloader unlock allowed: Yes.'"
88
- title: "Unlock the bootloader"
99
type: confirm_button
10-
content: "Connect the device to your PC via USB."
10+
content: "Connect the device to your PC via USB. And confirm to continue."
1111
- title: "Unlock the bootloader"
1212
type: call_button
13-
content: "Unlock the bootloader"
13+
content: "Press the button to reboot into the bootloader now. Then confirm to continue."
1414
command: "adb reboot bootloader"
1515
- title: "Unlock the bootloader"
1616
type: confirm_button
1717
content: "Follow the instructions on Sonys official unlocking website to generate an unlock code for your bootloader. https://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/"
1818
- title: "Unlock the bootloader"
1919
type: call_button_with_input
20-
content: "Use your code to unlock the bootloader of your device:"
20+
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."
2121
command: "fastboot oem unlock <inputtext>"
2222
allow_skip: True
2323
- title: "Flash temporary recovery"
24-
type: confirm_button
25-
content: "Since the device resets completely, you will need to re-enable USB debugging to continue. Connect your device to your PC via USB."
24+
type: call_button
25+
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."
26+
command: "fastboot reboot"
2627
- title: "Flash temporary recovery"
2728
type: call_button
28-
content: "Reboot into bootloader"
29+
content: "Now you have to reboot into bootloader again. Press the button to do it and continue once it is done."
2930
command: "adb reboot bootloader"
3031
allow_skip: True
3132
- title: "Flash temporary recovery"
3233
type: call_button
33-
content: "Flash recovery image"
34+
content: "Next, you need to flash a custom recovery image. Press the button to flash the selected image. Then continue."
3435
command: "fastboot flash boot <recovery>"
3536
- title: "Flash LineageOS"
3637
type: call_button
37-
content: "Boot into recovery"
38+
content: "Now, boot into recovery by pressing the button. Once it's booted again, continue."
3839
command: "fastboot reboot"
3940
- title: "Flash LineageOS"
4041
type: confirm_button
41-
content: "Now tap 'Wipe'. Then tap 'Format Data' and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage."
42+
content: "Now tap 'Wipe'. Then tap 'Format Data' and continue with the formatting process on your phone. This will remove encryption and delete all files stored in the internal storage. Then press the button to continue."
4243
- title: "Flash LineageOS"
4344
type: confirm_button
44-
content: "Return to the previous menu and tap 'Advanced Wipe', then select the 'Cache' and 'System' partitions and then 'Swipe to Wipe'."
45+
content: "Return to the previous menu and tap 'Advanced Wipe', then select the 'Cache' and 'System' partitions and then 'Swipe to Wipe' on the phone. Once it's finished, confirm here to continue."
4546
- title: "Flash LineageOS"
4647
type: confirm_button
47-
content: "On the device, go back and select “Advanced”, “ADB Sideload”, then swipe to begin sideload. Then confirm here"
48+
content: "On the device, go back to the main menu and select “Advanced”, “ADB Sideload”, then swipe to begin sideload. Then confirm here"
4849
- title: "Flash LineageOS"
4950
type: call_button
50-
content: "Flash lineageOS image. Don't remove the USB-Cable!"
51+
content: "By pressing the button, you flash lineageOS image now. This can take a while. Don't remove the USB-Cable!"
5152
command: "adb sideload <image>"
5253
- title: "Reboot"
5354
type: call_button
54-
content: "Reboot into OS"
55-
command: "adb reboot"
56-
- title: "Successfully finished flashing"
57-
type: text
58-
content: "Have fun with LineageOS!"
55+
content: "As a final step, reboot into LineageOS to finish the installation by pressing the button."
56+
command: "adb reboot"
6.37 KB
Loading
9.14 KB
Loading
105 KB
Loading

openandroidinstaller/installer_config.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
"""Class to load config files for the install procedure."""
2+
3+
# This file is part of OpenAndroidInstaller.
4+
# OpenAndroidInstaller is free software: you can redistribute it and/or modify it under the terms of
5+
# the GNU General Public License as published by the Free Software Foundation,
6+
# either version 3 of the License, or (at your option) any later version.
7+
8+
# OpenAndroidInstaller is distributed in the hope that it will be useful, but WITHOUT ANY
9+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
10+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11+
12+
# You should have received a copy of the GNU General Public License along with OpenAndroidInstaller.
13+
# If not, see <https://www.gnu.org/licenses/>."""
14+
# Author: Tobias Sterbak
15+
216
from typing import List
317

418
import yaml
@@ -11,12 +25,14 @@ def __init__(
1125
type: str,
1226
content: str,
1327
command: str = None,
28+
img: str = "placeholder.png",
1429
allow_skip: bool = False,
1530
):
1631
self.title = title
1732
self.type = type
1833
self.content = content
1934
self.command = command
35+
self.img = img
2036
self.allow_skip = allow_skip
2137

2238

0 commit comments

Comments
 (0)