Skip to content

Commit b100366

Browse files
committed
Updated the config section
- Made "metadata" & "requirements" - Reorderd metadata steps - Removed a unneeded statement as it is already written in the requirements section - Added notice to please retain the given order of fields
1 parent c7f998b commit b100366

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,14 @@ If you want to use the tool for a non-supported smartphone, the fastest way is t
195195
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.
196196

197197
##### How to write Metadata
198-
Every config file should have metadata with the following fields:
198+
Every config file should have `metadata` with the following fields:
199199
- `maintainer`: str; Maintainer and author of the config file.
200200
- `device_name`: str; Name of the device.
201201
- `device_code`: str; The official device code.
202202
- `supported_device_codes`: List[str]; A list of supported device codes for the config. The config will be loaded based on this field.
203203
- `twrp-link`: [OPTIONAL] str; name of the corresponding twrp page.
204204

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

@@ -214,13 +214,13 @@ Every step in the config file corresponds to one view in the application. These
214214
- `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.
215215
- `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.
216216
- `link_button_with_confirm`: Display a button that opens a browser with a given link, confirm afterwards. Link is given in `link`.
217+
- `img`: [OPTIONAL] Display an image on the left pane of the step view. Images are loaded from `openandroidinstaller/assets/imgs/`.
217218
- `content`: str; The content text displayed alongside the action of the step. Used to inform the user about whats going on.
219+
- `link`: [OPTIONAL] Link to use for the link button if type is `link_button_with_confirm`.
218220
- `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`.
219-
- `img`: [OPTIONAL] Display an image on the left pane of the step view. Images are loaded from `openandroidinstaller/assets/imgs/`.
220221
- `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.
221-
- `link`: [OPTIONAL] Link to use for the link button if type is `link_button_with_confirm`.
222222

223-
You can also use the `requirements` field in the yaml, to specify `firmware` or `android` version requirements. The user will then be prompted if these requirements are satisfied.
223+
**Please try to retain this order of these fields in your config to ensure consistency.**
224224

225225
### How to build the application for your platform
226226

0 commit comments

Comments
 (0)