diff --git a/.gitreview b/.gitreview index acd43a23..7f733c5a 100644 --- a/.gitreview +++ b/.gitreview @@ -2,4 +2,4 @@ host=review.calyxos.org port=29418 project=CalyxOS/scripts -defaultbranch=android13 +defaultbranch=staging/android15 diff --git a/aosp-merger/_merge_helper.sh b/aosp-merger/_merge_helper.sh index 01f81629..cb5252b8 100755 --- a/aosp-merger/_merge_helper.sh +++ b/aosp-merger/_merge_helper.sh @@ -1,13 +1,13 @@ #!/bin/bash # # SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project -# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute +# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute # # SPDX-License-Identifier: Apache-2.0 # usage() { - echo "Usage ${0} -p -o -c -n -b " + echo "Usage ${0} -p -o -c -n -b --lineage" } # Verify argument count @@ -16,6 +16,8 @@ if [ "${#}" -eq 0 ]; then exit 1 fi +LINEAGE=false + while [ "${#}" -gt 0 ]; do case "${1}" in -p | --project-path ) @@ -33,6 +35,9 @@ while [ "${#}" -gt 0 ]; do -b | --branch-suffix ) BRANCHSUFFIX="${2}"; shift ;; + -l | --lineage ) + LINEAGE=true; shift + ;; * ) usage exit 1 @@ -60,6 +65,8 @@ TOP="${script_path}/../../.." # Source build environment (needed for aospremote/lineageremote) source "${TOP}/build/envsetup.sh" +export ANDROID_BUILD_TOP=$(gettop) +source "${TOP}/vendor/calyx/build/envsetup.sh" BRANCH="${os_branch}" STAGINGBRANCH="staging/${BRANCHSUFFIX}" @@ -68,7 +75,7 @@ cd "${TOP}/${PROJECTPATH}" # Ditch any existing staging branches repo abandon "${STAGINGBRANCH}" . repo start "${STAGINGBRANCH}" . -if [ -f ".gitupstream-lineage" ]; then +if [ -f ".gitupstream-lineage" ] && [ "${LINEAGE}" = true ]; then if grep -q "${lineageos_device_branch}" .gitupstream-lineage; then LINEAGEBRANCH="$(cat .gitupstream-lineage | cut -d ' ' -f 2)" else @@ -105,8 +112,8 @@ if [ ! -z "${OLDTAG}" ]; then fi if [[ "${OPERATION}" == "merge" ]]; then - echo "#### Merging ${NEWTAG} into ${PROJECTPATH} ####" - if [ -f ".gitupstream-lineage" ]; then + echo -e "\n#### Merging ${NEWTAG} into ${PROJECTPATH} ####" + if [ -f ".gitupstream-lineage" ] && [ "${LINEAGE}" = true ]; then git merge --no-commit --log lineage/"${LINEAGEBRANCH}" && git commit --no-edit else git merge --no-commit --log "${NEWTAG}" && git commit --no-edit @@ -120,7 +127,7 @@ if [[ "${OPERATION}" == "merge" ]]; then exit 0 fi elif [[ "${OPERATION}" == "rebase" ]]; then - echo "#### Rebasing ${PROJECTPATH} onto ${NEWTAG} ####" + echo -e "\n#### Rebasing ${PROJECTPATH} onto ${NEWTAG} ####" git rebase --onto "${NEWTAG}" "${OLDTAG}" fi diff --git a/aosp-merger/_subtree_merge_helper.sh b/aosp-merger/_subtree_merge_helper.sh index 81b4f623..99369c5a 100755 --- a/aosp-merger/_subtree_merge_helper.sh +++ b/aosp-merger/_subtree_merge_helper.sh @@ -1,7 +1,7 @@ #!/bin/bash # # SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project -# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute +# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute # # SPDX-License-Identifier: Apache-2.0 # @@ -60,6 +60,8 @@ TOP="${script_path}/../../.." # Source build environment (needed for aospremote) source "${TOP}/build/envsetup.sh" +export ANDROID_BUILD_TOP=$(gettop) +source "${TOP}/vendor/calyx/build/envsetup.sh" BRANCH="${os_branch}" STAGINGBRANCH="staging/${BRANCHSUFFIX}" @@ -98,7 +100,7 @@ fi CONFLICT="" -echo "#### Merging ${NEWTAG} into ${PROJECTPATH} ####" +echo -e "\n#### Merging ${NEWTAG} into ${PROJECTPATH} ####" git merge --no-commit --log "${NEWTAG}" if [[ -z "$(git diff --no-ext-diff HEAD)" ]]; then diff --git a/aosp-merger/aosp-merger.sh b/aosp-merger/aosp-merger.sh index d90194e2..ad992ef7 100755 --- a/aosp-merger/aosp-merger.sh +++ b/aosp-merger/aosp-merger.sh @@ -157,7 +157,7 @@ push_clo_merge() { # Merge LineageOS to forks merge_lineage() { - "${script_path}"/_merge_helper.sh --project-path "${repo}" --new-tag "${1}" --branch-suffix "${os_branch}_merge-${1}" + "${script_path}"/_merge_helper.sh --project-path "${repo}" --new-tag "${1}" --branch-suffix "${os_branch}_merge-${1}" --lineage } post_lineage_merge() { diff --git a/aosp-merger/merge-aosp-forks.sh b/aosp-merger/merge-aosp-forks.sh index ea0c5782..fac48ebe 100755 --- a/aosp-merger/merge-aosp-forks.sh +++ b/aosp-merger/merge-aosp-forks.sh @@ -1,7 +1,7 @@ #!/bin/bash # # SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project -# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute +# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute # # SPDX-License-Identifier: Apache-2.0 # @@ -59,10 +59,10 @@ STAGINGBRANCH="staging/${BRANCHSUFFIX}" # Build list of forked repos PROJECTPATHS=$(grep "name=\"CalyxOS/" "${MANIFEST}" | sed -n 's/.*path="\([^"]\+\)".*/\1/p') -echo "#### Old tag = ${OLDTAG} Branch = ${BRANCH} Staging branch = ${STAGINGBRANCH} ####" +echo -e "\n#### Old tag = ${OLDTAG} Branch = ${BRANCH} Staging branch = ${STAGINGBRANCH} ####" # Make sure manifest and forked repos are in a consistent state -echo "#### Verifying there are no uncommitted changes on forked AOSP projects ####" +echo -e "\n#### Verifying there are no uncommitted changes on forked AOSP projects ####" for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do cd "${TOP}/${PROJECTPATH}" if [[ -n "$(git status --porcelain)" ]]; then diff --git a/aosp-merger/merge-aosp.sh b/aosp-merger/merge-aosp.sh index 2f513b76..7114394c 100755 --- a/aosp-merger/merge-aosp.sh +++ b/aosp-merger/merge-aosp.sh @@ -1,7 +1,7 @@ #!/bin/bash # # SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project -# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute +# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute # # SPDX-License-Identifier: Apache-2.0 # @@ -59,10 +59,10 @@ STAGINGBRANCH="staging/${BRANCHSUFFIX}" # Build list of AOSP repos PROJECTPATHS=$(grep -v "remote=\"gitlab" "${MANIFEST}" | grep -v "clone-depth=\"1" | sed -n 's/.*path="\([^"]\+\)".*/\1/p') -echo "#### Old tag = ${OLDTAG} New tag = ${NEWTAG} Staging branch = ${STAGINGBRANCH} ####" +echo -e "\n#### Old tag = ${OLDTAG} New tag = ${NEWTAG} Staging branch = ${STAGINGBRANCH} ####" # Make sure manifest and forked repos are in a consistent state -echo "#### Verifying there are no uncommitted changes on AOSP projects ####" +echo -e "\n#### Verifying there are no uncommitted changes on AOSP projects ####" for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do cd "${TOP}/${PROJECTPATH}" if [[ -n "$(git status --porcelain)" ]]; then diff --git a/aosp-merger/push-merge.sh b/aosp-merger/push-merge.sh index eb7f3d9d..8625b466 100755 --- a/aosp-merger/push-merge.sh +++ b/aosp-merger/push-merge.sh @@ -1,7 +1,7 @@ #!/bin/bash # # SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project -# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute +# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute # # SPDX-License-Identifier: Apache-2.0 # @@ -49,14 +49,16 @@ STAGINGBRANCH="staging/${BRANCHSUFFIX}" # Source build environment (needed for calyxremote) source "${TOP}/build/envsetup.sh" +export ANDROID_BUILD_TOP=$(gettop) +source "${TOP}/vendor/calyx/build/envsetup.sh" # List of merged repos PROJECTPATHS=$(cat ${MERGEDREPOS} | grep -w merge | awk '{printf "%s\n", $2}') -echo "#### Staging branch = ${STAGINGBRANCH} ####" +echo -e "\n#### Staging branch = ${STAGINGBRANCH} ####" # Make sure manifest and forked repos are in a consistent state -echo "#### Verifying there are no uncommitted changes on forked AOSP projects ####" +echo -e "\n#### Verifying there are no uncommitted changes on forked AOSP projects ####" for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do cd "${TOP}/${PROJECTPATH}" if [[ -n "$(git status --porcelain)" ]]; then @@ -66,7 +68,7 @@ for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do done echo "#### Verification complete - no uncommitted changes found ####" -echo "#### $(basename ${MERGEDREPOS}) ####" +echo -e "\n#### $(basename ${MERGEDREPOS}) ####" read -p "Pushing ${STAGINGBRANCH}. Press enter to confirm." # Iterate over each forked project @@ -82,7 +84,7 @@ for PROJECTPATH in ${PROJECTPATHS}; do fi fi - echo "#### Submitting ${PROJECTPATH} merge ####" + echo -e "\n#### Submitting ${PROJECTPATH} merge ####" git checkout "${STAGINGBRANCH}" calyxremote | grep -v "Remote 'calyx' created" git push calyx HEAD:refs/heads/"${BRANCH}" diff --git a/aosp-merger/push-upstream.sh b/aosp-merger/push-upstream.sh index a8ac09a8..c0deac86 100755 --- a/aosp-merger/push-upstream.sh +++ b/aosp-merger/push-upstream.sh @@ -1,7 +1,7 @@ #!/bin/bash # # SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project -# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute +# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute # # SPDX-License-Identifier: Apache-2.0 # @@ -47,6 +47,8 @@ TOP="${script_path}/../../.." # Source build environment (needed for calyxremote) source "${TOP}/build/envsetup.sh" +export ANDROID_BUILD_TOP=$(gettop) +source "${TOP}/vendor/calyx/build/envsetup.sh" # List of merged repos PROJECTPATHS=$(cat ${MERGEDREPOS} | grep -w merge | awk '{printf "%s\n", $2}') @@ -54,7 +56,7 @@ PROJECTPATHS=$(cat ${MERGEDREPOS} | grep -w merge | awk '{printf "%s\n", $2}') read -p "Press enter to begin pushing upstream branch." # Make sure manifest and forked repos are in a consistent state -echo "#### Verifying there are no uncommitted changes on forked AOSP projects ####" +echo -e "\n#### Verifying there are no uncommitted changes on forked AOSP projects ####" for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do cd "${TOP}/${PROJECTPATH}" if [[ -n "$(git status --porcelain)" ]]; then @@ -74,7 +76,7 @@ for PROJECTPATH in ${PROJECTPATHS}; do UPSTREAMBRANCH="${lineageos_branch}" fi fi - echo "#### Pushing upstream branch ${UPSTREAMBRANCH} for ${PROJECTPATH} ####" + echo -e "\n#### Pushing upstream branch ${UPSTREAMBRANCH} for ${PROJECTPATH} ####" calyxremote | grep -v "Remote 'calyx' created" if [ "${LINEAGE}" = true ]; then git push calyx lineage/${UPSTREAMBRANCH}:refs/heads/upstream/${UPSTREAMBRANCH} diff --git a/aosp-merger/squash.sh b/aosp-merger/squash.sh index c4e2d572..26e38af8 100755 --- a/aosp-merger/squash.sh +++ b/aosp-merger/squash.sh @@ -1,7 +1,7 @@ #!/bin/bash # # SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project -# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute +# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute # # SPDX-License-Identifier: Apache-2.0 # @@ -54,10 +54,10 @@ fi # List of merged repos PROJECTPATHS=$(cat ${MERGEDREPOS} | grep -w merge | awk '{printf "%s\n", $2}') -echo "#### Branch = ${BRANCH} Squash branch = ${SQUASHBRANCH} ####" +echo -e "\n#### Branch = ${BRANCH} Squash branch = ${SQUASHBRANCH} ####" # Make sure manifest and forked repos are in a consistent state -echo "#### Verifying there are no uncommitted changes on forked AOSP projects ####" +echo -e "\n#### Verifying there are no uncommitted changes on forked AOSP projects ####" for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do cd "${TOP}/${PROJECTPATH}" if [[ -n "$(git status --porcelain)" ]]; then @@ -70,7 +70,7 @@ echo "#### Verification complete - no uncommitted changes found ####" # Iterate over each forked project for PROJECTPATH in ${PROJECTPATHS}; do cd "${TOP}/${PROJECTPATH}" - echo "#### Squashing ${PROJECTPATH} ####" + echo -e "\n#### Squashing ${PROJECTPATH} ####" repo abandon "${SQUASHBRANCH}" . git checkout -b "${SQUASHBRANCH}" "${STAGINGBRANCH}" git branch --set-upstream-to=m/"${BRANCH}" diff --git a/aosp-merger/upload-merge.sh b/aosp-merger/upload-merge.sh index 25f3809b..065a910a 100755 --- a/aosp-merger/upload-merge.sh +++ b/aosp-merger/upload-merge.sh @@ -1,7 +1,7 @@ #!/bin/bash # # SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project -# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute +# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute # # SPDX-License-Identifier: Apache-2.0 # @@ -51,10 +51,10 @@ fi # List of merged repos PROJECTPATHS=$(cat ${MERGEDREPOS} | grep -w merge | awk '{printf "%s\n", $2}') -echo "#### Staging branch = ${STAGINGBRANCH} ####" +echo -e "\n#### Staging branch = ${STAGINGBRANCH} ####" # Make sure manifest and forked repos are in a consistent state -echo "#### Verifying there are no uncommitted changes on forked AOSP projects ####" +echo -e "\n#### Verifying there are no uncommitted changes on forked AOSP projects ####" for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do cd "${TOP}/${PROJECTPATH}" if [[ -n "$(git status --porcelain)" ]]; then @@ -67,6 +67,6 @@ echo "#### Verification complete - no uncommitted changes found ####" # Iterate over each forked project for PROJECTPATH in ${PROJECTPATHS}; do cd "${TOP}/${PROJECTPATH}" - echo "#### Pushing ${PROJECTPATH} merge to review ####" + echo -e "\n#### Pushing ${PROJECTPATH} merge to review ####" repo upload -c -y --no-verify -o topic="${TOPIC}" . done diff --git a/aosp-merger/upload-squash.sh b/aosp-merger/upload-squash.sh index cc4f92c8..7eb874c7 100755 --- a/aosp-merger/upload-squash.sh +++ b/aosp-merger/upload-squash.sh @@ -1,7 +1,7 @@ #!/bin/bash # # SPDX-FileCopyrightText: 2017, 2020-2022 The LineageOS Project -# SPDX-FileCopyrightText: 2021-2022 The Calyx Institute +# SPDX-FileCopyrightText: 2021-2023 The Calyx Institute # # SPDX-License-Identifier: Apache-2.0 # @@ -56,10 +56,10 @@ fi # List of merged repos PROJECTPATHS=$(cat ${MERGEDREPOS} | grep -w merge | awk '{printf "%s\n", $2}') -echo "#### Squash branch = ${SQUASHBRANCH} ####" +echo -e "\n#### Squash branch = ${SQUASHBRANCH} ####" # Make sure manifest and forked repos are in a consistent state -echo "#### Verifying there are no uncommitted changes on forked AOSP projects ####" +echo -e "\n#### Verifying there are no uncommitted changes on forked AOSP projects ####" for PROJECTPATH in ${PROJECTPATHS} .repo/manifests; do cd "${TOP}/${PROJECTPATH}" if [[ -n "$(git status --porcelain)" ]]; then @@ -72,7 +72,7 @@ echo "#### Verification complete - no uncommitted changes found ####" # Iterate over each forked project for PROJECTPATH in ${PROJECTPATHS}; do cd "${TOP}/${PROJECTPATH}" - echo "#### Pushing ${PROJECTPATH} squash to review ####" + echo -e "\n#### Pushing ${PROJECTPATH} squash to review ####" git checkout "${SQUASHBRANCH}" repo upload -c -y --no-verify -o topic="${TOPIC}" . done diff --git a/carriersettings-extractor/.gitignore b/carriersettings-extractor/.gitignore index 6e4266f3..586374c3 100644 --- a/carriersettings-extractor/.gitignore +++ b/carriersettings-extractor/.gitignore @@ -1,3 +1,4 @@ __pycache__/ *.py[cod] *$py.class +*_pb2.py diff --git a/carriersettings-extractor/carrierId_pb2.py b/carriersettings-extractor/carrierId_pb2.py deleted file mode 100644 index 91b3b7ce..00000000 --- a/carriersettings-extractor/carrierId_pb2.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: carrierId.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0f\x63\x61rrierId.proto\x12\x15\x63\x61rrierIdentification\"T\n\x0b\x43\x61rrierList\x12\x34\n\ncarrier_id\x18\x01 \x03(\x0b\x32 .carrierIdentification.CarrierId\x12\x0f\n\x07version\x18\x02 \x01(\x05\"\x98\x01\n\tCarrierId\x12\x14\n\x0c\x63\x61nonical_id\x18\x01 \x01(\x05\x12\x14\n\x0c\x63\x61rrier_name\x18\x02 \x01(\t\x12\x42\n\x11\x63\x61rrier_attribute\x18\x03 \x03(\x0b\x32\'.carrierIdentification.CarrierAttribute\x12\x1b\n\x13parent_canonical_id\x18\x04 \x01(\x05\"\xc9\x01\n\x10\x43\x61rrierAttribute\x12\x14\n\x0cmccmnc_tuple\x18\x01 \x03(\t\x12\x1c\n\x14imsi_prefix_xpattern\x18\x02 \x03(\t\x12\x0b\n\x03spn\x18\x03 \x03(\t\x12\x0c\n\x04plmn\x18\x04 \x03(\t\x12\x0c\n\x04gid1\x18\x05 \x03(\t\x12\x0c\n\x04gid2\x18\x06 \x03(\t\x12\x15\n\rpreferred_apn\x18\x07 \x03(\t\x12\x14\n\x0ciccid_prefix\x18\x08 \x03(\t\x12\x1d\n\x15privilege_access_rule\x18\t \x03(\t') - - - -_CARRIERLIST = DESCRIPTOR.message_types_by_name['CarrierList'] -_CARRIERID = DESCRIPTOR.message_types_by_name['CarrierId'] -_CARRIERATTRIBUTE = DESCRIPTOR.message_types_by_name['CarrierAttribute'] -CarrierList = _reflection.GeneratedProtocolMessageType('CarrierList', (_message.Message,), { - 'DESCRIPTOR' : _CARRIERLIST, - '__module__' : 'carrierId_pb2' - # @@protoc_insertion_point(class_scope:carrierIdentification.CarrierList) - }) -_sym_db.RegisterMessage(CarrierList) - -CarrierId = _reflection.GeneratedProtocolMessageType('CarrierId', (_message.Message,), { - 'DESCRIPTOR' : _CARRIERID, - '__module__' : 'carrierId_pb2' - # @@protoc_insertion_point(class_scope:carrierIdentification.CarrierId) - }) -_sym_db.RegisterMessage(CarrierId) - -CarrierAttribute = _reflection.GeneratedProtocolMessageType('CarrierAttribute', (_message.Message,), { - 'DESCRIPTOR' : _CARRIERATTRIBUTE, - '__module__' : 'carrierId_pb2' - # @@protoc_insertion_point(class_scope:carrierIdentification.CarrierAttribute) - }) -_sym_db.RegisterMessage(CarrierAttribute) - -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _CARRIERLIST._serialized_start=42 - _CARRIERLIST._serialized_end=126 - _CARRIERID._serialized_start=129 - _CARRIERID._serialized_end=281 - _CARRIERATTRIBUTE._serialized_start=284 - _CARRIERATTRIBUTE._serialized_end=485 -# @@protoc_insertion_point(module_scope) diff --git a/carriersettings-extractor/carrier_list.pb b/carriersettings-extractor/carrier_list.pb index 624ffec8..344cfcd7 100644 Binary files a/carriersettings-extractor/carrier_list.pb and b/carriersettings-extractor/carrier_list.pb differ diff --git a/carriersettings-extractor/carrier_list_pb2.py b/carriersettings-extractor/carrier_list_pb2.py deleted file mode 100644 index 483cb54f..00000000 --- a/carriersettings-extractor/carrier_list_pb2.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: carrier_list.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12\x63\x61rrier_list.proto\x12\x12\x63om.google.carrier\"^\n\tCarrierId\x12\x0f\n\x07mcc_mnc\x18\x01 \x01(\t\x12\r\n\x03spn\x18\x02 \x01(\tH\x00\x12\x0e\n\x04imsi\x18\x03 \x01(\tH\x00\x12\x0e\n\x04gid1\x18\x04 \x01(\tH\x00\x42\x0b\n\tmvno_dataJ\x04\x08\x05\x10\x06\"]\n\nCarrierMap\x12\x16\n\x0e\x63\x61nonical_name\x18\x01 \x01(\t\x12\x31\n\ncarrier_id\x18\x02 \x03(\x0b\x32\x1d.com.google.carrier.CarrierIdJ\x04\x08\x03\x10\x04\"M\n\x0b\x43\x61rrierList\x12-\n\x05\x65ntry\x18\x01 \x03(\x0b\x32\x1e.com.google.carrier.CarrierMap\x12\x0f\n\x07version\x18\x02 \x01(\x03') - - - -_CARRIERID = DESCRIPTOR.message_types_by_name['CarrierId'] -_CARRIERMAP = DESCRIPTOR.message_types_by_name['CarrierMap'] -_CARRIERLIST = DESCRIPTOR.message_types_by_name['CarrierList'] -CarrierId = _reflection.GeneratedProtocolMessageType('CarrierId', (_message.Message,), { - 'DESCRIPTOR' : _CARRIERID, - '__module__' : 'carrier_list_pb2' - # @@protoc_insertion_point(class_scope:com.google.carrier.CarrierId) - }) -_sym_db.RegisterMessage(CarrierId) - -CarrierMap = _reflection.GeneratedProtocolMessageType('CarrierMap', (_message.Message,), { - 'DESCRIPTOR' : _CARRIERMAP, - '__module__' : 'carrier_list_pb2' - # @@protoc_insertion_point(class_scope:com.google.carrier.CarrierMap) - }) -_sym_db.RegisterMessage(CarrierMap) - -CarrierList = _reflection.GeneratedProtocolMessageType('CarrierList', (_message.Message,), { - 'DESCRIPTOR' : _CARRIERLIST, - '__module__' : 'carrier_list_pb2' - # @@protoc_insertion_point(class_scope:com.google.carrier.CarrierList) - }) -_sym_db.RegisterMessage(CarrierList) - -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _CARRIERID._serialized_start=42 - _CARRIERID._serialized_end=136 - _CARRIERMAP._serialized_start=138 - _CARRIERMAP._serialized_end=231 - _CARRIERLIST._serialized_start=233 - _CARRIERLIST._serialized_end=310 -# @@protoc_insertion_point(module_scope) diff --git a/carriersettings-extractor/carrier_settings_pb2.py b/carriersettings-extractor/carrier_settings_pb2.py deleted file mode 100644 index eac646e6..00000000 --- a/carriersettings-extractor/carrier_settings_pb2.py +++ /dev/null @@ -1,902 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: carrier_settings.proto - -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='carrier_settings.proto', - package='com.google.carrier', - syntax='proto2', - serialized_options=None, - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x16\x63\x61rrier_settings.proto\x12\x12\x63om.google.carrier\"\xde\x01\n\x0f\x43\x61rrierSettings\x12\x16\n\x0e\x63\x61nonical_name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\x03\x12-\n\x04\x61pns\x18\x03 \x01(\x0b\x32\x1f.com.google.carrier.CarrierApns\x12\x32\n\x07\x63onfigs\x18\x04 \x01(\x0b\x32!.com.google.carrier.CarrierConfig\x12\x39\n\x0evendor_configs\x18\x06 \x01(\x0b\x32!.com.google.carrier.VendorConfigsJ\x04\x08\x05\x10\x06\"]\n\x14MultiCarrierSettings\x12\x0f\n\x07version\x18\x01 \x01(\x03\x12\x34\n\x07setting\x18\x02 \x03(\x0b\x32#.com.google.carrier.CarrierSettings\"\xf3\x07\n\x07\x41pnItem\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x31\n\x04type\x18\x03 \x03(\x0e\x32#.com.google.carrier.ApnItem.ApnType\x12\x19\n\x0e\x62\x65\x61rer_bitmask\x18\x04 \x01(\t:\x01\x30\x12\x0e\n\x06server\x18\x05 \x01(\t\x12\r\n\x05proxy\x18\x06 \x01(\t\x12\x0c\n\x04port\x18\x07 \x01(\t\x12\x0c\n\x04user\x18\x08 \x01(\t\x12\x10\n\x08password\x18\t \x01(\t\x12\x14\n\x08\x61uthtype\x18\n \x01(\x05:\x02-1\x12\x0c\n\x04mmsc\x18\x0b \x01(\t\x12\x12\n\nmmsc_proxy\x18\x0c \x01(\t\x12\x17\n\x0fmmsc_proxy_port\x18\r \x01(\t\x12:\n\x08protocol\x18\x0e \x01(\x0e\x32$.com.google.carrier.ApnItem.Protocol:\x02IP\x12\x42\n\x10roaming_protocol\x18\x0f \x01(\x0e\x32$.com.google.carrier.ApnItem.Protocol:\x02IP\x12\x0e\n\x03mtu\x18\x10 \x01(\x05:\x01\x30\x12\x12\n\nprofile_id\x18\x11 \x01(\x05\x12\x14\n\tmax_conns\x18\x12 \x01(\x05:\x01\x30\x12\x14\n\twait_time\x18\x13 \x01(\x05:\x01\x30\x12\x19\n\x0emax_conns_time\x18\x14 \x01(\x05:\x01\x30\x12\x17\n\x0f\x63\x61rrier_enabled\x18\x15 \x01(\x08\x12\x1e\n\x0fmodem_cognitive\x18\x16 \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0cuser_visible\x18\x17 \x01(\x08:\x04true\x12\x1b\n\ruser_editable\x18\x18 \x01(\x08:\x04true\x12\x15\n\napn_set_id\x18\x19 \x01(\x05:\x01\x30\x12L\n\x0cskip_464xlat\x18\x1a \x01(\x0e\x32 .com.google.carrier.ApnItem.Xlat:\x14SKIP_464XLAT_DEFAULT\"\x94\x01\n\x07\x41pnType\x12\x07\n\x03\x41LL\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x07\n\x03MMS\x10\x02\x12\x08\n\x04SUPL\x10\x03\x12\x07\n\x03\x44UN\x10\x04\x12\t\n\x05HIPRI\x10\x05\x12\x08\n\x04\x46OTA\x10\x06\x12\x07\n\x03IMS\x10\x07\x12\x07\n\x03\x43\x42S\x10\x08\x12\x06\n\x02IA\x10\t\x12\r\n\tEMERGENCY\x10\n\x12\x08\n\x04XCAP\x10\x0b\x12\x06\n\x02UT\x10\x0c\x12\x07\n\x03RCS\x10\r\"1\n\x08Protocol\x12\x06\n\x02IP\x10\x00\x12\x08\n\x04IPV6\x10\x01\x12\n\n\x06IPV4V6\x10\x02\x12\x07\n\x03PPP\x10\x03\"S\n\x04Xlat\x12\x18\n\x14SKIP_464XLAT_DEFAULT\x10\x00\x12\x18\n\x14SKIP_464XLAT_DISABLE\x10\x01\x12\x17\n\x13SKIP_464XLAT_ENABLE\x10\x02\"=\n\x0b\x43\x61rrierApns\x12(\n\x03\x61pn\x18\x02 \x03(\x0b\x32\x1b.com.google.carrier.ApnItemJ\x04\x08\x01\x10\x02\"\x19\n\tTextArray\x12\x0c\n\x04item\x18\x01 \x03(\t\"\x18\n\x08IntArray\x12\x0c\n\x04item\x18\x01 \x03(\x05\"\x82\x03\n\rCarrierConfig\x12\x38\n\x06\x63onfig\x18\x02 \x03(\x0b\x32(.com.google.carrier.CarrierConfig.Config\x1a\xaa\x02\n\x06\x43onfig\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x14\n\ntext_value\x18\x02 \x01(\tH\x00\x12\x13\n\tint_value\x18\x03 \x01(\x05H\x00\x12\x14\n\nlong_value\x18\x04 \x01(\x03H\x00\x12\x14\n\nbool_value\x18\x05 \x01(\x08H\x00\x12\x33\n\ntext_array\x18\x06 \x01(\x0b\x32\x1d.com.google.carrier.TextArrayH\x00\x12\x31\n\tint_array\x18\x07 \x01(\x0b\x32\x1c.com.google.carrier.IntArrayH\x00\x12\x33\n\x06\x62undle\x18\x08 \x01(\x0b\x32!.com.google.carrier.CarrierConfigH\x00\x12\x16\n\x0c\x64ouble_value\x18\t \x01(\x01H\x00\x42\x07\n\x05valueJ\x04\x08\x01\x10\x02J\x04\x08\x03\x10\x04\"8\n\x12VendorConfigClient\x12\x0c\n\x04name\x18\x01 \x02(\t\x12\r\n\x05value\x18\x02 \x01(\x0c*\x05\x08\x64\x10\x89\'\"M\n\rVendorConfigs\x12\x36\n\x06\x63lient\x18\x02 \x03(\x0b\x32&.com.google.carrier.VendorConfigClientJ\x04\x08\x01\x10\x02' -) - - - -_APNITEM_APNTYPE = _descriptor.EnumDescriptor( - name='ApnType', - full_name='com.google.carrier.ApnItem.ApnType', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='ALL', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='DEFAULT', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='MMS', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='SUPL', index=3, number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='DUN', index=4, number=4, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='HIPRI', index=5, number=5, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='FOTA', index=6, number=6, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='IMS', index=7, number=7, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='CBS', index=8, number=8, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='IA', index=9, number=9, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='EMERGENCY', index=10, number=10, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='XCAP', index=11, number=11, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='UT', index=12, number=12, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='RCS', index=13, number=13, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=1094, - serialized_end=1242, -) -_sym_db.RegisterEnumDescriptor(_APNITEM_APNTYPE) - -_APNITEM_PROTOCOL = _descriptor.EnumDescriptor( - name='Protocol', - full_name='com.google.carrier.ApnItem.Protocol', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='IP', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='IPV6', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='IPV4V6', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='PPP', index=3, number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=1244, - serialized_end=1293, -) -_sym_db.RegisterEnumDescriptor(_APNITEM_PROTOCOL) - -_APNITEM_XLAT = _descriptor.EnumDescriptor( - name='Xlat', - full_name='com.google.carrier.ApnItem.Xlat', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='SKIP_464XLAT_DEFAULT', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='SKIP_464XLAT_DISABLE', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='SKIP_464XLAT_ENABLE', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=1295, - serialized_end=1378, -) -_sym_db.RegisterEnumDescriptor(_APNITEM_XLAT) - - -_CARRIERSETTINGS = _descriptor.Descriptor( - name='CarrierSettings', - full_name='com.google.carrier.CarrierSettings', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='canonical_name', full_name='com.google.carrier.CarrierSettings.canonical_name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='version', full_name='com.google.carrier.CarrierSettings.version', index=1, - number=2, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='apns', full_name='com.google.carrier.CarrierSettings.apns', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='configs', full_name='com.google.carrier.CarrierSettings.configs', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='vendor_configs', full_name='com.google.carrier.CarrierSettings.vendor_configs', index=4, - number=6, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=47, - serialized_end=269, -) - - -_MULTICARRIERSETTINGS = _descriptor.Descriptor( - name='MultiCarrierSettings', - full_name='com.google.carrier.MultiCarrierSettings', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='version', full_name='com.google.carrier.MultiCarrierSettings.version', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='setting', full_name='com.google.carrier.MultiCarrierSettings.setting', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=271, - serialized_end=364, -) - - -_APNITEM = _descriptor.Descriptor( - name='ApnItem', - full_name='com.google.carrier.ApnItem', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='com.google.carrier.ApnItem.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='com.google.carrier.ApnItem.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='type', full_name='com.google.carrier.ApnItem.type', index=2, - number=3, type=14, cpp_type=8, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='bearer_bitmask', full_name='com.google.carrier.ApnItem.bearer_bitmask', index=3, - number=4, type=9, cpp_type=9, label=1, - has_default_value=True, default_value=b"0".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='server', full_name='com.google.carrier.ApnItem.server', index=4, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='proxy', full_name='com.google.carrier.ApnItem.proxy', index=5, - number=6, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='port', full_name='com.google.carrier.ApnItem.port', index=6, - number=7, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='user', full_name='com.google.carrier.ApnItem.user', index=7, - number=8, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='password', full_name='com.google.carrier.ApnItem.password', index=8, - number=9, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='authtype', full_name='com.google.carrier.ApnItem.authtype', index=9, - number=10, type=5, cpp_type=1, label=1, - has_default_value=True, default_value=-1, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='mmsc', full_name='com.google.carrier.ApnItem.mmsc', index=10, - number=11, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='mmsc_proxy', full_name='com.google.carrier.ApnItem.mmsc_proxy', index=11, - number=12, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='mmsc_proxy_port', full_name='com.google.carrier.ApnItem.mmsc_proxy_port', index=12, - number=13, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='protocol', full_name='com.google.carrier.ApnItem.protocol', index=13, - number=14, type=14, cpp_type=8, label=1, - has_default_value=True, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='roaming_protocol', full_name='com.google.carrier.ApnItem.roaming_protocol', index=14, - number=15, type=14, cpp_type=8, label=1, - has_default_value=True, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='mtu', full_name='com.google.carrier.ApnItem.mtu', index=15, - number=16, type=5, cpp_type=1, label=1, - has_default_value=True, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='profile_id', full_name='com.google.carrier.ApnItem.profile_id', index=16, - number=17, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='max_conns', full_name='com.google.carrier.ApnItem.max_conns', index=17, - number=18, type=5, cpp_type=1, label=1, - has_default_value=True, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='wait_time', full_name='com.google.carrier.ApnItem.wait_time', index=18, - number=19, type=5, cpp_type=1, label=1, - has_default_value=True, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='max_conns_time', full_name='com.google.carrier.ApnItem.max_conns_time', index=19, - number=20, type=5, cpp_type=1, label=1, - has_default_value=True, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='carrier_enabled', full_name='com.google.carrier.ApnItem.carrier_enabled', index=20, - number=21, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='modem_cognitive', full_name='com.google.carrier.ApnItem.modem_cognitive', index=21, - number=22, type=8, cpp_type=7, label=1, - has_default_value=True, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='user_visible', full_name='com.google.carrier.ApnItem.user_visible', index=22, - number=23, type=8, cpp_type=7, label=1, - has_default_value=True, default_value=True, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='user_editable', full_name='com.google.carrier.ApnItem.user_editable', index=23, - number=24, type=8, cpp_type=7, label=1, - has_default_value=True, default_value=True, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='apn_set_id', full_name='com.google.carrier.ApnItem.apn_set_id', index=24, - number=25, type=5, cpp_type=1, label=1, - has_default_value=True, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='skip_464xlat', full_name='com.google.carrier.ApnItem.skip_464xlat', index=25, - number=26, type=14, cpp_type=8, label=1, - has_default_value=True, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _APNITEM_APNTYPE, - _APNITEM_PROTOCOL, - _APNITEM_XLAT, - ], - serialized_options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=367, - serialized_end=1378, -) - - -_CARRIERAPNS = _descriptor.Descriptor( - name='CarrierApns', - full_name='com.google.carrier.CarrierApns', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='apn', full_name='com.google.carrier.CarrierApns.apn', index=0, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1380, - serialized_end=1441, -) - - -_TEXTARRAY = _descriptor.Descriptor( - name='TextArray', - full_name='com.google.carrier.TextArray', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='item', full_name='com.google.carrier.TextArray.item', index=0, - number=1, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1443, - serialized_end=1468, -) - - -_INTARRAY = _descriptor.Descriptor( - name='IntArray', - full_name='com.google.carrier.IntArray', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='item', full_name='com.google.carrier.IntArray.item', index=0, - number=1, type=5, cpp_type=1, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1470, - serialized_end=1494, -) - - -_CARRIERCONFIG_CONFIG = _descriptor.Descriptor( - name='Config', - full_name='com.google.carrier.CarrierConfig.Config', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='com.google.carrier.CarrierConfig.Config.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='text_value', full_name='com.google.carrier.CarrierConfig.Config.text_value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='int_value', full_name='com.google.carrier.CarrierConfig.Config.int_value', index=2, - number=3, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='long_value', full_name='com.google.carrier.CarrierConfig.Config.long_value', index=3, - number=4, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='bool_value', full_name='com.google.carrier.CarrierConfig.Config.bool_value', index=4, - number=5, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='text_array', full_name='com.google.carrier.CarrierConfig.Config.text_array', index=5, - number=6, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='int_array', full_name='com.google.carrier.CarrierConfig.Config.int_array', index=6, - number=7, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='bundle', full_name='com.google.carrier.CarrierConfig.Config.bundle', index=7, - number=8, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='double_value', full_name='com.google.carrier.CarrierConfig.Config.double_value', index=8, - number=9, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='value', full_name='com.google.carrier.CarrierConfig.Config.value', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), - ], - serialized_start=1573, - serialized_end=1871, -) - -_CARRIERCONFIG = _descriptor.Descriptor( - name='CarrierConfig', - full_name='com.google.carrier.CarrierConfig', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='config', full_name='com.google.carrier.CarrierConfig.config', index=0, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[_CARRIERCONFIG_CONFIG, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1497, - serialized_end=1883, -) - - -_VENDORCONFIGCLIENT = _descriptor.Descriptor( - name='VendorConfigClient', - full_name='com.google.carrier.VendorConfigClient', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='com.google.carrier.VendorConfigClient.name', index=0, - number=1, type=9, cpp_type=9, label=2, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='com.google.carrier.VendorConfigClient.value', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=True, - syntax='proto2', - extension_ranges=[(100, 5001), ], - oneofs=[ - ], - serialized_start=1885, - serialized_end=1941, -) - - -_VENDORCONFIGS = _descriptor.Descriptor( - name='VendorConfigs', - full_name='com.google.carrier.VendorConfigs', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='client', full_name='com.google.carrier.VendorConfigs.client', index=0, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1943, - serialized_end=2020, -) - -_CARRIERSETTINGS.fields_by_name['apns'].message_type = _CARRIERAPNS -_CARRIERSETTINGS.fields_by_name['configs'].message_type = _CARRIERCONFIG -_CARRIERSETTINGS.fields_by_name['vendor_configs'].message_type = _VENDORCONFIGS -_MULTICARRIERSETTINGS.fields_by_name['setting'].message_type = _CARRIERSETTINGS -_APNITEM.fields_by_name['type'].enum_type = _APNITEM_APNTYPE -_APNITEM.fields_by_name['protocol'].enum_type = _APNITEM_PROTOCOL -_APNITEM.fields_by_name['roaming_protocol'].enum_type = _APNITEM_PROTOCOL -_APNITEM.fields_by_name['skip_464xlat'].enum_type = _APNITEM_XLAT -_APNITEM_APNTYPE.containing_type = _APNITEM -_APNITEM_PROTOCOL.containing_type = _APNITEM -_APNITEM_XLAT.containing_type = _APNITEM -_CARRIERAPNS.fields_by_name['apn'].message_type = _APNITEM -_CARRIERCONFIG_CONFIG.fields_by_name['text_array'].message_type = _TEXTARRAY -_CARRIERCONFIG_CONFIG.fields_by_name['int_array'].message_type = _INTARRAY -_CARRIERCONFIG_CONFIG.fields_by_name['bundle'].message_type = _CARRIERCONFIG -_CARRIERCONFIG_CONFIG.containing_type = _CARRIERCONFIG -_CARRIERCONFIG_CONFIG.oneofs_by_name['value'].fields.append( - _CARRIERCONFIG_CONFIG.fields_by_name['text_value']) -_CARRIERCONFIG_CONFIG.fields_by_name['text_value'].containing_oneof = _CARRIERCONFIG_CONFIG.oneofs_by_name['value'] -_CARRIERCONFIG_CONFIG.oneofs_by_name['value'].fields.append( - _CARRIERCONFIG_CONFIG.fields_by_name['int_value']) -_CARRIERCONFIG_CONFIG.fields_by_name['int_value'].containing_oneof = _CARRIERCONFIG_CONFIG.oneofs_by_name['value'] -_CARRIERCONFIG_CONFIG.oneofs_by_name['value'].fields.append( - _CARRIERCONFIG_CONFIG.fields_by_name['long_value']) -_CARRIERCONFIG_CONFIG.fields_by_name['long_value'].containing_oneof = _CARRIERCONFIG_CONFIG.oneofs_by_name['value'] -_CARRIERCONFIG_CONFIG.oneofs_by_name['value'].fields.append( - _CARRIERCONFIG_CONFIG.fields_by_name['bool_value']) -_CARRIERCONFIG_CONFIG.fields_by_name['bool_value'].containing_oneof = _CARRIERCONFIG_CONFIG.oneofs_by_name['value'] -_CARRIERCONFIG_CONFIG.oneofs_by_name['value'].fields.append( - _CARRIERCONFIG_CONFIG.fields_by_name['text_array']) -_CARRIERCONFIG_CONFIG.fields_by_name['text_array'].containing_oneof = _CARRIERCONFIG_CONFIG.oneofs_by_name['value'] -_CARRIERCONFIG_CONFIG.oneofs_by_name['value'].fields.append( - _CARRIERCONFIG_CONFIG.fields_by_name['int_array']) -_CARRIERCONFIG_CONFIG.fields_by_name['int_array'].containing_oneof = _CARRIERCONFIG_CONFIG.oneofs_by_name['value'] -_CARRIERCONFIG_CONFIG.oneofs_by_name['value'].fields.append( - _CARRIERCONFIG_CONFIG.fields_by_name['bundle']) -_CARRIERCONFIG_CONFIG.fields_by_name['bundle'].containing_oneof = _CARRIERCONFIG_CONFIG.oneofs_by_name['value'] -_CARRIERCONFIG_CONFIG.oneofs_by_name['value'].fields.append( - _CARRIERCONFIG_CONFIG.fields_by_name['double_value']) -_CARRIERCONFIG_CONFIG.fields_by_name['double_value'].containing_oneof = _CARRIERCONFIG_CONFIG.oneofs_by_name['value'] -_CARRIERCONFIG.fields_by_name['config'].message_type = _CARRIERCONFIG_CONFIG -_VENDORCONFIGS.fields_by_name['client'].message_type = _VENDORCONFIGCLIENT -DESCRIPTOR.message_types_by_name['CarrierSettings'] = _CARRIERSETTINGS -DESCRIPTOR.message_types_by_name['MultiCarrierSettings'] = _MULTICARRIERSETTINGS -DESCRIPTOR.message_types_by_name['ApnItem'] = _APNITEM -DESCRIPTOR.message_types_by_name['CarrierApns'] = _CARRIERAPNS -DESCRIPTOR.message_types_by_name['TextArray'] = _TEXTARRAY -DESCRIPTOR.message_types_by_name['IntArray'] = _INTARRAY -DESCRIPTOR.message_types_by_name['CarrierConfig'] = _CARRIERCONFIG -DESCRIPTOR.message_types_by_name['VendorConfigClient'] = _VENDORCONFIGCLIENT -DESCRIPTOR.message_types_by_name['VendorConfigs'] = _VENDORCONFIGS -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -CarrierSettings = _reflection.GeneratedProtocolMessageType('CarrierSettings', (_message.Message,), { - 'DESCRIPTOR' : _CARRIERSETTINGS, - '__module__' : 'carrier_settings_pb2' - # @@protoc_insertion_point(class_scope:com.google.carrier.CarrierSettings) - }) -_sym_db.RegisterMessage(CarrierSettings) - -MultiCarrierSettings = _reflection.GeneratedProtocolMessageType('MultiCarrierSettings', (_message.Message,), { - 'DESCRIPTOR' : _MULTICARRIERSETTINGS, - '__module__' : 'carrier_settings_pb2' - # @@protoc_insertion_point(class_scope:com.google.carrier.MultiCarrierSettings) - }) -_sym_db.RegisterMessage(MultiCarrierSettings) - -ApnItem = _reflection.GeneratedProtocolMessageType('ApnItem', (_message.Message,), { - 'DESCRIPTOR' : _APNITEM, - '__module__' : 'carrier_settings_pb2' - # @@protoc_insertion_point(class_scope:com.google.carrier.ApnItem) - }) -_sym_db.RegisterMessage(ApnItem) - -CarrierApns = _reflection.GeneratedProtocolMessageType('CarrierApns', (_message.Message,), { - 'DESCRIPTOR' : _CARRIERAPNS, - '__module__' : 'carrier_settings_pb2' - # @@protoc_insertion_point(class_scope:com.google.carrier.CarrierApns) - }) -_sym_db.RegisterMessage(CarrierApns) - -TextArray = _reflection.GeneratedProtocolMessageType('TextArray', (_message.Message,), { - 'DESCRIPTOR' : _TEXTARRAY, - '__module__' : 'carrier_settings_pb2' - # @@protoc_insertion_point(class_scope:com.google.carrier.TextArray) - }) -_sym_db.RegisterMessage(TextArray) - -IntArray = _reflection.GeneratedProtocolMessageType('IntArray', (_message.Message,), { - 'DESCRIPTOR' : _INTARRAY, - '__module__' : 'carrier_settings_pb2' - # @@protoc_insertion_point(class_scope:com.google.carrier.IntArray) - }) -_sym_db.RegisterMessage(IntArray) - -CarrierConfig = _reflection.GeneratedProtocolMessageType('CarrierConfig', (_message.Message,), { - - 'Config' : _reflection.GeneratedProtocolMessageType('Config', (_message.Message,), { - 'DESCRIPTOR' : _CARRIERCONFIG_CONFIG, - '__module__' : 'carrier_settings_pb2' - # @@protoc_insertion_point(class_scope:com.google.carrier.CarrierConfig.Config) - }) - , - 'DESCRIPTOR' : _CARRIERCONFIG, - '__module__' : 'carrier_settings_pb2' - # @@protoc_insertion_point(class_scope:com.google.carrier.CarrierConfig) - }) -_sym_db.RegisterMessage(CarrierConfig) -_sym_db.RegisterMessage(CarrierConfig.Config) - -VendorConfigClient = _reflection.GeneratedProtocolMessageType('VendorConfigClient', (_message.Message,), { - 'DESCRIPTOR' : _VENDORCONFIGCLIENT, - '__module__' : 'carrier_settings_pb2' - # @@protoc_insertion_point(class_scope:com.google.carrier.VendorConfigClient) - }) -_sym_db.RegisterMessage(VendorConfigClient) - -VendorConfigs = _reflection.GeneratedProtocolMessageType('VendorConfigs', (_message.Message,), { - 'DESCRIPTOR' : _VENDORCONFIGS, - '__module__' : 'carrier_settings_pb2' - # @@protoc_insertion_point(class_scope:com.google.carrier.VendorConfigs) - }) -_sym_db.RegisterMessage(VendorConfigs) - - -# @@protoc_insertion_point(module_scope) diff --git a/carriersettings-extractor/carriersettings_extractor.py b/carriersettings-extractor/carriersettings_extractor.py index d6e6f71d..5ed37bb5 100755 --- a/carriersettings-extractor/carriersettings_extractor.py +++ b/carriersettings-extractor/carriersettings_extractor.py @@ -5,10 +5,18 @@ from glob import glob from itertools import product import os.path +import subprocess import sys from xml.etree import ElementTree as ET from xml.sax.saxutils import escape, quoteattr +dir_path = os.path.dirname(os.path.realpath(__file__)) + +for name in glob(f"{dir_path}/*.proto"): + subprocess.run( + ["protoc", "--proto_path=.", "--python_out=.", os.path.basename(name)], + cwd=dir_path) + from carrier_settings_pb2 import CarrierSettings, MultiCarrierSettings from carrier_list_pb2 import CarrierList from carrierId_pb2 import CarrierList as CarrierIdList @@ -59,6 +67,12 @@ def parse_args(): "read_only_apn_types_string_array", "read_only_apn_fields_string_array"] +threshold_configs = ["5g_nr_ssrsrp_thresholds_int_array", + "5g_nr_sssinr_thresholds_int_array", + "gsm_rssi_thresholds_int_array", + "lte_rsrp_thresholds_int_array", + "lte_rssnr_thresholds_int_array", + "wcdma_rscp_thresholds_int_array"] def extract_elements(carrier_config_element, config): if config.key in unwanted_configs: @@ -121,6 +135,8 @@ def extract_elements(carrier_config_element, config): ) carrier_config_item.set('value', value) elif value_type == 'int_array': + if config.key in threshold_configs and len(getattr(config, value_type).item) > 4: + return carrier_config_subelement = ET.SubElement( carrier_config_element, 'int-array', diff --git a/factory/FP4/flash-all.bat b/factory/FP4/flash-all.bat new file mode 100644 index 00000000..449f94b4 --- /dev/null +++ b/factory/FP4/flash-all.bat @@ -0,0 +1,80 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: FP4" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: FP4" || exit /B 1 +fastboot flash abl_a abl.img || exit /B 1 +fastboot flash abl_b abl.img || exit /B 1 +fastboot flash aop_a aop.img || exit /B 1 +fastboot flash aop_b aop.img || exit /B 1 +fastboot flash bluetooth_a bluetooth.img || exit /B 1 +fastboot flash bluetooth_b bluetooth.img || exit /B 1 +fastboot flash core_nhlos_a core_nhlos.img || exit /B 1 +fastboot flash core_nhlos_b core_nhlos.img || exit /B 1 +fastboot flash devcfg_a devcfg.img || exit /B 1 +fastboot flash devcfg_b devcfg.img || exit /B 1 +fastboot flash dsp_a dsp.img || exit /B 1 +fastboot flash dsp_b dsp.img || exit /B 1 +fastboot flash featenabler_a featenabler.img || exit /B 1 +fastboot flash featenabler_b featenabler.img || exit /B 1 +fastboot flash hyp_a hyp.img || exit /B 1 +fastboot flash hyp_b hyp.img || exit /B 1 +fastboot flash imagefv_a imagefv.img || exit /B 1 +fastboot flash imagefv_b imagefv.img || exit /B 1 +fastboot flash keymaster_a keymaster.img || exit /B 1 +fastboot flash keymaster_b keymaster.img || exit /B 1 +fastboot flash modem_a modem.img || exit /B 1 +fastboot flash modem_b modem.img || exit /B 1 +fastboot flash multiimgoem_a multiimgoem.img || exit /B 1 +fastboot flash multiimgoem_b multiimgoem.img || exit /B 1 +fastboot flash qupfw_a qupfw.img || exit /B 1 +fastboot flash qupfw_b qupfw.img || exit /B 1 +fastboot flash tz_a tz.img || exit /B 1 +fastboot flash tz_b tz.img || exit /B 1 +fastboot flash uefisecapp_a uefisecapp.img || exit /B 1 +fastboot flash uefisecapp_b uefisecapp.img || exit /B 1 +fastboot flash xbl_a xbl.img || exit /B 1 +fastboot flash xbl_b xbl.img || exit /B 1 +fastboot flash xbl_config_a xbl_config.img || exit /B 1 +fastboot flash xbl_config_b xbl_config.img || exit /B 1 + +fastboot flash apdp apdp.img || exit /B 1 +fastboot flash ddr ddr.img || exit /B 1 +fastboot flash logfs logfs.img || exit /B 1 +fastboot flash storsec storsec.img || exit /B 1 +fastboot flash toolsfv toolsfv.img || exit /B 1 +fastboot flash tunning tunning.img || exit /B 1 + +fastboot flash frp frp.img || exit /B 1 + +fastboot erase misc || exit /B 1 +fastboot erase modemst1 || exit /B 1 +fastboot erase modemst2 || exit /B 1 + +fastboot --set-active=a reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-FP4-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/FP4/flash-all.sh b/factory/FP4/flash-all.sh new file mode 100755 index 00000000..dd3794b0 --- /dev/null +++ b/factory/FP4/flash-all.sh @@ -0,0 +1,89 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: FP4$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash abl_a abl.img +fastboot flash abl_b abl.img +fastboot flash aop_a aop.img +fastboot flash aop_b aop.img +fastboot flash bluetooth_a bluetooth.img +fastboot flash bluetooth_b bluetooth.img +fastboot flash core_nhlos_a core_nhlos.img +fastboot flash core_nhlos_b core_nhlos.img +fastboot flash devcfg_a devcfg.img +fastboot flash devcfg_b devcfg.img +fastboot flash dsp_a dsp.img +fastboot flash dsp_b dsp.img +fastboot flash featenabler_a featenabler.img +fastboot flash featenabler_b featenabler.img +fastboot flash hyp_a hyp.img +fastboot flash hyp_b hyp.img +fastboot flash imagefv_a imagefv.img +fastboot flash imagefv_b imagefv.img +fastboot flash keymaster_a keymaster.img +fastboot flash keymaster_b keymaster.img +fastboot flash modem_a modem.img +fastboot flash modem_b modem.img +fastboot flash multiimgoem_a multiimgoem.img +fastboot flash multiimgoem_b multiimgoem.img +fastboot flash qupfw_a qupfw.img +fastboot flash qupfw_b qupfw.img +fastboot flash tz_a tz.img +fastboot flash tz_b tz.img +fastboot flash uefisecapp_a uefisecapp.img +fastboot flash uefisecapp_b uefisecapp.img +fastboot flash xbl_a xbl.img +fastboot flash xbl_b xbl.img +fastboot flash xbl_config_a xbl_config.img +fastboot flash xbl_config_b xbl_config.img + +fastboot flash apdp apdp.img +fastboot flash ddr ddr.img +fastboot flash logfs logfs.img +fastboot flash storsec storsec.img +fastboot flash toolsfv toolsfv.img +fastboot flash tunning tunning.img + +fastboot flash frp frp.img + +fastboot erase misc +fastboot erase modemst1 +fastboot erase modemst2 + +fastboot --set-active=a reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-FP4-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/FP4/flash-base.sh b/factory/FP4/flash-base.sh new file mode 100755 index 00000000..4caf06d7 --- /dev/null +++ b/factory/FP4/flash-base.sh @@ -0,0 +1,86 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: FP4$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash abl_a abl.img +fastboot flash abl_b abl.img +fastboot flash aop_a aop.img +fastboot flash aop_b aop.img +fastboot flash bluetooth_a bluetooth.img +fastboot flash bluetooth_b bluetooth.img +fastboot flash core_nhlos_a core_nhlos.img +fastboot flash core_nhlos_b core_nhlos.img +fastboot flash devcfg_a devcfg.img +fastboot flash devcfg_b devcfg.img +fastboot flash dsp_a dsp.img +fastboot flash dsp_b dsp.img +fastboot flash featenabler_a featenabler.img +fastboot flash featenabler_b featenabler.img +fastboot flash hyp_a hyp.img +fastboot flash hyp_b hyp.img +fastboot flash imagefv_a imagefv.img +fastboot flash imagefv_b imagefv.img +fastboot flash keymaster_a keymaster.img +fastboot flash keymaster_b keymaster.img +fastboot flash modem_a modem.img +fastboot flash modem_b modem.img +fastboot flash multiimgoem_a multiimgoem.img +fastboot flash multiimgoem_b multiimgoem.img +fastboot flash qupfw_a qupfw.img +fastboot flash qupfw_b qupfw.img +fastboot flash tz_a tz.img +fastboot flash tz_b tz.img +fastboot flash uefisecapp_a uefisecapp.img +fastboot flash uefisecapp_b uefisecapp.img +fastboot flash xbl_a xbl.img +fastboot flash xbl_b xbl.img +fastboot flash xbl_config_a xbl_config.img +fastboot flash xbl_config_b xbl_config.img + +fastboot flash apdp apdp.img +fastboot flash ddr ddr.img +fastboot flash logfs logfs.img +fastboot flash storsec storsec.img +fastboot flash toolsfv toolsfv.img +fastboot flash tunning tunning.img + +fastboot flash frp frp.img + +fastboot erase misc +fastboot erase modemst1 +fastboot erase modemst2 + +fastboot --set-active=a reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/FP5/flash-all.bat b/factory/FP5/flash-all.bat new file mode 100644 index 00000000..1f191f5a --- /dev/null +++ b/factory/FP5/flash-all.bat @@ -0,0 +1,82 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: FP5" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: FP5" || exit /B 1 +fastboot flash abl_a abl.img || exit /B 1 +fastboot flash abl_b abl.img || exit /B 1 +fastboot flash aop_a aop.img || exit /B 1 +fastboot flash aop_b aop.img || exit /B 1 +fastboot flash bluetooth_a bluetooth.img || exit /B 1 +fastboot flash bluetooth_b bluetooth.img || exit /B 1 +fastboot flash cpucp_a cpucp.img || exit /B 1 +fastboot flash cpucp_b cpucp.img || exit /B 1 +fastboot flash devcfg_a devcfg.img || exit /B 1 +fastboot flash devcfg_b devcfg.img || exit /B 1 +fastboot flash dsp_a dsp.img || exit /B 1 +fastboot flash dsp_b dsp.img || exit /B 1 +fastboot flash featenabler_a featenabler.img || exit /B 1 +fastboot flash featenabler_b featenabler.img || exit /B 1 +fastboot flash hyp_a hyp.img || exit /B 1 +fastboot flash hyp_b hyp.img || exit /B 1 +fastboot flash imagefv_a imagefv.img || exit /B 1 +fastboot flash imagefv_b imagefv.img || exit /B 1 +fastboot flash keymaster_a keymaster.img || exit /B 1 +fastboot flash keymaster_b keymaster.img || exit /B 1 +fastboot flash modem_a modem.img || exit /B 1 +fastboot flash modem_b modem.img || exit /B 1 +fastboot flash multiimgoem_a multiimgoem.img || exit /B 1 +fastboot flash multiimgoem_b multiimgoem.img || exit /B 1 +fastboot flash qupfw_a qupfw.img || exit /B 1 +fastboot flash qupfw_b qupfw.img || exit /B 1 +fastboot flash shrm_a shrm.img || exit /B 1 +fastboot flash shrm_b shrm.img || exit /B 1 +fastboot flash studybk_a studybk.img || exit /B 1 +fastboot flash studybk_b studybk.img || exit /B 1 +fastboot flash tz_a tz.img || exit /B 1 +fastboot flash tz_b tz.img || exit /B 1 +fastboot flash uefisecapp_a uefisecapp.img || exit /B 1 +fastboot flash uefisecapp_b uefisecapp.img || exit /B 1 +fastboot flash xbl_a xbl.img || exit /B 1 +fastboot flash xbl_b xbl.img || exit /B 1 +fastboot flash xbl_config_a xbl_config.img || exit /B 1 +fastboot flash xbl_config_b xbl_config.img || exit /B 1 + +fastboot flash apdp apdp.img || exit /B 1 +fastboot flash ddr ddr.img || exit /B 1 +fastboot flash logfs logfs.img || exit /B 1 +fastboot flash rtice rtice.img || exit /B 1 +fastboot flash storsec storsec.img || exit /B 1 +fastboot flash study study.img || exit /B 1 + +fastboot flash frp frp.img || exit /B 1 + +fastboot erase misc || exit /B 1 + +fastboot --set-active=a reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-FP5-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/FP5/flash-all.sh b/factory/FP5/flash-all.sh new file mode 100755 index 00000000..4c7e68f7 --- /dev/null +++ b/factory/FP5/flash-all.sh @@ -0,0 +1,91 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: FP5$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash abl_a abl.img +fastboot flash abl_b abl.img +fastboot flash aop_a aop.img +fastboot flash aop_b aop.img +fastboot flash bluetooth_a bluetooth.img +fastboot flash bluetooth_b bluetooth.img +fastboot flash cpucp_a cpucp.img +fastboot flash cpucp_b cpucp.img +fastboot flash devcfg_a devcfg.img +fastboot flash devcfg_b devcfg.img +fastboot flash dsp_a dsp.img +fastboot flash dsp_b dsp.img +fastboot flash featenabler_a featenabler.img +fastboot flash featenabler_b featenabler.img +fastboot flash hyp_a hyp.img +fastboot flash hyp_b hyp.img +fastboot flash imagefv_a imagefv.img +fastboot flash imagefv_b imagefv.img +fastboot flash keymaster_a keymaster.img +fastboot flash keymaster_b keymaster.img +fastboot flash modem_a modem.img +fastboot flash modem_b modem.img +fastboot flash multiimgoem_a multiimgoem.img +fastboot flash multiimgoem_b multiimgoem.img +fastboot flash qupfw_a qupfw.img +fastboot flash qupfw_b qupfw.img +fastboot flash shrm_a shrm.img +fastboot flash shrm_b shrm.img +fastboot flash studybk_a studybk.img +fastboot flash studybk_b studybk.img +fastboot flash tz_a tz.img +fastboot flash tz_b tz.img +fastboot flash uefisecapp_a uefisecapp.img +fastboot flash uefisecapp_b uefisecapp.img +fastboot flash xbl_a xbl.img +fastboot flash xbl_b xbl.img +fastboot flash xbl_config_a xbl_config.img +fastboot flash xbl_config_b xbl_config.img + +fastboot flash apdp apdp.img +fastboot flash ddr ddr.img +fastboot flash logfs logfs.img +fastboot flash rtice rtice.img +fastboot flash storsec storsec.img +fastboot flash study study.img + +fastboot flash frp frp.img + +fastboot erase misc + +fastboot --set-active=a reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-FP5-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/FP5/flash-base.sh b/factory/FP5/flash-base.sh new file mode 100755 index 00000000..7ffa8d23 --- /dev/null +++ b/factory/FP5/flash-base.sh @@ -0,0 +1,88 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: FP5$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash abl_a abl.img +fastboot flash abl_b abl.img +fastboot flash aop_a aop.img +fastboot flash aop_b aop.img +fastboot flash bluetooth_a bluetooth.img +fastboot flash bluetooth_b bluetooth.img +fastboot flash cpucp_a cpucp.img +fastboot flash cpucp_b cpucp.img +fastboot flash devcfg_a devcfg.img +fastboot flash devcfg_b devcfg.img +fastboot flash dsp_a dsp.img +fastboot flash dsp_b dsp.img +fastboot flash featenabler_a featenabler.img +fastboot flash featenabler_b featenabler.img +fastboot flash hyp_a hyp.img +fastboot flash hyp_b hyp.img +fastboot flash imagefv_a imagefv.img +fastboot flash imagefv_b imagefv.img +fastboot flash keymaster_a keymaster.img +fastboot flash keymaster_b keymaster.img +fastboot flash modem_a modem.img +fastboot flash modem_b modem.img +fastboot flash multiimgoem_a multiimgoem.img +fastboot flash multiimgoem_b multiimgoem.img +fastboot flash qupfw_a qupfw.img +fastboot flash qupfw_b qupfw.img +fastboot flash shrm_a shrm.img +fastboot flash shrm_b shrm.img +fastboot flash studybk_a studybk.img +fastboot flash studybk_b studybk.img +fastboot flash tz_a tz.img +fastboot flash tz_b tz.img +fastboot flash uefisecapp_a uefisecapp.img +fastboot flash uefisecapp_b uefisecapp.img +fastboot flash xbl_a xbl.img +fastboot flash xbl_b xbl.img +fastboot flash xbl_config_a xbl_config.img +fastboot flash xbl_config_b xbl_config.img + +fastboot flash apdp apdp.img +fastboot flash ddr ddr.img +fastboot flash logfs logfs.img +fastboot flash rtice rtice.img +fastboot flash storsec storsec.img +fastboot flash study study.img + +fastboot flash frp frp.img + +fastboot erase misc + +fastboot --set-active=a reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/akita/flash-all.bat b/factory/akita/flash-all.bat new file mode 100644 index 00000000..26e44ece --- /dev/null +++ b/factory/akita/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: akita" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: akita" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-akita-akita-14.5-11693900.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-akita-akita-14.5-11693900.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-akita-g5300o-240308-240517-B-11857457.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-akita-g5300o-240308-240517-B-11857457.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-akita-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/akita/flash-all.sh b/factory/akita/flash-all.sh new file mode 100755 index 00000000..42655787 --- /dev/null +++ b/factory/akita/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: akita$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-akita-akita-14.5-11693900.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-akita-akita-14.5-11693900.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-akita-g5300o-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-akita-g5300o-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-akita-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/akita/flash-base.sh b/factory/akita/flash-base.sh new file mode 100755 index 00000000..c2233ff8 --- /dev/null +++ b/factory/akita/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: akita$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-akita-akita-14.5-11693900.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-akita-akita-14.5-11693900.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-akita-g5300o-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-akita-g5300o-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/axolotl/flash-all.bat b/factory/axolotl/flash-all.bat new file mode 100644 index 00000000..44597df0 --- /dev/null +++ b/factory/axolotl/flash-all.bat @@ -0,0 +1,67 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: sdm845" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: sdm845" || exit /B 1 +fastboot flash ImageFv_a ImageFv.img || exit /B 1 +fastboot flash ImageFv_b ImageFv.img || exit /B 1 +fastboot flash abl_a abl.img || exit /B 1 +fastboot flash abl_b abl.img || exit /B 1 +fastboot flash aop_a aop.img || exit /B 1 +fastboot flash aop_b aop.img || exit /B 1 +fastboot flash bluetooth_a bluetooth.img || exit /B 1 +fastboot flash bluetooth_b bluetooth.img || exit /B 1 +fastboot flash cmnlib_a cmnlib.img || exit /B 1 +fastboot flash cmnlib_b cmnlib.img || exit /B 1 +fastboot flash cmnlib64_a cmnlib64.img || exit /B 1 +fastboot flash cmnlib64_b cmnlib64.img || exit /B 1 +fastboot flash devcfg_a devcfg.img || exit /B 1 +fastboot flash devcfg_b devcfg.img || exit /B 1 +fastboot flash dsp_a dsp.img || exit /B 1 +fastboot flash dsp_b dsp.img || exit /B 1 +fastboot flash hyp_a hyp.img || exit /B 1 +fastboot flash hyp_b hyp.img || exit /B 1 +fastboot flash keymaster_a keymaster.img || exit /B 1 +fastboot flash keymaster_b keymaster.img || exit /B 1 +fastboot flash modem_a modem.img || exit /B 1 +fastboot flash modem_b modem.img || exit /B 1 +fastboot flash qupfw_a qupfw.img || exit /B 1 +fastboot flash qupfw_b qupfw.img || exit /B 1 +fastboot flash storsec_a storsec.img || exit /B 1 +fastboot flash storsec_b storsec.img || exit /B 1 +fastboot flash tz_a tz.img || exit /B 1 +fastboot flash tz_b tz.img || exit /B 1 +fastboot flash xbl_a xbl.img || exit /B 1 +fastboot flash xbl_b xbl.img || exit /B 1 +fastboot flash xbl_config_a xbl_config.img || exit /B 1 +fastboot flash xbl_config_b xbl_config.img || exit /B 1 + +fastboot flash frp frp.img || exit /B 1 +fastboot flash devinfo devinfo.img || exit /B 1 + +fastboot --set-active=a reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot --skip-reboot -w update image-axolotl-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/axolotl/flash-all.sh b/factory/axolotl/flash-all.sh new file mode 100755 index 00000000..ad38e44b --- /dev/null +++ b/factory/axolotl/flash-all.sh @@ -0,0 +1,76 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: sdm845$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash ImageFv_a ImageFv.img +fastboot flash ImageFv_b ImageFv.img +fastboot flash abl_a abl.img +fastboot flash abl_b abl.img +fastboot flash aop_a aop.img +fastboot flash aop_b aop.img +fastboot flash bluetooth_a bluetooth.img +fastboot flash bluetooth_b bluetooth.img +fastboot flash cmnlib_a cmnlib.img +fastboot flash cmnlib_b cmnlib.img +fastboot flash cmnlib64_a cmnlib64.img +fastboot flash cmnlib64_b cmnlib64.img +fastboot flash devcfg_a devcfg.img +fastboot flash devcfg_b devcfg.img +fastboot flash dsp_a dsp.img +fastboot flash dsp_b dsp.img +fastboot flash hyp_a hyp.img +fastboot flash hyp_b hyp.img +fastboot flash keymaster_a keymaster.img +fastboot flash keymaster_b keymaster.img +fastboot flash modem_a modem.img +fastboot flash modem_b modem.img +fastboot flash qupfw_a qupfw.img +fastboot flash qupfw_b qupfw.img +fastboot flash storsec_a storsec.img +fastboot flash storsec_b storsec.img +fastboot flash tz_a tz.img +fastboot flash tz_b tz.img +fastboot flash xbl_a xbl.img +fastboot flash xbl_b xbl.img +fastboot flash xbl_config_a xbl_config.img +fastboot flash xbl_config_b xbl_config.img + +fastboot flash frp frp.img +fastboot flash devinfo devinfo.img + +fastboot --set-active=a reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot --skip-reboot -w update image-axolotl-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/axolotl/flash-base.sh b/factory/axolotl/flash-base.sh new file mode 100755 index 00000000..8a9072e3 --- /dev/null +++ b/factory/axolotl/flash-base.sh @@ -0,0 +1,73 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: sdm845$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash ImageFv_a ImageFv.img +fastboot flash ImageFv_b ImageFv.img +fastboot flash abl_a abl.img +fastboot flash abl_b abl.img +fastboot flash aop_a aop.img +fastboot flash aop_b aop.img +fastboot flash bluetooth_a bluetooth.img +fastboot flash bluetooth_b bluetooth.img +fastboot flash cmnlib_a cmnlib.img +fastboot flash cmnlib_b cmnlib.img +fastboot flash cmnlib64_a cmnlib64.img +fastboot flash cmnlib64_b cmnlib64.img +fastboot flash devcfg_a devcfg.img +fastboot flash devcfg_b devcfg.img +fastboot flash dsp_a dsp.img +fastboot flash dsp_b dsp.img +fastboot flash hyp_a hyp.img +fastboot flash hyp_b hyp.img +fastboot flash keymaster_a keymaster.img +fastboot flash keymaster_b keymaster.img +fastboot flash modem_a modem.img +fastboot flash modem_b modem.img +fastboot flash qupfw_a qupfw.img +fastboot flash qupfw_b qupfw.img +fastboot flash storsec_a storsec.img +fastboot flash storsec_b storsec.img +fastboot flash tz_a tz.img +fastboot flash tz_b tz.img +fastboot flash xbl_a xbl.img +fastboot flash xbl_b xbl.img +fastboot flash xbl_config_a xbl_config.img +fastboot flash xbl_config_b xbl_config.img + +fastboot flash frp frp.img +fastboot flash devinfo devinfo.img + +fastboot --set-active=a reboot-bootloader +sleep 5 +fastboot erase avb_custom_key diff --git a/factory/barbet/flash-all.bat b/factory/barbet/flash-all.bat new file mode 100644 index 00000000..2506cf47 --- /dev/null +++ b/factory/barbet/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: barbet" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: barbet" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-barbet-b9-0.6-10898944.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-barbet-b9-0.6-10898944.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-barbet-g7250-00299-240229-B-11514324.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-barbet-g7250-00299-240229-B-11514324.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-barbet-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/barbet/flash-all.sh b/factory/barbet/flash-all.sh new file mode 100755 index 00000000..a6b1499d --- /dev/null +++ b/factory/barbet/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: barbet$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-barbet-b9-0.6-10898944.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-barbet-b9-0.6-10898944.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-barbet-g7250-00299-240229-B-11514324.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-barbet-g7250-00299-240229-B-11514324.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-barbet-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/barbet/flash-base.sh b/factory/barbet/flash-base.sh new file mode 100755 index 00000000..7524ec32 --- /dev/null +++ b/factory/barbet/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: barbet$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-barbet-b9-0.6-10898944.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-barbet-b9-0.6-10898944.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-barbet-g7250-00299-240229-B-11514324.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-barbet-g7250-00299-240229-B-11514324.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/bluejay/flash-all.bat b/factory/bluejay/flash-all.bat new file mode 100644 index 00000000..70132b90 --- /dev/null +++ b/factory/bluejay/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: bluejay" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: bluejay" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-bluejay-bluejay-14.5-11677881.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-bluejay-bluejay-14.5-11677881.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-bluejay-g5123b-135085-240517-B-11857288.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-bluejay-g5123b-135085-240517-B-11857288.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-bluejay-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/bluejay/flash-all.sh b/factory/bluejay/flash-all.sh new file mode 100755 index 00000000..0990b0b3 --- /dev/null +++ b/factory/bluejay/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: bluejay$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-bluejay-bluejay-14.5-11677881.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-bluejay-bluejay-14.5-11677881.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bluejay-g5123b-135085-240517-B-11857288.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bluejay-g5123b-135085-240517-B-11857288.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-bluejay-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/bluejay/flash-base.sh b/factory/bluejay/flash-base.sh new file mode 100755 index 00000000..27ede601 --- /dev/null +++ b/factory/bluejay/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: bluejay$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-bluejay-bluejay-14.5-11677881.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-bluejay-bluejay-14.5-11677881.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bluejay-g5123b-135085-240517-B-11857288.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bluejay-g5123b-135085-240517-B-11857288.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/blueline/flash-all.bat b/factory/blueline/flash-all.bat new file mode 100644 index 00000000..bbf4bc73 --- /dev/null +++ b/factory/blueline/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: blueline" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: blueline" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-blueline-b1c1-0.4-7617406.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-blueline-b1c1-0.4-7617406.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-blueline-g845-00194-210812-B-7635520.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-blueline-g845-00194-210812-B-7635520.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-blueline-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/blueline/flash-all.sh b/factory/blueline/flash-all.sh new file mode 100755 index 00000000..1d16a47b --- /dev/null +++ b/factory/blueline/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: blueline$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-blueline-b1c1-0.4-7617406.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-blueline-b1c1-0.4-7617406.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-blueline-g845-00194-210812-B-7635520.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-blueline-g845-00194-210812-B-7635520.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-blueline-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/blueline/flash-base.sh b/factory/blueline/flash-base.sh new file mode 100755 index 00000000..c64fb8a1 --- /dev/null +++ b/factory/blueline/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: blueline$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-blueline-b1c1-0.4-7617406.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-blueline-b1c1-0.4-7617406.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-blueline-g845-00194-210812-B-7635520.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-blueline-g845-00194-210812-B-7635520.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/bonito/flash-all.bat b/factory/bonito/flash-all.bat new file mode 100644 index 00000000..d21f0fdd --- /dev/null +++ b/factory/bonito/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: bonito" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: bonito" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-bonito-b4s4-0.4-8048689.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-bonito-b4s4-0.4-8048689.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-bonito-g670-00145-220106-B-8048689.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-bonito-g670-00145-220106-B-8048689.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-bonito-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/bonito/flash-all.sh b/factory/bonito/flash-all.sh new file mode 100755 index 00000000..43783998 --- /dev/null +++ b/factory/bonito/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: bonito$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-bonito-b4s4-0.4-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-bonito-b4s4-0.4-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bonito-g670-00145-220106-B-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bonito-g670-00145-220106-B-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-bonito-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/bonito/flash-base.sh b/factory/bonito/flash-base.sh new file mode 100755 index 00000000..758f2c14 --- /dev/null +++ b/factory/bonito/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: bonito$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-bonito-b4s4-0.4-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-bonito-b4s4-0.4-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bonito-g670-00145-220106-B-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bonito-g670-00145-220106-B-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/bramble/flash-all.bat b/factory/bramble/flash-all.bat new file mode 100644 index 00000000..470130e1 --- /dev/null +++ b/factory/bramble/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: bramble" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: bramble" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-bramble-b5-0.6-10489838.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-bramble-b5-0.6-10489838.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-bramble-g7250-00264-230619-B-10346159.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-bramble-g7250-00264-230619-B-10346159.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-bramble-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/bramble/flash-all.sh b/factory/bramble/flash-all.sh new file mode 100755 index 00000000..2ddcfdb8 --- /dev/null +++ b/factory/bramble/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: bramble$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-bramble-b5-0.6-10489838.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-bramble-b5-0.6-10489838.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bramble-g7250-00264-230619-B-10346159.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bramble-g7250-00264-230619-B-10346159.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-bramble-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/bramble/flash-base.sh b/factory/bramble/flash-base.sh new file mode 100755 index 00000000..aba21495 --- /dev/null +++ b/factory/bramble/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: bramble$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-bramble-b5-0.6-10489838.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-bramble-b5-0.6-10489838.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bramble-g7250-00264-230619-B-10346159.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bramble-g7250-00264-230619-B-10346159.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/cheetah/flash-all.bat b/factory/cheetah/flash-all.bat new file mode 100644 index 00000000..92c424fa --- /dev/null +++ b/factory/cheetah/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: cheetah" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: cheetah" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-cheetah-cloudripper-14.5-11677884.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-cheetah-cloudripper-14.5-11677884.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-cheetah-g5300q-240308-240517-B-11857457.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-cheetah-g5300q-240308-240517-B-11857457.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-cheetah-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/cheetah/flash-all.sh b/factory/cheetah/flash-all.sh new file mode 100755 index 00000000..aeb6ec04 --- /dev/null +++ b/factory/cheetah/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: cheetah$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-cheetah-cloudripper-14.5-11677884.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-cheetah-cloudripper-14.5-11677884.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-cheetah-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-cheetah-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-cheetah-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/cheetah/flash-base.sh b/factory/cheetah/flash-base.sh new file mode 100755 index 00000000..01cc390a --- /dev/null +++ b/factory/cheetah/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: cheetah$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-cheetah-cloudripper-14.5-11677884.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-cheetah-cloudripper-14.5-11677884.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-cheetah-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-cheetah-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/coral/flash-all.bat b/factory/coral/flash-all.bat new file mode 100644 index 00000000..abc2d519 --- /dev/null +++ b/factory/coral/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: coral" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: coral" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-coral-c2f2-0.5-8906123.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-coral-c2f2-0.5-8906123.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-coral-g8150-00123-220708-B-8810441.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-coral-g8150-00123-220708-B-8810441.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-coral-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/coral/flash-all.sh b/factory/coral/flash-all.sh new file mode 100755 index 00000000..1ea650e7 --- /dev/null +++ b/factory/coral/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: coral$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-coral-c2f2-0.5-8906123.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-coral-c2f2-0.5-8906123.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-coral-g8150-00123-220708-B-8810441.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-coral-g8150-00123-220708-B-8810441.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-coral-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/coral/flash-base.sh b/factory/coral/flash-base.sh new file mode 100755 index 00000000..bf61eea2 --- /dev/null +++ b/factory/coral/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: coral$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-coral-c2f2-0.5-8906123.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-coral-c2f2-0.5-8906123.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-coral-g8150-00123-220708-B-8810441.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-coral-g8150-00123-220708-B-8810441.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/crosshatch/flash-all.bat b/factory/crosshatch/flash-all.bat new file mode 100644 index 00000000..05209c41 --- /dev/null +++ b/factory/crosshatch/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: crosshatch" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: crosshatch" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-crosshatch-b1c1-0.4-7617406.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-crosshatch-b1c1-0.4-7617406.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-crosshatch-g845-00194-210812-B-7635520.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-crosshatch-g845-00194-210812-B-7635520.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-crosshatch-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/crosshatch/flash-all.sh b/factory/crosshatch/flash-all.sh new file mode 100755 index 00000000..452c8d49 --- /dev/null +++ b/factory/crosshatch/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: crosshatch$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-crosshatch-b1c1-0.4-7617406.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-crosshatch-b1c1-0.4-7617406.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-crosshatch-g845-00194-210812-B-7635520.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-crosshatch-g845-00194-210812-B-7635520.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-crosshatch-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/crosshatch/flash-base.sh b/factory/crosshatch/flash-base.sh new file mode 100755 index 00000000..4f38654c --- /dev/null +++ b/factory/crosshatch/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: crosshatch$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-crosshatch-b1c1-0.4-7617406.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-crosshatch-b1c1-0.4-7617406.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-crosshatch-g845-00194-210812-B-7635520.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-crosshatch-g845-00194-210812-B-7635520.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/devon/flash-all.bat b/factory/devon/flash-all.bat new file mode 100644 index 00000000..e87e8500 --- /dev/null +++ b/factory/devon/flash-all.bat @@ -0,0 +1,77 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: devon" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: devon" || exit /B 1 +fastboot oem fb_mode_set || exit /B 1 + +fastboot flash partition partition.img || exit /B 1 + +fastboot flash keymaster_a keymaster.img || exit /B 1 +fastboot flash keymaster_b keymaster.img || exit /B 1 +fastboot flash hyp_a hyp.img || exit /B 1 +fastboot flash hyp_b hyp.img || exit /B 1 +fastboot flash tz_a tz.img || exit /B 1 +fastboot flash tz_b tz.img || exit /B 1 +fastboot flash devcfg_a devcfg.img || exit /B 1 +fastboot flash devcfg_b devcfg.img || exit /B 1 +fastboot flash storsec_a storsec.img || exit /B 1 +fastboot flash storsec_b storsec.img || exit /B 1 +fastboot flash prov_a prov.img || exit /B 1 +fastboot flash prov_b prov.img || exit /B 1 +fastboot flash rpm_a rpm.img || exit /B 1 +fastboot flash rpm_b rpm.img || exit /B 1 +fastboot flash abl_a abl.img || exit /B 1 +fastboot flash abl_b abl.img || exit /B 1 +fastboot flash uefisecapp_a uefisecapp.img || exit /B 1 +fastboot flash uefisecapp_b uefisecapp.img || exit /B 1 +fastboot flash qupfw_a qupfw.img || exit /B 1 +fastboot flash qupfw_b qupfw.img || exit /B 1 +fastboot flash xbl_config_a xbl_config.img || exit /B 1 +fastboot flash xbl_config_b xbl_config.img || exit /B 1 +fastboot flash xbl_a xbl.img || exit /B 1 +fastboot flash xbl_b xbl.img || exit /B 1 + +fastboot flash modem_a modem.img || exit /B 1 +fastboot flash modem_b modem.img || exit /B 1 +fastboot flash fsg_a fsg.img || exit /B 1 +fastboot flash fsg_b fsg.img || exit /B 1 + +fastboot flash bluetooth_a bluetooth.img || exit /B 1 +fastboot flash bluetooth_b bluetooth.img || exit /B 1 +fastboot flash dsp_a dsp.img || exit /B 1 +fastboot flash dsp_b dsp.img || exit /B 1 +fastboot flash logo_a logo.img || exit /B 1 +fastboot flash logo_b logo.img || exit /B 1 + +fastboot erase ddr || exit /B 1 + +fastboot oem fb_mode_clear || exit /B 1 + +fastboot --set-active=a reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-devon-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/devon/flash-all.sh b/factory/devon/flash-all.sh new file mode 100755 index 00000000..901ba873 --- /dev/null +++ b/factory/devon/flash-all.sh @@ -0,0 +1,86 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: devon$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot oem fb_mode_set + +fastboot flash partition partition.img + +fastboot flash keymaster_a keymaster.img +fastboot flash keymaster_b keymaster.img +fastboot flash hyp_a hyp.img +fastboot flash hyp_b hyp.img +fastboot flash tz_a tz.img +fastboot flash tz_b tz.img +fastboot flash devcfg_a devcfg.img +fastboot flash devcfg_b devcfg.img +fastboot flash storsec_a storsec.img +fastboot flash storsec_b storsec.img +fastboot flash prov_a prov.img +fastboot flash prov_b prov.img +fastboot flash rpm_a rpm.img +fastboot flash rpm_b rpm.img +fastboot flash abl_a abl.img +fastboot flash abl_b abl.img +fastboot flash uefisecapp_a uefisecapp.img +fastboot flash uefisecapp_b uefisecapp.img +fastboot flash qupfw_a qupfw.img +fastboot flash qupfw_b qupfw.img +fastboot flash xbl_config_a xbl_config.img +fastboot flash xbl_config_b xbl_config.img +fastboot flash xbl_a xbl.img +fastboot flash xbl_b xbl.img + +fastboot flash modem_a modem.img +fastboot flash modem_b modem.img +fastboot flash fsg_a fsg.img +fastboot flash fsg_b fsg.img + +fastboot flash bluetooth_a bluetooth.img +fastboot flash bluetooth_b bluetooth.img +fastboot flash dsp_a dsp.img +fastboot flash dsp_b dsp.img +fastboot flash logo_a logo.img +fastboot flash logo_b logo.img + +fastboot erase ddr + +fastboot oem fb_mode_clear + +fastboot --set-active=a reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-devon-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/devon/flash-base.sh b/factory/devon/flash-base.sh new file mode 100755 index 00000000..f8283ca4 --- /dev/null +++ b/factory/devon/flash-base.sh @@ -0,0 +1,83 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: devon$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot oem fb_mode_set + +fastboot flash partition partition.img + +fastboot flash keymaster_a keymaster.img +fastboot flash keymaster_b keymaster.img +fastboot flash hyp_a hyp.img +fastboot flash hyp_b hyp.img +fastboot flash tz_a tz.img +fastboot flash tz_b tz.img +fastboot flash devcfg_a devcfg.img +fastboot flash devcfg_b devcfg.img +fastboot flash storsec_a storsec.img +fastboot flash storsec_b storsec.img +fastboot flash prov_a prov.img +fastboot flash prov_b prov.img +fastboot flash rpm_a rpm.img +fastboot flash rpm_b rpm.img +fastboot flash abl_a abl.img +fastboot flash abl_b abl.img +fastboot flash uefisecapp_a uefisecapp.img +fastboot flash uefisecapp_b uefisecapp.img +fastboot flash qupfw_a qupfw.img +fastboot flash qupfw_b qupfw.img +fastboot flash xbl_config_a xbl_config.img +fastboot flash xbl_config_b xbl_config.img +fastboot flash xbl_a xbl.img +fastboot flash xbl_b xbl.img + +fastboot flash modem_a modem.img +fastboot flash modem_b modem.img +fastboot flash fsg_a fsg.img +fastboot flash fsg_b fsg.img + +fastboot flash bluetooth_a bluetooth.img +fastboot flash bluetooth_b bluetooth.img +fastboot flash dsp_a dsp.img +fastboot flash dsp_b dsp.img +fastboot flash logo_a logo.img +fastboot flash logo_b logo.img + +fastboot erase ddr + +fastboot oem fb_mode_clear + +fastboot --set-active=a reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/felix/flash-all.bat b/factory/felix/flash-all.bat new file mode 100644 index 00000000..7df3cbf6 --- /dev/null +++ b/factory/felix/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: felix" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: felix" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-felix-felix-14.5-11707788.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-felix-felix-14.5-11707788.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-felix-g5300q-240308-240517-B-11857457.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-felix-g5300q-240308-240517-B-11857457.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-felix-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/felix/flash-all.sh b/factory/felix/flash-all.sh new file mode 100755 index 00000000..5885f1bd --- /dev/null +++ b/factory/felix/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: felix$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-felix-felix-14.5-11707788.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-felix-felix-14.5-11707788.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-felix-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-felix-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-felix-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/felix/flash-base.sh b/factory/felix/flash-base.sh new file mode 100755 index 00000000..240f728a --- /dev/null +++ b/factory/felix/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: felix$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-felix-felix-14.5-11707788.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-felix-felix-14.5-11707788.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-felix-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-felix-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/flame/flash-all.bat b/factory/flame/flash-all.bat new file mode 100644 index 00000000..8a216a13 --- /dev/null +++ b/factory/flame/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: flame" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: flame" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-flame-c2f2-0.5-8906123.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-flame-c2f2-0.5-8906123.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-flame-g8150-00123-220708-B-8810441.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-flame-g8150-00123-220708-B-8810441.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-flame-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/flame/flash-all.sh b/factory/flame/flash-all.sh new file mode 100755 index 00000000..0d704e51 --- /dev/null +++ b/factory/flame/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: flame$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-flame-c2f2-0.5-8906123.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-flame-c2f2-0.5-8906123.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-flame-g8150-00123-220708-B-8810441.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-flame-g8150-00123-220708-B-8810441.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-flame-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/flame/flash-base.sh b/factory/flame/flash-base.sh new file mode 100755 index 00000000..d41e12b6 --- /dev/null +++ b/factory/flame/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: flame$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-flame-c2f2-0.5-8906123.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-flame-c2f2-0.5-8906123.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-flame-g8150-00123-220708-B-8810441.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-flame-g8150-00123-220708-B-8810441.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/hawao/flash-all.bat b/factory/hawao/flash-all.bat new file mode 100644 index 00000000..088893f0 --- /dev/null +++ b/factory/hawao/flash-all.bat @@ -0,0 +1,77 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: hawao" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: hawao" || exit /B 1 +fastboot oem fb_mode_set || exit /B 1 + +fastboot flash partition partition.img || exit /B 1 + +fastboot flash keymaster_a keymaster.img || exit /B 1 +fastboot flash keymaster_b keymaster.img || exit /B 1 +fastboot flash hyp_a hyp.img || exit /B 1 +fastboot flash hyp_b hyp.img || exit /B 1 +fastboot flash tz_a tz.img || exit /B 1 +fastboot flash tz_b tz.img || exit /B 1 +fastboot flash devcfg_a devcfg.img || exit /B 1 +fastboot flash devcfg_b devcfg.img || exit /B 1 +fastboot flash storsec_a storsec.img || exit /B 1 +fastboot flash storsec_b storsec.img || exit /B 1 +fastboot flash prov_a prov.img || exit /B 1 +fastboot flash prov_b prov.img || exit /B 1 +fastboot flash rpm_a rpm.img || exit /B 1 +fastboot flash rpm_b rpm.img || exit /B 1 +fastboot flash abl_a abl.img || exit /B 1 +fastboot flash abl_b abl.img || exit /B 1 +fastboot flash uefisecapp_a uefisecapp.img || exit /B 1 +fastboot flash uefisecapp_b uefisecapp.img || exit /B 1 +fastboot flash qupfw_a qupfw.img || exit /B 1 +fastboot flash qupfw_b qupfw.img || exit /B 1 +fastboot flash xbl_config_a xbl_config.img || exit /B 1 +fastboot flash xbl_config_b xbl_config.img || exit /B 1 +fastboot flash xbl_a xbl.img || exit /B 1 +fastboot flash xbl_b xbl.img || exit /B 1 + +fastboot flash modem_a modem.img || exit /B 1 +fastboot flash modem_b modem.img || exit /B 1 +fastboot flash fsg_a fsg.img || exit /B 1 +fastboot flash fsg_b fsg.img || exit /B 1 + +fastboot flash bluetooth_a bluetooth.img || exit /B 1 +fastboot flash bluetooth_b bluetooth.img || exit /B 1 +fastboot flash dsp_a dsp.img || exit /B 1 +fastboot flash dsp_b dsp.img || exit /B 1 +fastboot flash logo_a logo.img || exit /B 1 +fastboot flash logo_b logo.img || exit /B 1 + +fastboot erase ddr || exit /B 1 + +fastboot oem fb_mode_clear || exit /B 1 + +fastboot --set-active=a reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-hawao-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/hawao/flash-all.sh b/factory/hawao/flash-all.sh new file mode 100755 index 00000000..2f6e3681 --- /dev/null +++ b/factory/hawao/flash-all.sh @@ -0,0 +1,86 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: hawao$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot oem fb_mode_set + +fastboot flash partition partition.img + +fastboot flash keymaster_a keymaster.img +fastboot flash keymaster_b keymaster.img +fastboot flash hyp_a hyp.img +fastboot flash hyp_b hyp.img +fastboot flash tz_a tz.img +fastboot flash tz_b tz.img +fastboot flash devcfg_a devcfg.img +fastboot flash devcfg_b devcfg.img +fastboot flash storsec_a storsec.img +fastboot flash storsec_b storsec.img +fastboot flash prov_a prov.img +fastboot flash prov_b prov.img +fastboot flash rpm_a rpm.img +fastboot flash rpm_b rpm.img +fastboot flash abl_a abl.img +fastboot flash abl_b abl.img +fastboot flash uefisecapp_a uefisecapp.img +fastboot flash uefisecapp_b uefisecapp.img +fastboot flash qupfw_a qupfw.img +fastboot flash qupfw_b qupfw.img +fastboot flash xbl_config_a xbl_config.img +fastboot flash xbl_config_b xbl_config.img +fastboot flash xbl_a xbl.img +fastboot flash xbl_b xbl.img + +fastboot flash modem_a modem.img +fastboot flash modem_b modem.img +fastboot flash fsg_a fsg.img +fastboot flash fsg_b fsg.img + +fastboot flash bluetooth_a bluetooth.img +fastboot flash bluetooth_b bluetooth.img +fastboot flash dsp_a dsp.img +fastboot flash dsp_b dsp.img +fastboot flash logo_a logo.img +fastboot flash logo_b logo.img + +fastboot erase ddr + +fastboot oem fb_mode_clear + +fastboot --set-active=a reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-hawao-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/hawao/flash-base.sh b/factory/hawao/flash-base.sh new file mode 100755 index 00000000..90b94871 --- /dev/null +++ b/factory/hawao/flash-base.sh @@ -0,0 +1,83 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: hawao$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot oem fb_mode_set + +fastboot flash partition partition.img + +fastboot flash keymaster_a keymaster.img +fastboot flash keymaster_b keymaster.img +fastboot flash hyp_a hyp.img +fastboot flash hyp_b hyp.img +fastboot flash tz_a tz.img +fastboot flash tz_b tz.img +fastboot flash devcfg_a devcfg.img +fastboot flash devcfg_b devcfg.img +fastboot flash storsec_a storsec.img +fastboot flash storsec_b storsec.img +fastboot flash prov_a prov.img +fastboot flash prov_b prov.img +fastboot flash rpm_a rpm.img +fastboot flash rpm_b rpm.img +fastboot flash abl_a abl.img +fastboot flash abl_b abl.img +fastboot flash uefisecapp_a uefisecapp.img +fastboot flash uefisecapp_b uefisecapp.img +fastboot flash qupfw_a qupfw.img +fastboot flash qupfw_b qupfw.img +fastboot flash xbl_config_a xbl_config.img +fastboot flash xbl_config_b xbl_config.img +fastboot flash xbl_a xbl.img +fastboot flash xbl_b xbl.img + +fastboot flash modem_a modem.img +fastboot flash modem_b modem.img +fastboot flash fsg_a fsg.img +fastboot flash fsg_b fsg.img + +fastboot flash bluetooth_a bluetooth.img +fastboot flash bluetooth_b bluetooth.img +fastboot flash dsp_a dsp.img +fastboot flash dsp_b dsp.img +fastboot flash logo_a logo.img +fastboot flash logo_b logo.img + +fastboot erase ddr + +fastboot oem fb_mode_clear + +fastboot --set-active=a reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/husky/flash-all.bat b/factory/husky/flash-all.bat new file mode 100644 index 00000000..45c21e01 --- /dev/null +++ b/factory/husky/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: husky" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: husky" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-husky-ripcurrent-14.5-11693900.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-husky-ripcurrent-14.5-11693900.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-husky-g5300i-240308-240517-B-11857457.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-husky-g5300i-240308-240517-B-11857457.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-husky-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/husky/flash-all.sh b/factory/husky/flash-all.sh new file mode 100755 index 00000000..dabbf310 --- /dev/null +++ b/factory/husky/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: husky$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-husky-ripcurrent-14.5-11693900.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-husky-ripcurrent-14.5-11693900.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-husky-g5300i-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-husky-g5300i-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-husky-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/husky/flash-base.sh b/factory/husky/flash-base.sh new file mode 100755 index 00000000..6b6db15d --- /dev/null +++ b/factory/husky/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: husky$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-husky-ripcurrent-14.5-11693900.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-husky-ripcurrent-14.5-11693900.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-husky-g5300i-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-husky-g5300i-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/lynx/flash-all.bat b/factory/lynx/flash-all.bat new file mode 100644 index 00000000..4ea91730 --- /dev/null +++ b/factory/lynx/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: lynx" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: lynx" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-lynx-lynx-14.5-11677884.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-lynx-lynx-14.5-11677884.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-lynx-g5300q-240308-240517-B-11857457.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-lynx-g5300q-240308-240517-B-11857457.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-lynx-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/lynx/flash-all.sh b/factory/lynx/flash-all.sh new file mode 100755 index 00000000..86388f34 --- /dev/null +++ b/factory/lynx/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: lynx$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-lynx-lynx-14.5-11677884.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-lynx-lynx-14.5-11677884.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-lynx-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-lynx-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-lynx-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/lynx/flash-base.sh b/factory/lynx/flash-base.sh new file mode 100755 index 00000000..2ec686a7 --- /dev/null +++ b/factory/lynx/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: lynx$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-lynx-lynx-14.5-11677884.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-lynx-lynx-14.5-11677884.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-lynx-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-lynx-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/oriole/flash-all.bat b/factory/oriole/flash-all.bat new file mode 100644 index 00000000..cb7006e7 --- /dev/null +++ b/factory/oriole/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: oriole" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: oriole" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-oriole-slider-14.5-11677881.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-oriole-slider-14.5-11677881.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-oriole-g5123b-135085-240517-B-11857288.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-oriole-g5123b-135085-240517-B-11857288.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-oriole-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/oriole/flash-all.sh b/factory/oriole/flash-all.sh new file mode 100755 index 00000000..d6fda475 --- /dev/null +++ b/factory/oriole/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: oriole$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-oriole-slider-14.5-11677881.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-oriole-slider-14.5-11677881.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-oriole-g5123b-135085-240517-B-11857288.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-oriole-g5123b-135085-240517-B-11857288.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-oriole-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/oriole/flash-base.sh b/factory/oriole/flash-base.sh new file mode 100755 index 00000000..72a87c13 --- /dev/null +++ b/factory/oriole/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: oriole$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-oriole-slider-14.5-11677881.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-oriole-slider-14.5-11677881.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-oriole-g5123b-135085-240517-B-11857288.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-oriole-g5123b-135085-240517-B-11857288.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/panther/flash-all.bat b/factory/panther/flash-all.bat new file mode 100644 index 00000000..8f7ad5a3 --- /dev/null +++ b/factory/panther/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: panther" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: panther" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-panther-cloudripper-14.5-11677884.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-panther-cloudripper-14.5-11677884.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-panther-g5300q-240308-240517-B-11857457.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-panther-g5300q-240308-240517-B-11857457.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-panther-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/panther/flash-all.sh b/factory/panther/flash-all.sh new file mode 100755 index 00000000..2efb0ada --- /dev/null +++ b/factory/panther/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: panther$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-panther-cloudripper-14.5-11677884.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-panther-cloudripper-14.5-11677884.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-panther-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-panther-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-panther-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/panther/flash-base.sh b/factory/panther/flash-base.sh new file mode 100755 index 00000000..64c27301 --- /dev/null +++ b/factory/panther/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: panther$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-panther-cloudripper-14.5-11677884.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-panther-cloudripper-14.5-11677884.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-panther-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-panther-g5300q-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/raven/flash-all.bat b/factory/raven/flash-all.bat new file mode 100644 index 00000000..a0ee0750 --- /dev/null +++ b/factory/raven/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: raven" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: raven" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-raven-slider-14.5-11677881.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-raven-slider-14.5-11677881.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-raven-g5123b-135085-240517-B-11857288.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-raven-g5123b-135085-240517-B-11857288.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-raven-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/raven/flash-all.sh b/factory/raven/flash-all.sh new file mode 100755 index 00000000..f840c76c --- /dev/null +++ b/factory/raven/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: raven$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-raven-slider-14.5-11677881.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-raven-slider-14.5-11677881.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-raven-g5123b-135085-240517-B-11857288.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-raven-g5123b-135085-240517-B-11857288.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-raven-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/raven/flash-base.sh b/factory/raven/flash-base.sh new file mode 100755 index 00000000..086120cd --- /dev/null +++ b/factory/raven/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: raven$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-raven-slider-14.5-11677881.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-raven-slider-14.5-11677881.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-raven-g5123b-135085-240517-B-11857288.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-raven-g5123b-135085-240517-B-11857288.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/redfin/flash-all.bat b/factory/redfin/flash-all.bat new file mode 100644 index 00000000..b74ba358 --- /dev/null +++ b/factory/redfin/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: redfin" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: redfin" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-redfin-r3-0.6-10489834.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-redfin-r3-0.6-10489834.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-redfin-g7250-00264-230619-B-10346159.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-redfin-g7250-00264-230619-B-10346159.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-redfin-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/redfin/flash-all.sh b/factory/redfin/flash-all.sh new file mode 100755 index 00000000..9fb482ce --- /dev/null +++ b/factory/redfin/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: redfin$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-redfin-r3-0.6-10489834.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-redfin-r3-0.6-10489834.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-redfin-g7250-00264-230619-B-10346159.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-redfin-g7250-00264-230619-B-10346159.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-redfin-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/redfin/flash-base.sh b/factory/redfin/flash-base.sh new file mode 100755 index 00000000..d79ff2dd --- /dev/null +++ b/factory/redfin/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: redfin$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-redfin-r3-0.6-10489834.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-redfin-r3-0.6-10489834.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-redfin-g7250-00264-230619-B-10346159.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-redfin-g7250-00264-230619-B-10346159.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/rhode/flash-all.bat b/factory/rhode/flash-all.bat new file mode 100644 index 00000000..8101d213 --- /dev/null +++ b/factory/rhode/flash-all.bat @@ -0,0 +1,77 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: rhode" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: rhode" || exit /B 1 +fastboot oem fb_mode_set || exit /B 1 + +fastboot flash partition partition.img || exit /B 1 + +fastboot flash keymaster_a keymaster.img || exit /B 1 +fastboot flash keymaster_b keymaster.img || exit /B 1 +fastboot flash hyp_a hyp.img || exit /B 1 +fastboot flash hyp_b hyp.img || exit /B 1 +fastboot flash tz_a tz.img || exit /B 1 +fastboot flash tz_b tz.img || exit /B 1 +fastboot flash devcfg_a devcfg.img || exit /B 1 +fastboot flash devcfg_b devcfg.img || exit /B 1 +fastboot flash storsec_a storsec.img || exit /B 1 +fastboot flash storsec_b storsec.img || exit /B 1 +fastboot flash prov_a prov.img || exit /B 1 +fastboot flash prov_b prov.img || exit /B 1 +fastboot flash rpm_a rpm.img || exit /B 1 +fastboot flash rpm_b rpm.img || exit /B 1 +fastboot flash abl_a abl.img || exit /B 1 +fastboot flash abl_b abl.img || exit /B 1 +fastboot flash uefisecapp_a uefisecapp.img || exit /B 1 +fastboot flash uefisecapp_b uefisecapp.img || exit /B 1 +fastboot flash qupfw_a qupfw.img || exit /B 1 +fastboot flash qupfw_b qupfw.img || exit /B 1 +fastboot flash xbl_config_a xbl_config.img || exit /B 1 +fastboot flash xbl_config_b xbl_config.img || exit /B 1 +fastboot flash xbl_a xbl.img || exit /B 1 +fastboot flash xbl_b xbl.img || exit /B 1 + +fastboot flash modem_a modem.img || exit /B 1 +fastboot flash modem_b modem.img || exit /B 1 +fastboot flash fsg_a fsg.img || exit /B 1 +fastboot flash fsg_b fsg.img || exit /B 1 + +fastboot flash bluetooth_a bluetooth.img || exit /B 1 +fastboot flash bluetooth_b bluetooth.img || exit /B 1 +fastboot flash dsp_a dsp.img || exit /B 1 +fastboot flash dsp_b dsp.img || exit /B 1 +fastboot flash logo_a logo.img || exit /B 1 +fastboot flash logo_b logo.img || exit /B 1 + +fastboot erase ddr || exit /B 1 + +fastboot oem fb_mode_clear || exit /B 1 + +fastboot --set-active=a reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-rhode-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/rhode/flash-all.sh b/factory/rhode/flash-all.sh new file mode 100755 index 00000000..7e1cc815 --- /dev/null +++ b/factory/rhode/flash-all.sh @@ -0,0 +1,86 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: rhode$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot oem fb_mode_set + +fastboot flash partition partition.img + +fastboot flash keymaster_a keymaster.img +fastboot flash keymaster_b keymaster.img +fastboot flash hyp_a hyp.img +fastboot flash hyp_b hyp.img +fastboot flash tz_a tz.img +fastboot flash tz_b tz.img +fastboot flash devcfg_a devcfg.img +fastboot flash devcfg_b devcfg.img +fastboot flash storsec_a storsec.img +fastboot flash storsec_b storsec.img +fastboot flash prov_a prov.img +fastboot flash prov_b prov.img +fastboot flash rpm_a rpm.img +fastboot flash rpm_b rpm.img +fastboot flash abl_a abl.img +fastboot flash abl_b abl.img +fastboot flash uefisecapp_a uefisecapp.img +fastboot flash uefisecapp_b uefisecapp.img +fastboot flash qupfw_a qupfw.img +fastboot flash qupfw_b qupfw.img +fastboot flash xbl_config_a xbl_config.img +fastboot flash xbl_config_b xbl_config.img +fastboot flash xbl_a xbl.img +fastboot flash xbl_b xbl.img + +fastboot flash modem_a modem.img +fastboot flash modem_b modem.img +fastboot flash fsg_a fsg.img +fastboot flash fsg_b fsg.img + +fastboot flash bluetooth_a bluetooth.img +fastboot flash bluetooth_b bluetooth.img +fastboot flash dsp_a dsp.img +fastboot flash dsp_b dsp.img +fastboot flash logo_a logo.img +fastboot flash logo_b logo.img + +fastboot erase ddr + +fastboot oem fb_mode_clear + +fastboot --set-active=a reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-rhode-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/rhode/flash-base.sh b/factory/rhode/flash-base.sh new file mode 100755 index 00000000..2e14cce7 --- /dev/null +++ b/factory/rhode/flash-base.sh @@ -0,0 +1,83 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: rhode$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot oem fb_mode_set + +fastboot flash partition partition.img + +fastboot flash keymaster_a keymaster.img +fastboot flash keymaster_b keymaster.img +fastboot flash hyp_a hyp.img +fastboot flash hyp_b hyp.img +fastboot flash tz_a tz.img +fastboot flash tz_b tz.img +fastboot flash devcfg_a devcfg.img +fastboot flash devcfg_b devcfg.img +fastboot flash storsec_a storsec.img +fastboot flash storsec_b storsec.img +fastboot flash prov_a prov.img +fastboot flash prov_b prov.img +fastboot flash rpm_a rpm.img +fastboot flash rpm_b rpm.img +fastboot flash abl_a abl.img +fastboot flash abl_b abl.img +fastboot flash uefisecapp_a uefisecapp.img +fastboot flash uefisecapp_b uefisecapp.img +fastboot flash qupfw_a qupfw.img +fastboot flash qupfw_b qupfw.img +fastboot flash xbl_config_a xbl_config.img +fastboot flash xbl_config_b xbl_config.img +fastboot flash xbl_a xbl.img +fastboot flash xbl_b xbl.img + +fastboot flash modem_a modem.img +fastboot flash modem_b modem.img +fastboot flash fsg_a fsg.img +fastboot flash fsg_b fsg.img + +fastboot flash bluetooth_a bluetooth.img +fastboot flash bluetooth_b bluetooth.img +fastboot flash dsp_a dsp.img +fastboot flash dsp_b dsp.img +fastboot flash logo_a logo.img +fastboot flash logo_b logo.img + +fastboot erase ddr + +fastboot oem fb_mode_clear + +fastboot --set-active=a reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/sargo/flash-all.bat b/factory/sargo/flash-all.bat new file mode 100644 index 00000000..8310a111 --- /dev/null +++ b/factory/sargo/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: sargo" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: sargo" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-sargo-b4s4-0.4-8048689.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-sargo-b4s4-0.4-8048689.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-sargo-g670-00145-220106-B-8048689.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-sargo-g670-00145-220106-B-8048689.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-sargo-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/sargo/flash-all.sh b/factory/sargo/flash-all.sh new file mode 100755 index 00000000..1f660773 --- /dev/null +++ b/factory/sargo/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: sargo$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-sargo-b4s4-0.4-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-sargo-b4s4-0.4-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-sargo-g670-00145-220106-B-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-sargo-g670-00145-220106-B-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-sargo-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/sargo/flash-base.sh b/factory/sargo/flash-base.sh new file mode 100755 index 00000000..a05a2c36 --- /dev/null +++ b/factory/sargo/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: sargo$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-sargo-b4s4-0.4-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-sargo-b4s4-0.4-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-sargo-g670-00145-220106-B-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-sargo-g670-00145-220106-B-8048689.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/shiba/flash-all.bat b/factory/shiba/flash-all.bat new file mode 100644 index 00000000..f65f9bca --- /dev/null +++ b/factory/shiba/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: shiba" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: shiba" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-shiba-ripcurrent-14.5-11693900.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-shiba-ripcurrent-14.5-11693900.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-shiba-g5300i-240308-240517-B-11857457.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-shiba-g5300i-240308-240517-B-11857457.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-shiba-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/shiba/flash-all.sh b/factory/shiba/flash-all.sh new file mode 100755 index 00000000..fba73647 --- /dev/null +++ b/factory/shiba/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: shiba$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-shiba-ripcurrent-14.5-11693900.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-shiba-ripcurrent-14.5-11693900.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-shiba-g5300i-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-shiba-g5300i-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-shiba-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/shiba/flash-base.sh b/factory/shiba/flash-base.sh new file mode 100755 index 00000000..525a974e --- /dev/null +++ b/factory/shiba/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: shiba$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-shiba-ripcurrent-14.5-11693900.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-shiba-ripcurrent-14.5-11693900.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-shiba-g5300i-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-shiba-g5300i-240308-240517-B-11857457.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/sunfish/flash-all.bat b/factory/sunfish/flash-all.bat new file mode 100644 index 00000000..2ac0820a --- /dev/null +++ b/factory/sunfish/flash-all.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: sunfish" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: sunfish" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-sunfish-s5-0.5-10252351.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-sunfish-s5-0.5-10252351.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-sunfish-g7150-00112-230505-B-10075601.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other radio radio-sunfish-g7150-00112-230505-B-10075601.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-sunfish-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/sunfish/flash-all.sh b/factory/sunfish/flash-all.sh new file mode 100755 index 00000000..e83c81cf --- /dev/null +++ b/factory/sunfish/flash-all.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: sunfish$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-sunfish-s5-0.5-10252351.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-sunfish-s5-0.5-10252351.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-sunfish-g7150-00112-230505-B-10075601.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-sunfish-g7150-00112-230505-B-10075601.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-sunfish-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/sunfish/flash-base.sh b/factory/sunfish/flash-base.sh new file mode 100755 index 00000000..0a0257e0 --- /dev/null +++ b/factory/sunfish/flash-base.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: sunfish$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-sunfish-s5-0.5-10252351.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-sunfish-s5-0.5-10252351.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-sunfish-g7150-00112-230505-B-10075601.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-sunfish-g7150-00112-230505-B-10075601.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/factory/tangorpro/flash-all.bat b/factory/tangorpro/flash-all.bat new file mode 100644 index 00000000..406a3eac --- /dev/null +++ b/factory/tangorpro/flash-all.bat @@ -0,0 +1,36 @@ +@ECHO OFF + +:: Copyright 2012 The Android Open Source Project +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +if "%DEVICE_FLASHER_VERSION%"=="" choice /M "Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway." +if not %ERRORLEVEL%==1 if "%DEVICE_FLASHER_VERSION%"=="" exit /B 1 +PATH=%PATH%;"%SYSTEMROOT%\System32" +fastboot getvar product 2>&1 | findstr /r /c:"^product: tangorpro" || echo "Factory image and device do not match. Please double check" +fastboot getvar product 2>&1 | findstr /r /c:"^product: tangorpro" || exit /B 1 +fastboot flash --slot=other bootloader bootloader-tangorpro-tangorpro-14.5-11707788.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot flash --slot=other bootloader bootloader-tangorpro-tangorpro-14.5-11707788.img || exit /B 1 +fastboot --set-active=other reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul +fastboot erase avb_custom_key || exit /B 1 +fastboot flash avb_custom_key avb_custom_key.img || exit /B 1 +fastboot --skip-reboot -w update image-tangorpro-ap2a.240605.024.zip || exit /B 1 +fastboot reboot-bootloader || exit /B 1 +ping -n 5 127.0.0.1 >nul + +echo Press any key to exit... +pause >nul +exit diff --git a/factory/tangorpro/flash-all.sh b/factory/tangorpro/flash-all.sh new file mode 100755 index 00000000..150677e5 --- /dev/null +++ b/factory/tangorpro/flash-all.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: tangorpro$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-tangorpro-tangorpro-14.5-11707788.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-tangorpro-tangorpro-14.5-11707788.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img +fastboot --skip-reboot -w update image-tangorpro-ap2a.240605.024.zip +fastboot reboot-bootloader +sleep 5 diff --git a/factory/tangorpro/flash-base.sh b/factory/tangorpro/flash-base.sh new file mode 100755 index 00000000..bdbd58e7 --- /dev/null +++ b/factory/tangorpro/flash-base.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +# Copyright 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu + +if test -z "${DEVICE_FLASHER_VERSION:-}"; then + printf 'Use device-flasher to flash your device properly! See install guide at https://calyxos.org for more info. Enter Y to continue anyway. ' + read answer + if [ "$answer" != "Y" ]; then + exit 1 + fi +fi +fastboot_version="$("$(which fastboot)" --version | grep "^fastboot version" | cut -c18-23 | sed 's/\.//g' )" +if ! [ "${fastboot_version:-0}" -ge 3301 ]; then + echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" + exit 1 +fi +if ! fastboot getvar product 2>&1 | grep "^product: tangorpro$"; then + echo "Factory image and device do not match. Please double check" + exit 1 +fi +fastboot flash --slot=other bootloader bootloader-tangorpro-tangorpro-14.5-11707788.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-tangorpro-tangorpro-14.5-11707788.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot erase avb_custom_key +fastboot flash avb_custom_key avb_custom_key.img diff --git a/fairphone/common b/fairphone/common new file mode 100644 index 00000000..a447b7f9 --- /dev/null +++ b/fairphone/common @@ -0,0 +1,6 @@ +### CONSTANTS ### +readonly vars_path="${script_path}/../vars" +readonly top="${script_path}/../../.." + +readonly work_dir="${WORK_DIR:-/tmp/fairphone}" +readonly device="${1}" diff --git a/fairphone/device.sh b/fairphone/device.sh new file mode 100755 index 00000000..96962403 --- /dev/null +++ b/fairphone/device.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +# SPDX-FileCopyrightText: 2022-2024 The Calyx Institute +# +# SPDX-License-Identifier: Apache-2.0 + +# +# device: +# +# Do it all for one device +# +# +############################################################################## + + +### SET ### + +# use bash strict mode +set -euo pipefail + +### TRAPS ### + +# trap signals for clean exit +trap 'exit $?' EXIT +trap 'error_m interrupted!' SIGINT + +readonly script_path="$(dirname "$(realpath "$0")")" +source "${script_path}/common" + +## HELP MESSAGE (USAGE INFO) +# TODO + +### FUNCTIONS ### + +device() { + source "${vars_path}/${device}" + local factory_dir="${work_dir}/${device}/${build_id}/factory" + + "${script_path}/download.sh" "${device}" + "${script_path}/extract-factory-image.sh" "${device}" + + pushd "${top}" + device/fairphone/${device}/extract-files.sh "${factory_dir}/images" + popd +} + +# error message +# ARG1: error message for STDERR +# ARG2: error status +error_m() { + echo "ERROR: ${1:-'failed.'}" 1>&2 + return "${2:-1}" +} + +# print help message. +help_message() { + echo "${help_message:-'No help available.'}" +} + +main() { + if [[ $# -eq 1 ]] ; then + device + else + error_m + fi +} + +### RUN PROGRAM ### + +main "${@}" + + +## diff --git a/fairphone/download.sh b/fairphone/download.sh new file mode 100755 index 00000000..a66edbdb --- /dev/null +++ b/fairphone/download.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +# SPDX-FileCopyrightText: 2024 The Calyx Institute +# +# SPDX-License-Identifier: Apache-2.0 + +# +# download: +# +# Download Fairphone factory images +# +# +############################################################################## + + +### SET ### + +# use bash strict mode +set -euo pipefail + + +### TRAPS ### + +# trap signals for clean exit +trap 'exit $?' EXIT +trap 'error_m interrupted!' SIGINT + +readonly script_path="$(dirname "$(realpath "$0")")" +source "${script_path}/common" +source "${vars_path}/${device}" + +## HELP MESSAGE (USAGE INFO) +# TODO + +### FUNCTIONS ### + +download_factory_image() { + local factory_dir="${work_dir}/${device}/${build_id}" + mkdir -p "${factory_dir}" + local output="${factory_dir}/$(basename ${image_url})" + curl --http1.1 -C - -L -o "${output}" "${image_url}" + echo "${image_sha256} ${output}" | sha256sum --check --status +} + +# error message +# ARG1: error message for STDERR +# ARG2: error status +error_m() { + echo "ERROR: ${1:-'failed.'}" 1>&2 + return "${2:-1}" +} + +# print help message. +help_message() { + echo "${help_message:-'No help available.'}" +} + +main() { + download_factory_image +} + +### RUN PROGRAM ### + +main "${@}" + + +## diff --git a/pixel/extract-factory-image.sh b/fairphone/extract-factory-image.sh similarity index 73% rename from pixel/extract-factory-image.sh rename to fairphone/extract-factory-image.sh index 275619f4..7a77f6c1 100755 --- a/pixel/extract-factory-image.sh +++ b/fairphone/extract-factory-image.sh @@ -1,13 +1,13 @@ #!/bin/bash -# SPDX-FileCopyrightText: 2022 The Calyx Institute +# SPDX-FileCopyrightText: 2022-2024 The Calyx Institute # # SPDX-License-Identifier: Apache-2.0 # -# extract: +# extract-factory-image: # -# Extract Pixel factory images +# Extract Fairphone factory images # # ############################################################################## @@ -25,15 +25,8 @@ set -euo pipefail trap 'exit $?' EXIT trap 'error_m interrupted!' SIGINT -### CONSTANTS ### -readonly script_path="$(cd "$(dirname "$0")";pwd -P)" -readonly vars_path="${script_path}/../vars" - -readonly work_dir="${WORK_DIR:-/tmp/pixel}" - -source "${vars_path}/pixels" - -readonly device="${1}" +readonly script_path="$(dirname "$(realpath "$0")")" +source "${script_path}/common" source "${vars_path}/${device}" ## HELP MESSAGE (USAGE INFO) @@ -52,9 +45,6 @@ extract_factory_image() { echo "${image_sha256} ${factory_zip}" | sha256sum --check --status pushd "${factory_dir}" unzip -o "${factory_zip}" - pushd ${device}-${build_id,,} - unzip -o "image-${device}-${build_id,,}.zip" -d "image" - popd popd } diff --git a/fbpacktool/fbpack.py b/fbpacktool/fbpack.py index 5fc7cc99..3afccd69 100644 --- a/fbpacktool/fbpack.py +++ b/fbpacktool/fbpack.py @@ -19,6 +19,7 @@ FBPACK_MAGIC = 0x4b504246 # "FBPK" FastBook PacK FBPACK_VERSION = 2 +FBPACK_VERSION_V1 = 1 FBPACK_DEFAULT_DATA_ALIGN = 16 FBPACK_PARTITION_TABLE = 0 @@ -26,6 +27,20 @@ FBPACK_SIDELOAD_DATA = 2 +class CommonPackHeader(packedstruct.PackedStruct): + magic: int + version: int + _FIELDS = collections.OrderedDict([ + ('magic', 'I'), + ('version', 'I'), + ]) + + def __init__(self, + magic=FBPACK_MAGIC, + version=FBPACK_VERSION_V1): + super().__init__(magic, version) + + class PackEntry(packedstruct.PackedStruct): """Pack entry info.""" @@ -103,3 +118,56 @@ def __init__(self, total_entries, total_size) # update header size once we know all fields self.header_size = len(self) + + +class PackHeaderV1(packedstruct.PackedStruct): + magic: int + version: int + img_version: str + total_entries: int + total_size: int + _FIELDS = collections.OrderedDict([ + ('magic', 'I'), + ('version', 'I'), + ('img_version', '68s'), + ('total_entries', 'I'), + ('total_size', 'I'), + ]) + + def __init__(self, + magic=FBPACK_MAGIC, + version=FBPACK_VERSION_V1, + img_version=b'', + total_entries=0, + total_size=0): + super().__init__(magic, version, img_version, total_entries, total_size) + +class PackEntryV1(packedstruct.PackedStruct): + type: int + name: str + size_h: int + size: int + next_offset_h: int + next_offset: int + crc32: int + _FIELDS = collections.OrderedDict([ + ('type', 'I'), + ('name', '32s'), + ('size_h', 'I'), + ('size', 'I'), + ('next_offset_h', 'I'), + ('next_offset', 'I'), + ('crc32', 'I'), + ]) + + # Provide defaults. + # pylint: disable=useless-super-delegation + def __init__(self, + type_=0, + name=b'', + size_h=0, + size=0, + next_offset_h=0, + next_offset=0, + crc32=0): + super().__init__(type_, name, size_h, size, next_offset_h, next_offset, crc32) diff --git a/fbpacktool/fbpacktool.py b/fbpacktool/fbpacktool.py index 943b3bba..7a04b0a9 100644 --- a/fbpacktool/fbpacktool.py +++ b/fbpacktool/fbpacktool.py @@ -146,21 +146,41 @@ def copyfileobj(src, dst, file_size): def cmd_unpack(args): with open(args.file, 'rb') as f: - pack = fbpack.PackHeader.from_bytes(f.read(len(fbpack.PackHeader()))) + pack = fbpack.CommonPackHeader.from_bytes(f.read(len(fbpack.CommonPackHeader()))) - if pack.version != fbpack.FBPACK_VERSION: + f.seek(0, os.SEEK_SET) + + if pack.version == fbpack.FBPACK_VERSION: + pack = fbpack.PackHeader.from_bytes(f.read(len(fbpack.PackHeader()))) + elif pack.version == fbpack.FBPACK_VERSION_V1: + pack = fbpack.PackHeaderV1.from_bytes(f.read(len(fbpack.PackHeaderV1()))) + else: raise NotImplementedError('unsupported version {}'.format(pack.version)) entries = [] + next_offset = len(pack) # create list of entries we want to extact for _ in range(pack.total_entries): - entry = fbpack.PackEntry.from_bytes(f.read(len(fbpack.PackEntry()))) + if pack.version == fbpack.FBPACK_VERSION: + entry = fbpack.PackEntry.from_bytes(f.read(len(fbpack.PackEntry()))) + offset = entry.offset + else: + f.seek(next_offset, os.SEEK_SET) + entry = fbpack.PackEntryV1.from_bytes(f.read(len(fbpack.PackEntryV1()))) + offset = f.tell() + next_offset = (entry.next_offset_h << 32) | entry.next_offset + + if entry.type == 0: + # Ignore partition table entries, next_offset will tell us + # where to go next + continue + name = bytes_to_str(entry.name) if not args.partitions or name in args.partitions: # if both product are valid then match product name too if not args.product or not entry.product or product_match( entry.product, args.product): - entries.append(entry) + entries.append((name, offset, entry.size)) if not entries and not args.unpack_ver: raise RuntimeError('no images to unpack') @@ -171,11 +191,10 @@ def cmd_unpack(args): out_files = {} # write file per entry - for entry in entries: - name = bytes_to_str(entry.name) + for name, offset, size in entries: logging.info('Unpacking {} (size: {}, offset: {})'.format( - name, entry.size, entry.offset)) - f.seek(entry.offset) + name, size, offset)) + f.seek(offset) entry_filename = os.path.join(args.out_dir, name + '.img') instance = out_files.get(entry_filename, 0) + 1 out_files[entry_filename] = instance @@ -183,7 +202,7 @@ def cmd_unpack(args): entry_filename = os.path.join(args.out_dir, name + '({}).img'.format(instance - 1)) with open(entry_filename, 'wb') as entry_file: - copyfileobj(f, entry_file, entry.size) + copyfileobj(f, entry_file, size) if args.unpack_ver: ver_file_path = os.path.join(args.out_dir, 'version.txt') diff --git a/misc/check_keys.sh b/misc/check_keys.sh new file mode 100755 index 00000000..28d3f5db --- /dev/null +++ b/misc/check_keys.sh @@ -0,0 +1,453 @@ +#!/bin/bash +set -euo pipefail + +error() { + printf "%s\n" "$*" >&2 + exit 1 +} + +help() { + # For convenience, the examples shown will fill in the actual current values of variables + # DEVICE and BUILD_NUMBER when available. When not available, they'll appear as variables. + local DEVICE="${DEVICE:-\$DEVICE}" + local BUILD_NUMBER="${BUILD_NUMBER:-\$BUILD_NUMBER}" + echo "Usage: $0 (app|gen_allowlist|target_files) path [path...]" + echo + echo "This tool checks the signing keys used for the given path(s) against a user-provided " + echo "list of allowed or denied fingerprints. This list can be generated with gen_allowlist, " + echo "and then the whole list (newline-separated) provided in either the ALLOWED_FINGERPRINTS or " + echo "DENIED_FINGERPRINTS environment variables." + echo + echo "Example allowlist usage:" + echo " # on the signing server" + echo " $0 gen_allowlist keys/$DEVICE keys/common | sort -u > allowed-keys-$DEVICE.txt" + echo ' ALLOWED_FINGERPRINTS="$(cat allowed-keys-$DEVICE.txt)" '"$0"' target_files \' + echo " "'"'"archive/release-$DEVICE-$BUILD_NUMBER/$DEVICE-target_files-$BUILD_NUMBER.zip"'"' + echo + echo "Example denylist usage:" + echo " # on the build server" + echo " $0 gen_allowlist calyx/keys/aosp-test-keys/* | sort -u > aosp-test-keys.txt" + echo " # copy aosp-test-keys.txt to signing server" + echo " # on the signing server" + echo ' DENIED_FINGERPRINTS="$(cat aosp-test-keys.txt)" '"$0"' target_files \' + echo " "'"'"archive/release-$DEVICE-$BUILD_NUMBER/$DEVICE-target_files-$BUILD_NUMBER.zip"'"' +} + +readonly -a SIGNED_TYPES=('*.apk' '*.apex' '*.capex' 'original_apex') +readonly -a SIGNATURE_FILES=('META-INF/*.RSA') +readonly ERROR_TESTKEY=42 +readonly ERROR_EXTRACTION_FAILED=43 +readonly ERROR_FINGERPRINT=44 + +# ALLOWED_FINGERPRINTS or DENIED_FINGERPRINTS, one per line +# see gen_allowlist +declare -a allowed_fingerprints=() +declare -a denied_fingerprints=() +[ -z "${ALLOWED_FINGERPRINTS:-}" ] || readarray -d $'\n' -t allowed_fingerprints <<< "${ALLOWED_FINGERPRINTS:-}" +[ -z "${DENIED_FINGERPRINTS:-}" ] || readarray -d $'\n' -t denied_fingerprints <<< "${DENIED_FINGERPRINTS:-}" + +readarray -t ignore_patterns <<< "${IGNORE_PATTERNS:-}" +if [ -z "${IGNORE_PATTERNS:-}" ]; then + # Default ignore patterns + ignore_patterns=( + # F-Droid repo apps are pre-signed + 'PRODUCT/fdroid/repo/*' + + # cts shim is always test key + 'SYSTEM/apex/com.android.apex.cts.shim.apex' + + # vendor-provided apps are pre-signed + 'PRODUCT/priv-app/EuiccGoogle/*' + 'PRODUCT/priv-app/PixelCameraServices/*' + 'SYSTEM_EXT/priv-app/EuiccSupportPixel/*' + 'SYSTEM_EXT/priv-app/EuiccSupportPixelPermissions/*' + 'SYSTEM_EXT/priv-app/OemRilService/*' + 'SYSTEM_EXT/priv-app/ShannonIms/*' + 'SYSTEM_EXT/priv-app/ShannonQualifiedNetworksService/*' + 'SYSTEM_EXT/priv-app/ShannonRcs/*' + 'VENDOR/apex/com.google.android.widevine*' + 'VENDOR/apex/com.google.pixel.euicc.update.apex' + 'VENDOR/apex/com.google.pixel.wifi.ext.apex' + 'VENDOR/apex/com.google.pixel.camera.hal.apex' + ) +fi + +# can be allowlist, denylist, or testkeys-old (not recommended) +# will be computed in main if unspecified +CHECK_MODE="${CHECK_MODE:-}" + +gen_allowed_fingerprints() { + local cert + local -a allowed_fingerprints + local keys_path="$1" + for cert in "${keys_path}"/*.x509.pem; do + local fingerprint="$(cat "$cert" | openssl x509 -inform PEM -fingerprint -sha256 | head -n1 | tr '[A-Z]' '[a-z]' | sed -e 's/://g' -e 's/^sha256 fingerprint=/SHA-256:/')" + local fp + for fp in "${allowed_fingerprints[@]}"; do + [ -n "$fingerprint" ] || break + if [ "$fp" = "$fingerprint" ]; then + # already exists + fingerprint= + fi + done + if [ -n "$fingerprint" ]; then + allowed_fingerprints+=("$fingerprint") + fi + done + printf "%s\n" "${allowed_fingerprints[@]}" +} + +find_apksigner() { + apksigner="${APKSIGNER_COMMAND:-}" + if [ -e "$apksigner" ]; then + return 0 + fi + apksigner="$(which apksigner || true)" + if [ -z "$apksigner" ]; then + if [ -f "$(pwd)/bin/apksigner" ]; then + apksigner="$(pwd)/bin/apksigner" + elif [ -f "$HOME/androidsign/bin/apksigner" ]; then + apksigner="$HOME/androidsign/bin/apksigner" + fi + fi + if [ ! -f "$apksigner" ]; then + echo "Could not find apksigner tool" >&2 + return 1 + fi +} + +find_deapexer() { + deapexer="${DEAPEXER_COMMAND:-}" + if [ -e "$deapexer" ]; then + return 0 + fi + deapexer="$(which deapexer || true)" + if [ -z "$deapexer" ]; then + if [ -f "$(pwd)/bin/deapexer" ]; then + deapexer="$(pwd)/bin/deapexer" + elif [ -f "$HOME/androidsign/bin/deapexer" ]; then + deapexer="$HOME/androidsign/bin/deapexer" + fi + fi + if [ ! -f "$deapexer" ]; then + echo "Could not find deapexer tool" >&2 + return 1 + fi +} + +apksigner() { + command "$apksigner" "$@" +} + +deapex() { + local parentdir="$(dirname "$deapexer")" + "$deapexer" --fsckerofs_path "$parentdir/fsck.erofs" --debugfs_path "$parentdir/debugfs_static" "$@" +} + +main() { + if [ $# -eq 0 ]; then + help + exit 0 + fi + case "${1:-}" in + -h|--help|help) + help + exit 0 + ;; + esac + + if [ -z "$CHECK_MODE" ]; then + local num_allowed=${#allowed_fingerprints[@]} + local num_denied=${#denied_fingerprints[@]} + if [ $num_allowed -gt 0 ] && [ $num_denied -gt 0 ]; then + error "Expected only one of ALLOWED_FINGERPRINTS or DENIED_FINGERPRINTS environment variables," \ + "or to choose allowlist/denylist explicitly via CHECK_MODE variable" + exit 1 + fi + if [ $num_allowed -gt 0 ]; then + CHECK_MODE=allowlist + else + CHECK_MODE=denylist + fi + fi + + case "$CHECK_MODE" in + allowlist|denylist) + find_apksigner + ;; + esac + + find_deapexer + + case "${1:-}" in + app) + shift 1 + local app="$1" + # first arg is used as a name for the app, which here is the same as the filename + handle_app "$app" "" "$@" || return $? + ;; + target_files) + shift 1 + handle_target_files "$@" || return $? + ;; + gen_allowlist) + shift 1 + local allowed_fingerprints_per_dir=() + for dir in "$@"; do + allowed_fingerprints_per_dir+=("$(gen_allowed_fingerprints "$dir")") + printf "%s\n" "${allowed_fingerprints_per_dir[@]}" | sort -u + done + echo "Try setting these to the ALLOWED_FINGERPRINTS variable" >&2 + echo 'e.g. check_keys gen_allowlist [...] > allowlist.txt; export ALLOWED_FINGERPRINTS="$(cat allowlist.txt)"' >&2 + ;; + *) + help >&2 + error "Mode must be one of: app, gen_allowlist, target_files" + ;; + esac + + return $? +} + +check_signature_of_package() { + local app="$1" + local subapp="$2" + local file="$3" + local err=0 + local result="$(apksigner verify --print-certs "$file" 2>&1)" || err=$? + if [ $err -ne 0 ]; then + # apksigner failed; dump its full output + printf "%s\n" "$result" >&2 + return $err + fi + + local -a signer_certificates + local cert + while IFS= read -r cert; do + signer_certificates+=("$cert") + case "$CHECK_MODE" in + allowlist) + for allowed_cert in "${allowed_fingerprints[@]}"; do + if [ "$allowed_cert" = "$cert" ]; then + return 0 + fi + done + ;; + denylist) + for denied_cert in "${denied_fingerprints[@]}"; do + if [ "$denied_cert" = "$cert" ]; then + return $ERROR_FINGERPRINT + fi + done + ;; + esac + done < <(printf "%s\n" "$result" | parse_signer_certificates) + + case "$CHECK_MODE" in + allowlist) + echo "No matching certs for $app ($subapp):" >&2 + printf " %s\n" "${signer_certificates[@]}" >&2 + return $ERROR_FINGERPRINT + esac +} + +parse_signer_certificates() { + sed -n -e 's/^Signer.* certificate \(.*\) digest: \(.*\)/\1:\2/p' +} + +handle_app() { + local err=0 + local app="$1" + local subapp="$2" + check_subapps="$check_subapps" \ + handle_app_internal "$@" || err=$? + case $err in + $ERROR_TESTKEY) + echo "TEST KEYS IN USE FOR $app OR FILES CONTAINED WITHIN" >&2 + ;; + $ERROR_EXTRACTION_FAILED) + echo "Failed to extract signature for $app" >&2 + ;; + $ERROR_FINGERPRINT) + case "$CHECK_MODE" in + allowlist) + echo "Fingerprint not found on allowlist: $app" >&2 + ;; + denylist) + echo "Fingerprint found on denylist: $app" >&2 + ;; + esac + ;; + 0) + true + ;; + *) + echo "Failed to validate signature for $app" >&2 + ;; + esac + # output a line to stdout representing the failed app + if [ $err -ne 0 ]; then + printf "%s\n" "$app" + return $err + fi +} + +handle_app_internal() { + local app="$1" + local subapp="$2" + #case "$(basename "$app")" in + # com.android.apex.cts.shim.apex) + # echo "Skipping signature check for cts shim, as it is meant to use a throwaway key: $app" >&2 + # return 0 + # ;; + #esac + local file="$3" + local extract_ok + local err=0 + case "$CHECK_MODE" in + testkeys-old) + for sig in "${SIGNATURE_FILES[@]}"; do + unzip -p "$file" "$sig" 2>/dev/null | check_signature_stdin + err=${PIPESTATUS[1]:-$?} + if [ ${PIPESTATUS[0]} -ne 0 ]; then + return $ERROR_EXTRACTION_FAILED + elif [ $err -ne 0 ]; then + return $err + fi + done + ;; + *) + check_signature_of_package "$app" "$subapp" "$file" || return $? + ;; + esac + if [ "$check_subapps" = "y" ]; then +# echo $app $file >&2 + local subapps + #zipinfo -1 "$file" "${SIGNED_TYPES[@]}" 1>&2 + case "$file" in + *.apex|*original_apex) + local tmpdir="$(mktemp -d)" + deapex extract "$file" "$tmpdir" >&2 || { rm -rf "$tmpdir"; return $ERROR_EXTRACTION_FAILED; } + #ls -lR "$tmpdir" + for signed_type in "${SIGNED_TYPES[@]}"; do + local -a subfiles + readarray -d '' subfiles < <(find "$tmpdir" -name "$signed_type" -print0) + local subfile + for subfile in "${subfiles[@]}"; do + cp -a "$subfile" ~/blah.apk + check_subapps=y \ + handle_app_internal "$app" "$subfile" "$subfile" || { err=$?; break; } + done + done + rm -rf "$tmpdir" + if [ $err -ne 0 ]; then + echo "Error $err encountered with subfile: $subfile" >&2 + fi + return $err + ;; + esac + readarray -t subapps < <(zipinfo -1 "$file" "${SIGNED_TYPES[@]}" 2>/dev/null) + local subapp + for subapp in "${subapps[@]}"; do + #echo "$subapp" >&2 + local subfile="$(mktemp_with_extension "${subapp##*.}")" + unzip -p "$file" "$subapp" > "$subfile" || { rm -f "$subfile"; continue; } + check_subapps=y \ + handle_app_internal "$app" "$subapp" "$subfile" || { err=$?; rm -f "$subfile"; break; } + rm -f "$subfile" + done + if [ $err -ne 0 ]; then + echo "Error $err encountered with subfile: $subfile" >&2 + fi + fi + return $err +} + +mktemp_with_extension() { + local tmpfile="$(mktemp)" || return $? + mv "$tmpfile" "${tmpfile}.$1" || return $? + printf "%s\n" "${tmpfile}.$1" +} + +handle_target_files() { + local target_files_zip="$1" + shift 1 + local -a apps=() + if [ $# -eq 0 ]; then + readarray -t apps < <(zipinfo -1 "$target_files_zip" "${SIGNED_TYPES[@]}" 2>/dev/null) + #readarray -t apps < <(zipinfo -1 "$target_files_zip" "SYSTEM/apex/com.android.appsearch.capex" 2>/dev/null) + else + local apps=("$@") + fi + local -a failed_apps=() + + if [ "${#apps[@]}" -gt 1 ]; then + local output=$(printf "%s\n" "${apps[@]}" | parallel "$0" target_files "$target_files_zip" || return $?) + # the presence of any output from parallel is considered an error, because stdout lists failed apps. + # stderr includes more details and is not inhibited by the above capture. + if [ -n "$output" ]; then + echo >&2 + echo "FINGERPRINT ISSUES FOUND WITH:" >&2 + printf "%s\n" "$output" + return 1 + fi + return $? + fi + + local app="${apps[0]}" + local err=0 + local check_subapps= + local tmpfile="$(mktemp_with_extension "${app##*.}")" + local ignored_path= + for ignored_path in "${ignore_patterns[@]}"; do + case "$app" in + $ignored_path) + #echo "Ignored path, boom: $app $ignored_path" >&2 + break + ;; + esac + ignored_path= + done + if [ -n "$ignored_path" ]; then + return 0 + fi + unzip -p "$target_files_zip" "$app" > "$tmpfile" || { rm "$tmpfile"; continue; } + case "$app" in + *.capex|*.apex) + check_subapps=y + ;; + *) + check_subapps=n + ;; + esac + check_subapps="$check_subapps" \ + handle_app "$app" "" "$tmpfile" || err=$? + rm -f "$tmpfile" + return $err +} + +check_signature_stdin() { + # testkey subject and issuer are: + # C = US, ST = California, L = Mountain View, O = Android, OU = Android, CN = Android, emailAddress = android@android.com + # And for APEX: + # C = US, ST = California, L = Mountain View, O = Google Inc., OU = Android, CN = com.android + case "$CHECK_MODE" in + testkeys-old) + local result="$(decode_app_signature_stdin)" + #printf "%s\n" "$result" | head -n100 >&2 + if printf "%s\n" "$result" | grep -q 'android@android\.com\|C = US, ST = California, L = Mountain View, O = Google Inc\., OU = Android, CN = com\.android'; then + return $ERROR_TESTKEY + fi + return $? + ;; + *) + error "This should not happen" + ;; + esac +} + +decode_app_signature_stdin() { + openssl pkcs7 -inform DER -text -print_certs 2>/dev/null +} + +main "$@" || exit $? diff --git a/misc/install_test.sh b/misc/install_test.sh new file mode 100755 index 00000000..ebe80919 --- /dev/null +++ b/misc/install_test.sh @@ -0,0 +1,56 @@ +#!/bin/bash +set -euo pipefail + +help() { + echo 'This script attempts to install APKs and APEXes from the build output directory, $OUT, ' + echo 'with the expectation that they are not yet production-signed. It is used to ensure that ' + echo 'packages signed with test keys fail to install, as expected.' + echo + echo 'It is normal for some packages, such as vendor packages, to be presigned. Warnings about ' + echo 'packages known to be presigned can be safely ignored.' +} + +case "${1:-}" in + -h|--help) + help + exit 0 + ;; +esac + +[ -n "$OUT" ] || { echo "OUT is not set" >&2; help >&2; exit 1; } + +IGNORE_PATTERNS=( + 'product/fdroid/*' +) +files=() + +cd "$OUT" + +for d in apex product system system_ext vendor; do + readarray -t -d '' new_paths < <(find $d/ -name '*.apk' -print0) + files+=(${new_paths[@]}) + readarray -t -d '' new_paths < <(find $d/ -name '*.apex' -print0) + files+=(${new_paths[@]}) + readarray -t -d '' new_paths < <(find $d/ -name '*.capex' -print0) + files+=(${new_paths[@]}) +done + +for file in "${files[@]}"; do + for ignore_pattern in "${IGNORE_PATTERNS[@]}"; do + case "$file" in + $ignore_pattern) + # skip it (ignore_pattern will not be blank, so will continue below) + break + ;; + esac + ignore_pattern= + done + if [ -n "$ignore_pattern" ]; then + continue + fi + err=0 + result="$(adb install "$file" 2>&1)" || err=$? + if [ $err -eq 0 ]; then + printf "WARNING: successfully installed %s\n" "$file" + fi +done diff --git a/motorola/info.sh b/motorola/info.sh new file mode 100755 index 00000000..f936755b --- /dev/null +++ b/motorola/info.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +# SPDX-FileCopyrightText: 2023 The Calyx Institute +# +# SPDX-License-Identifier: Apache-2.0 + +# +# info: +# +# Dump information for one device +# +# +############################################################################## + + +### SET ### + +# use bash strict mode +set -euo pipefail + +### TRAPS ### + +# trap signals for clean exit +trap 'exit $?' EXIT +trap 'error_m interrupted!' SIGINT + +### CONSTANTS ### +readonly script_path="$(cd "$(dirname "$0")";pwd -P)" +readonly top="${script_path}/../../.." +readonly avbtool="${top}/external/avb/avbtool.py" + +## HELP MESSAGE (USAGE INFO) +# TODO + +### FUNCTIONS ### + +info() { + local source="${1}" + + local bootloader_version=$(cat ${source}/*.info.txt | grep "MBM Version:" | cut -c 14-) + local build_id=$(cat ${source}/*.info.txt | grep "Build Id:" | cut -c 11-) + local build_fingerprint=$(cat ${source}/*.info.txt | grep "Build Fingerprint:" | cut -c 20-) + local build_description=$(cat ${source}/*.info.txt | grep "Version when read from CPV:" | cut -c 29-) + local security_patch=$(python3 ${avbtool} info_image --image ${source}/vbmeta.img | grep "com.android.build.vendor.security_patch" | cut -c 54- | sed s/\'//g) + local rollback_index=$(python3 ${avbtool} info_image --image ${source}/vbmeta.img | grep "Rollback Index:" | cut -c 27-) + + echo "Bootloader version: $bootloader_version" + echo "Build ID: $build_id" + echo "Build fingerprint: $build_fingerprint" + echo "Build description: $build_description" + echo "Vendor security patch: $security_patch" + echo "AVB rollback index: $rollback_index" +} + +# error message +# ARG1: error message for STDERR +# ARG2: error status +error_m() { + echo "ERROR: ${1:-'failed.'}" 1>&2 + return "${2:-1}" +} + +# print help message. +help_message() { + echo "${help_message:-'No help available.'}" +} + +main() { + if [[ $# -eq 1 ]] ; then + info "${1}" + else + error_m + fi +} + +### RUN PROGRAM ### + +main "${@}" + + +## diff --git a/motorola/star.sh b/motorola/star.sh new file mode 100755 index 00000000..b89a1252 --- /dev/null +++ b/motorola/star.sh @@ -0,0 +1,46 @@ +#!/bin/sh + +# SPDX-License-Identifier: CC0-1.0 + +# This basic program is used for unpacking Motorola archives which are made using single image tar(star) utility +# can run in dash. dd, od, tr are used mainly(busybox also compatible) +# +# Created : 1st Feb 2023 +# Author : HemanthJabalpuri + +if [ $# -lt 2 ]; then + echo "Usage: star.sh file outdir" + exit +fi + +f="$1" +outdir="$2" + +mkdir -p "$outdir" 2>/dev/null + +getData() { + dd if="$f" bs=1 skip=$1 count=$2 2>/dev/null +} + +getLong() { + getData $1 8 | od -A n -t u8 | tr -d " " +} + +magic=$(getData 0 15) +if [ "$magic" != "SINGLE_N_LONELY" ]; then + echo " Unsupported"; exit 1 +fi + +seekoff=256 +for i in $(seq 64); do + name="$(getData $seekoff 248)" + [ "$name" = "LONELY_N_SINGLE" ] && break + length="$(getLong $((seekoff+248)))" + offset="$((seekoff+256))" + pad=$((length%4096)) + [ "$pad" -ne 0 ] && pad=$((4096-pad)) + echo "Name: $name, Offset: $offset, Size: $length, Padding: $pad" + + dd if="$f" of="$outdir/$name" iflag=skip_bytes,count_bytes status=none bs=4096 skip=$offset count=$length + seekoff="$((offset+length+pad))" +done diff --git a/pixel/build-desc-fingerprint.sh b/pixel/build-desc-fingerprint.sh index 2ffed932..520c57a4 100755 --- a/pixel/build-desc-fingerprint.sh +++ b/pixel/build-desc-fingerprint.sh @@ -67,8 +67,8 @@ main() { local mk="$(ls ${top}/device/google/*/calyx_${d}.mk)" desc="${d}-user ${android_version} ${build_id} ${build_number} release-keys" fingerprint="google/${d}/${d}:${android_version}/${build_id}/${build_number}:user/release-keys" - sed -i "/PRIVATE_BUILD_DESC/c\ PRIVATE_BUILD_DESC=\"${desc}\"" "${mk}" - sed -i "/BUILD_FINGERPRINT/c\BUILD_FINGERPRINT\ :=\ ${fingerprint}" "${mk}" + sed -i "/BuildDesc/c\ BuildDesc=\"${desc}\" \\\\" "${mk}" + sed -i "/BuildFingerprint/c\ BuildFingerprint=${fingerprint} \\\\" "${mk}" ) done diff --git a/pixel/device.sh b/pixel/device.sh index 378311fa..25c0c362 100755 --- a/pixel/device.sh +++ b/pixel/device.sh @@ -1,6 +1,6 @@ #!/bin/bash -# SPDX-FileCopyrightText: 2022 The Calyx Institute +# SPDX-FileCopyrightText: 2022-2023 The Calyx Institute # # SPDX-License-Identifier: Apache-2.0 @@ -33,6 +33,8 @@ readonly work_dir="${WORK_DIR:-/tmp/pixel}" source "${vars_path}/pixels" +KEEP_DUMP=${KEEP_DUMP:-false} + ## HELP MESSAGE (USAGE INFO) # TODO @@ -41,27 +43,20 @@ source "${vars_path}/pixels" device() { local device="${1}" source "${vars_path}/${device}" - local factory_dir="${work_dir}/${device}/${build_id}/factory/${device}-${build_id,,}" + local factory_zip="${work_dir}/${device}/${build_id}/$(basename ${image_url})" + local extract_args="${factory_zip}" "${script_path}/download.sh" "${device}" - "${script_path}/extract-factory-image.sh" "${device}" - pushd "${top}" - if [[ -f device/google/${device}/regen-vendor.sh ]]; then - if [[ -z ${wifi_only-} ]]; then - device/google/${device}/regen-carriersettings.sh "${factory_dir}/image/product.img" device/google/${device}/proprietary-files-carriersettings.txt - fi - device/google/${device}/regen-vendor.sh "${factory_dir}/image/vendor.img" device/google/${device}/proprietary-files-vendor.txt - else - if [[ -z ${wifi_only-} ]]; then - device/google/*/${device}/regen-carriersettings.sh "${factory_dir}/image/product.img" device/google/*/${device}/proprietary-files-carriersettings.txt - fi - device/google/*/${device}/regen-vendor.sh "${factory_dir}/image/vendor.img" device/google/*/${device}/proprietary-files-vendor.txt + if [ "$KEEP_DUMP" == "true" ] || [ "$KEEP_DUMP" == "1" ]; then + extract_args+=" --keep-dump" fi - device/google/${device}/extract-files.sh "${factory_dir}/image" - popd - "${script_path}/firmware.sh" "${device}" + extract_args+=" --extract-factory --regenerate" + + pushd "${top}" + device/google/${device}/extract-files.py "${extract_args}" + popd echo "${build_id}" > "${top}/vendor/google/${device}/build_id.txt" } diff --git a/pixel/firmware.sh b/pixel/firmware.sh deleted file mode 100755 index b5f92922..00000000 --- a/pixel/firmware.sh +++ /dev/null @@ -1,177 +0,0 @@ -#!/bin/bash - -# SPDX-FileCopyrightText: 2022 The Calyx Institute -# -# SPDX-License-Identifier: Apache-2.0 - -# -# extract: -# -# Setup pixel firmware -# -# -############################################################################## - - -### SET ### - -# use bash strict mode -set -euo pipefail - - -### TRAPS ### - -# trap signals for clean exit -trap 'exit $?' EXIT -trap 'error_m interrupted!' SIGINT - -### CONSTANTS ### -readonly script_path="$(cd "$(dirname "$0")";pwd -P)" -readonly vars_path="${script_path}/../vars" -readonly top="${script_path}/../../.." - -readonly fbpacktool="${top}/calyx/scripts/fbpacktool/fbpacktool.py" -readonly qc_image_unpacker="${top}/prebuilts/extract-tools/linux-x86/bin/qc_image_unpacker" -readonly extract_ota_py="${top}/tools/extract-utils/extract_ota.py" - -readonly work_dir="${WORK_DIR:-/tmp/pixel}" - -source "${vars_path}/pixels" - -readonly device="${1}" -source "${vars_path}/${device}" - -readonly _wifi_only="${wifi_only:-false}" - -readonly factory_dir="${work_dir}/${device}/${build_id}/factory/${device}-${build_id,,}" -readonly ota_zip="${work_dir}/${device}/${build_id}/$(basename ${ota_url})" -readonly ota_firmware_dir="${work_dir}/${device}/${build_id}/firmware" - -readonly vendor_path="${top}/vendor/google/${device}" - -## HELP MESSAGE (USAGE INFO) -# TODO - -### FUNCTIONS ### - -# Firmware included in our factory images, -# typically bootloader and radio -copy_factory_firmware() { - cp "${factory_dir}"/bootloader-*.img "${vendor_path}/firmware/" - if [[ "${_wifi_only}" != "true" ]]; then - cp "${factory_dir}"/radio-*.img "${vendor_path}/firmware/" - fi - cp "${factory_dir}"/image/android-info.txt "${vendor_path}/android-info.txt" -} - -# Unpack the seperate partitions needed for OTA -# from the factory image's bootloader.img -unpack_firmware() { - local fbpk="${fbpk_version:-v1}" - - if [[ "${_wifi_only}" != "true" ]]; then - # modem.img - "${qc_image_unpacker}" -i "${factory_dir}"/radio-*.img -o "${ota_firmware_dir}" - # Alternative: dd bs=4 skip=35 - fi - - if [[ "$fbpk" == "v1" ]]; then - # All other ${firmware_partitions[@]} - "${qc_image_unpacker}" -i "${factory_dir}"/bootloader-*.img -o "${ota_firmware_dir}" - else - # All other ${firmware_partitions[@]} - python3 "${fbpacktool}" unpack -o "${ota_firmware_dir}" "${factory_dir}"/bootloader-*.img - fi -} - -extract_firmware() { - echo "${ota_sha256} ${ota_zip}" | sha256sum --check --status - python3 ${extract_ota_py} ${ota_zip} -o "${ota_firmware_dir}" -p ${firmware_partitions[@]} -} - -# Firmware included in OTAs, separate partitions -# Can be extracted from bootloader.img inside the factory image, -# or directly from the OTA zip -copy_ota_firmware() { - for fp in ${firmware_partitions[@]}; do - cp "${ota_firmware_dir}/${fp}.img" "${vendor_path}/firmware/${fp}.img" - done -} - -setup_makefiles() { - local exists=$(grep firmware "${vendor_path}/BoardConfigVendor.mk") - if [[ -z "${exists}" ]]; then - echo >> "${vendor_path}/BoardConfigVendor.mk" - echo "# firmware" >> "${vendor_path}/BoardConfigVendor.mk" - echo "TARGET_BOARD_INFO_FILE := vendor/google/${device}/android-info.txt" >> "${vendor_path}/BoardConfigVendor.mk" - echo >> "${vendor_path}/BoardConfigVendor.mk" - echo "AB_OTA_PARTITIONS += \\" >> "${vendor_path}/BoardConfigVendor.mk" - for fp in ${firmware_partitions[@]}; do - echo " ${fp} \\" >> "${vendor_path}/BoardConfigVendor.mk" - done - echo >> "${vendor_path}/BoardConfigVendor.mk" - fi - - local exists2=$(grep firmware "${vendor_path}/Android.mk") - if [[ -z "${exists2}" ]]; then - # I don't like this - sed -i /endif/d "${vendor_path}/Android.mk" - - local bootloader_version=$(cat "${vendor_path}/android-info.txt" | grep version-bootloader | cut -d = -f 2) - if [[ "${_wifi_only}" != "true" ]]; then - local radio_version=$(cat "${vendor_path}/android-info.txt" | grep version-baseband | cut -d = -f 2) - fi - - echo >> "${vendor_path}/Android.mk" - echo "# firmware" >> "${vendor_path}/Android.mk" - echo "\$(call add-radio-file,firmware/bootloader-${device}-${bootloader_version,,}.img,version-bootloader)" >> "${vendor_path}/Android.mk" - if [[ "${_wifi_only}" != "true" ]]; then - echo "\$(call add-radio-file,firmware/radio-${device}-${radio_version,,}.img,version-baseband)" >> "${vendor_path}/Android.mk" - fi - - for fp in ${firmware_partitions[@]}; do - echo "\$(call add-radio-file,firmware/${fp}.img)" >> "${vendor_path}/Android.mk" - done - echo >> "${vendor_path}/Android.mk" - - # I still don't like this - echo endif >> "${vendor_path}/Android.mk" - fi -} - -# error message -# ARG1: error message for STDERR -# ARG2: error status -error_m() { - echo "ERROR: ${1:-'failed.'}" 1>&2 - return "${2:-1}" -} - -# print help message. -help_message() { - echo "${help_message:-'No help available.'}" -} - -main() { - rm -rf "${ota_firmware_dir}" - mkdir -p "${ota_firmware_dir}" - rm -rf "${vendor_path}/firmware" - mkdir -p "${vendor_path}/firmware" - - copy_factory_firmware - # Not all devices need OTA, most are supported in image_unpacker - if [[ -n ${needs_ota-} ]]; then - extract_firmware - else - unpack_firmware - fi - copy_ota_firmware - setup_makefiles -} - -### RUN PROGRAM ### - -main "${@}" - - -## diff --git a/release/tag.sh b/release/tag.sh index 6b266701..adafea8f 100755 --- a/release/tag.sh +++ b/release/tag.sh @@ -27,8 +27,11 @@ trap 'error_m interrupted!' SIGINT ### CONSTANTS ### readonly script_path="$(cd "$(dirname "$0")";pwd -P)" +readonly vars_path="${script_path}/../vars" readonly top="${script_path}/../../.." +source "${vars_path}/common" + if [[ -e "${top}/build_kernel.sh" ]]; then readonly excluded_repos='CalyxOS/kernel_manifest' else @@ -52,7 +55,7 @@ handle_repos() { tag_repo "${repo}" "${version}" "${msgfile}" done read -p "Press enter to start pushing" - parallel push_repo {} "${version}" ::: "${repos}" + parallel -j8 push_repo {} "${version}" "${os_branch}" "${topic}" ::: "${repos}" popd } @@ -66,7 +69,36 @@ tag_repo() { push_repo() { local repo="${1}" local version="${2}" - git -C "${repo}" push calyx "${version}" + local os_branch="${3}" + local topic="${4}" + pushd "${repo}" + + if [ -f ".lfsconfig" ]; then + # Pushing a LFS tag from a remote-tracking branch is MUCH, MUCH faster + # than the alternative + # Fetch because this remote isn't fetched by default + git fetch calyx "${os_branch}:refs/remotes/calyx/${os_branch}" + # This should match the tag + git checkout -b "lfs_${topic}" "${version}" + git branch --set-upstream-to="calyx/${os_branch}" + fi + + git push calyx "${version}" + + if [ -f ".lfsconfig" ]; then + # Cleanup + git checkout "${version}" + git branch -D "lfs_${topic}" + fi + + popd +} + +cleanup_repo() { + local repo="${1}" + local version="${2}" + pushd "${repo}" + popd } export -f push_repo diff --git a/vars/FP4 b/vars/FP4 index ec831969..16d9272d 100644 --- a/vars/FP4 +++ b/vars/FP4 @@ -5,3 +5,11 @@ device_repos=( device/fairphone/FP4 kernel/fairphone/sm7225 ) + +# Updated manually +readonly build_id="FP4.TP2G.C.0119" + +readonly image_url="https://fairphone-android-builds.ams3.digitaloceanspaces.com/FP4/A13/FP4-TP2G-factory.zip" +readonly image_sha256="9979a11e832a3911fbabcb3207f90560b5a4c3eab3c4a4c81267023e84d057d8" + +readonly security_patch="2024-05-05" diff --git a/vars/FP5 b/vars/FP5 new file mode 100644 index 00000000..11044df6 --- /dev/null +++ b/vars/FP5 @@ -0,0 +1,15 @@ +# Fairphone 5 + +# Usage: ${device_repos[@]} +device_repos=( + device/fairphone/FP5 + kernel/fairphone/qcm6490 +) + +# Updated manually +readonly build_id="FP5.TT4H.A.162" + +readonly image_url="https://fairphone-android-builds.ams3.digitaloceanspaces.com/FP5/A13/FP5-TT4H-factory.zip" +readonly image_sha256="38f5cded3cceca25cbf7c9d42ad664ec232a9b1446f3ae17053fe97d7110da01" + +readonly security_patch="2024-06-05" diff --git a/vars/akita b/vars/akita new file mode 100644 index 00000000..a7ef172e --- /dev/null +++ b/vars/akita @@ -0,0 +1,30 @@ +# Pixel 8a + +# Usage: ${device_repos[@]} +device_repos=( + device/google/akita + device/google/akita-sepolicy +) + +# Updated semi-manually via pixel/update-any-var.sh + +readonly build_id="AP4A.250105.002" + +# Updated automatically via pixel/update-device-vars.sh + +readonly aosp_branch="android15-qpr1-release" + +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" + +readonly build_number="12701944" + +readonly image_url="https://dl.google.com/dl/android/aosp/akita-ap4a.250105.002-factory-1c5c298d.zip" +readonly image_sha256="1c5c298daa1e66408c49a796d61cc16c7f7858eabafa9b6c87c1a32b4359a341" + +readonly flash_url="https://flash.android.com/build/12701944?target=akita-user&signed" + +readonly ota_url="https://dl.google.com/dl/android/aosp/akita-ota-ap4a.250105.002-640ed10d.zip" +readonly ota_sha256="640ed10d073af3320869c5ad4c1747a66cda9195e94d57b1dbd23bc96ca95ba8" + +readonly security_patch="2025-01-05" diff --git a/vars/aosp_target_release b/vars/aosp_target_release new file mode 100644 index 00000000..53601ef3 --- /dev/null +++ b/vars/aosp_target_release @@ -0,0 +1,2 @@ +# Updated manually +aosp_target_release=ap4a diff --git a/vars/axolotl b/vars/axolotl deleted file mode 100644 index b98cb488..00000000 --- a/vars/axolotl +++ /dev/null @@ -1,7 +0,0 @@ -# SHIFT6mq - -# Usage: ${device_repos[@]} -device_repos=( - device/shift/axolotl - kernel/shift/sdm845 -) diff --git a/vars/barbet b/vars/barbet index a5b5f020..56e3aaab 100644 --- a/vars/barbet +++ b/vars/barbet @@ -1,47 +1,32 @@ # Pixel 5a -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - abl - aop - devcfg - hyp - keymaster - qupfw - tz - uefisecapp - xbl - xbl_config - featenabler - modem -) - # Usage: ${device_repos[@]} device_repos=( - # common repos in redfin + device/google/redbull + device/google/redbull-sepolicy device/google/barbet device/google/barbet-sepolicy ) # Updated semi-manually via pixel/update-any-var.sh -readonly build_id="TQ3A.230901.001" +readonly build_id="AP2A.240805.005" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android14-qpr3-release" -readonly prev_aosp_tag="android-13.0.0_r67" -readonly aosp_tag="android-13.0.0_r75" +readonly prev_aosp_tag="android-14.0.0_r52" +readonly aosp_tag="android-14.0.0_r55" -readonly build_number="10750268" +readonly build_number="12025142" -readonly image_url="https://dl.google.com/dl/android/aosp/barbet-tq3a.230901.001-factory-533f6127.zip" -readonly image_sha256="533f6127fd5cafb1667b3e177d9e9a4d70035f427861010f5c06befaaa5dfd9b" +readonly image_url="https://dl.google.com/dl/android/aosp/barbet-ap2a.240805.005-factory-231e0672.zip" +readonly image_sha256="231e06729299ce594d8b929a0db7d2cb845e74d0fb014b9938f515d0d3f9703c" -readonly flash_url="https://flash.android.com/build/10750268?target=barbet-user&signed" +readonly flash_url="https://flash.android.com/build/12025142?target=barbet-user&signed" -readonly ota_url="https://dl.google.com/dl/android/aosp/barbet-ota-tq3a.230901.001-3dd5e91e.zip" -readonly ota_sha256="3dd5e91e3a3fe612e9d1d6b4d787113053c31d740a9f227b7243b3befeaa5263" +readonly ota_url="https://dl.google.com/dl/android/aosp/barbet-ota-ap2a.240805.005-44633b16.zip" +readonly ota_sha256="44633b16c66bd19bdf160bf6d65af95b7d038c8a172a972f4f38843146d06ffe" -readonly security_patch="2023-09-01" +readonly security_patch="2024-08-05" diff --git a/vars/bluejay b/vars/bluejay index c964dd1f..7af9f09b 100644 --- a/vars/bluejay +++ b/vars/bluejay @@ -1,45 +1,30 @@ # Pixel 6a -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - bl1 - pbl - bl2 - abl - bl31 - tzsw - gsa - ldfw - modem -) - # Usage: ${device_repos[@]} device_repos=( device/google/bluejay device/google/bluejay-sepolicy ) -readonly fbpk_version="v2" - # Updated semi-manually via pixel/update-any-var.sh -readonly build_id="TQ3A.230901.001" +readonly build_id="AP4A.250105.002" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android15-qpr1-release" -readonly prev_aosp_tag="android-13.0.0_r67" -readonly aosp_tag="android-13.0.0_r75" +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" -readonly build_number="10750268" +readonly build_number="12701944" -readonly image_url="https://dl.google.com/dl/android/aosp/bluejay-tq3a.230901.001-factory-141a3d5b.zip" -readonly image_sha256="141a3d5b9dcffb59df5f6171f1c0f020e5832e0f68c8d6b691566403b03b7a5f" +readonly image_url="https://dl.google.com/dl/android/aosp/bluejay-ap4a.250105.002-factory-72283090.zip" +readonly image_sha256="72283090f956af65694f65f0d9947eefb0c0023f739f9f7eaa0038b008e63491" -readonly flash_url="https://flash.android.com/build/10750268?target=bluejay-user&signed" +readonly flash_url="https://flash.android.com/build/12701944?target=bluejay-user&signed" -readonly ota_url="https://dl.google.com/dl/android/aosp/bluejay-ota-tq3a.230901.001-1f1f0abe.zip" -readonly ota_sha256="1f1f0abe67a6f6f47287be6dafec2c12628de6a715b82ca7beddaf67ad22aca5" +readonly ota_url="https://dl.google.com/dl/android/aosp/bluejay-ota-ap4a.250105.002-14508b66.zip" +readonly ota_sha256="14508b664b31eb5c6880a0b5bba13905f876ff5a9b6a5be9832a2b1d872edfcb" -readonly security_patch="2023-09-01" +readonly security_patch="2025-01-05" diff --git a/vars/blueline b/vars/blueline deleted file mode 100644 index 07e1d712..00000000 --- a/vars/blueline +++ /dev/null @@ -1,45 +0,0 @@ -# Pixel 3 - -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - abl - aop - cmnlib - cmnlib64 - devcfg - hyp - keymaster - qupfw - tz - xbl - xbl_config - modem -) - -# Usage: ${device_repos[@]} -device_repos=( - # common repos in crosshatch -) - -# Updated semi-manually via pixel/update-any-var.sh - -readonly build_id=SP1A.210812.016.C2 # Jun 2022 - -# Updated automatically via pixel/update-device-vars.sh - -readonly aosp_branch="android12-s5-release" - -readonly prev_aosp_tag="android-12.0.0_r31" -readonly aosp_tag="android-12.0.0_r34" - -readonly build_number="8618562" - -readonly image_url="https://dl.google.com/dl/android/aosp/blueline-sp1a.210812.016.c2-factory-fa981d87.zip" -readonly image_sha256="fa981d87b6b28a1996161accbb147f46fe29663bb2ce6cc13dc9e500cbc59c93" - -readonly flash_url="https://flash.android.com/build/8618562?target=blueline-user&signed" - -readonly ota_url="https://dl.google.com/dl/android/aosp/blueline-ota-sp1a.210812.016.c2-f7ebc6b3.zip" -readonly ota_sha256="f7ebc6b326be1b40355d1e0b6d5e5e73204878f3419dec954eb35e1677bb12a1" - -readonly security_patch="2021-10-05" diff --git a/vars/bonito b/vars/bonito deleted file mode 100644 index ad502707..00000000 --- a/vars/bonito +++ /dev/null @@ -1,46 +0,0 @@ -# Pixel 3a XL - -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - abl - aop - cmnlib - cmnlib64 - devcfg - hyp - keymaster - qupfw - tz - xbl - xbl_config - modem -) - -# Usage: ${device_repos[@]} -device_repos=( - device/google/bonito - device/google/bonito-sepolicy -) - -# Updated semi-manually via pixel/update-any-var.sh - -readonly build_id="SP2A.220505.008" - -# Updated automatically via pixel/update-device-vars.sh - -readonly aosp_branch="android12L-release" - -readonly prev_aosp_tag="android-12.1.0_r6" -readonly aosp_tag="android-12.1.0_r27" - -readonly build_number="8782922" - -readonly image_url="https://dl.google.com/dl/android/aosp/bonito-sp2a.220505.008-factory-db19d2aa.zip" -readonly image_sha256="db19d2aaff36f29b7f58f11acad856f9382dafa1ae9160a692782e27cd7b0002" - -readonly flash_url="https://flash.android.com/build/8782922?target=bonito-user&signed" - -readonly ota_url="https://dl.google.com/dl/android/aosp/bonito-ota-sp2a.220505.008-37a410d5.zip" -readonly ota_sha256="37a410d5a370771625e9c607913ab94b07e1bebdb1b0c1a931854d48b5defe53" - -readonly security_patch="2022-05-05" diff --git a/vars/bramble b/vars/bramble index 1b29e8da..092fcc01 100644 --- a/vars/bramble +++ b/vars/bramble @@ -1,47 +1,31 @@ # Pixel 4a (5G) -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - abl - aop - devcfg - hyp - keymaster - qupfw - tz - uefisecapp - xbl - xbl_config - featenabler - modem -) - # Usage: ${device_repos[@]} device_repos=( - # common repos in redfin + # common repos in barbet device/google/bramble device/google/bramble-sepolicy ) # Updated semi-manually via pixel/update-any-var.sh -readonly build_id="TQ3A.230901.001" +readonly build_id="UP1A.231105.001.B2" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android14-release" -readonly prev_aosp_tag="android-13.0.0_r67" -readonly aosp_tag="android-13.0.0_r75" +readonly prev_aosp_tag="android-14.0.0_r13" +readonly aosp_tag="android-14.0.0_r28" -readonly build_number="10750268" +readonly build_number="11260668" -readonly image_url="https://dl.google.com/dl/android/aosp/bramble-tq3a.230901.001-factory-ae237efd.zip" -readonly image_sha256="ae237efd5531feedc43038ec8326f2f7f418541deab1363b500d23b3b355ee10" +readonly image_url="https://dl.google.com/dl/android/aosp/bramble-up1a.231105.001.b2-factory-46a218d9.zip" +readonly image_sha256="46a218d9dc2bf1802a584fa4e7e1b4d609a62189bd87a474201fb6d84e1c3e1c" -readonly flash_url="https://flash.android.com/build/10750268?target=bramble-user&signed" +readonly flash_url="https://flash.android.com/build/11260668?target=bramble-user&signed" -readonly ota_url="https://dl.google.com/dl/android/aosp/bramble-ota-tq3a.230901.001-6d107ffa.zip" -readonly ota_sha256="6d107ffac1cd3da2c972112acc75957ed725e5c13d57ca724d9bcca5404fcebd" +readonly ota_url="https://dl.google.com/dl/android/aosp/bramble-ota-up1a.231105.001.b2-06727ba9.zip" +readonly ota_sha256="06727ba9ba1d53b7c7ed3ae22eb5fada4af475ea5725a569d05774c753f32f48" -readonly security_patch="2023-09-01" +readonly security_patch="2023-11-05" diff --git a/vars/caiman b/vars/caiman new file mode 100644 index 00000000..b4265a3a --- /dev/null +++ b/vars/caiman @@ -0,0 +1,29 @@ +# Pixel 9 Pro + +# Usage: ${device_repos[@]} +device_repos=( + # common repos in komodo +) + +# Updated semi-manually via pixel/update-any-var.sh + +readonly build_id="AP4A.250105.002" + +# Updated automatically via pixel/update-device-vars.sh + +readonly aosp_branch="android15-qpr1-release" + +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" + +readonly build_number="12701944" + +readonly image_url="https://dl.google.com/dl/android/aosp/caiman-ap4a.250105.002-factory-c63e0cc2.zip" +readonly image_sha256="c63e0cc23ddf96bf963dc9e473024ee0059009143addb5d54c5d3731e8ef0317" + +readonly flash_url="https://flash.android.com/build/12701944?target=caiman-user&signed" + +readonly ota_url="https://dl.google.com/dl/android/aosp/caiman-ota-ap4a.250105.002-678a8519.zip" +readonly ota_sha256="678a85190456a7140d34fa2ef10c54c8bd92da2293d6bfca40075649723e4388" + +readonly security_patch="2025-01-05" diff --git a/vars/cheetah b/vars/cheetah index fd6521f1..0f817424 100644 --- a/vars/cheetah +++ b/vars/cheetah @@ -1,47 +1,31 @@ # Pixel 7 Pro -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - bl1 - pbl - bl2 - abl - bl31 - tzsw - gsa - ldfw - modem -) - # Usage: ${device_repos[@]} device_repos=( device/google/gs201 device/google/gs201-sepolicy - device/google/gs-common device/google/pantah ) -readonly fbpk_version="v2" - # Updated semi-manually via pixel/update-any-var.sh -readonly build_id="TQ3A.230901.001" +readonly build_id="AP4A.250105.002" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android15-qpr1-release" -readonly prev_aosp_tag="android-13.0.0_r67" -readonly aosp_tag="android-13.0.0_r75" +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" -readonly build_number="10750268" +readonly build_number="12701944" -readonly image_url="https://dl.google.com/dl/android/aosp/cheetah-tq3a.230901.001-factory-6b946f4d.zip" -readonly image_sha256="6b946f4db4b28d04ff436924f9e9dbf18f989df22c2298bbf7889f1a7db9d515" +readonly image_url="https://dl.google.com/dl/android/aosp/cheetah-ap4a.250105.002-factory-7574869b.zip" +readonly image_sha256="7574869b3d4379a2cd813ab36f42b58f8380f881d5f622a42cc81358b9c4172b" -readonly flash_url="https://flash.android.com/build/10750268?target=cheetah-user&signed" +readonly flash_url="https://flash.android.com/build/12701944?target=cheetah-user&signed" -readonly ota_url="https://dl.google.com/dl/android/aosp/cheetah-ota-tq3a.230901.001-6b881553.zip" -readonly ota_sha256="6b881553f012d582080642d660e1cf5c9e6fe41e9f1c6ab12ae87fab7894e307" +readonly ota_url="https://dl.google.com/dl/android/aosp/cheetah-ota-ap4a.250105.002-f36057bd.zip" +readonly ota_sha256="f36057bde1e0a9c49adf89ed9385b3cd3565190cedb2666a3387f14c0f505cdf" -readonly security_patch="2023-09-01" +readonly security_patch="2025-01-05" diff --git a/vars/comet b/vars/comet new file mode 100644 index 00000000..0d6ecc3c --- /dev/null +++ b/vars/comet @@ -0,0 +1,30 @@ +# Pixel 9 Pro Fold + +# Usage: ${device_repos[@]} +device_repos=( + device/google/comet + device/google/comet-sepolicy +) + +# Updated semi-manually via pixel/update-any-var.sh + +readonly build_id="AP4A.250105.002" + +# Updated automatically via pixel/update-device-vars.sh + +readonly aosp_branch="android15-qpr1-release" + +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" + +readonly build_number="12701944" + +readonly image_url="https://dl.google.com/dl/android/aosp/comet-ap4a.250105.002-factory-aa2a315e.zip" +readonly image_sha256="aa2a315e4b94ccdb010bddbaf8ba567864096ac478cb8b68cce1627736ace4ba" + +readonly flash_url="https://flash.android.com/build/12701944?target=comet-user&signed" + +readonly ota_url="https://dl.google.com/dl/android/aosp/comet-ota-ap4a.250105.002-9273a642.zip" +readonly ota_sha256="9273a6429bcee2d0d94fb5bb30bdde30767baa1388e69a2ffda94833339b2264" + +readonly security_patch="2025-01-05" diff --git a/vars/common b/vars/common index b89f243b..8d14ec97 100644 --- a/vars/common +++ b/vars/common @@ -1,20 +1,20 @@ # Entire file updated manually -readonly android_version=13 # For build-desc-fingerprint.sh -readonly aosp_tag_match=android-13.0 # For update-device-vars.sh +readonly android_version=15 # For build-desc-fingerprint.sh +readonly aosp_tag_match=android-15.0 # For update-device-vars.sh -readonly os_branch=android13 -readonly device_branch=android13 +readonly os_branch=staging/android15 +readonly device_branch=staging/android15 -readonly common_aosp_branch=android13-security-release # Oct 2023 +readonly common_aosp_branch=android15-qpr1-release # Jan 2025 -readonly prev_common_aosp_tag=android-security-13.0.0_r9 # Sep 2023 -readonly common_aosp_tag=android-security-13.0.0_r10 # Oct 2023 +readonly prev_common_aosp_tag=android-15.0.0_r6 # Dec 2024, Pixel 6-9 +readonly common_aosp_tag=android-15.0.0_r10 # Jan 2025, Pixel 6-9 -readonly common_aosp_build_id=TQ3A.230905.001 # Sep 2023, Pixel 4a (5G) - 7a +readonly common_aosp_build_id=AP4A.250105.002 # Jan 2025, Pixel 6-9 -readonly topic=oct23 +readonly topic=jan25 -readonly lineageos_branch=lineage-20.0 -readonly lineageos_device_branch=lineage-20 +readonly lineageos_branch=lineage-22.1 +readonly lineageos_device_branch=lineage-22.1 readonly merge_method="merge" diff --git a/vars/coral b/vars/coral index dd4c3e03..0981cdef 100644 --- a/vars/coral +++ b/vars/coral @@ -1,20 +1,5 @@ # Pixel 4 XL -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - abl - aop - devcfg - hyp - keymaster - qupfw - tz - uefisecapp - xbl - xbl_config - modem -) - # Usage: ${device_repos[@]} device_repos=( device/google/coral diff --git a/vars/crosshatch b/vars/crosshatch deleted file mode 100644 index ba7e3b76..00000000 --- a/vars/crosshatch +++ /dev/null @@ -1,46 +0,0 @@ -# Pixel 3 XL - -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - abl - aop - cmnlib - cmnlib64 - devcfg - hyp - keymaster - qupfw - tz - xbl - xbl_config - modem -) - -# Usage: ${device_repos[@]} -device_repos=( - device/google/crosshatch - device/google/crosshatch-sepolicy -) - -# Updated semi-manually via pixel/update-any-var.sh - -readonly build_id=SP1A.210812.016.C2 # Jun 2022 - -# Updated automatically via pixel/update-device-vars.sh - -readonly aosp_branch="android12-s5-release" - -readonly prev_aosp_tag="android-12.0.0_r31" -readonly aosp_tag="android-12.0.0_r34" - -readonly build_number="8618562" - -readonly image_url="https://dl.google.com/dl/android/aosp/crosshatch-sp1a.210812.016.c2-factory-27f59137.zip" -readonly image_sha256="27f59137f9802f6913f92d820bb0cbd80793f6e4a80c5f05e1242810903d4aea" - -readonly flash_url="https://flash.android.com/build/8618562?target=crosshatch-user&signed" - -readonly ota_url="https://dl.google.com/dl/android/aosp/crosshatch-ota-sp1a.210812.016.c2-efea980d.zip" -readonly ota_sha256="efea980d6359363b645435a5d077228d9a00d6f9772bf6adf16e26090dba0d53" - -readonly security_patch="2021-10-05" diff --git a/vars/device_kernels b/vars/device_kernels index f693ef12..906f5210 100644 --- a/vars/device_kernels +++ b/vars/device_kernels @@ -1,14 +1,6 @@ # Usage: ${device_kernels[@]} readonly device_kernels=( - felix - tangorpro - lynx - pantah - bluejay - raviole redbull sunfish coral - bonito - crosshatch ) diff --git a/vars/devices b/vars/devices index fb6c5f39..a2f889b2 100644 --- a/vars/devices +++ b/vars/devices @@ -1,6 +1,18 @@ # All supported devices # Usage: ${devices[@]} readonly devices=( + FP5 + FP4 + devon + hawao + rhode + comet + komodo + caiman + tokay + akita + husky + shiba felix tangorpro lynx @@ -15,10 +27,4 @@ readonly devices=( sunfish coral flame - bonito - sargo - crosshatch - blueline - FP4 - axolotl ) diff --git a/vars/felix b/vars/felix index 5fb8de27..289bbf8c 100644 --- a/vars/felix +++ b/vars/felix @@ -1,45 +1,30 @@ # Pixel Fold -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - bl1 - pbl - bl2 - abl - bl31 - tzsw - gsa - ldfw - modem -) - # Usage: ${device_repos[@]} device_repos=( device/google/felix device/google/felix-sepolicy ) -readonly fbpk_version="v2" - # Updated semi-manually via pixel/update-any-var.sh -readonly build_id="TQ3C.230901.001.A1" +readonly build_id="AP4A.250105.002" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-c-s10-release" +readonly aosp_branch="android15-qpr1-release" -readonly prev_aosp_tag="android-13.0.0_r72" -readonly aosp_tag="android-13.0.0_r80" +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" -readonly build_number="10750808" +readonly build_number="12701944" -readonly image_url="https://dl.google.com/dl/android/aosp/felix-tq3c.230901.001.a1-factory-334244a0.zip" -readonly image_sha256="334244a068ae61f6f609c16171fdd06c17675f3ae1d7a802241892ec3a988df4" +readonly image_url="https://dl.google.com/dl/android/aosp/felix-ap4a.250105.002-factory-2f535487.zip" +readonly image_sha256="2f535487264aea5b68e1243eaf19ff0b542f426411ff2e0effaf051701388147" -readonly flash_url="https://flash.android.com/build/10750808?target=felix-user&signed" +readonly flash_url="https://flash.android.com/build/12701944?target=felix-user&signed" -readonly ota_url="https://dl.google.com/dl/android/aosp/felix-ota-tq3c.230901.001.a1-2fd0f36e.zip" -readonly ota_sha256="2fd0f36e0ac316ca5678043cd2a597e09ca6ac0557d9d8e4499f17ce24cb032c" +readonly ota_url="https://dl.google.com/dl/android/aosp/felix-ota-ap4a.250105.002-6523eab6.zip" +readonly ota_sha256="6523eab624f94e4087717296faa174961bc29ee62da33146c56fa7ab84baf283" -readonly security_patch="2023-09-01" +readonly security_patch="2025-01-05" diff --git a/vars/flame b/vars/flame index c2c86208..c1b48d2a 100644 --- a/vars/flame +++ b/vars/flame @@ -1,20 +1,5 @@ # Pixel 4 -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - abl - aop - devcfg - hyp - keymaster - qupfw - tz - uefisecapp - xbl - xbl_config - modem -) - # Usage: ${device_repos[@]} device_repos=( # common repos in coral diff --git a/vars/husky b/vars/husky new file mode 100644 index 00000000..a9a6f12d --- /dev/null +++ b/vars/husky @@ -0,0 +1,32 @@ +# Pixel 8 Pro + +# Usage: ${device_repos[@]} +device_repos=( + device/google/zuma + device/google/zuma-sepolicy + device/google/shusky + device/google/shusky-sepolicy +) + +# Updated semi-manually via pixel/update-any-var.sh + +readonly build_id="AP4A.250105.002" + +# Updated automatically via pixel/update-device-vars.sh + +readonly aosp_branch="android15-qpr1-release" + +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" + +readonly build_number="12701944" + +readonly image_url="https://dl.google.com/dl/android/aosp/husky-ap4a.250105.002-factory-0b0ddde9.zip" +readonly image_sha256="0b0ddde9994194b36a6a98b9335d961bdb4d851777e83023de634ca1e11e3276" + +readonly flash_url="https://flash.android.com/build/12701944?target=husky-user&signed" + +readonly ota_url="https://dl.google.com/dl/android/aosp/husky-ota-ap4a.250105.002-a9df99e8.zip" +readonly ota_sha256="a9df99e894b6cc17256a35a5c6dfb8a4c31978dda26c4d4b74fedfa46b5a6e92" + +readonly security_patch="2025-01-05" diff --git a/vars/komodo b/vars/komodo new file mode 100644 index 00000000..359b56eb --- /dev/null +++ b/vars/komodo @@ -0,0 +1,33 @@ +# Pixel 9 Pro XL + +# Usage: ${device_repos[@]} +device_repos=( + device/google/gs-common + device/google/zumapro + device/google/zumapro-sepolicy + device/google/caimito + device/google/caimito-sepolicy +) + +# Updated semi-manually via pixel/update-any-var.sh + +readonly build_id="AP4A.250105.002" + +# Updated automatically via pixel/update-device-vars.sh + +readonly aosp_branch="android15-qpr1-release" + +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" + +readonly build_number="12701944" + +readonly image_url="https://dl.google.com/dl/android/aosp/komodo-ap4a.250105.002-factory-1f16cb17.zip" +readonly image_sha256="1f16cb17ce7221aa40dc9ddf3fb8d166257a4a69d8d3751e25528ab867516a67" + +readonly flash_url="https://flash.android.com/build/12701944?target=komodo-user&signed" + +readonly ota_url="https://dl.google.com/dl/android/aosp/komodo-ota-ap4a.250105.002-41ab2eac.zip" +readonly ota_sha256="41ab2eacd26553a88d72a37295604f66eb8807b094d4cad043c482408c16bd38" + +readonly security_patch="2025-01-05" diff --git a/vars/lineage_devices b/vars/lineage_devices index 2cc2a38d..d17e40d8 100644 --- a/vars/lineage_devices +++ b/vars/lineage_devices @@ -1,8 +1,8 @@ # LineageOS supported devices (excluding Pixels) # Usage: ${lineage_devices[@]} readonly lineage_devices=( + FP5 FP4 - axolotl devon hawao rhode diff --git a/vars/lynx b/vars/lynx index 79eb3cc1..531e64a1 100644 --- a/vars/lynx +++ b/vars/lynx @@ -1,45 +1,30 @@ # Pixel 7a -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - bl1 - pbl - bl2 - abl - bl31 - tzsw - gsa - ldfw - modem -) - # Usage: ${device_repos[@]} device_repos=( device/google/lynx device/google/lynx-sepolicy ) -readonly fbpk_version="v2" - # Updated semi-manually via pixel/update-any-var.sh -readonly build_id="TQ3A.230901.001" +readonly build_id="AP4A.250105.002" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android15-qpr1-release" -readonly prev_aosp_tag="android-13.0.0_r67" -readonly aosp_tag="android-13.0.0_r75" +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" -readonly build_number="10750268" +readonly build_number="12701944" -readonly image_url="https://dl.google.com/dl/android/aosp/lynx-tq3a.230901.001-factory-c54b4a33.zip" -readonly image_sha256="c54b4a33f42db91904a0b1ffb6c272207437b14e2331fc093b9f111e3b6d4ee4" +readonly image_url="https://dl.google.com/dl/android/aosp/lynx-ap4a.250105.002-factory-9426ca16.zip" +readonly image_sha256="9426ca164b081aa3ed051a123a06a632004459a6913e59a58dacd06344442bae" -readonly flash_url="https://flash.android.com/build/10750268?target=lynx-user&signed" +readonly flash_url="https://flash.android.com/build/12701944?target=lynx-user&signed" -readonly ota_url="https://dl.google.com/dl/android/aosp/lynx-ota-tq3a.230901.001-79bacf86.zip" -readonly ota_sha256="79bacf863b8de86041086834b94e428a73337922cd73bde116f25c5deb57db3f" +readonly ota_url="https://dl.google.com/dl/android/aosp/lynx-ota-ap4a.250105.002-c8dc5836.zip" +readonly ota_sha256="c8dc58360421b0db748ecbc16352aed6d559a6c6cf49e31d5b50451f465c1b10" -readonly security_patch="2023-09-01" +readonly security_patch="2025-01-05" diff --git a/vars/msm-4.9 b/vars/msm-4.9 deleted file mode 100644 index e2155f78..00000000 --- a/vars/msm-4.9 +++ /dev/null @@ -1,8 +0,0 @@ -# Pixel 3, 3a - -# Updated semi-manually via pixel/update-any-var.sh - -readonly kernel_branch="android-msm-bonito-4.9-android12L" # May 2022 - -readonly prev_kernel_tag=android-12.1.0_r0.17 # May 2022 -readonly kernel_tag=android-12.1.0_r0.23 # May 2022 diff --git a/vars/oriole b/vars/oriole index acf5156a..cf4d7ccf 100644 --- a/vars/oriole +++ b/vars/oriole @@ -1,44 +1,29 @@ # Pixel 6 -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - bl1 - pbl - bl2 - abl - bl31 - tzsw - gsa - ldfw - modem -) - # Usage: ${device_repos[@]} device_repos=( # common repos in raven ) -readonly fbpk_version="v2" - # Updated semi-manually via pixel/update-any-var.sh -readonly build_id="TQ3A.230901.001" +readonly build_id="AP4A.250105.002" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android15-qpr1-release" -readonly prev_aosp_tag="android-13.0.0_r67" -readonly aosp_tag="android-13.0.0_r75" +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" -readonly build_number="10750268" +readonly build_number="12701944" -readonly image_url="https://dl.google.com/dl/android/aosp/oriole-tq3a.230901.001-factory-57afd319.zip" -readonly image_sha256="57afd319cb7660c477c0063b3ae6b5e6159fa9f38597d9d21595a7f3a863b2cd" +readonly image_url="https://dl.google.com/dl/android/aosp/oriole-ap4a.250105.002-factory-242e9271.zip" +readonly image_sha256="242e92719154c8ee3bf906aecddae049798c28108e510cea0d6f011a804fcf7f" -readonly flash_url="https://flash.android.com/build/10750268?target=oriole-user&signed" +readonly flash_url="https://flash.android.com/build/12701944?target=oriole-user&signed" -readonly ota_url="https://dl.google.com/dl/android/aosp/oriole-ota-tq3a.230901.001-ea9d9bca.zip" -readonly ota_sha256="ea9d9bca6dfc031e2e7969b6e143005cd87531a95cf2b736cd57c1e37ec430e8" +readonly ota_url="https://dl.google.com/dl/android/aosp/oriole-ota-ap4a.250105.002-5e0383a4.zip" +readonly ota_sha256="5e0383a4d1a3b6b788fbca7c1d52b7e93702969cbb640a474461ff1dd5165dfb" -readonly security_patch="2023-09-01" +readonly security_patch="2025-01-05" diff --git a/vars/panther b/vars/panther index 3a8fd6e6..b5b78561 100644 --- a/vars/panther +++ b/vars/panther @@ -1,44 +1,29 @@ # Pixel 7 -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - bl1 - pbl - bl2 - abl - bl31 - tzsw - gsa - ldfw - modem -) - # Usage: ${device_repos[@]} device_repos=( # common repos in cheetah ) -readonly fbpk_version="v2" - # Updated semi-manually via pixel/update-any-var.sh -readonly build_id="TQ3A.230901.001" +readonly build_id="AP4A.250105.002" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android15-qpr1-release" -readonly prev_aosp_tag="android-13.0.0_r67" -readonly aosp_tag="android-13.0.0_r75" +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" -readonly build_number="10750268" +readonly build_number="12701944" -readonly image_url="https://dl.google.com/dl/android/aosp/panther-tq3a.230901.001-factory-21bf556f.zip" -readonly image_sha256="21bf556f0d65fc1e383a5d0614084c9dce685219537e6909d0bbcffe0ef331ea" +readonly image_url="https://dl.google.com/dl/android/aosp/panther-ap4a.250105.002-factory-19fbfb65.zip" +readonly image_sha256="19fbfb654a3c566cc993c12335d288af9e57161ceab2a00d0754ccaffe7450ee" -readonly flash_url="https://flash.android.com/build/10750268?target=panther-user&signed" +readonly flash_url="https://flash.android.com/build/12701944?target=panther-user&signed" -readonly ota_url="https://dl.google.com/dl/android/aosp/panther-ota-tq3a.230901.001-a8420d46.zip" -readonly ota_sha256="a8420d46318e07094574d13415bf30be90c84f4be148582bc62c26e230102e87" +readonly ota_url="https://dl.google.com/dl/android/aosp/panther-ota-ap4a.250105.002-6e2a6418.zip" +readonly ota_sha256="6e2a641805f44df0f989deb0a87eb69de61d3e82648d3999185854d037f03ab3" -readonly security_patch="2023-09-01" +readonly security_patch="2025-01-05" diff --git a/vars/pixels b/vars/pixels index 55571687..51d8665b 100644 --- a/vars/pixels +++ b/vars/pixels @@ -1,6 +1,13 @@ # Google Pixels, currently supported in AOSP # Usage: ${devices[@]} readonly devices=( + comet + komodo + caiman + tokay + akita + husky + shiba felix tangorpro lynx @@ -9,7 +16,4 @@ readonly devices=( bluejay raven oriole - barbet - redfin - bramble ) diff --git a/vars/raven b/vars/raven index 665096dc..5de5ff6c 100644 --- a/vars/raven +++ b/vars/raven @@ -1,18 +1,5 @@ # Pixel 6 Pro -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - bl1 - pbl - bl2 - abl - bl31 - tzsw - gsa - ldfw - modem -) - # Usage: ${device_repos[@]} device_repos=( device/google/gs101 @@ -20,27 +7,25 @@ device_repos=( device/google/raviole ) -readonly fbpk_version="v2" - # Updated semi-manually via pixel/update-any-var.sh -readonly build_id="TQ3A.230901.001" +readonly build_id="AP4A.250105.002" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android15-qpr1-release" -readonly prev_aosp_tag="android-13.0.0_r67" -readonly aosp_tag="android-13.0.0_r75" +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" -readonly build_number="10750268" +readonly build_number="12701944" -readonly image_url="https://dl.google.com/dl/android/aosp/raven-tq3a.230901.001-factory-5917d34f.zip" -readonly image_sha256="5917d34f251c8094b0db034127220a9244acf13559f16e929f83288de4545453" +readonly image_url="https://dl.google.com/dl/android/aosp/raven-ap4a.250105.002-factory-a6237d24.zip" +readonly image_sha256="a6237d24518841c6d60c1df36932ed31fda9ee55575bef1d1b59f52aeabb6a8a" -readonly flash_url="https://flash.android.com/build/10750268?target=raven-user&signed" +readonly flash_url="https://flash.android.com/build/12701944?target=raven-user&signed" -readonly ota_url="https://dl.google.com/dl/android/aosp/raven-ota-tq3a.230901.001-16187f60.zip" -readonly ota_sha256="16187f604421f90baeb73ddeb04c12328ffe8dd664fd25cb39b8324d25f4a0a5" +readonly ota_url="https://dl.google.com/dl/android/aosp/raven-ota-ap4a.250105.002-1653a739.zip" +readonly ota_sha256="1653a7393e55d9d7e85fa57d01a17267caee3e024e9a81f93aa907d7bcb521d9" -readonly security_patch="2023-09-01" +readonly security_patch="2025-01-05" diff --git a/vars/redfin b/vars/redfin index 47d234c7..d6292219 100644 --- a/vars/redfin +++ b/vars/redfin @@ -1,48 +1,31 @@ # Pixel 5 -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - abl - aop - devcfg - hyp - keymaster - qupfw - tz - uefisecapp - xbl - xbl_config - featenabler - modem -) - # Usage: ${device_repos[@]} device_repos=( - device/google/redbull - device/google/redbull-sepolicy + # common repos in barbet device/google/redfin device/google/redfin-sepolicy ) # Updated semi-manually via pixel/update-any-var.sh -readonly build_id="TQ3A.230901.001" +readonly build_id="UP1A.231105.001.B2" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android14-release" -readonly prev_aosp_tag="android-13.0.0_r67" -readonly aosp_tag="android-13.0.0_r75" +readonly prev_aosp_tag="android-14.0.0_r13" +readonly aosp_tag="android-14.0.0_r28" -readonly build_number="10750268" +readonly build_number="11260668" -readonly image_url="https://dl.google.com/dl/android/aosp/redfin-tq3a.230901.001-factory-308061bf.zip" -readonly image_sha256="308061bf6961ade40cae773395e01e5ca05fc8ebb554d4c56c42057b1022ec2e" +readonly image_url="https://dl.google.com/dl/android/aosp/redfin-up1a.231105.001.b2-factory-4e5a2679.zip" +readonly image_sha256="4e5a26793d8400f13b72cbd17aeb284e040b3236436f0c6f3119ccc77d4495ad" -readonly flash_url="https://flash.android.com/build/10750268?target=redfin-user&signed" +readonly flash_url="https://flash.android.com/build/11260668?target=redfin-user&signed" -readonly ota_url="https://dl.google.com/dl/android/aosp/redfin-ota-tq3a.230901.001-eac0a8f6.zip" -readonly ota_sha256="eac0a8f686a2d16b5ee2944d22cda9dec7ca044f521b7b240f6a312daa3b5115" +readonly ota_url="https://dl.google.com/dl/android/aosp/redfin-ota-up1a.231105.001.b2-17322169.zip" +readonly ota_sha256="17322169afdc648e2e9ff46eee16156d5bdccd8842acb41b870b905cc28fe3b5" -readonly security_patch="2023-09-01" +readonly security_patch="2023-11-05" diff --git a/vars/sargo b/vars/sargo deleted file mode 100644 index e70a8bce..00000000 --- a/vars/sargo +++ /dev/null @@ -1,45 +0,0 @@ -# Pixel 3a - -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - abl - aop - cmnlib - cmnlib64 - devcfg - hyp - keymaster - qupfw - tz - xbl - xbl_config - modem -) - -# Usage: ${device_repos[@]} -device_repos=( - # common repos in bonito -) - -# Updated semi-manually via pixel/update-any-var.sh - -readonly build_id="SP2A.220505.008" - -# Updated automatically via pixel/update-device-vars.sh - -readonly aosp_branch="android12L-release" - -readonly prev_aosp_tag="android-12.1.0_r6" -readonly aosp_tag="android-12.1.0_r27" - -readonly build_number="8782922" - -readonly image_url="https://dl.google.com/dl/android/aosp/sargo-sp2a.220505.008-factory-071e368a.zip" -readonly image_sha256="071e368a127ce5a3c553f8b717895eaf1e44dec78971dc4c80baa7237d2d37f1" - -readonly flash_url="https://flash.android.com/build/8782922?target=sargo-user&signed" - -readonly ota_url="https://dl.google.com/dl/android/aosp/sargo-ota-sp2a.220505.008-2037245c.zip" -readonly ota_sha256="2037245c06c8e0912c098c347be7b49a707d7cacf9a663ad7e68c96ce75ea32b" - -readonly security_patch="2022-05-05" diff --git a/vars/shiba b/vars/shiba new file mode 100644 index 00000000..68cf92d0 --- /dev/null +++ b/vars/shiba @@ -0,0 +1,29 @@ +# Pixel 8 + +# Usage: ${device_repos[@]} +device_repos=( + # common repos in husky +) + +# Updated semi-manually via pixel/update-any-var.sh + +readonly build_id="AP4A.250105.002" + +# Updated automatically via pixel/update-device-vars.sh + +readonly aosp_branch="android15-qpr1-release" + +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" + +readonly build_number="12701944" + +readonly image_url="https://dl.google.com/dl/android/aosp/shiba-ap4a.250105.002-factory-fe54edcd.zip" +readonly image_sha256="fe54edcd0607c29bec24b016655d99128f3597c98561f1d27efa61ecdb5a31a3" + +readonly flash_url="https://flash.android.com/build/12701944?target=shiba-user&signed" + +readonly ota_url="https://dl.google.com/dl/android/aosp/shiba-ota-ap4a.250105.002-8973f6e7.zip" +readonly ota_sha256="8973f6e79d0f3a371e5c342b15aa39f30d6f43cfa93d2bb5913d10247cda27f7" + +readonly security_patch="2025-01-05" diff --git a/vars/sunfish b/vars/sunfish index 2e2097ed..2c7c9243 100644 --- a/vars/sunfish +++ b/vars/sunfish @@ -1,20 +1,5 @@ # Pixel 4a -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - abl - aop - devcfg - hyp - keymaster - qupfw - tz - uefisecapp - xbl - xbl_config - modem -) - # Usage: ${device_repos[@]} device_repos=( device/google/sunfish @@ -23,23 +8,23 @@ device_repos=( # Updated semi-manually via pixel/update-any-var.sh -readonly build_id="TQ3A.230805.001" +readonly build_id="TQ3A.230805.001.S1" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android13-qpr3-s14-release" -readonly prev_aosp_tag="android-13.0.0_r61" -readonly aosp_tag="android-13.0.0_r67" +readonly prev_aosp_tag="android-13.0.0_r67" +readonly aosp_tag="android-13.0.0_r83" -readonly build_number="10316531" +readonly build_number="10786265" -readonly image_url="https://dl.google.com/dl/android/aosp/sunfish-tq3a.230805.001-factory-b3d86cc6.zip" -readonly image_sha256="b3d86cc61452d79b7e67426fe40594ede549ead3ab20d7729caf1a1dfbd8e107" +readonly image_url="https://dl.google.com/dl/android/aosp/sunfish-tq3a.230805.001.s1-factory-82902ea9.zip" +readonly image_sha256="82902ea98c80f1a22706279a30d2bc46aa55cbe60703c9a02ba043bd052c6d99" -readonly flash_url="https://flash.android.com/build/10316531?target=sunfish-user&signed" +readonly flash_url="https://flash.android.com/build/10786265?target=sunfish-user&signed" -readonly ota_url="https://dl.google.com/dl/android/aosp/sunfish-ota-tq3a.230805.001-01fd34b2.zip" -readonly ota_sha256="01fd34b206152a3559039161c9874ab03df37da4268b86a9e0be899de5fc0af7" +readonly ota_url="https://dl.google.com/dl/android/aosp/sunfish-ota-tq3a.230805.001.s1-965296b1.zip" +readonly ota_sha256="965296b1498b1d71bbf4013088b34213d5e6bc4dc836a7d06d1534eaf7621336" readonly security_patch="2023-08-05" diff --git a/vars/tangorpro b/vars/tangorpro index f7154a87..c45b839e 100644 --- a/vars/tangorpro +++ b/vars/tangorpro @@ -1,45 +1,30 @@ # Pixel Tablet -# Usage: ${firmware_partitions[@]} -readonly firmware_partitions=( - bl1 - pbl - bl2 - abl - bl31 - tzsw - gsa - ldfw -) - # Usage: ${device_repos[@]} device_repos=( device/google/tangorpro device/google/tangorpro-sepolicy ) -readonly fbpk_version="v2" -readonly wifi_only=true - # Updated semi-manually via pixel/update-any-var.sh -readonly build_id="TQ3A.230901.001.B1" +readonly build_id="AP4A.250105.002" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-s10-release" +readonly aosp_branch="android15-qpr1-release" -readonly prev_aosp_tag="android-13.0.0_r71" -readonly aosp_tag="android-13.0.0_r76" +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" -readonly build_number="10750577" +readonly build_number="12701944" -readonly image_url="https://dl.google.com/dl/android/aosp/tangorpro-tq3a.230901.001.b1-factory-5ca0683c.zip" -readonly image_sha256="5ca0683c5fdc33a4bb77e6648d76382bdc9a0bf37f15af5ae4dcb302b6530837" +readonly image_url="https://dl.google.com/dl/android/aosp/tangorpro-ap4a.250105.002-factory-8c471fde.zip" +readonly image_sha256="8c471fde1ae795fdd264e4ba9bcb2b93e8a3aa88a8a38df0ad40b3cb4559424f" -readonly flash_url="https://flash.android.com/build/10750577?target=tangorpro-user&signed" +readonly flash_url="https://flash.android.com/build/12701944?target=tangorpro-user&signed" -readonly ota_url="https://dl.google.com/dl/android/aosp/tangorpro-ota-tq3a.230901.001.b1-d0d5de51.zip" -readonly ota_sha256="d0d5de519ec5d4a45e81e85c62c5072a91b2623a0918aa95c3b92a79d7b1c130" +readonly ota_url="https://dl.google.com/dl/android/aosp/tangorpro-ota-ap4a.250105.002-f0d8d5e9.zip" +readonly ota_sha256="f0d8d5e9f6d288e10c0b53ca4e6b978a223f965af73f5c6f6b00a19a130b7761" -readonly security_patch="2023-09-01" +readonly security_patch="2025-01-05" diff --git a/vars/tokay b/vars/tokay new file mode 100644 index 00000000..3001b605 --- /dev/null +++ b/vars/tokay @@ -0,0 +1,29 @@ +# Pixel 9 + +# Usage: ${device_repos[@]} +device_repos=( + # common repos in komodo +) + +# Updated semi-manually via pixel/update-any-var.sh + +readonly build_id="AP4A.250105.002" + +# Updated automatically via pixel/update-device-vars.sh + +readonly aosp_branch="android15-qpr1-release" + +readonly prev_aosp_tag="android-15.0.0_r6" +readonly aosp_tag="android-15.0.0_r10" + +readonly build_number="12701944" + +readonly image_url="https://dl.google.com/dl/android/aosp/tokay-ap4a.250105.002-factory-d3f58a9f.zip" +readonly image_sha256="d3f58a9f93f634d8e73992a01df3ef5515fad7cef76b0f3fdb240439db279c45" + +readonly flash_url="https://flash.android.com/build/12701944?target=tokay-user&signed" + +readonly ota_url="https://dl.google.com/dl/android/aosp/tokay-ota-ap4a.250105.002-d60a3438.zip" +readonly ota_sha256="d60a34387c64b775bed0edda39c20c26138fb7881b8d00a88ae8f8617178acca" + +readonly security_patch="2025-01-05"