You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR is based on #220 (by @anon1892) and aims to integrate the code
in the Installer.
- Include the commands `fastboot_flash_recovery` and
`fastboot_reboot_recovery` (thanks to @anon1892)
- Add support for Mi439 (Redmi 7A & co.) (thanks to @anon1892)
- Display device specific notes at the image selection step (thanks to
@anon1892)
Other fixes & additions:
- Display the scroll bar by default if scrolling is necessary
- An info text box for additional images
Todo:
- [x] When the "custom recovery already flashed" button is selected,
user should not have to select recovery file, as in this PR for now.
- [x] User should be able not to select additional partitions, even on
Android 13 (maybe add a button like "custom recovery already flashed".
- [x] When recovery flashing is disabled, `adb reboot recovery` is not
performed. Fix that.
@@ -197,7 +204,6 @@ Please have a look before opening an issue or starting to contribute.
197
204
A detailed list can be found [here](https://openandroidinstaller.org/#contribute).
198
205
199
206
200
-
201
207
## Tools
202
208
203
209
- The [Android SDK Platform Tools](https://developer.android.com/studio/releases/platform-tools) (such as adb and fastboot) are [Apache](https://android.googlesource.com/platform/system/adb/+/refs/heads/master/NOTICE)-licensed universal Android utilities
Copy file name to clipboardExpand all lines: docs/how_to_contribute_your_own_installation_configurations.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,14 @@ A config file consists of two parts. The first part are some metadata about the
12
12
Every config file should have `metadata` with the following fields:
13
13
-`maintainer`: str; Maintainer and author of the config file.
14
14
-`device_name`: str; Name of the device.
15
+
-`brand`: [OPTIONAL] str; Name of the brand. Can be used to make brand specific actions.
15
16
-`is_ab_device`: bool; A boolean to determine if the device is a/b-partitioned or not.
16
17
-`device_code`: str; The official device code.
17
18
-`supported_device_codes`: List[str]; A list of supported device codes for the config. The config will be loaded based on this field.
18
19
-`twrp-link`: [OPTIONAL] str; name of the corresponding twrp page.
20
+
-`additional_steps` : [OPTIONAL] List[str]; A list of additional steps. Can be `dtbo`, `vbmeta`, `vendor_boot` or `super_empty`.
21
+
-`notes`: [OPTIONAL] List[str]; specific phone information, showed before choosing ROM / recovery
22
+
-`untested`: [OPTIONAL] bool; If `true`, a warning message is showed during installation process.
19
23
20
24
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
25
-`android`: [OPTIONAL] int|str; Android version to install prior to installing a custom ROM.
@@ -32,7 +36,7 @@ Every step in the config file corresponds to one view in the application. These
32
36
-`img`: [OPTIONAL] Display an image on the left pane of the step view. Images are loaded from `openandroidinstaller/assets/imgs/`.
33
37
-`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
38
-`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`.
39
+
-`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_flash_recovery`, `fastboot_reboot_recovery`, `fastboot_flash_additional_partitions`, `fastboot_unlock_with_code`, `fastboot_unlock`, `fastboot_unlock_critical`, `fastboot_oem_unlock`, `fastboot_get_unlock_data`, `fastboot_reboot`, `heimdall_flash_recovery`.
36
40
-`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
41
38
42
**Please try to retain this order of these fields in your config to ensure consistency.**
content="If you already flashed TWRP, boot into it by pressing 'Confirm and run'. Otherwise restart the process. Once your phone screen looks like the picture on the left, continue.",
content="If you already flashed TWRP, boot into it by pressing 'Confirm and run'. Otherwise restart the process. Once your phone screen looks like the picture on the left, continue.",
- Be careful when choosing OrangeFox version, Android 12 & 13 ROM needs OrangeFox version code with `A12`, for example `R11.1_5_A12`. Android 10 & 11 ROM needs OrangeFox version code without `A12` (bellow on the page)
20
+
requirements:
21
+
firmware: MiUI 12.5 (Q)
22
+
steps:
23
+
unlock_bootloader:
24
+
- type: confirm_button
25
+
content: >
26
+
As a first step, you need to unlock the bootloader. A bootloader is the piece of software, that tells your phone
27
+
how to start and run an operating system (like Android). Your device should be turned on. This will reset your phone.
28
+
- type: link_button_with_confirm
29
+
content: >
30
+
- Create a Mi account on Xiaomi’s website. Beware that one account is only allowed to unlock one unique device every 30 days.
31
+
32
+
- Add a phone number to your Mi account, insert a SIM into your phone.
33
+
34
+
- Enable developer options in `Settings` > `About Phone` by repeatedly tapping MIUI Version.
35
+
36
+
- Link the device to your Mi account in `Settings` > `Additional settings` > `Developer options` > `Mi Unlock status`.
37
+
38
+
- Download the Mi Unlock app with the link bellow (Windows is required to run the app), and follow the instructions provided by the app. It may tell you that you have to wait, usually 7 days. If it does so, please wait the quoted amount of time before continuing to the next step!
39
+
40
+
- After device and Mi account are successfully verified, the bootloader should be unlocked.
41
+
42
+
- Since the device resets completely, you will need to re-enable USB debugging to continue : `Settings` > `Additional settings` > `Developer options` > `USB debugging`
43
+
link: https://en.miui.com/unlock/download_en.html
44
+
boot_recovery:
45
+
- type: call_button
46
+
content: >
47
+
Now you need to install a custom recovery system on the phone. A recovery is a small subsystem on your phone,
48
+
that manages updating, adapting and repairing of the operating system.
49
+
50
+
Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
51
+
command: adb_reboot_bootloader
52
+
- type: call_button
53
+
content: >
54
+
Install additional partitions selected before by pressing 'Confirm and run'. Once it's done continue.
55
+
56
+
Note : If you have not selected this partition, it will do nothing.
57
+
command: fastboot_flash_additional_partitions
58
+
- type: call_button
59
+
content: >
60
+
Install the recovery you chosen before by pressing 'Confirm and run'. Once it's done continue.
61
+
command: fastboot_flash_recovery
62
+
- type: call_button
63
+
img: ofox.png
64
+
content: >
65
+
Reboot to recovery by pressing 'Confirm and run', and hold the Vol+ button of your phone UNTIL you see the recovery.
66
+
If MiUI starts, you have to start the process again, since MiUI delete the recovery you just flashed.
0 commit comments