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 1 commit
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
139 changes: 139 additions & 0 deletions v2/devices/axolotl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ user_actions:
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.<br>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.<br>Press on 'Factory reset' -> 'Format data/factory reset' -> 'Format data'."
amartinz marked this conversation as resolved.
Show resolved Hide resolved
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."
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, force all future operations in "a" slot.
- actions:
- fastboot:set_active:
slot: "a"
###
######################################################################

######################################################################
###
### (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 Down