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

v2: devices: axolotl: add LineageOS support #184

Merged
merged 3 commits into from
Mar 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 145 additions & 6 deletions v2/devices/axolotl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,37 @@ user_actions:
button: true
fastbootd:
title: "Reboot to Fastbootd"
description: "With the device powered off, hold Volume Down + Power to boot into recovery.<br><br>Inside the recovery, press on 'Advanced' and select 'Enter fastboot'."
description: "With the device powered off, hold Volume Down + Power to boot into recovery. Inside the recovery, press on 'Advanced' and select 'Enter fastboot'."
image: "phone_power_down"
button: true
recovery:
title: "Reboot to Recovery"
description: "With the device powered off, hold Volume Down + Power."
image: "phone_power_down"
button: true
lineageos_reboot_system:
title: "Recovery - Reboot system now"
description: "Press on the top left arrow until you are back on the home screen. Press on 'Reboot system now'."
button: true
lineageos_sideload:
title: "Recovery - Apply update from ADB"
description: "Please select 'Apply update' -> 'Apply from ADB'."
button: true
lineageos_wipe_data:
title: "Recovery - Wipe data/factory reset"
description: "Press on the top left arrow until you are back on the home screen. Press on 'Factory reset' -> 'Format data/factory reset' -> 'Format data'."
button: true
shiftos_reboot_system:
title: "Recovery - Reboot system now"
description: "With the recovery mode active, navigate using your volume keys up/down and select 'Reboot system now'.<br>Confirm with pressing the Power key.<br><br>Warning: Do NOT lock your bootloader, this is not supported yet."
description: "With the recovery mode active, navigate using your volume keys up/down and select 'Reboot system now'. Confirm with pressing the Power key. Warning: Do NOT lock your bootloader, this is not supported yet."
button: true
shiftos_sideload:
title: "Recovery - Apply update from ADB"
description: "With the recovery mode active, navigate using your volume keys up/down and select 'Apply update from ADB'.<br>Confirm with pressing the Power key."
description: "With the recovery mode active, navigate using your volume keys up/down and select 'Apply update from ADB'. Confirm with pressing the Power key."
button: true
shiftos_wipe_data:
title: "Recovery - Wipe data/factory reset"
description: "With the recovery mode active, navigate using your volume keys up/down and select 'Wipe data/factory reset'.<br>Confirm with pressing the Power key."
description: "With the recovery mode active, navigate using your volume keys up/down and select 'Wipe data/factory reset'. Confirm with pressing the Power key."
button: true
unlock: []
handlers:
Expand Down Expand Up @@ -221,6 +233,133 @@ operating_systems:

##################################################################################################

- name: "LineageOS"
compatible_installer: ">=0.9.4-beta"
options:
- var: "channel"
name: "LineageOS version"
tooltip: "Which LineageOS channel do you want to install?"
type: "select"
remote_values:
lineage_os:channels:
- var: "wipe"
name: "Wipe personal data"
tooltip: "This is required for new installations"
type: "checkbox"
value: false
prerequisites: []
steps:
######################################################################
###
### Ensure we always start in bootloader mode
###
- actions:
- adb:reboot:
to_state: "bootloader"
fallback:
- core:user_action:
action: "bootloader"
### As this is an A/B device, set slot to "b" to install the new system into the "a" slot.
- actions:
- fastboot:set_active:
slot: "b"
###
######################################################################

######################################################################
###
### (Optional) Wipe steps
###
# 1) Format userdata as f2fs
- actions:
- fastboot:format:
partition: "userdata"
type: "f2fs"
condition:
var: "wipe"
value: true
# 2) Format metadata as ext4
- actions:
- fastboot:format:
partition: "metadata"
type: "ext4"
condition:
var: "wipe"
value: true
# 3) Erase misc
- actions:
- fastboot:erase:
partition: "misc"
condition:
var: "wipe"
value: true
###
######################################################################

######################################################################
###
### LineageOS Installation
###
# 1) Download firmware images
- actions:
- core:download:
group: "firmware_lineageos"
files:
- url: "https://gitlab.com/SHIFTPHONES/ubports/assets/-/raw/25fdb3352c33008a1e18ed32cac239ae347b0893/axolotl/images/recovery_lineage.img"
name: "recovery.img"
checksum:
sum: "c339282553408b50972dad17173500aaa5383c2a0f79c5868a72281dd7c99332"
algorithm: "sha256"
- url: "https://gitlab.com/SHIFTPHONES/ubports/assets/-/raw/06fa047c3afcceb0532f90e8b503ff6a963bec56/axolotl/images/super_empty.img"
name: "super_empty.img"
checksum:
sum: "0a0aa8a7b0faad8de4003ded16b6ffb83ba4bffde0ea29ecba12d99a9162ae3d"
algorithm: "sha256"
- lineage_os:download:
# 2) Flash firmware images in bootloader fastboot mode
- actions:
- fastboot:flash:
partitions:
- partition: "recovery"
file: "recovery.img"
group: "firmware_lineageos"
# 3) Flash firmware images in fastbootd mode
- actions:
- fastboot:reboot_fastboot:
fallback:
- core:user_action:
action: "fastbootd"
- actions:
- fastboot:wipe_super:
image:
file: "super_empty.img"
group: "firmware_lineageos"
# 4) Reboot back into bootloader to activate new super scheme, then into recovery mode and sideload update.zip
- actions:
- fastboot:reboot_bootloader:
- fastboot:reboot_recovery:
- core:user_action:
action: "lineageos_sideload"
- actions:
- adb:sideload:
file: "lineageos_rootfs_axolotl.zip"
group: "LineageOS"
- actions:
- core:user_action:
action: "lineageos_wipe_data"
condition:
var: "wipe"
value: true
- actions:
- core:user_action:
action: "lineageos_reboot_system"

###
######################################################################
slideshow: []

##################################################################################################

- name: "ShiftOS - G / L"
compatible_installer: ">=0.9.4-beta"
options:
Expand All @@ -246,10 +385,10 @@ operating_systems:
fallback:
- core:user_action:
action: "bootloader"
### As this is an A/B device, force all future operations in "a" slot.
### As this is an A/B device, set slot to "b" to install the new system into the "a" slot.
- actions:
- fastboot:set_active:
slot: "a"
slot: "b"
###
######################################################################

Expand Down