Skip to content

Commit

Permalink
Release/0.3.5 alpha (#68)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
tsterbak committed Feb 10, 2023
2 parents dabc11e + 9708070 commit ceea990
Show file tree
Hide file tree
Showing 7 changed files with 211 additions and 3 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Linux is currently the best supported platform (tested with Ubuntu 20.04/22.04 L

## Officially supported devices

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


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

<details><summary><b>OnePlus</b></summary>

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

#### Content of a config file

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.

##### How to write Metadata
Every config file should have metadata with the following fields:
- `maintainer`: str; Maintainer and author of the config file.
- `devicename`: str; Name of the device.
- `devicecode`: str; The official device code.
- `twrp-link`: [OPTIONAL] str; name of the corresponding twrp page.

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.
- `android`: [OPTIONAL] int|str; Android version to install prior to installing a custom ROM.
- `firmware`: [OPTIONAL] str; specific firmware version to install before installing a custom ROM.

##### How to write steps:
Every step in the config file corresponds to one view in the application. These steps should contain the following fields:
- `type`: str; Corresponds to the type of view to generate. There are the following options:
- `text`: Just display the text given in content.
Expand Down Expand Up @@ -218,7 +236,7 @@ Other phone vendors stops allowing to unlock the bootloader all together. There


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

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.

Expand Down
43 changes: 43 additions & 0 deletions openandroidinstaller/assets/configs/cheeseburger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
metadata:
maintainer: SirRGB
devicename: OnePlus 5
devicecode: cheeseburger
twrp-link: cheeseburger_dumpling
steps:
unlock_bootloader:
- type: call_button
content: >
As a first step, you need to unlock the bootloader. A bootloader is the piece of software, that tells your phone
how to start and run an operating system (like Android). Your device should be turned on.
Press 'Confirm and run' to reboot into the bootloader.
command: adb_reboot_bootloader
- type: call_button
content: In this step you actually unlock the bootloader. Just press 'Confirm and run' here. Once it's done, press continue here.
command: fastboot_oem_unlock
- type: confirm_button
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.
- type: call_button
content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue.
command: fastboot_reboot
- type: confirm_button
content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue.
flash_recovery:
- type: call_button
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.
Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
command: adb_reboot_bootloader
- type: call_button
content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
command: fastboot_flash_recovery
install_os:
- type: call_button
content: >
In the next steps, you finally flash the selected OS image.
Wait until the TWRP screen appears. Then run the command.
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
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.
command: adb_twrp_wipe_and_install
43 changes: 43 additions & 0 deletions openandroidinstaller/assets/configs/dumpling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
metadata:
maintainer: SirRGB
devicename: OnePlus 5T
devicecode: dumpling
twrp-link: cheeseburger_dumpling
steps:
unlock_bootloader:
- type: call_button
content: >
As a first step, you need to unlock the bootloader. A bootloader is the piece of software, that tells your phone
how to start and run an operating system (like Android). Your device should be turned on.
Press 'Confirm and run' to reboot into the bootloader.
command: adb_reboot_bootloader
- type: call_button
content: In this step you actually unlock the bootloader. Just press 'Confirm and run' here. Once it's done, press continue here.
command: fastboot_oem_unlock
- type: confirm_button
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.
- type: call_button
content: To finish the unlocking, the phone needs to reboot. Just press 'Confirm and run' here to reboot. Then continue.
command: fastboot_reboot
- type: confirm_button
content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable Developer Options and USB debugging to continue.
flash_recovery:
- type: call_button
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.
Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
command: adb_reboot_bootloader
- type: call_button
content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
command: fastboot_flash_recovery
install_os:
- type: call_button
content: >
In the next steps, you finally flash the selected OS image.
Wait until the TWRP screen appears. Then run the command.
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
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.
command: adb_twrp_wipe_and_install
54 changes: 54 additions & 0 deletions openandroidinstaller/assets/configs/griffin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
metadata:
maintainer: SirRGB
devicename: Motorola Moto Z
devicecode: griffin
steps:
unlock_bootloader:
- type: call_button
command: adb_reboot_bootloader
content: >
As a first step, you need to unlock the bootloader of your device. A bootloader is the piece of software, that tells your phone
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.
- type: call_button
command: fastboot_get_unlock_data
content: >
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.)
Copy it to a separate file to use it in the next step.
- type: link_button_with_confirm
content: >
Click on the button to open the instructions on Motorola's official unlocking website to generate an unlock code for your bootloader.
Copy the code from the last step to the website and follow the instructions there. Then continue here.
link: https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a
- type: confirm_button
content: Connect the device to your PC via USB. And confirm to continue.
- type: call_button_with_input
content: >
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.
command: fastboot_unlock_with_code
- type: call_button_with_input
content: >
You need to perform the last command again, so reenter the code and run again. Afterwards you can continue.
command: fastboot_unlock_with_code
- type: call_button
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.
command: fastboot_reboot
flash_recovery:
- type: call_button
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.
Make sure your device is turned on. You need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
command: adb_reboot_bootloader
- type: call_button
content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
command: fastboot_flash_recovery
install_os:
- type: call_button
content: >
In this last step, you finally flash the selected OS image.
Wait until the TWRP screen appears. Then run the command.
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
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.
command: adb_twrp_wipe_and_install
45 changes: 45 additions & 0 deletions openandroidinstaller/assets/configs/s3ve3g.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
metadata:
maintainer: Tobias Sterbak (tsterbak)
devicename: Samsung Galaxy S III Neo
devicecode: s3ve3g
steps:
unlock_bootloader:
flash_recovery:
- type: confirm_button
content: >
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:
- Make sure to be on the latest stock firmware of your variant (you can check updates with Settings, Updates);
- Make sure the rear camera is working on the stock ROM;
- Open the phone app and dial *#*#34971539#*#* to access to the hidden menu;
- Tap on ‘Phone/Cam FW Check’ and take note of the numbers shown in the notification:
- For E08QT, install the s3ve3gjv builds
- For B08QT, install the s3ve3gxx builds
I you are not sure what you used, you can safely restart here and pick the correct image and recovery.
- type: call_button
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.
command: adb_reboot_download
- type: call_button
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.
command: heimdall_flash_recovery
- type: confirm_button
img: samsung-buttons.png
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*. Confirm when the recovery screen appears.
install_os:
- type: call_button
content: >
In the next steps, you finally flash the selected OS image.
Connect your device with your computer with the USB-Cable.
This step will format your phone and wipe all the data. It will also remove encryption and delete all files stored
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.
command: adb_twrp_wipe_and_install
4 changes: 4 additions & 0 deletions openandroidinstaller/installer_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class InstallerConfig:
# Sony issues
"C6603": "yuga",
# OnePlus issues
"OnePlus5": "cheeseburger",
"OnePlus5T": "dumpling",
"OnePlus6": "enchilada",
"OnePlus6T": "fajita",
"OnePlus7": "guacamoleb",
Expand All @@ -79,6 +81,7 @@ def __init__(
self.metadata = metadata
self.requirements = requirements
self.device_code = metadata.get("devicecode")
self.twrp_link = metadata.get("twrp-link")
inverted_mapping = dict(map(reversed, self.device_code_mapping.items()))
self.alternative_device_code = inverted_mapping.get(
self.device_code, self.device_code
Expand Down Expand Up @@ -173,6 +176,7 @@ def validate_config(config: str) -> bool:
"maintainer": str,
"devicename": str,
"devicecode": str,
schema.Optional("twrp-link"): str,
},
schema.Optional("requirements"): {
schema.Optional("android"): schema.Or(str, int),
Expand Down
3 changes: 2 additions & 1 deletion openandroidinstaller/views/select_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ def build(self):
self.info_field = Row()
# if there is an available download, show the button to the page
if self.download_link:
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}"
self.right_view.controls.append(Divider())
self.right_view.controls.append(
Column(
Expand All @@ -166,7 +167,7 @@ def build(self):
"Download TWRP recovery",
icon=icons.DOWNLOAD_OUTLINED,
on_click=lambda _: webbrowser.open(
f"https://dl.twrp.me/{self.state.config.device_code}"
twrp_download_link
),
expand=True,
),
Expand Down

0 comments on commit ceea990

Please sign in to comment.