Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.4.2-beta #119

Merged
merged 49 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
4556780
Added config for bacon
MagicLike Mar 7, 2023
a5d34b1
Renamed config
MagicLike Mar 11, 2023
8da1b90
Removing extra reboot step
MagicLike Mar 11, 2023
754b7be
Cosmetic changes to the text elements
MagicLike Mar 11, 2023
51f6c5d
Added OnePlus One to list
MagicLike Mar 11, 2023
4b616ab
Added another config for device code "bacon"
MagicLike Mar 11, 2023
077ea03
Added notice for custom recoveries
MagicLike Mar 12, 2023
ba97efe
Added notice for launching recovery manually
MagicLike Mar 12, 2023
e3c12e6
Updated contribute_link
MagicLike Mar 12, 2023
0f487ce
Switched from flashing to booting TWRP
MagicLike Mar 12, 2023
1a99a42
Moved feedback to app header
MagicLike Mar 12, 2023
3c28998
Added feedback icon and updated tooltip
MagicLike Mar 12, 2023
0abb90f
Renamed variables, updated configs & updated README
MagicLike Mar 12, 2023
66d6cba
Updated bacon configs to new TWRP booting
MagicLike Mar 12, 2023
6880808
Code formatting
MagicLike Mar 12, 2023
13c3500
Added restart button on final page
MagicLike Mar 13, 2023
4222309
Put restart and finish buttons next to each other
MagicLike Mar 13, 2023
2d7b0e2
Updated search icon
MagicLike Mar 13, 2023
dd1c897
Fixed image not showing in "Boot custom recovery"
MagicLike Mar 20, 2023
c7706b9
Supported device codes for a config are now a list; config is loaded …
tsterbak Mar 23, 2023
13a9751
Update test and fix configs
tsterbak Mar 23, 2023
475cfa3
Revert "Put restart and finish buttons next to each other"
MagicLike Mar 23, 2023
f24ed79
Revert "Added restart button on final page"
MagicLike Mar 23, 2023
306c789
Success page update (#113)
tsterbak Mar 24, 2023
ecd5019
Switched from flashing to booting TWRP (#111)
tsterbak Mar 24, 2023
a49cae3
Support for OnePlus One (#98)
tsterbak Mar 24, 2023
cd1436e
Merge branch 'release-0.4.2-beta' into device-code-as-list
tsterbak Mar 24, 2023
5fb50d3
Device code as list (#118)
tsterbak Mar 24, 2023
faf315f
Align configs
tsterbak Mar 24, 2023
436e4a3
Bump version
tsterbak Mar 24, 2023
b12f239
Removed extra reboot step
MagicLike Mar 24, 2023
69f73dd
Code formatting
MagicLike Mar 24, 2023
1ca341b
minor fixes
tsterbak Mar 24, 2023
c800eb4
Fix device code issue
MagicLike Mar 24, 2023
41825e9
Update android version requirement for avicii
tsterbak Mar 24, 2023
916386e
Fix device code issue (#121)
tsterbak Mar 24, 2023
2df4a66
Replace detect_is_ab_device by field in the config
tsterbak Mar 27, 2023
523b9c7
Update configs accordinly
tsterbak Mar 27, 2023
ece1e25
Update readme
tsterbak Mar 27, 2023
150700d
Make all text and markdown elements selectable
tsterbak Mar 27, 2023
a9a421d
If there are not instructions to unlock the bootloader, assume that t…
tsterbak Mar 27, 2023
f927280
Fix extra reboot step for OnePlus configs (#120)
tsterbak Mar 27, 2023
b6f701a
Add is ab partintioned device to config (#126)
tsterbak Mar 27, 2023
1736ccf
Adjust configs for a/b partition info
tsterbak Mar 27, 2023
d7149c8
Make texts selectable in the application (#127)
tsterbak Mar 27, 2023
c8aaaa0
Support fajita OnePlus6TSingle
tsterbak Mar 27, 2023
6e5e2e7
Merge remote-tracking branch 'origin/release-0.4.2-beta' into release…
tsterbak Mar 27, 2023
c985726
Fix unlock bootloader toggle when no instructions in cofnig
tsterbak Mar 27, 2023
21a7981
Check a different url if lineageos exists
tsterbak Mar 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Linux is currently the best supported platform (tested with Ubuntu 20.04/22.04 L

## Officially supported devices

Currently, the **we support 56 devices** by various vendors and working on adding more soon!
Currently, the **we support 57 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 Down Expand Up @@ -149,6 +149,7 @@ Motorola | moto z | [griffin](https://wiki.lineageos.org/devices/griffin/) | | t

Vendor | Device Name | CodeName | Models | Status
---|---|---|---|---
OnePlus | One | [bacon](https://wiki.lineageos.org/devices/bacon/) | A0001 | tested
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
Expand Down Expand Up @@ -185,19 +186,21 @@ All kinds of contributions are welcome. These include:

### How to contribute your own installation configurations

If you want to use the tool for a non-supported smartphone, the fastest way is to adapt an [existing config file](https://github.com/openandroidinstaller-dev/openandroidinstaller/tree/main/openandroidinstaller/assets/configs). The file should be named after the `device code` of your device. This is in general the output by `adb shell getprop | grep ro.product.device` when the devices is connected to the computer. You can also get the device code by connecting the device to the computer and run OpenAndroidInstaller to detect the device.
If you want to use the tool for a non-supported smartphone, the fastest way is to adapt an [existing config file](https://github.com/openandroidinstaller-dev/openandroidinstaller/tree/main/openandroidinstaller/assets/configs). The file should be named after the official `device code` of the device. Add the code output by `adb shell getprop | grep ro.product.device` (when the devices is connected to the computer) as well as the official device code to the `supported_device_codes` list in the config. You can also get the device code by connecting the device to the computer and run OpenAndroidInstaller to detect the device.

**To test your config file with the executable** without using the developer setup, place it in the same directory as the executable. There it will be detected by name. After you created a config file and it works fine, you can open a pull request to make the file available to other users. Please also add the device to the supported devices table above.

#### 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.
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, boot 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.
- `device_name`: str; Name of the device.
- `is_ab_device`: bool; A boolean to determine if the device is a/b-partitioned or not.
- `device_code`: str; The official device code.
- `supported_device_codes`: List[str]; A list of supported device codes for the config. The config will be loaded based on this field.
- `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.
Expand All @@ -213,7 +216,7 @@ Every step in the config file corresponds to one view in the application. These
- `call_button_with_input`: Display the content text, an input field and a button that runs a given command. The inputtext, can be used in the command by using the `<inputtext>` placeholder in the command field. After the command is run, a confirm button is displayed to allow the user to move to the next step.
- `link_button_with_confirm`: Display a button that opens a browser with a given link, confirm afterwards. Link is given in `link`.
- `content`: str; The content text displayed alongside the action of the step. Used to inform the user about whats going on.
- `command`: [ONLY for call_button* steps] str; The command to run. One of `adb_reboot`, `adb_reboot_bootloader`, `adb_reboot_download`, `adb_sideload`, `adb_twrp_wipe_and_install`, `adb_twrp_copy_partitions`, `fastboot_flash_recovery`, `fastboot_unlock_with_code`, `fastboot_unlock`, `fastboot_oem_unlock`, `fastboot_get_unlock_data`, `fastboot_reboot`, `heimdall_flash_recovery`.
- `command`: [ONLY for call_button* steps] str; The command to run. One of `adb_reboot`, `adb_reboot_bootloader`, `adb_reboot_download`, `adb_sideload`, `adb_twrp_wipe_and_install`, `adb_twrp_copy_partitions`, `fastboot_boot_recovery`, `fastboot_unlock_with_code`, `fastboot_unlock`, `fastboot_oem_unlock`, `fastboot_get_unlock_data`, `fastboot_reboot`, `heimdall_flash_recovery`.
- `img`: [OPTIONAL] Display an image on the left pane of the step view. Images are loaded from `openandroidinstaller/assets/imgs/`.
- `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.
- `link`: [OPTIONAL] Link to use for the link button if type is `link_button_with_confirm`.
Expand Down
3 changes: 1 addition & 2 deletions openandroidinstaller/app_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def __init__(
self.config = None
self.image_path = None
self.recovery_path = None
self.is_ab = None

# store views
self.default_views: List = []
Expand All @@ -67,5 +66,5 @@ def load_config(self, device_code: str):
self.config = _load_config(device_code, self.config_path)
if self.config:
self.steps = copy.deepcopy(self.config.unlock_bootloader) + copy.deepcopy(
self.config.flash_recovery
self.config.boot_recovery
)
15 changes: 9 additions & 6 deletions openandroidinstaller/assets/configs/FP2.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
metadata:
maintainer: Tobias Sterbak (tsterbak)
devicename: Fairphone 2
devicecode: FP2
device_name: Fairphone 2
is_ab_device: false
device_code: FP2
supported_device_codes:
- FP2
steps:
unlock_bootloader:
flash_recovery:
boot_recovery:
- type: confirm_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,
Now you need to boot 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.
- type: call_button
content: Once the device is fully booted, 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
content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
command: fastboot_boot_recovery
- type: confirm_button
content: >
Now reboot into recovery to verify the installation. Do not reboot into the existing OS, since it will overwrite the recovery you just installed!
Expand Down
13 changes: 8 additions & 5 deletions openandroidinstaller/assets/configs/FP3.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
metadata:
maintainer: Tobias Sterbak (tsterbak)
devicename: Fairphone 3
devicecode: FP3
device_name: Fairphone 3
is_ab_device: true
device_code: FP3
supported_device_codes:
- FP3
steps:
unlock_bootloader:
- type: link_button_with_confirm
Expand Down Expand Up @@ -29,17 +32,17 @@ steps:
command: fastboot_reboot
- type: confirm_button
content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable USB debugging to continue.
flash_recovery:
boot_recovery:
- type: confirm_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,
Now you need to boot 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.
- type: call_button
content: Turn on your device. Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
command: adb_reboot_bootloader
- type: call_button
content: Once the device is in fastboot mode, flash the custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
command: fastboot_flash_recovery
command: fastboot_boot_recovery
- type: confirm_button
content: >
Now reboot into recovery to verify the installation. Do not reboot into the existing OS, since it will overwrite the recovery you just installed!
Expand Down
15 changes: 9 additions & 6 deletions openandroidinstaller/assets/configs/FP4.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
metadata:
maintainer: Tobias Sterbak (tsterbak)
devicename: Fairphone 4
devicecode: FP4
device_name: Fairphone 4
is_ab_device: true
device_code: FP4
supported_device_codes:
- FP4
steps:
unlock_bootloader:
- type: link_button_with_confirm
Expand Down Expand Up @@ -29,17 +32,17 @@ steps:
command: fastboot_reboot
- type: confirm_button
content: The bootloader is now unlocked. Since the device resets completely, you will need to re-enable USB debugging to continue.
flash_recovery:
boot_recovery:
- type: confirm_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,
Now you need to boot 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.
- type: call_button
content: Turn on your device. Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
command: adb_reboot_bootloader
- type: call_button
content: Once the device is in fastboot mode, flash the custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
command: fastboot_flash_recovery
content: Once the device is in fastboot mode, boot the custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
command: fastboot_boot_recovery
- type: confirm_button
content: >
Now reboot into recovery to verify the installation. Do not reboot into the existing OS, since it will overwrite the recovery you just installed!
Expand Down
11 changes: 7 additions & 4 deletions openandroidinstaller/assets/configs/a3y17lte.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
metadata:
maintainer: Tobias Sterbak (tsterbak)
devicename: Samsung Galaxy A3 (2017)
devicecode: a3y17lte
device_name: Samsung Galaxy A3 (2017)
is_ab_device: false
device_code: a3y17lte
supported_device_codes:
- a3y17lte
steps:
unlock_bootloader:
flash_recovery:
boot_recovery:
- type: call_button
content: >
As a first step, you need to boot into the bootloader. A bootloader is the piece of software,
Expand All @@ -13,7 +16,7 @@ steps:
command: adb_reboot_download
- type: call_button
content: >
In this step, you need to flash a custom recovery on your device.
In this step, you need to boot 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
Expand Down
11 changes: 7 additions & 4 deletions openandroidinstaller/assets/configs/a5xelte.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
metadata:
maintainer: Tobias Sterbak (tsterbak)
devicename: Samsung Galaxy A5 (2016)
devicecode: a5xelte
device_name: Samsung Galaxy A5 (2016)
is_ab_device: false
device_code: a5xelte
supported_device_codes:
- a5xelte
steps:
unlock_bootloader:
flash_recovery:
boot_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.
content: In this step, you need to boot 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
Expand Down
11 changes: 7 additions & 4 deletions openandroidinstaller/assets/configs/a72q.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
metadata:
maintainer: Tobias Sterbak (tsterbak)
devicename: Samsung Galaxy A72
devicecode: a72q
device_name: Samsung Galaxy A72
is_ab_device: false
device_code: a72q
supported_device_codes:
- a72q
steps:
unlock_bootloader:
flash_recovery:
boot_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.
content: In this step, you need to boot 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
Expand Down
11 changes: 7 additions & 4 deletions openandroidinstaller/assets/configs/a7xelte.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
metadata:
maintainer: Tobias Sterbak (tsterbak)
devicename: Samsung Galaxy A7 (2016)
devicecode: a7xelte
device_name: Samsung Galaxy A7 (2016)
is_ab_device: false
device_code: a7xelte
supported_device_codes:
- a7xelte
steps:
unlock_bootloader:
flash_recovery:
boot_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.
content: In this step, you need to boot 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
Expand Down
13 changes: 8 additions & 5 deletions openandroidinstaller/assets/configs/akari.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
metadata:
maintainer: Tobias Sterbak (tsterbak)
devicename: Sony Xperia XZ2
devicecode: akari
device_name: Sony Xperia XZ2
is_ab_device: true
device_code: akari
supported_device_codes:
- akari
requirements:
android: 10
steps:
Expand Down Expand Up @@ -33,15 +36,15 @@ steps:
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:
boot_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,
Now you need to boot 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.
content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
command: fastboot_flash_boot
- type: call_button
command: adb_twrp_copy_partitions
Expand Down
13 changes: 8 additions & 5 deletions openandroidinstaller/assets/configs/akatsuki.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
metadata:
maintainer: Tobias Sterbak (tsterbak)
devicename: Sony Xperia XZ3
devicecode: akatsuki
device_name: Sony Xperia XZ3
is_ab_device: true
device_code: akatsuki
supported_device_codes:
- akatsuki
requirements:
android: 10
steps:
Expand Down Expand Up @@ -33,15 +36,15 @@ steps:
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:
boot_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,
Now you need to boot 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.
content: Boot a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
command: fastboot_flash_boot
- type: call_button
command: adb_twrp_copy_partitions
Expand Down
Loading