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

DO NOT MERGE YET oneplus 2/3/3T: add/fix OxygenOS and LineageOS #139

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
126 changes: 69 additions & 57 deletions v2/devices/oneplus2.yml
Expand Up @@ -130,37 +130,22 @@ operating_systems:
- core:user_action:
action: "recovery"
slideshow: []

- name: "LineageOS"
options:
- var: "gapps"
name: "Install OpenGApps"
tooltip: "Install Google Play and Google Services"
type: "checkbox"
- var: "channel"
name: "LineageOS version"
tooltip: "Which LineageOS channel do you want to install?"
type: "select"
remote_values:
lineage_os:channels:
- var: "installTWRP"
name: "Install TWRP"
tooltip: "Install TWRP 3.2.1-0 to recovery (recommended)"
type: "checkbox"
value: true
- var: "LineageVersion"
name: "Lineage Version"
tooltip: "The version of LineageOS to install"
type: "select"
values:
- value: "16"
label: "LineageOS 16 (Android 9)"
prerequisites: []
steps:
- actions:
- core:download:
group: "LineageOS"
files:
- url: "https://archive.org/download/lineage-16.0-20200418-nightly-oneplus2-signed/lineage-16.0-20200418-nightly-oneplus2-signed.zip"
checksum:
sum: "5aaf16d27abbd14a535086cbd4503cbac0aa78ef057caace4a72729aa4e21c94"
algorithm: "sha256"
condition:
var: "LineageVersion"
value: "16"
- actions:
- core:download:
group: "firmware"
Expand All @@ -172,23 +157,69 @@ operating_systems:
condition:
var: "installTWRP"
value: true
- actions:
- adb:reboot:
to_state: "bootloader"
fallback:
- core:user_action:
action: "bootloader"
- actions:
- fastboot:flash:
partitions:
- partition: "recovery"
file: "twrp-3.2.1-0-oneplus2.img"
group: "firmware"
condition:
var: "installTWRP"
value: true
- actions:
- fastboot:boot:
group: "firmware"
file: "twrp-3.2.1-0-oneplus2.img"
fallback:
- core:user_action:
action: "recovery"
- actions:
- lineage_os:install:
- actions:
- adb:reboot:
to_state: "recovery"
slideshow: []
- name: "OxygenOS"
options:
- var: "version"
name: "OxygenOS version"
tooltip: "Which OxygenOS version do you want to install?"
type: "select"
values:
- value: "bloppy"
label: "OxygenOS 3.6.1"
- var: "installTWRP"
name: "Install TWRP"
tooltip: "Install TWRP 3.2.1-0 to recovery (recommended)"
type: "checkbox"
value: true
prerequisites: []
steps:
- actions:
- core:download:
group: "OpenGApps"
group: "OxygenOS"
files:
- url: "https://archive.org/download/opengapps-nano-20200615/open_gapps-arm64-9.0-nano-20200615.zip"
- url: "https://oxygenos.oneplus.net/OnePlus2Oxygen_14_OTA_032_all_1710240102_5aab6a62151e4407.zip"
checksum:
sum: "74ca6374d0c6c476d5ea1106c841ce65b7d108a253fdb2434be4b93166c2cd43"
sum: "031294228f1642e983c91042961dfce0"
algorithm: "md5"
- actions:
- core:download:
group: "firmware"
files:
- url: "https://archive.org/download/twrp-oneplus2/twrp-3.2.1-0-oneplus2.img"
checksum:
sum: "343691d4e85d24896afe2bd7ab6125a5047a70aa1fb4bfbb2b1cd54f744a20c9"
algorithm: "sha256"
condition:
var: "gapps"
var: "installTWRP"
value: true
- actions:
- core:unpack:
group: "LineageOS"
files:
- archive: "lineage-16.0-20200418-nightly-oneplus2-signed.zip"
dir: "unpacked"
- actions:
- adb:reboot:
to_state: "bootloader"
Expand All @@ -205,13 +236,10 @@ operating_systems:
var: "installTWRP"
value: true
- actions:
- fastboot:flash:
partitions:
- partition: "boot"
file: "unpacked/boot.img"
group: "LineageOS"
raw: true
- actions:
- fastboot:boot:
group: "firmware"
file: "twrp-3.2.1-0-oneplus2.img"
fallback:
- core:user_action:
action: "recovery"
- actions:
Expand All @@ -222,24 +250,8 @@ operating_systems:
action: "twrp_sideload"
- actions:
- adb:sideload:
group: "LineageOS"
file: "lineage-16.0-20200418-nightly-oneplus2-signed.zip"
condition:
var: "LineageVersion"
value: "16"
- actions:
- core:user_action:
action: "twrp_sideload"
condition:
var: "gapps"
value: true
- actions:
- adb:sideload:
group: "OpenGApps"
file: "open_gapps-arm64-9.0-nano-20200615.zip"
condition:
var: "gapps"
value: true
group: "OxygenOS"
file: "OnePlus2Oxygen_14_OTA_032_all_1710240102_5aab6a62151e4407.zip"
- actions:
- core:user_action:
action: "twrp_sideload_reboot"
Expand Down
55 changes: 55 additions & 0 deletions v2/devices/oneplus3.yml
Expand Up @@ -150,6 +150,61 @@ operating_systems:
- core:user_action:
action: "recovery"
slideshow: []
- name: "LineageOS"
options:
- var: "channel"
name: "LineageOS version"
tooltip: "Which LineageOS channel do you want to install?"
type: "select"
remote_values:
lineage_os:channels:
- var: "installTWRP"
name: "Install TWRP"
tooltip: "Install TWRP 3.2.1-0 to recovery (recommended)"
type: "checkbox"
value: true
prerequisites: []
steps:
- actions:
- core:download:
group: "firmware"
files:
- url: "https://archive.org/download/twrp-3.2.1-0-oneplus3/twrp-3.2.1-0-oneplus3.img"
checksum:
sum: "4df27c0e0ea7dde9139f7f4717206df3577c34163c2822bc3e8a26b15c60ccd4"
algorithm: "sha256"
condition:
var: "installTWRP"
value: true
- actions:
- adb:reboot:
to_state: "bootloader"
fallback:
- core:user_action:
action: "bootloader"
- actions:
- fastboot:flash:
partitions:
- partition: "recovery"
file: "twrp-3.2.1-0-oneplus3.img"
group: "firmware"
condition:
var: "installTWRP"
value: true
- actions:
- fastboot:boot:
group: "firmware"
file: "twrp-3.2.1-0-oneplus3.img"
fallback:
- core:user_action:
action: "recovery"
- actions:
- lineage_os:install:
- actions:
- adb:reboot:
to_state: "recovery"
slideshow: []

- name: "OxygenOS"
options:
- var: "version"
Expand Down
158 changes: 158 additions & 0 deletions v2/lancelot.yml
@@ -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: []