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

lancelot: add Redmi 9 installer config #138

Merged
merged 3 commits into from
Oct 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
158 changes: 158 additions & 0 deletions v2/lancelot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
name: "Xiaomi Redmi 9 and 9 Prime"
codename: "lancelot"
aliases: []
formfactor: "phone"
doppelgangers: []
user_actions:
recovery:
title: "Reboot to Recovery"
description: "With the device powered off, hold Volume Up + Power."
image: "phone_power_up"
button: true
bootloader:
title: "Reboot to Bootloader"
description: "With the device powered off, hold Volume Down + Power."
image: "phone_power_down"
button: true
confirm_model:
title: "Confirm your model"
description: "Please double-check that your device is the following model: Xiaomi Redmi 9 (lancelot)."
confirm_firmware:
title: "Confirm your firmware"
description: "Please double-check that your device is running the latest available stock Android 10 firmware."
link: "https://github.com/ubuntu-touch-redmi-mt6768/lancelotfw/blob/main/README.md"
unlock:
title: "OEM unlock"
description: "If you haven't done so already, make sure to OEM unlock your device first."
link: "https://en.miui.com/unlock/"
unlock:
- "confirm_model"
- "confirm_firmware"
- "unlock"
handlers:
bootloader_locked:
actions:
- fastboot:oem_unlock:
operating_systems:
- name: "Ubuntu Touch"
options:
- var: "channel"
name: "Channel"
tooltip: "The release channel"
link: "https://docs.ubports.com/en/latest/about/process/release-schedule.html"
type: "select"
remote_values:
systemimage:channels:
- var: "wipe"
name: "Wipe Userdata"
tooltip: "Wipe personal data"
type: "checkbox"
- var: "bootstrap"
name: "Bootstrap"
tooltip: "Flash system partitions using fastboot"
type: "checkbox"
value: true
prerequisites: []
steps:
- actions:
- core:download:
group: "firmware"
files:
- url: "https://github.com/ubuntu-touch-redmi-mt6768/lancelotfw/releases/download/20211005/recovery.img"
name: "recovery.img"
checksum:
sum: "d941e216c78fb69411b2ab34066c92806245698917f1c95e62abbc3e142141bf"
algorithm: "sha256"
- url: "https://github.com/ubuntu-touch-redmi-mt6768/lancelotfw/releases/download/20211005/dtbo.img"
name: "dtbo.img"
checksum:
sum: "b668fe7b025f0de2ecac4df41fe6f0a9a81d5af5e99ae27fe081679831aba4be"
algorithm: "sha256"
- url: "https://github.com/ubuntu-touch-redmi-mt6768/lancelotfw/releases/download/20211005/super.zip"
name: "super.zip"
checksum:
sum: "4d203a72d7ec05edb38cd717946dd244ea39749ea4996b03a5d1a188e444924b"
algorithm: "sha256"
- url: "https://dl.google.com/developers/android/qt/images/gsi/vbmeta.img"
name: "vbmeta.img"
checksum:
sum: "f6da5489fd877cb69cf61fa721cfd6d77e530084aefe9b96664f818947ff61f6"
algorithm: "sha256"
condition:
var: "bootstrap"
value: true
- actions:
- core:unpack:
group: "firmware"
files:
- archive: "super.zip"
dir: "unpacked"
condition:
var: "bootstrap"
value: true
- actions:
- adb:reboot:
to_state: "bootloader"
fallback:
- core:user_action:
action: "bootloader"
condition:
var: "bootstrap"
value: true
- actions:
- fastboot:format:
partition: "userdata"
type: "ext4"
condition:
var: "wipe"
value: true
- actions:
- fastboot:flash:
partitions:
- partition: "vbmeta"
file: "vbmeta.img"
group: "firmware"
flags:
- "--disable-verity"
- "--disable-verification"
- partition: "boot"
file: "recovery.img"
group: "firmware"
- partition: "recovery"
file: "recovery.img"
group: "firmware"
- partition: "dtbo"
file: "dtbo.img"
group: "firmware"
- partition: "super"
file: "unpacked/super.img"
group: "firmware"
condition:
var: "bootstrap"
value: true
- actions:
- fastboot:reboot:
fallback:
- core:user_action:
action: "recovery"
condition:
var: "bootstrap"
value: true
- actions:
- adb:reboot:
to_state: "recovery"
fallback:
- core:user_action:
action: "recovery"
condition:
var: "bootstrap"
value: false
- actions:
- systemimage:install:
- actions:
- adb:reboot:
to_state: "recovery"
fallback:
- core:user_action:
action: "recovery"
slideshow: []