From f3ef9bf874fb51ac662734f119017910adf31372 Mon Sep 17 00:00:00 2001 From: Tavi Date: Sat, 4 May 2024 19:33:36 -0400 Subject: [PATCH] Add lynx & tangorpro Signed-off-by: Tavi --- Manifests/Manifest_LAOS-20.0.xml | 10 ++++++++++ .../android_build/0004-Selective_APEX.patch | 2 +- .../0030-agnss.goog_override.patch | 2 +- Scripts/Common/Copy_Keys.sh | 2 ++ Scripts/Common/Enable_Verity.sh | 4 ++++ Scripts/Common/Functions.sh | 4 ++-- Scripts/Generate_Signing_Keys.sh | 2 +- Scripts/Generate_Supporting_Files.sh | 6 +++--- Scripts/Generate_Verified_Boot_Hashes.sh | 8 ++++---- Scripts/LineageOS-20.0/Functions.sh | 14 ++++++++------ 10 files changed, 36 insertions(+), 18 deletions(-) diff --git a/Manifests/Manifest_LAOS-20.0.xml b/Manifests/Manifest_LAOS-20.0.xml index 46ea7412..7f206fcb 100644 --- a/Manifests/Manifest_LAOS-20.0.xml +++ b/Manifests/Manifest_LAOS-20.0.xml @@ -145,6 +145,14 @@ + + + + + + + + @@ -347,12 +355,14 @@ + + diff --git a/Patches/LineageOS-20.0/android_build/0004-Selective_APEX.patch b/Patches/LineageOS-20.0/android_build/0004-Selective_APEX.patch index 36f9166a..e92bb09f 100644 --- a/Patches/LineageOS-20.0/android_build/0004-Selective_APEX.patch +++ b/Patches/LineageOS-20.0/android_build/0004-Selective_APEX.patch @@ -20,7 +20,7 @@ index 7f5f74f4b..93e689444 100644 -# Enable updating of APEXes -$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk) +# Enable updating of APEXes on 6th and 7th generation Pixel devices only -+ifneq (,$(filter lineage_cheetah lineage_panther lineage_oriole lineage_raven lineage_bluejay, $(TARGET_PRODUCT))) ++ifneq (,$(filter lineage_cheetah lineage_panther lineage_oriole lineage_raven lineage_bluejay lineage_lynx lineage_tangorpro, $(TARGET_PRODUCT))) + $(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk) +endif diff --git a/Patches/LineageOS-20.0/android_frameworks_base/0030-agnss.goog_override.patch b/Patches/LineageOS-20.0/android_frameworks_base/0030-agnss.goog_override.patch index 2ff9a22d..edac7812 100644 --- a/Patches/LineageOS-20.0/android_frameworks_base/0030-agnss.goog_override.patch +++ b/Patches/LineageOS-20.0/android_frameworks_base/0030-agnss.goog_override.patch @@ -41,7 +41,7 @@ index 243910dd9541..07f0f8a6a4af 100644 private int mNextServerIndex; + private static boolean shouldUseBroadcomServer() { -+ boolean supportedDevice = Build.DEVICE.equals("cheetah") || Build.DEVICE.equals("panther") || Build.DEVICE.equals("raven") || Build.DEVICE.equals("oriole") || Build.DEVICE.equals("bluejay"); ++ boolean supportedDevice = Build.DEVICE.equals("cheetah") || Build.DEVICE.equals("panther") || Build.DEVICE.equals("raven") || Build.DEVICE.equals("oriole") || Build.DEVICE.equals("bluejay") || Build.DEVICE.equals("lynx") || Build.DEVICE.equals("tangorpro"); + return supportedDevice; + } + diff --git a/Scripts/Common/Copy_Keys.sh b/Scripts/Common/Copy_Keys.sh index 77f153b8..ffbf32bf 100644 --- a/Scripts/Common/Copy_Keys.sh +++ b/Scripts/Common/Copy_Keys.sh @@ -96,6 +96,7 @@ if [ -d "$DOS_SIGNING_KEYS" ]; then copyKey "lemonadep" "kernel/oneplus/sm8350"; copyKey "lemonades" "kernel/oneplus/sm8250"; copyKey "lmi" "kernel/xiaomi/sm8250"; + copyKey "lynx" "kernel/google/gs201/private/gs-google"; copyKey "marlin" "kernel/google/marlin"; copyKey "mata" "kernel/essential/msm8998"; copyKey "mermaid" "kernel/sony/sdm660"; @@ -122,6 +123,7 @@ if [ -d "$DOS_SIGNING_KEYS" ]; then copyKey "starlte" "kernel/samsung/universal9810"; copyKey "sunfish" "kernel/google/sunfish"; copyKey "taimen" "kernel/google/wahoo"; + copyKey "tangorpro" "kernel/google/gs201/private/gs-google"; copyKey "twolip" "kernel/xiaomi/sdm660"; copyKey "ursa" "kernel/xiaomi/sdm845"; copyKey "vayu" "kernel/xiaomi/sm8150"; diff --git a/Scripts/Common/Enable_Verity.sh b/Scripts/Common/Enable_Verity.sh index 28d2f4f1..e878830e 100644 --- a/Scripts/Common/Enable_Verity.sh +++ b/Scripts/Common/Enable_Verity.sh @@ -114,6 +114,7 @@ enableAVB "device/google/crosshatch"; enableAVB "device/google/flame"; enableAVB "device/google/gs101"; enableAVB "device/google/gs201"; +enableAVB "device/google/lynx"; enableAVB "device/google/muskie"; enableAVB "device/google/oriole"; enableAVB "device/google/pantah"; @@ -125,6 +126,7 @@ enableAVB "device/google/redfin"; enableAVB "device/google/sargo"; enableAVB "device/google/sunfish"; enableAVB "device/google/taimen"; +enableAVB "device/google/tangorpro"; enableAVB "device/google/wahoo"; enableAVB "device/google/walleye"; enableAVB "device/oneplus/avicii"; @@ -220,11 +222,13 @@ sed -i 's/^\treturn VERITY_STATE_DISABLE;//' kernel/*/*/drivers/md/dm-android-ve [[ -d device/google/crosshatch ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1/' device/google/crosshatch/product.prop &>/dev/null || true; [[ -d device/google/crosshatch ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1/' device/google/crosshatch/vendor.prop &>/dev/null || true; [[ -d device/google/dragon ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1/' device/google/dragon/system.prop &>/dev/null || true; +[[ -d device/google/lynx ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1/' device/google/lynx/vendor.prop &>/dev/null || true; [[ -d device/google/marlin ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1/' device/google/marlin/system.prop &>/dev/null || true; [[ -d device/google/pantah ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1/' device/google/pantah/vendor.prop &>/dev/null || true; [[ -d device/google/raviole ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1/' device/google/raviole/vendor.prop &>/dev/null || true; [[ -d device/google/redbull ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1/' device/google/redbull/vendor.prop &>/dev/null || true; [[ -d device/google/sunfish ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1/' device/google/sunfish/vendor.prop &>/dev/null || true; +[[ -d device/google/tangorpro ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1/' device/google/tangorpro/vendor.prop &>/dev/null || true; [[ -d device/google/wahoo ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1/' device/google/wahoo/system.prop &>/dev/null || true; #[[ -d device/google/yellowstone ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1/' device/google/yellowstone/system.prop &>/dev/null || true; [[ -d device/huawei/angler ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1/' device/huawei/angler/system.prop &>/dev/null || true; diff --git a/Scripts/Common/Functions.sh b/Scripts/Common/Functions.sh index e5174e06..1d00a54c 100644 --- a/Scripts/Common/Functions.sh +++ b/Scripts/Common/Functions.sh @@ -400,7 +400,7 @@ processRelease() { #Deltas #grep update_engine Build/*/device/*/*/*.mk -l - local DOS_GENERATE_DELTAS_DEVICES=('akari' 'akatsuki' 'alioth' 'Amber' 'aura' 'aurora' 'avicii' 'barbet' 'bluejay' 'blueline' 'bonito' 'bramble' 'cheetah' 'cheryl' 'coral' 'crosshatch' 'davinci' 'discovery' 'enchilada' 'fajita' 'flame' 'FP3' 'FP4' 'guacamole' 'guacamoleb' 'hotdog' 'hotdogb' 'instantnoodle' 'instantnoodlep' 'kebab' 'kirin' 'lemonade' 'lemonadep' 'lemonades' 'marlin' 'mata' 'mermaid' 'oriole' 'panther' 'pioneer' 'pro1' 'pro1x' 'raven' 'redfin' 'sailfish' 'sargo' 'sunfish' 'taimen' 'vayu' 'voyager' 'walleye' 'xz2c'); #TODO: check lmi/alioth/apollon + local DOS_GENERATE_DELTAS_DEVICES=('akari' 'akatsuki' 'alioth' 'Amber' 'aura' 'aurora' 'avicii' 'barbet' 'bluejay' 'blueline' 'bonito' 'bramble' 'cheetah' 'cheryl' 'coral' 'crosshatch' 'davinci' 'discovery' 'enchilada' 'fajita' 'flame' 'FP3' 'FP4' 'guacamole' 'guacamoleb' 'hotdog' 'hotdogb' 'instantnoodle' 'instantnoodlep' 'kebab' 'kirin' 'lemonade' 'lemonadep' 'lemonades' 'lynx' 'marlin' 'mata' 'mermaid' 'oriole' 'panther' 'pioneer' 'pro1' 'pro1x' 'raven' 'redfin' 'sailfish' 'sargo' 'sunfish' 'taimen' 'tangorpro' 'vayu' 'voyager' 'walleye' 'xz2c'); #TODO: check lmi/alioth/apollon if [ "$DOS_GENERATE_DELTAS" = true ]; then if [[ " ${DOS_GENERATE_DELTAS_DEVICES[@]} " =~ " ${DEVICE} " ]]; then for LAST_TARGET_FILES in $ARCHIVE/target_files/$DOS_BRANDING_ZIP_PREFIX-$VERSION-*-dos-$DEVICE-target_files.zip; do @@ -760,7 +760,7 @@ export -f disableEnforceRRO; disableAPEX() { cd "$DOS_BUILD_BASE/$1"; - if [[ "$1" != *"device/google/gs101"* ]] && [[ "$1" != *"device/google/gs201"* ]] && [[ "$1" != *"device/google/oriole"* ]] && [[ "$1" != *"device/google/raven"* ]] && [[ "$1" != *"device/google/raviole"* ]] && [[ "$1" != *"device/google/bluejay"* ]] && [[ "$1" != *"device/google/panther"* ]] && [[ "$1" != *"device/google/cheetah"* ]] && [[ "$1" != *"device/google/pantah"* ]]; then + if [[ "$1" != *"device/google/gs101"* ]] && [[ "$1" != *"device/google/gs201"* ]] && [[ "$1" != *"device/google/oriole"* ]] && [[ "$1" != *"device/google/raven"* ]] && [[ "$1" != *"device/google/raviole"* ]] && [[ "$1" != *"device/google/bluejay"* ]] && [[ "$1" != *"device/google/panther"* ]] && [[ "$1" != *"device/google/cheetah"* ]] && [[ "$1" != *"device/google/pantah"* ]] && [[ "$1" != *"device/google/lynx"* ]] && [[ "$1" != *"device/google/tangorpro"* ]]; then awk -i inplace '!/DEXPREOPT_GENERATE_APEX_IMAGE/' *.mk &>/dev/null || true; awk -i inplace '!/updatable_apex.mk/' *.mk &>/dev/null || true; echo "Disabled APEX for $1"; diff --git a/Scripts/Generate_Signing_Keys.sh b/Scripts/Generate_Signing_Keys.sh index 49dd8fd5..ee81fdfa 100644 --- a/Scripts/Generate_Signing_Keys.sh +++ b/Scripts/Generate_Signing_Keys.sh @@ -22,7 +22,7 @@ source "$DOS_SCRIPTS_COMMON/Shell.sh"; type='rsa'; #Options: rsa, ec -#source build/envsetup.sh && breakfast lineage_sailfish-user && make -j20 generate_verity_key otatools; +#source build/envsetup.sh && breakfast lineage_clark-user && make -j20 generate_verity_key otatools; #source ../../Scripts/Generate_Signing_Keys.sh $device; mkdir -p "$DOS_SIGNING_KEYS/NEW"; diff --git a/Scripts/Generate_Supporting_Files.sh b/Scripts/Generate_Supporting_Files.sh index d362b3ae..81582bb4 100644 --- a/Scripts/Generate_Supporting_Files.sh +++ b/Scripts/Generate_Supporting_Files.sh @@ -18,12 +18,12 @@ umask 0022; set -uo pipefail; -export copyPartsZip="/mnt/backup-1/DivestOS/Builds/Extras/copy-partitions-20210323_1922-cleaned.zip"; #XXX: ADJUST ME +export copyPartsZip="/mnt/Storage-1/DivestOS/Builds/Extras/copy-partitions-20210323_1922-cleaned.zip"; #XXX: ADJUST ME -export repoDir="/mnt/backup-1/DivestOS/Builds/Supporting_Files/"; +export repoDir="/mnt/Storage-1/DivestOS/Builds/Supporting_Files/"; mkdir -p $repoDir; -devicesCopy=(akari akatsuki alioth Amber aura aurora avicii barbet bluejay blueline bonito bramble cheetah cheryl coral crosshatch davinci discovery enchilada fajita flame FP3 FP4 guacamole guacamoleb hotdog hotdogb instantnoodle instantnoodlep kebab kirin lemonade lemonadep lemonades marlin mata mermaid oriole panther pioneer pro1 pro1x raven redfin sailfish sargo sunfish taimen voyager walleye xz2c); +devicesCopy=(akari akatsuki alioth Amber aura aurora avicii barbet bluejay blueline bonito bramble cheetah cheryl coral crosshatch davinci discovery enchilada fajita flame FP3 FP4 guacamole guacamoleb hotdog hotdogb instantnoodle instantnoodlep kebab kirin lemonade lemonadep lemonades lynx marlin mata mermaid oriole panther pioneer pro1 pro1x raven redfin sailfish sargo sunfish taimen tangorpro voyager walleye xz2c); for device in "${devicesCopy[@]}" do diff --git a/Scripts/Generate_Verified_Boot_Hashes.sh b/Scripts/Generate_Verified_Boot_Hashes.sh index 6223c900..a9125f4e 100644 --- a/Scripts/Generate_Verified_Boot_Hashes.sh +++ b/Scripts/Generate_Verified_Boot_Hashes.sh @@ -20,7 +20,7 @@ set -uo pipefail; #grep "verity\.mk" Build/*/device/*/*/*.mk -l VERITY_DEVICES=('Amber' 'angler' 'bullhead' 'cheeseburger' 'cheryl' 'discovery' 'dragon' 'dumpling' 'flounder' 'kirin' 'marlin' 'mata' 'mermaid' 'oneplus3' 'pioneer' 'sailfish' 'shamu' 'voyager' 'z2_plus'); #grep "AVB_ENABLE" Build/*/device/*/*/*.mk -l -AVB_DEVICES=('akari' 'akatsuki' 'alioth' 'apollon' 'aura' 'aurora' 'avicii' 'barbet' 'beryllium' 'bluejay' 'blueline' 'bonito' 'bramble' 'cheetah' 'coral' 'crosshatch' 'davinci' 'dipper' 'enchilada' 'equuleus' 'fajita' 'flame' 'FP3' 'FP4' 'guacamole' 'guacamoleb' 'hotdog' 'hotdogb' 'instantnoodle' 'instantnoodlep' 'jasmine_sprout' 'kebab' 'lavender' 'lemonade' 'lemonadep' 'lemonades' 'lmi' 'oriole' 'panther' 'platina' 'polaris' 'pro1' 'pro1x' 'raphael' 'raven' 'redfin' 'sargo' 'sunfish' 'taimen' 'twolip' 'ursa' 'vayu' 'walleye' 'wayne' 'whyred' 'xz2c'); +AVB_DEVICES=('akari' 'akatsuki' 'alioth' 'apollon' 'aura' 'aurora' 'avicii' 'barbet' 'beryllium' 'bluejay' 'blueline' 'bonito' 'bramble' 'cheetah' 'coral' 'crosshatch' 'davinci' 'dipper' 'enchilada' 'equuleus' 'fajita' 'flame' 'FP3' 'FP4' 'guacamole' 'guacamoleb' 'hotdog' 'hotdogb' 'instantnoodle' 'instantnoodlep' 'jasmine_sprout' 'kebab' 'lavender' 'lemonade' 'lemonadep' 'lemonades' 'lmi' 'lynx' 'oriole' 'panther' 'platina' 'polaris' 'pro1' 'pro1x' 'raphael' 'raven' 'redfin' 'sargo' 'sunfish' 'taimen' 'tangorpro' 'twolip' 'ursa' 'vayu' 'walleye' 'wayne' 'whyred' 'xz2c'); #TODO: Make this a function? echo "================================================================================"; @@ -31,8 +31,8 @@ do device=$(dirname $f); if [[ " ${VERITY_DEVICES[@]} " =~ " ${device} " ]]; then echo "Device: $device"; - sha1=$(cat $f | openssl dgst -sha1 -c | sed 's/(stdin)= //' | tr [a-z] [A-Z]); - sha256=$(cat $f | openssl dgst -sha256 | sed 's/(stdin)= //' | tr [a-z] [A-Z]); + sha1=$(cat $f | openssl dgst -sha1 -c | sed 's/SHA1(stdin)= //' | tr [a-z] [A-Z]); + sha256=$(cat $f | openssl dgst -sha256 | sed 's/SHA2-256(stdin)= //' | tr [a-z] [A-Z]); #echo -e "\tSHA-1:"; #TODO: Figure out how this is actually calculated, perhaps lacks the actual certificate infomation due to mincrypt? #echo -e "\t\t$sha1"; echo -e "\tSHA-256:"; @@ -50,7 +50,7 @@ do device=$(dirname $f); if [[ " ${AVB_DEVICES[@]} " =~ " ${device} " ]]; then echo "Device: $device"; - sha256=$(cat $f | openssl dgst -sha256 | sed 's/(stdin)= //' | tr [a-z] [A-Z]); + sha256=$(cat $f | openssl dgst -sha256 | sed 's/SHA2-256(stdin)= //' | tr [a-z] [A-Z]); #echo -e "\tID:"; #Not really needed #echo -e "\t\t${sha256:0:8}"; echo -e "\tSHA-256:"; diff --git a/Scripts/LineageOS-20.0/Functions.sh b/Scripts/LineageOS-20.0/Functions.sh index c21c0798..13435b3c 100644 --- a/Scripts/LineageOS-20.0/Functions.sh +++ b/Scripts/LineageOS-20.0/Functions.sh @@ -60,14 +60,14 @@ buildAll() { buildDevice h850; buildDevice rs988; buildDevice h870; - #buildDevice h872; #TODO: needs keys + buildDevice h872; buildDevice us997; buildDevice h910; buildDevice h918; buildDevice h990; buildDevice ls997; buildDevice us996; - #buildDevice us996d; #TODO: needs keys + buildDevice us996d; buildDevice vs995; buildDevice z2_plus verity; #SD835 @@ -95,8 +95,8 @@ buildAll() { buildDevice equuleus avb; buildDevice polaris avb; buildDevice ursa avb; - buildDevice crosshatch avb; #unb - buildDevice blueline avb; #unb + buildDevice crosshatch avb; + buildDevice blueline avb; buildDevice akari avb; buildDevice aurora avb; buildDevice xz2c avb; @@ -132,8 +132,8 @@ buildAll() { buildDevice redfin avb; buildDevice barbet avb; #SD670 - buildDevice bonito avb; #unb - buildDevice sargo avb; #unb + buildDevice bonito avb; + buildDevice sargo avb; #SD865 buildDevice lmi avb; buildDevice apollon avb; @@ -144,6 +144,8 @@ buildAll() { buildDevice raven avb; buildDevice panther avb; buildDevice cheetah avb; + buildDevice lynx avb; + buildDevice tangorpro avb; #Exynos buildDevice starlte; buildDevice star2lte;