diff --git a/Scripts/Common/Enable_Verity.sh b/Scripts/Common/Enable_Verity.sh index cb7b0cf4..aa9ca293 100644 --- a/Scripts/Common/Enable_Verity.sh +++ b/Scripts/Common/Enable_Verity.sh @@ -38,17 +38,15 @@ enableAVB() { awk -i inplace '!/AVB_MAKE_VBMETA_IMAGE_ARGS += --set_hashtree_disabled_flag/' *.mk &>/dev/null || true; awk -i inplace '!/AVB_MAKE_VBMETA_IMAGE_ARGS += --flag/' *.mk &>/dev/null || true; #Disable chaining - if [ "$DOS_SIGNING_NOCHAIN" = true ]; then - awk -i inplace '!/BOARD_AVB_VBMETA_SYSTEM/' *.mk &>/dev/null || true; - awk -i inplace '!/BOARD_AVB_BOOT/' *.mk &>/dev/null || true; - awk -i inplace '!/BOARD_AVB_RECOVERY/' *.mk &>/dev/null || true; - sed -i 's/vbmeta_system//' *.mk &>/dev/null || true; - sed -i '/\/system /{s|avb=vbmeta_system|avb=vbmeta|}' fstab.* root/fstab.* rootdir/fstab.* rootdir/*/fstab.* &>/dev/null || true; - sed -i '/\/system_ext/{s|avb=vbmeta_system|avb|}' fstab.* root/fstab.* rootdir/fstab.* rootdir/*/fstab.* &>/dev/null || true; - sed -i '/\/system_ext/{s|avb=vbmeta|avb|}' fstab.* root/fstab.* rootdir/fstab.* rootdir/*/fstab.* &>/dev/null || true; - sed -i '/\/vendor/{s|avb=vbmeta_system|avb|}' fstab.* root/fstab.* rootdir/fstab.* rootdir/*/fstab.* &>/dev/null || true; - sed -i '/\/vendor/{s|avb=vbmeta|avb|}' fstab.* root/fstab.* rootdir/fstab.* rootdir/*/fstab.* &>/dev/null || true; - fi; + awk -i inplace '!/BOARD_AVB_VBMETA_SYSTEM/' *.mk &>/dev/null || true; + awk -i inplace '!/BOARD_AVB_BOOT/' *.mk &>/dev/null || true; + awk -i inplace '!/BOARD_AVB_RECOVERY/' *.mk &>/dev/null || true; + sed -i 's/vbmeta_system//' *.mk &>/dev/null || true; + sed -i '/\/system /{s|avb=vbmeta_system|avb=vbmeta|}' fstab.* root/fstab.* rootdir/fstab.* rootdir/*/fstab.* &>/dev/null || true; + sed -i '/\/system_ext/{s|avb=vbmeta_system|avb|}' fstab.* root/fstab.* rootdir/fstab.* rootdir/*/fstab.* &>/dev/null || true; + sed -i '/\/system_ext/{s|avb=vbmeta|avb|}' fstab.* root/fstab.* rootdir/fstab.* rootdir/*/fstab.* &>/dev/null || true; + sed -i '/\/vendor/{s|avb=vbmeta_system|avb|}' fstab.* root/fstab.* rootdir/fstab.* rootdir/*/fstab.* &>/dev/null || true; + sed -i '/\/vendor/{s|avb=vbmeta|avb|}' fstab.* root/fstab.* rootdir/fstab.* rootdir/*/fstab.* &>/dev/null || true; echo "Enabled AVB for $1"; cd "$DOS_BUILD_BASE"; fi; diff --git a/Scripts/Common/Functions.sh b/Scripts/Common/Functions.sh index 6ad5eb20..38e8e016 100644 --- a/Scripts/Common/Functions.sh +++ b/Scripts/Common/Functions.sh @@ -208,10 +208,6 @@ processRelease() { echo -e "\e[0;32mProcessing release for $DEVICE\e[0m"; #Arguments - DOS_DEVICES_VBMETA=('akari' 'aura' 'aurora' 'beryllium' 'blueline' 'bonito' 'crosshatch' 'davinci' 'enchilada' 'fajita' 'FP3' 'guacamole' 'guacamoleb' 'lavender' 'pro1' 'raphael' 'sargo' 'taimen' 'walleye' 'xz2c'); - DOS_DEVICES_VBMETA_SYSTEM=('alioth' 'avicii' 'hotdog' 'hotdogb' 'lmi' 'vayu'); - DOS_DEVICES_VBMETA_SYSTEM_FULL=('bramble' 'coral' 'flame' 'redfin' 'sunfish'); - DOS_DEVICES_VBMETA_EVERYTHING=('oriole' 'raven'); if [ "$BLOCK" != false ]; then local BLOCK_SWITCHES="--block"; fi; @@ -222,35 +218,8 @@ processRelease() { echo -e "\e[0;32m\t+ Verified Boot 1.0\e[0m"; elif [[ "$VERITY" == "avb" ]]; then local AVB_PKMD="$KEY_DIR/avb_pkmd.bin"; - - if [ "$DOS_SIGNING_NOCHAIN" = true ]; then - local VERITY_SWITCHES=(--avb_vbmeta_key "$KEY_DIR/avb.pem" --avb_vbmeta_algorithm SHA256_RSA4096); - echo -e "\e[0;32m\t+ Verified Boot 2.0 with VBMETA and NOCHAIN\e[0m"; - else - if [[ " ${DOS_DEVICES_VBMETA[@]} " =~ " ${DEVICE} " ]]; then - local VERITY_SWITCHES=(--avb_vbmeta_key "$KEY_DIR/avb.pem" --avb_vbmeta_algorithm SHA256_RSA4096); - echo -e "\e[0;32m\t+ Verified Boot 2.0 with VBMETA\e[0m"; - fi; - if [[ " ${DOS_DEVICES_VBMETA_SYSTEM[@]} " =~ " ${DEVICE} " ]]; then - local VERITY_SWITCHES=(--avb_vbmeta_key "$KEY_DIR/avb.pem" --avb_vbmeta_algorithm SHA256_RSA4096 \ - --avb_system_key "$KEY_DIR/avb.pem" --avb_system_algorithm SHA256_RSA4096); - echo -e "\e[0;32m\t+ Verified Boot 2.0 with VBMETA and VBMETA_SYSTEM\e[0m"; - fi; - if [[ " ${DOS_DEVICES_VBMETA_SYSTEM_FULL[@]} " =~ " ${DEVICE} " ]]; then - local VERITY_SWITCHES=(--avb_vbmeta_key "$KEY_DIR/avb.pem" --avb_vbmeta_algorithm SHA256_RSA4096 \ - --avb_system_key "$KEY_DIR/avb.pem" --avb_system_algorithm SHA256_RSA4096 \ - --avb_vbmeta_system_key "$KEY_DIR/avb.pem" --avb_vbmeta_system_algorithm SHA256_RSA4096); - echo -e "\e[0;32m\t+ Verified Boot 2.0 with VBMETA and VBMETA_SYSTEM_FULL\e[0m"; - fi; - if [[ " ${DOS_DEVICES_VBMETA_EVERYTHING[@]} " =~ " ${DEVICE} " ]]; then - local VERITY_SWITCHES=(--avb_vbmeta_key "$KEY_DIR/avb.pem" --avb_vbmeta_algorithm SHA256_RSA4096 \ - --avb_system_key "$KEY_DIR/avb.pem" --avb_system_algorithm SHA256_RSA4096 \ - --avb_vbmeta_system_key "$KEY_DIR/avb.pem" --avb_vbmeta_system_algorithm SHA256_RSA4096 \ - --avb_vbmeta_vendor_key "$KEY_DIR/avb.pem" --avb_vbmeta_vendor_algorithm SHA256_RSA4096 \ - --avb_boot_key "$KEY_DIR/avb.pem" --avb_boot_algorithm SHA256_RSA4096); - echo -e "\e[0;32m\t+ Verified Boot 2.0 with VBMETA_EVERYTHING\e[0m"; - fi; - fi; + local VERITY_SWITCHES=(--avb_vbmeta_key "$KEY_DIR/avb.pem" --avb_vbmeta_algorithm SHA256_RSA4096); + echo -e "\e[0;32m\t+ Verified Boot 2.0 with VBMETA and NOCHAIN\e[0m"; fi; if [[ "$DOS_VERSION" == "LineageOS-17.1" ]] || [[ "$DOS_VERSION" == "LineageOS-18.1" ]] || [[ "$DOS_VERSION" == "LineageOS-19.1" ]]; then local APEX_SWITCHES=(--extra_apks com.android.adbd.apex="$KEY_DIR/releasekey" \ diff --git a/Scripts/init.sh b/Scripts/init.sh index 8e0931cf..8c1663bc 100644 --- a/Scripts/init.sh +++ b/Scripts/init.sh @@ -86,7 +86,6 @@ export DOS_GPS_SUPL_HOST="supl.google.com"; #Options: supl.{google,vodafone,sony #Release Processing export DOS_MALWARE_SCAN_BEFORE_SIGN=false; #Scan device files for malware before signing -export DOS_SIGNING_NOCHAIN=true; #Disable AVB partition chaining export DOS_GENERATE_DELTAS=true; #Creates deltas from existing target_files in $DOS_BUILDS export DOS_GENERATE_DELTAS_DEVICES=('akari' 'alioth' 'Amber' 'aura' 'aurora' 'avicii' 'blueline' 'bonito' 'bramble' 'cheryl' 'coral' 'crosshatch' 'davinci' 'discovery' 'enchilada' 'fajita' 'flame' 'FP3' 'guacamole' 'guacamoleb' 'hotdog' 'hotdogb' 'marlin' 'mata' 'pioneer' 'pro1' 'redfin' 'sailfish' 'sargo' 'sunfish' 'taimen' 'vayu' 'voyager' 'walleye' 'xz2c'); #List of devices deltas will be generated for export DOS_AUTO_ARCHIVE_BUILDS=true; #Copies files to $DOS_BUILDS after signing