diff --git a/src/build.sh b/src/build.sh index ad64f1a9eab96c8d896f9a7b7413877fa977fe24..7d6823f3443e5663786462b3a705e5f3d2d08dad 100755 --- a/src/build.sh +++ b/src/build.sh @@ -272,11 +272,6 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then echo ">> [$(date)] Adding keys path ($KEYS_DIR)" # Soong (Android 9+) complains if the signing keys are outside the build path ln -sf "$KEYS_DIR" user-keys - if [ "$android_version_major" -lt "10" ]; then - sed -i "1s;^;PRODUCT_DEFAULT_DEV_CERTIFICATE := user-keys/releasekey\nPRODUCT_OTA_PUBLIC_KEYS := user-keys/releasekey\nPRODUCT_EXTRA_RECOVERY_KEYS := user-keys/releasekey\n\n;" "vendor/$vendor/config/common.mk" - elif [ "$android_version_major" -lt "12" ]; then - sed -i "1s;^;PRODUCT_DEFAULT_DEV_CERTIFICATE := user-keys/releasekey\nPRODUCT_OTA_PUBLIC_KEYS := user-keys/releasekey\n\n;" "vendor/$vendor/config/common.mk" - fi fi # Prepare the environment @@ -385,12 +380,8 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then build_success=true fi fi - elif [ "$android_version_major" -lt "12" ] || [ "${RELEASE_TYPE}" = "test" ]; then - if [ "${BUILD_SUPER_IMAGE}" = true ]; then - if breakfast_device && mka bacon superimage; then - build_success=true - fi - elif brunch "${DEVICE}" "${BUILD_TYPE}"; then + elif [ "${RELEASE_TYPE}" = "test" ]; then + if brunch "${DEVICE}" "${BUILD_TYPE}"; then build_success=true fi elif breakfast_device; then @@ -439,7 +430,7 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then fi if [ "$(find $OUT/obj/PACKAGING/target_files_intermediates/ -name *-target_files*.zip -print -quit)" ]; then - sign_target_files_apks "${SIGN_TARGETS[@]}" \ + ./build/tools/releasetools/sign_target_files_apks "${SIGN_TARGETS[@]}" \ $OUT/obj/PACKAGING/target_files_intermediates/*-target_files*.zip "$OUT/$TARGET_FILES" # Generate OTA zip @@ -447,7 +438,7 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then if [ "$SIGN_BUILDS" = true ]; then SIGN_KEY=(-k "user-keys/releasekey") fi - ota_from_target_files --backup=true "${SIGN_KEY[@]}" "$OUT/$TARGET_FILES" \ + ./build/tools/releasetools/ota_from_target_files --backup=true "${SIGN_KEY[@]}" "$OUT/$TARGET_FILES" \ "$OUT/$E_VERSION" if [ ! -f "$OUT/$E_VERSION" ]; then @@ -459,7 +450,7 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then # Flash: fastboot update update.zip FASTBOOT_PACKAGE="FASTBOOT-$E_VERSION" echo ">> [$(date)] Generating fastboot zip from target-files-package" - img_from_target_files "$OUT/$TARGET_FILES" "$OUT/$FASTBOOT_PACKAGE" + ./build/tools/releasetools/img_from_target_files "$OUT/$TARGET_FILES" "$OUT/$FASTBOOT_PACKAGE" if [ ! -f "$OUT/$FASTBOOT_PACKAGE" ]; then clean_up @@ -596,17 +587,11 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then fi IMG_OUT=$OUT - if [ "$android_version_major" -lt "12" ]; then - IMG_OUT=obj/PACKAGING/target_files_intermediates/lineage_*/IMAGES - fi # Move produced ZIP files to the main OUT directory echo ">> [$(date)] Moving build artifacts for ${DEVICE} to '$ZIP_DIR/$zipsubdir'" cd "${OUT}" || return 1 for build in $(ls e-*.zip); do - if [ "$android_version_major" -lt "12" ]; then - sha256sum "$build" >"$ZIP_DIR/$zipsubdir/$build.sha256sum" - fi find . -maxdepth 1 \( -name 'e-*.zip*' -o -name 'IMG-e*.zip*' -o -name 'QFIL-e*.zip*' \) -type f -exec mv {} "$ZIP_DIR/$zipsubdir/" \; SKIP_DYNAMIC_IMAGES="odm.img product.img system.img system_ext.img vendor.img"