Skip to content

Commit f122086

Browse files
author
anon1892
authored
Merge branch 'main' into cupid
2 parents f26a6e4 + 83d2de4 commit f122086

File tree

8 files changed

+78
-70
lines changed

8 files changed

+78
-70
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ patreon: # Replace with a single Patreon username
66
ko_fi: # Replace with a single Ko-fi username
77
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
88
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9-
liberapay: # Replace with a single Liberapay username
9+
liberapay: OpenAndroidInstaller
1010
issuehunt: # Replace with a single IssueHunt username
1111
otechie: # Replace with a single Otechie username
1212
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Bug report
33
about: Create a report to help us improve
44
title: ''
5-
labels: ''
5+
labels: 'bug'
66
assignees: ''
77

88
---

.github/ISSUE_TEMPLATE/device-support-request.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
22
name: Device support request
33
about: Request support for a new device
44
title: ''
5-
labels: ''
5+
labels: 'device'
66
assignees: ''
77

88
---
99

10-
**Device name**
11-
Please enter the name of the device you would like to request support for.
12-
If you know the device code, please also add it here.
10+
**Device informations**
11+
- Brand:
12+
- Phone name:
13+
- Device code (if unknown, leave blank):
14+
- Model (if several models exist):
1315

14-
**Device images**
15-
Please provide links to any available images of the device, such as official stock firmware or custom ROMs you would like to install.
16+
**Device images**
17+
Please provide links to any available images of the device, such as official stock firmware or custom ROMs you would like to install.
1618

1719
**Do you own the device and would be willing to test the installer?**
1820
- [ ]
1921

20-
**Additional context**
21-
Please provide any additional context or information that may be helpful in adding support for this device.
22+
**Additional context**
23+
Please provide any additional context or information that may be helpful in adding support for this device.

.github/ISSUE_TEMPLATE/feature-request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Feature request
33
about: Suggest an idea for this project
44
title: ''
5-
labels: ''
5+
labels: 'enhancement'
66
assignees: ''
77

88
---

README.md

Lines changed: 6 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,6 @@ Xiaomi | 12 | cupid | | untested
179179
And more to come!
180180

181181

182-
## Run OpenAndroidInstaller for development
183-
184-
Currently development is only supported on Ubuntu Linux. MacOS and Windows should also work fine. You might need to install additional USB-drivers on Windows.
185-
186-
1. Clone the main branch of this repository
187-
2. Run `make poetry` and `make install` to install poetry to manage python and install the required dependencies like adb, fastboot and heimdall.
188-
3. Run `make app` to start the desktop app from the source.
189-
190-
191182
## Contributing
192183

193184
All kinds of contributions are welcome. These include:
@@ -199,62 +190,18 @@ All kinds of contributions are welcome. These include:
199190
- Add features and/or improve the code base.
200191
- Report bugs.
201192

