Skip to content

Commit 5ee6c27

Browse files
committed
Add minimal logging and improve config for Xperia Z
1 parent 4059b75 commit 5ee6c27

File tree

4 files changed

+51
-22
lines changed

4 files changed

+51
-22
lines changed
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"

openandroidinstaller/openandroidinstaller.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# Author: Tobias Sterbak
1515

1616
import webbrowser
17+
from loguru import logger
1718
from os import path
1819
from subprocess import STDOUT, CalledProcessError, call, check_output
1920
from time import sleep
@@ -51,7 +52,7 @@
5152

5253
# Toggle to True for development purposes
5354
DEVELOPMENT = False
54-
DEVELOPMENT_CONFIG = "Pixel 3a"
55+
DEVELOPMENT_CONFIG = "Xperia Z" # "Pixel 3a"
5556

5657

5758
CONFIG_PATH = path.abspath(path.join(path.dirname(__file__), "assets/configs/"))
@@ -134,7 +135,7 @@ def build(self):
134135
),
135136
Divider(),
136137
Text(
137-
"Now connect your device to this computer via USB, then press 'Search device'."
138+
"Now connect your device to this computer via USB and allow USB debugging in the pop-up on your phone. Then press 'Search device'."
138139
),
139140
Divider(),
140141
Column(
@@ -483,6 +484,7 @@ def call_to_phone(self, e, command: str):
483484
)
484485
)
485486
self.right_view.update()
487+
logger.info(f"Run command: {command}")
486488
res = call(f"{command}", shell=True)
487489
if res != 0:
488490
self.right_view.controls.pop()

poetry.lock

Lines changed: 29 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pyinstaller = "^5.3"
1515
Pillow = "^9.2.0"
1616
PyYAML = "^6.0"
1717
isort = "^5.10.1"
18+
loguru = "^0.6.0"
1819

1920
[tool.poetry.dev-dependencies]
2021

0 commit comments

Comments
 (0)