Skip to content

Commit ceea990

Browse files
authored
Release/0.3.5 alpha (#68)
This release adds: Support for new devices: * Motorola moto z (griffin) (thanks to @SirRGB) * OnePlus 5 (cheeseburger) (thanks to @SirRGB) * OnePlus 5T (dumpling) (thanks to @SirRGB) * Samsung Galaxy S III Neo (s3ve3g)
2 parents dabc11e + 9708070 commit ceea990

File tree

7 files changed

+211
-3
lines changed

7 files changed

+211
-3
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Linux is currently the best supported platform (tested with Ubuntu 20.04/22.04 L
5555

5656
## Officially supported devices
5757

58-
Currently, the **we support 48 devices** by various vendors and working on adding more soon!
58+
Currently, the **we support 52 devices** by various vendors and working on adding more soon!
5959

6060

6161
Support for these devices is provided as best effort, but things might still go wrong.
@@ -67,6 +67,7 @@ Vendor | Device Name | CodeName | Models | Status
6767
---|---|---|---|---
6868
Samsung | Galaxy J7 2015 | j7elte | | tested
6969
Samsung | Galaxy A3 2017 | a3y17lte | SM-A320FL | tested
70+
Samsung | Galaxy S III Neo | s3ve3g | GT-I9301I | tested
7071
Samsung | Galaxy A5 2016 | [a5xelte](https://wiki.lineageos.org/devices/a5xelte/) | SM-A510F | tested
7172
Samsung | Galaxy A7 2016 | a7xelte | | tested
7273
Samsung | Galaxy S6 | [zerofltexx](https://wiki.lineageos.org/devices/zerofltexx/) | | tested
@@ -130,12 +131,15 @@ Motorola | moto g7 power | [ocean](https://wiki.lineageos.org/devices/ocean/) |
130131
Motorola | moto g 5G plus / one 5G | [nairo](https://wiki.lineageos.org/devices/nairo/) | | tested
131132
Motorola | moto g 5G / one 5G ace | [kiev](https://wiki.lineageos.org/devices/kiev/) | | tested
132133
Motorola | edge | [racer](https://wiki.lineageos.org/devices/racer/) | | tested
134+
Motorola | moto z | [griffin](https://wiki.lineageos.org/devices/griffin/) | | tested
133135
</details>
134136

135137
<details><summary><b>OnePlus</b></summary>
136138

137139
Vendor | Device Name | CodeName | Models | Status
138140
---|---|---|---|---
141+
OnePlus | 5 | [cheeseburger](https://wiki.lineageos.org/devices/cheeseburger/) | | tested
142+
OnePlus | 5T | [dumpling](https://wiki.lineageos.org/devices/dumpling/) | | tested
139143
OnePlus | 6 | [enchilada](https://wiki.lineageos.org/devices/enchilada/) | | tested
140144
OnePlus | 6T | [fajita](https://wiki.lineageos.org/devices/fajita/) | | tested
141145
OnePlus | 7 | [guacamoleb](https://wiki.lineageos.org/devices/guacamoleb/) | | tested
@@ -176,6 +180,20 @@ If you want to use the tool for a non-supported smartphone, the fastest way is t
176180

177181
#### Content of a config file
178182

183+
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.
184+
185+
##### How to write Metadata
186+
Every config file should have metadata with the following fields:
187+
- `maintainer`: str; Maintainer and author of the config file.
188+
- `devicename`: str; Name of the device.
189+
- `devicecode`: str; The official device code.
190+
- `twrp-link`: [OPTIONAL] str; name of the corresponding twrp page.
191+
192+
In addition to these metadata, every config can have optional requirements. If these are set, the user is asked to check if they are meet.
193+
- `android`: [OPTIONAL] int|str; Android version to install prior to installing a custom ROM.
194+
- `firmware`: [OPTIONAL] str; specific firmware version to install before installing a custom ROM.
195+
196+
##### How to write steps:
179197
Every step in the config file corresponds to one view in the application. These steps should contain the following fields:
180198
- `type`: str; Corresponds to the type of view to generate. There are the following options:
181199
- `text`: Just display the text given in content.
@@ -218,7 +236,7 @@ Other phone vendors stops allowing to unlock the bootloader all together. There
218236

219237

220238
## License
221-
Original development by [Tobias Sterbak](https://tobiassterbak.com). Copyright (C) 2022.
239+
Original development by [Tobias Sterbak](https://tobiassterbak.com). Copyright (C) 2022-2023.
222240

223241
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
224242

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
metadata:
2+
maintainer: SirRGB
3+
devicename: OnePlus 5
4+
devicecode: cheeseburger
5+
twrp-link: cheeseburger_dumpling
6+
steps:
7+
unlock_bootloader:
8+
- type: call_button
9+
content: >
10+
As a first step, you need to unlock the bootloader. A bootloader is the piece of software, that tells your phone
11+
how to start and run an operating system (like Android). Your device should be turned on.
12+
Press 'Confirm and run' to reboot into the bootloader.
13+
command: adb_reboot_bootloader
14+
- type: call_button
15+
content: In this step you actually unlock the bootloader. Just press 'Confirm and run' here. Once it's done, press continue here.
16+
command: fastboot_oem_unlock
17+
- type: confirm_button
18+
content: >
19+
At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader.
20+
Please take whatever actions the device asks you to to proceed.
21+
- type: call_button
22+
content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue.
23+
command: fastboot_reboot
24+
- type: confirm_button
25+
content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue.
26+
flash_recovery:
27+
- type: call_button
28+
content: >
29+
Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating,
30+
adapting and repairing of the operating system.
31+
Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
32+
command: adb_reboot_bootloader
33+
- type: call_button
34+
content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
35+
command: fastboot_flash_recovery
36+
install_os:
37+
- type: call_button
38+
content: >
39+
In the next steps, you finally flash the selected OS image.
40+
Wait until the TWRP screen appears. Then run the command.
41+
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
42+
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.
43+
command: adb_twrp_wipe_and_install
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
metadata:
2+
maintainer: SirRGB
3+
devicename: OnePlus 5T
4+
devicecode: dumpling
5+
twrp-link: cheeseburger_dumpling
6+
steps:
7+
unlock_bootloader:
8+
- type: call_button
9+
content: >
10+
As a first step, you need to unlock the bootloader. A bootloader is the piece of software, that tells your phone
11+
how to start and run an operating system (like Android). Your device should be turned on.
12+
Press 'Confirm and run' to reboot into the bootloader.
13+
command: adb_reboot_bootloader
14+
- type: call_button
15+
content: In this step you actually unlock the bootloader. Just press 'Confirm and run' here. Once it's done, press continue here.
16+
command: fastboot_oem_unlock
17+
- type: confirm_button
18+
content: >
19+
At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader.
20+
Please take whatever actions the device asks you to to proceed.
21+
- type: call_button
22+
content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue.
23+
command: fastboot_reboot
24+
- type: confirm_button
25+
content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue.
26+
flash_recovery:
27+
- type: call_button
28+
content: >
29+
Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating,
30+
adapting and repairing of the operating system.
31+
Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
32+
command: adb_reboot_bootloader
33+
- type: call_button
34+
content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
35+
command: fastboot_flash_recovery
36+
install_os:
37+
- type: call_button
38+
content: >
39+
In the next steps, you finally flash the selected OS image.
40+
Wait until the TWRP screen appears. Then run the command.
41+
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
42+
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.
43+
command: adb_twrp_wipe_and_install
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
metadata:
2+
maintainer: SirRGB
3+
devicename: Motorola Moto Z
4+
devicecode: griffin
5+
steps:
6+
unlock_bootloader:
7+
- type: call_button
8+
command: adb_reboot_bootloader
9+
content: >
10+
As a first step, you need to unlock the bootloader of your device. A bootloader is the piece of software, that tells your phone
11+
how to start and run an operating system (like Android). You need to boot into fastboot mode by pressing the 'Confirm and run' button. Then continue.
12+
- type: call_button
13+
command: fastboot_get_unlock_data
14+
content: >
15+
Now you need to get your device ID to get an unlock code from Motorola. Press 'Confirm and run' to get the ID. (You need to toggle 'Advanced Output' here to see it.)
16+
Copy it to a separate file to use it in the next step.
17+
- type: link_button_with_confirm
18+
content: >
19+
Click on the button to open the instructions on Motorola's official unlocking website to generate an unlock code for your bootloader.
20+
Copy the code from the last step to the website and follow the instructions there. Then continue here.
21+
link: https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a
22+
- type: confirm_button
23+
content: Connect the device to your PC via USB. And confirm to continue.
24+
- type: call_button_with_input
25+
content: >
26+
Use your code to unlock the bootloader of your device. Type in the full 21 character code you received by email (Example: 5RTSQCYL7ZJKL4NN35MY). Then confirm an run. Afterwards you can continue.
27+
command: fastboot_unlock_with_code
28+
- type: call_button_with_input
29+
content: >
30+
You need to perform the last command again, so reenter the code and run again. Afterwards you can continue.
31+
command: fastboot_unlock_with_code
32+
- type: call_button
33+
content: >
34+
Press the button to reboot. Since the device resets completely, you will need to re-enable USB debugging to continue.
35+
Connect your device to your PC via USB. Then confirm here to continue.
36+
command: fastboot_reboot
37+
flash_recovery:
38+
- type: call_button
39+
content: >
40+
Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating,
41+
adapting and repairing of the operating system.
42+
Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
43+
command: adb_reboot_bootloader
44+
- type: call_button
45+
content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
46+
command: fastboot_flash_recovery
47+
install_os:
48+
- type: call_button
49+
content: >
50+
In this last step, 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. Confirm to run. This might take a while. At the end your phone will boot into the new OS.
54+
command: adb_twrp_wipe_and_install
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
metadata:
2+
maintainer: Tobias Sterbak (tsterbak)
3+
devicename: Samsung Galaxy S III Neo
4+
devicecode: s3ve3g
5+
steps:
6+
unlock_bootloader:
7+
flash_recovery:
8+
- type: confirm_button
9+
content: >
10+
There are two possible hardware configurations of this phone regardless of model number. Some phones were released with a Sony IMX 175 rear camera sensor, while others with a Samsung s5k4h5yb rear camera sensor. As such, we’ve separated this devices builds into two separate builds. The procedure to distinguish which to use is as follows:
11+
12+
- Make sure to be on the latest stock firmware of your variant (you can check updates with Settings, Updates);
13+
14+
- Make sure the rear camera is working on the stock ROM;
15+
16+
- Open the phone app and dial *#*#34971539#*#* to access to the hidden menu;
17+
- Tap on ‘Phone/Cam FW Check’ and take note of the numbers shown in the notification:
18+
- For E08QT, install the s3ve3gjv builds
19+
- For B08QT, install the s3ve3gxx builds
20+
I you are not sure what you used, you can safely restart here and pick the correct image and recovery.
21+
- type: call_button
22+
content: >
23+
As a first step, you need to boot into the bootloader. A bootloader is the piece of software,
24+
that tells your phone who to start and run an operating system (like Android). Your device should be turned on.
25+
Then press 'Confirm and run' to reboot into the bootloader. Continue once it's done.
26+
command: adb_reboot_download
27+
- type: call_button
28+
content: >
29+
In this step, you need to flash a custom recovery on your device.
30+
Press 'Confirm and run' to start the process. Confirm afterwards to continue.
31+
command: heimdall_flash_recovery
32+
- type: confirm_button
33+
img: samsung-buttons.png
34+
content: >
35+
Unplug the USB cable from your device. Then manually reboot into recovery by pressing the *Volume Down* + *Power buttons* for
36+
8~10 seconds until the screen turns black & release the buttons immediately when it does, then boot to recovery with the device powered off,
37+
hold *Volume Up* + *Home* + *Power*. Confirm when the recovery screen appears.
38+
install_os:
39+
- type: call_button
40+
content: >
41+
In the next steps, you finally flash the selected OS image.
42+
Connect your device with your computer with the USB-Cable.
43+
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
44+
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.
45+
command: adb_twrp_wipe_and_install

openandroidinstaller/installer_config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ class InstallerConfig:
5555
# Sony issues
5656
"C6603": "yuga",
5757
# OnePlus issues
58+
"OnePlus5": "cheeseburger",
59+
"OnePlus5T": "dumpling",
5860
"OnePlus6": "enchilada",
5961
"OnePlus6T": "fajita",
6062
"OnePlus7": "guacamoleb",
@@ -79,6 +81,7 @@ def __init__(
7981
self.metadata = metadata
8082
self.requirements = requirements
8183
self.device_code = metadata.get("devicecode")
84+
self.twrp_link = metadata.get("twrp-link")
8285
inverted_mapping = dict(map(reversed, self.device_code_mapping.items()))
8386
self.alternative_device_code = inverted_mapping.get(
8487
self.device_code, self.device_code
@@ -173,6 +176,7 @@ def validate_config(config: str) -> bool:
173176
"maintainer": str,
174177
"devicename": str,
175178
"devicecode": str,
179+
schema.Optional("twrp-link"): str,
176180
},
177181
schema.Optional("requirements"): {
178182
schema.Optional("android"): schema.Or(str, int),

openandroidinstaller/views/select_view.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ def build(self):
145145
self.info_field = Row()
146146
# if there is an available download, show the button to the page
147147
if self.download_link:
148+
twrp_download_link = f"https://dl.twrp.me/{self.state.config.twrp_link if self.state.config.twrp_link else self.state.config.device_code}"
148149
self.right_view.controls.append(Divider())
149150
self.right_view.controls.append(
150151
Column(
@@ -166,7 +167,7 @@ def build(self):
166167
"Download TWRP recovery",
167168
icon=icons.DOWNLOAD_OUTLINED,
168169
on_click=lambda _: webbrowser.open(
169-
f"https://dl.twrp.me/{self.state.config.device_code}"
170+
twrp_download_link
170171
),
171172
expand=True,
172173
),

0 commit comments

Comments
 (0)