202-
More details on how to contribute can be found [here](https://github.com/openandroidinstaller-dev/openandroidinstaller/blob/main/CONTRIBUTING.md).
203-
Please have a look before opening an issue or starting to contribute.
204-
205-
A detailed list can be found [here](https://openandroidinstaller.org/#contribute).
206-
207-
### How to contribute your own installation configurations
208-
209-
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.
193+
[How to contribute your own installation configurations](https://github.com/openandroidinstaller-dev/openandroidinstaller/blob/main/doc/how_to_contribute_your_own_installation_configurations.md)
210194

211-
**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.
195+
[How to build the application for your platform](https://github.com/openandroidinstaller-dev/openandroidinstaller/blob/main/doc/building_the_application_for_your_platform.md)
212196

213-
#### Content of a config file
197+
[On unlocking the bootloader](https://github.com/openandroidinstaller-dev/openandroidinstaller/blob/main/doc/unlocking_the_bootloader.md)
214198

215-
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.
216-
217-
##### How to write Metadata
218-
Every config file should have `metadata` with the following fields:
219-
- `maintainer`: str; Maintainer and author of the config file.
220-
- `device_name`: str; Name of the device.
221-
- `is_ab_device`: bool; A boolean to determine if the device is a/b-partitioned or not.
222-
- `device_code`: str; The official device code.
223-
- `supported_device_codes`: List[str]; A list of supported device codes for the config. The config will be loaded based on this field.
224-
- `twrp-link`: [OPTIONAL] str; name of the corresponding twrp page.
225-
226-
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.
227-
- `android`: [OPTIONAL] int|str; Android version to install prior to installing a custom ROM.
228-
- `firmware`: [OPTIONAL] str; specific firmware version to install before installing a custom ROM.
229-
230-
##### How to write steps:
231-
Every step in the config file corresponds to one view in the application. These steps should contain the following fields:
232-
- `type`: str; Corresponds to the type of view to generate. There are the following options:
233-
- `text`: Just display the text given in content.
234-
- `confirm_button`: Display the content, as well as a button to allow the user to go to the next step.
235-
- `call_button`: Display the content text and a button that runs a given command. After the command is run, a confirm button is displayed to allow the user to move to the next step.
236-
- `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.
237-
- `link_button_with_confirm`: Display a button that opens a browser with a given link, confirm afterwards. Link is given in `link`.
238-
- `img`: [OPTIONAL] Display an image on the left pane of the step view. Images are loaded from `openandroidinstaller/assets/imgs/`.
239-
- `content`: str; The content text displayed alongside the action of the step. Used to inform the user about what's going on. For consistency and better readability the text should be moved into the next line using `>`.
240-
- `link`: [OPTIONAL] Link to use for the link button if type is `link_button_with_confirm`.
241-
- `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`.
242-
- `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.
243-
244-
**Please try to retain this order of these fields in your config to ensure consistency.**
245-
246-
## How to build the application for your platform
247-
248-
The executables for the OpenAndroidInstaller are build with [pyinstaller](https://pyinstaller.org/en/stable/index.html). You can create builds for MacOS or Linux with `make build-app`. For Windows the paths need to be modified. For now, you can have a look [here](https://github.com/openandroidinstaller-dev/openandroidinstaller/blob/v0.1.2-alpha/.github/workflows/manual-build-windows.yml#L22) on how it's done.
249-
250-
If you build the application for your platform and want to contribute the build, please reach out to me.
199+
More details on how to contribute can be found [here](https://github.com/openandroidinstaller-dev/openandroidinstaller/blob/main/CONTRIBUTING.md).
200+
Please have a look before opening an issue or starting to contribute.
251201

252-
#### On unlocking the bootloader
253-
Devices by *Samsung*, *Google* and *Fairphone* make it fairly easy to unlock the bootloader and receive good support in the installer.
202+
A detailed list can be found [here](https://openandroidinstaller.org/#contribute).
254203

255-
Some devices with require manual steps to unlock the bootloader. In general you will need to create an account at a vendor website and receive some code from there. OpenAndroidInstaller will try to guide you as far as possible. These vendors include *Sony, Motorola, Xiaomi* and *OnePlus* among others.
256204

257-
Other phone vendors stops allowing to unlock the bootloader all together. There is nothing to be done if you didn't unlock your device in time. These vendors include *Huawei and LG* among others. Support for these vendors will always be very limited.
258205

259206
## Tools
260207

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## How to build the application for your platform
2+
3+
The executables for the OpenAndroidInstaller are build with [pyinstaller](https://pyinstaller.org/en/stable/index.html). You can create builds for MacOS or Linux with `make build-app`. For Windows the paths need to be modified. For now, you can have a look [here](https://github.com/openandroidinstaller-dev/openandroidinstaller/blob/v0.1.2-alpha/.github/workflows/manual-build-windows.yml#L22) on how it's done.
4+
5+
If you build the application for your platform and want to contribute the build, please reach out to me.
6+
7+
## Run OpenAndroidInstaller for development
8+
9+
Currently development is only supported on Ubuntu Linux. MacOS and Windows should also work fine. You might need to install additional USB-drivers on Windows.
10+
11+
1. Clone the main branch of this repository
12+
2. Run `make poetry` and `make install` to install poetry to manage python and install the required dependencies like adb, fastboot and heimdall.
13+
3. Run `make app` to start the desktop app from the source.
14+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
### How to contribute your own installation configurations
2+
3+
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.
4+
5+
**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.
6+
7+
#### Content of a config file
8+
9+
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.
10+
11+
##### How to write Metadata
12+
Every config file should have `metadata` with the following fields:
13+
- `maintainer`: str; Maintainer and author of the config file.
14+
- `device_name`: str; Name of the device.
15+
- `is_ab_device`: bool; A boolean to determine if the device is a/b-partitioned or not.
16+
- `device_code`: str; The official device code.
17+
- `supported_device_codes`: List[str]; A list of supported device codes for the config. The config will be loaded based on this field.
18+
- `twrp-link`: [OPTIONAL] str; name of the corresponding twrp page.
19+
20+
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.
21+
- `android`: [OPTIONAL] int|str; Android version to install prior to installing a custom ROM.
22+
- `firmware`: [OPTIONAL] str; specific firmware version to install before installing a custom ROM.
23+
24+
##### How to write steps:
25+
Every step in the config file corresponds to one view in the application. These steps should contain the following fields:
26+
- `type`: str; Corresponds to the type of view to generate. There are the following options:
27+
- `text`: Just display the text given in content.
28+
- `confirm_button`: Display the content, as well as a button to allow the user to go to the next step.
29+
- `call_button`: Display the content text and a button that runs a given command. After the command is run, a confirm button is displayed to allow the user to move to the next step.
30+
- `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.
31+
- `link_button_with_confirm`: Display a button that opens a browser with a given link, confirm afterwards. Link is given in `link`.
32+
- `img`: [OPTIONAL] Display an image on the left pane of the step view. Images are loaded from `openandroidinstaller/assets/imgs/`.
33+
- `content`: str; The content text displayed alongside the action of the step. Used to inform the user about what's going on. For consistency and better readability the text should be moved into the next line using `>`.
34+
- `link`: [OPTIONAL] Link to use for the link button if type is `link_button_with_confirm`.
35+
- `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`.
36+
- `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.
37+
38+
**Please try to retain this order of these fields in your config to ensure consistency.**
39+

doc/unlocking_the_bootloader.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#### On unlocking the bootloader
2+
Devices by *Samsung*, *Google* and *Fairphone* make it fairly easy to unlock the bootloader and receive good support in the installer.
3+
4+
Some devices with require manual steps to unlock the bootloader. In general you will need to create an account at a vendor website and receive some code from there. OpenAndroidInstaller will try to guide you as far as possible. These vendors include *Sony, Motorola, Xiaomi* and *OnePlus* among others.
5+
6+
Other phone vendors stops allowing to unlock the bootloader all together. There is nothing to be done if you didn't unlock your device in time. These vendors include *Huawei and LG* among others. Support for these vendors will always be very limited.

0 commit comments

Comments
 (0)