diff --git a/.gitreview b/.gitreview index acd43a23..81db4bdc 100644 --- a/.gitreview +++ b/.gitreview @@ -2,4 +2,4 @@ host=review.calyxos.org port=29418 project=CalyxOS/scripts -defaultbranch=android13 +defaultbranch=android15-qpr2 diff --git a/aosp-merger/_merge_helper.sh b/aosp-merger/_merge_helper.sh index 01f81629..ea488444 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,15 +65,19 @@ 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}" cd "${TOP}/${PROJECTPATH}" # Ditch any existing staging branches -repo abandon "${STAGINGBRANCH}" . +if git show-ref --verify --quiet refs/heads/"${STAGINGBRANCH}"; then + repo abandon "${STAGINGBRANCH}" . +fi 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 +114,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 +129,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..a932384c 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,13 +60,17 @@ 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}" cd "${TOP}/${PROJECTPATH}" # Ditch any existing staging branches -repo abandon "${STAGINGBRANCH}" . +if git show-ref --verify --quiet refs/heads/"${STAGINGBRANCH}"; then + repo abandon "${STAGINGBRANCH}" . +fi repo start "${STAGINGBRANCH}" . if [ -f ".gitupstream" ]; then git fetch -q --force --tags "$(cat .gitupstream)" "${NEWTAG}" @@ -98,7 +102,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..6316549e 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 # @@ -48,13 +48,18 @@ else TOPIC="${topic}" fi +# 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 @@ -67,6 +72,14 @@ 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 ####" - repo upload -c -y --no-verify -o topic="${TOPIC}" . + + BRANCH=$(git config --get branch.${STAGINGBRANCH}.merge | sed 's|refs/heads/||') + if [ -z "${BRANCH}" ]; then + BRANCH="${os_branch}" + fi + + echo -e "\n#### Pushing ${PROJECTPATH} merge to review ####" + git checkout "${STAGINGBRANCH}" + calyxremote | grep -v "Remote 'calyx' created" + git push calyx HEAD:refs/for/"${BRANCH}"%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..cdf22017 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 @@ -54,11 +62,22 @@ def parse_args(): "smart_forwarding_config_component_name_string", "wfc_emergency_address_carrier_app_string", # Always allow editing APNs - "apn_expand_bool", "allow_adding_apns_bool", + "apn_expand_bool", + "hide_carrier_network_settings_bool", + "read_only_apn_fields_string_array", "read_only_apn_types_string_array", - "read_only_apn_fields_string_array"] - + "show_apn_setting_cdma_bool", + # Enhanced 4G toggles + "hide_enhanced_4g_lte_bool", + "editable_enhanced_4g_lte_bool"] + +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 +140,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', @@ -295,7 +316,6 @@ def add_attributes(self): ) self.add_attribute('protocol') self.add_attribute('roaming_protocol') - self.add_attribute('carrier_enabled') self.add_attribute('bearer_bitmask') self.add_attribute('profile_id') self.add_attribute('modem_cognitive') @@ -316,8 +336,6 @@ def add_attributes(self): self.add_attribute('apn_set_id') # No source for integer carrier_id? self.add_attribute('skip_464xlat') - self.add_attribute('user_visible') - self.add_attribute('user_editable') if apns_folder is not None: with open(os.path.join(apns_folder, 'apns-conf.xml'), 'w', encoding='utf-8') as f: diff --git a/factory/FP4/flash-all.bat b/factory/FP4/flash-all.bat new file mode 100644 index 00000000..850f384e --- /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-ap4a.250205.002.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..8f58bf96 --- /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-ap4a.250205.002.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..5657ded8 --- /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-ap4a.250205.002.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..c8a832ee --- /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-ap4a.250205.002.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..254a976c --- /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-15.1-12474670.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-15.1-12474670.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-240919-241106-B-12612898.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-240919-241106-B-12612898.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-ap4a.250205.002.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..5b155069 --- /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-15.1-12474670.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-akita-akita-15.1-12474670.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-akita-g5300o-240919-241106-B-12612898.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-akita-g5300o-240919-241106-B-12612898.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-ap4a.250205.002.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..42688175 --- /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-15.1-12474670.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-akita-akita-15.1-12474670.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-akita-g5300o-240919-241106-B-12612898.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-akita-g5300o-240919-241106-B-12612898.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..c71adf2a --- /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-ap4a.250205.002.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..6a6407fd --- /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-ap4a.250205.002.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..4aebd948 --- /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-15.1-12292109.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-15.1-12292109.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-143112-241107-B-12620021.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-143112-241107-B-12620021.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-ap4a.250205.002.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..323f1a89 --- /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-15.1-12292109.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-bluejay-bluejay-15.1-12292109.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bluejay-g5123b-143112-241107-B-12620021.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bluejay-g5123b-143112-241107-B-12620021.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-ap4a.250205.002.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..281d6b19 --- /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-15.1-12292109.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-bluejay-bluejay-15.1-12292109.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bluejay-g5123b-143112-241107-B-12620021.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-bluejay-g5123b-143112-241107-B-12620021.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..640a9410 --- /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-ap4a.250205.002.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..7c384e8e --- /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-ap4a.250205.002.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..aca4b655 --- /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-15.1-12292122.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-15.1-12292122.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-240919-241106-B-12612898.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-240919-241106-B-12612898.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-ap4a.250205.002.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..e9e178c4 --- /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-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-cheetah-cloudripper-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-cheetah-g5300q-240919-241106-B-12612898.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-cheetah-g5300q-240919-241106-B-12612898.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-ap4a.250205.002.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..8e5045d0 --- /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-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-cheetah-cloudripper-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-cheetah-g5300q-240919-241106-B-12612898.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-cheetah-g5300q-240919-241106-B-12612898.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..314f0ee0 --- /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-ap4a.250205.002.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..1811a5e5 --- /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-ap4a.250205.002.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..adb09f1b --- /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-15.1-12292122.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-15.1-12292122.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-240919-241106-B-12612898.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-240919-241106-B-12612898.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-ap4a.250205.002.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..4aae11a5 --- /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-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-felix-felix-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-felix-g5300q-240919-241106-B-12612898.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-felix-g5300q-240919-241106-B-12612898.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-ap4a.250205.002.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..8de45e87 --- /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-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-felix-felix-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-felix-g5300q-240919-241106-B-12612898.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-felix-g5300q-240919-241106-B-12612898.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..43a51b14 --- /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-ap4a.250205.002.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..abf6de9c --- /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-ap4a.250205.002.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..4421b9c6 --- /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-15.1-12474670.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-15.1-12474670.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-240919-241106-B-12612898.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-240919-241106-B-12612898.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-ap4a.250205.002.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..daa6ad74 --- /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-15.1-12474670.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-husky-ripcurrent-15.1-12474670.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-husky-g5300i-240919-241106-B-12612898.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-husky-g5300i-240919-241106-B-12612898.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-ap4a.250205.002.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..7d0a3b5d --- /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-15.1-12474670.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-husky-ripcurrent-15.1-12474670.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-husky-g5300i-240919-241106-B-12612898.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-husky-g5300i-240919-241106-B-12612898.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..afa4067f --- /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-15.1-12292122.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-15.1-12292122.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-240919-241106-B-12612898.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-240919-241106-B-12612898.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-ap4a.250205.002.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..65a296b0 --- /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-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-lynx-lynx-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-lynx-g5300q-240919-241106-B-12612898.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-lynx-g5300q-240919-241106-B-12612898.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-ap4a.250205.002.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..7b45a5b4 --- /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-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-lynx-lynx-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-lynx-g5300q-240919-241106-B-12612898.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-lynx-g5300q-240919-241106-B-12612898.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..2f0e309a --- /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-15.1-12292109.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-15.1-12292109.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-143112-241107-B-12620021.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-143112-241107-B-12620021.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-ap4a.250205.002.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..09fc0edf --- /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-15.1-12292109.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-oriole-slider-15.1-12292109.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-oriole-g5123b-143112-241107-B-12620021.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-oriole-g5123b-143112-241107-B-12620021.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-ap4a.250205.002.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..fae448fe --- /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-15.1-12292109.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-oriole-slider-15.1-12292109.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-oriole-g5123b-143112-241107-B-12620021.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-oriole-g5123b-143112-241107-B-12620021.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..03b6f76d --- /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-15.1-12292122.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-15.1-12292122.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-240919-241106-B-12612898.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-240919-241106-B-12612898.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-ap4a.250205.002.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..a250a66a --- /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-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-panther-cloudripper-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-panther-g5300q-240919-241106-B-12612898.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-panther-g5300q-240919-241106-B-12612898.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-ap4a.250205.002.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..7b7d2b41 --- /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-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-panther-cloudripper-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-panther-g5300q-240919-241106-B-12612898.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-panther-g5300q-240919-241106-B-12612898.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..e466d574 --- /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-15.1-12292109.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-15.1-12292109.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-143112-241107-B-12620021.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-143112-241107-B-12620021.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-ap4a.250205.002.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..0d441545 --- /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-15.1-12292109.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-raven-slider-15.1-12292109.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-raven-g5123b-143112-241107-B-12620021.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-raven-g5123b-143112-241107-B-12620021.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-ap4a.250205.002.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..20011d29 --- /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-15.1-12292109.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-raven-slider-15.1-12292109.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-raven-g5123b-143112-241107-B-12620021.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-raven-g5123b-143112-241107-B-12620021.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..6d9c51a6 --- /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-ap4a.250205.002.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..3422df59 --- /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-ap4a.250205.002.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..e1fe7905 --- /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-ap4a.250205.002.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..20e46a78 --- /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-ap4a.250205.002.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..0dafe0af --- /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-15.1-12474670.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-15.1-12474670.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-240919-241106-B-12612898.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-240919-241106-B-12612898.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-ap4a.250205.002.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..5335163f --- /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-15.1-12474670.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-shiba-ripcurrent-15.1-12474670.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-shiba-g5300i-240919-241106-B-12612898.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-shiba-g5300i-240919-241106-B-12612898.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-ap4a.250205.002.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..93b9f472 --- /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-15.1-12474670.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-shiba-ripcurrent-15.1-12474670.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-shiba-g5300i-240919-241106-B-12612898.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other radio radio-shiba-g5300i-240919-241106-B-12612898.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..8ce7acc5 --- /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-15.1-12292122.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-15.1-12292122.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-ap4a.250205.002.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..8ce014da --- /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-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-tangorpro-tangorpro-15.1-12292122.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-ap4a.250205.002.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..cbc8ea0a --- /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-15.1-12292122.img +fastboot --set-active=other reboot-bootloader +sleep 5 +fastboot flash --slot=other bootloader bootloader-tangorpro-tangorpro-15.1-12292122.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/pixel/extract-factory-image.sh b/fairphone/device.sh similarity index 54% rename from pixel/extract-factory-image.sh rename to fairphone/device.sh index 275619f4..ad29a0d9 100755 --- a/pixel/extract-factory-image.sh +++ b/fairphone/device.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: +# device: # -# Extract Pixel factory images +# Do it all for one device # # ############################################################################## @@ -18,7 +18,6 @@ # use bash strict mode set -euo pipefail - ### TRAPS ### # trap signals for clean exit @@ -28,34 +27,36 @@ 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 work_dir="${WORK_DIR:-/tmp/pixel}" - -source "${vars_path}/pixels" +readonly work_dir="${WORK_DIR:-/tmp/fairphone}" -readonly device="${1}" -source "${vars_path}/${device}" +KEEP_DUMP=${KEEP_DUMP:-false} ## HELP MESSAGE (USAGE INFO) # TODO ### FUNCTIONS ### -extract_factory_image() { - local factory_dir="${work_dir}/${device}/${build_id}/factory" - if [[ -d "${factory_dir}" ]]; then - echo "Skipping factory image extraction, ${factory_dir} already exists" - exit - fi - mkdir -p "${factory_dir}" +device() { + local device="${1}" + source "${vars_path}/${device}" local factory_zip="${work_dir}/${device}/${build_id}/$(basename ${image_url})" - 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 + local extract_args="${factory_zip}" + + "${script_path}/download.sh" "${device}" + + if [ "$KEEP_DUMP" == "true" ] || [ "$KEEP_DUMP" == "1" ]; then + extract_args+=" --keep-dump" + fi + + extract_args+=" --extract-factory" + + pushd "${top}/device/fairphone/${device}" + ./extract-files.py ${extract_args} popd + + echo "${build_id}" > "${top}/vendor/fairphone/${device}/build_id.txt" } # error message @@ -72,7 +73,11 @@ help_message() { } main() { - extract_factory_image + if [[ $# -eq 1 ]] ; then + device "${1}" + else + error_m + fi } ### RUN PROGRAM ### diff --git a/fairphone/download.sh b/fairphone/download.sh new file mode 100755 index 00000000..aeabfafc --- /dev/null +++ b/fairphone/download.sh @@ -0,0 +1,72 @@ +#!/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 + +### CONSTANTS ### +readonly script_path="$(cd "$(dirname "$0")";pwd -P)" +readonly vars_path="${script_path}/../vars" + +readonly work_dir="${WORK_DIR:-/tmp/fairphone}" + +readonly device="${1}" +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/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..4b1fa72e 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/pixel/get-new-device-vars.py b/pixel/get-new-device-vars.py index 763e668e..65f10540 100755 --- a/pixel/get-new-device-vars.py +++ b/pixel/get-new-device-vars.py @@ -6,6 +6,8 @@ import argparse import base64 +from functools import partial +import re from bs4 import BeautifulSoup from git import cmd import os @@ -23,24 +25,22 @@ BUILD_ID_FILTER = "BUILD_ID=" SECURITY_PATCH_URL = "https://android.googlesource.com/platform/build/+/refs/{}/core/version_defaults.mk?format=TEXT" SECURITY_PATCH_FILTER = "PLATFORM_SECURITY_PATCH :=" +NEW_SECURITY_PATCH_URL = "https://android.googlesource.com/platform/build/release/+/refs/tags/{}/flag_values/{}/RELEASE_PLATFORM_SECURITY_PATCH.textproto?format=TEXT" +NEW_SECURITY_PATCH_FILTER = "string_value: " -def handle_image(html_id): - image_html = urllib.request.urlopen(urllib.request.Request(IMAGE_URL, headers=COOKIE)).read() - soup = BeautifulSoup(image_html, 'html.parser') +def handle_image(soup, html_id, output_fn): td = soup.find(id=html_id).find_all('td') flash_url = td[1].a['href'] image_url = td[2].a['href'] image_sha256 = td[3].contents[0] build_number = flash_url.split("/")[4].split("?")[0] - print('new_build_number="{0}"\nnew_flash_url="{1}"\nnew_image_url="{2}"\nnew_image_sha256="{3}"'.format(build_number, flash_url, image_url, image_sha256)) + output_fn('new_build_number="{0}"\nnew_flash_url="{1}"\nnew_image_url="{2}"\nnew_image_sha256="{3}"'.format(build_number, flash_url, image_url, image_sha256)) -def handle_ota(html_id): - ota_html = urllib.request.urlopen(urllib.request.Request(OTA_URL, headers=COOKIE)).read() - soup = BeautifulSoup(ota_html, 'html.parser') +def handle_ota(soup, html_id, output_fn): td = soup.find(id=html_id).find_all('td') ota_url = td[1].a['href'] ota_sha256 = td[2].contents[0] - print('new_ota_url="{0}"\nnew_ota_sha256="{1}"'.format(ota_url, ota_sha256)) + output_fn('new_ota_url="{0}"\nnew_ota_sha256="{1}"'.format(ota_url, ota_sha256)) def get_all_aosp_branches(branch_filter): all_branches = [] @@ -55,21 +55,16 @@ def get_all_aosp_branches(branch_filter): except Exception as e: return all_branches -def get_aosp_branch_for_build_id(aosp_branches, wanted_build_id): +def get_aosp_branches_for_build_ids(aosp_branches, m): try: for aosp_branch in aosp_branches: output = base64.decodebytes(urllib.request.urlopen(BUILD_ID_URL.format("heads/" + aosp_branch)).read()).decode() for line in output.split('\n'): if BUILD_ID_FILTER in line: found_build_id = line.split("=")[1] - if found_build_id == wanted_build_id: - print('new_aosp_branch="{0}"'.format(aosp_branch)) - return aosp_branch - print('new_aosp_branch="unknown"') - return 'unknown' + m[found_build_id] = aosp_branch except Exception as e: - print('new_aosp_branch="unknown"') - return 'unknown' + pass def get_all_aosp_tags(tag_filter): all_tags = [] @@ -84,48 +79,119 @@ def get_all_aosp_tags(tag_filter): except Exception as e: return all_tags -def get_aosp_tag_for_build_id(aosp_tags, wanted_build_id): +def get_aosp_tags_for_build_ids(aosp_tags, m): try: for aosp_tag in aosp_tags: output = base64.decodebytes(urllib.request.urlopen(BUILD_ID_URL.format("tags/" + aosp_tag)).read()).decode() for line in output.split('\n'): if BUILD_ID_FILTER in line: found_build_id = line.split("=")[1] - if found_build_id == wanted_build_id: - print('new_aosp_tag="{0}"'.format(aosp_tag)) - return aosp_tag - print('new_aosp_tag="unknown"') - return 'unknown' + m[found_build_id] = aosp_tag except Exception as e: - print('new_aosp_tag="unknown"') - return 'unknown' + pass def get_security_patch_for_aosp_tag(aosp_tag): try: output = base64.decodebytes(urllib.request.urlopen(SECURITY_PATCH_URL.format("tags/" + aosp_tag)).read()).decode() except: - print('new_security_patch=unknown') - return + return None + for line in output.split('\n'): if SECURITY_PATCH_FILTER in line: security_patch = line.split(":=")[1].strip() - print('new_security_patch="{0}"'.format(security_patch)) - return - print('new_security_patch="unknown"') + return security_patch + + return None + +def get_security_patches_for_aosp_tags(aosp_tags, m): + for aosp_tag in aosp_tags: + security_patch = get_security_patch_for_aosp_tag(aosp_tag) + if security_patch is None: + continue + + m[aosp_tag] = security_patch + + +def get_security_patch(aosp_tag, release): + try: + url = NEW_SECURITY_PATCH_URL.format(aosp_tag, release) + output = base64.decodebytes(urllib.request.urlopen(url).read()).decode() + except: + return None + + for line in output.split('\n'): + if NEW_SECURITY_PATCH_FILTER in line: + match = re.search(r'\d{4}-\d{2}-\d{2}', line) + security_patch = match.group(0) if match else None + return security_patch + + return None + + +def get_security_patches(aosp_tags, build_ids, m): + for build_id in build_ids: + release, _ = build_id.split('.', 1) + release = release.lower() + + for aosp_tag in aosp_tags: + security_patch = get_security_patch(aosp_tag, release) + if security_patch is None: + continue + + m[aosp_tag] = security_patch + def main(): parser = argparse.ArgumentParser() - parser.add_argument('-b', '--build_id', help="Build ID", type=str, required=True) - parser.add_argument('-d', '--device', help="Device codename", type=str, required=True) + parser.add_argument('--devices', help="Device codenames", type=str, nargs='+', required=True) + parser.add_argument('--build-ids', help="Build IDs", type=str, nargs='+', required=True) + parser.add_argument('--tmps', help="Temporary files to store device vars into", type=str, nargs='+', required=True) parser.add_argument('-t', '--tags_match', help='Android version tag to match, such as android-13.0', type=str, required=True) parser.add_argument('-br', '--branch_match', help='Android version branch to match, such as android13', type=str, required=True) args = parser.parse_args() - html_id = "{0}{1}".format(args.device, args.build_id.lower()) - handle_image(html_id) - handle_ota(html_id) - get_aosp_branch_for_build_id(get_all_aosp_branches("{0}*".format(args.branch_match)), args.build_id.upper()) - aosp_tag = get_aosp_tag_for_build_id(get_all_aosp_tags("{0}*".format(args.tags_match)), args.build_id.upper()) - get_security_patch_for_aosp_tag(aosp_tag) + + assert len(args.devices) == len(args.build_ids) == len(args.tmps) + + image_html = urllib.request.urlopen(urllib.request.Request(IMAGE_URL, headers=COOKIE)).read() + image_soup = BeautifulSoup(image_html, 'html.parser') + + ota_html = urllib.request.urlopen(urllib.request.Request(OTA_URL, headers=COOKIE)).read() + ota_soup = BeautifulSoup(ota_html, 'html.parser') + + all_aosp_branches = get_all_aosp_branches("{0}*".format(args.branch_match)) + build_id_aosp_branch_map = {} + get_aosp_branches_for_build_ids(all_aosp_branches, build_id_aosp_branch_map) + + all_aosp_tags = get_all_aosp_tags("{0}*".format(args.tags_match)) + build_ids = set(args.build_ids) + + build_id_aosp_tag_map = {} + get_aosp_tags_for_build_ids(all_aosp_tags, build_id_aosp_tag_map) + + aosp_tag_security_patch_map = {} + get_security_patches_for_aosp_tags(all_aosp_tags, aosp_tag_security_patch_map) + get_security_patches(all_aosp_tags, build_ids, aosp_tag_security_patch_map) + + def handle_device(device, build_id, output_fn): + html_id = "{0}{1}".format(device, build_id.lower()) + handle_image(image_soup, html_id, output_fn) + handle_ota(ota_soup, html_id, output_fn) + aosp_branch = build_id_aosp_branch_map.get(build_id, 'unknown') + output_fn('new_aosp_branch="{0}"'.format(aosp_branch)) + aosp_tag = build_id_aosp_tag_map.get(build_id, 'unknown') + output_fn('new_aosp_tag="{0}"'.format(aosp_tag)) + security_patch = aosp_tag_security_patch_map.get(aosp_tag, 'unknown') + output_fn('new_security_patch="{0}"'.format(security_patch)) + + for device, build_id, tmp in zip(args.devices, args.build_ids, args.tmps): + with open(tmp, 'w', encoding='utf-8') as f: + def output_fns(fs, s): + fs.write(s) + fs.write('\n') + + output_fn = partial(output_fns, f) + handle_device(device, build_id, output_fn) + if __name__ == "__main__": main() diff --git a/pixel/update-device-vars.sh b/pixel/update-device-vars.sh index 5d2ffff5..83d4b877 100755 --- a/pixel/update-device-vars.sh +++ b/pixel/update-device-vars.sh @@ -57,17 +57,34 @@ help_message() { main() { mkdir -p "${tmp_dir}" if [[ $# -ne 0 ]]; then - local ds="${@}" + ds=("${@}") else - local ds="${devices[@]}" + ds=("${devices[@]}") fi - for d in ${ds}; do + declare -a tmps + declare -a build_ids + for d in "${ds[@]}"; do + local tmp=$(mktemp "${tmp_dir}/${d}.XXXXXXXXXX") + tmps+=("$tmp") + + # Variables are marked readonly, do this to avoid it + build_id=$( + local dv="${vars_path}/${d}" + source "${dv}" + echo "${build_id}" + ) + build_ids+=("${build_id}") + done + + ${script_path}/get-new-device-vars.py --devices "${ds[@]}" --build-ids "${build_ids[@]}" --tmps "${tmps[@]}" -t ${aosp_tag_match} -br ${os_branch} + + for i in "${!ds[@]}"; do + d="${ds[$i]}" + tmp="${tmps[$i]}" ( - local tmp=$(mktemp "${tmp_dir}/${d}.XXXXXXXXXX") local dv="${vars_path}/${d}" source "${dv}" - ${script_path}/get-new-device-vars.py -b "${build_id}" -d "${d}" -t ${aosp_tag_match} -br ${os_branch}> "${tmp}" source "${tmp}" if [[ "${new_aosp_branch}" != "${aosp_branch}" ]]; then sed -i "/ aosp_branch=/c\readonly aosp_branch=\"$new_aosp_branch\"" "${dv}" @@ -84,7 +101,6 @@ main() { sed -i "/ ota_sha256=/c\readonly ota_sha256=\"$new_ota_sha256\"" "${dv}" sed -i "/ security_patch=/c\readonly security_patch=\"$new_security_patch\"" "${dv}" ) - sleep 10s done } 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..532d5ebf 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.TP2U.C.0136" + +readonly image_url="https://fairphone-android-builds.ams3.digitaloceanspaces.com/FP4/A13/FP4-TP2U-factory.zip" +readonly image_sha256="0b1acc2927c9fbac54a3208db8ae520f736da1ccb151f56bb0a561bbbb85b4d3" + +readonly security_patch="2025-06-05" diff --git a/vars/FP5 b/vars/FP5 new file mode 100644 index 00000000..59d85270 --- /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.VT28.C.042" + +readonly image_url="https://fairphone-android-builds.ams3.digitaloceanspaces.com/FP5/A15/FP5-VT28-factory.zip" +readonly image_sha256="3f50414b84d87c35b7db22e03839faef372fc991a2137ce99c925f65fc834a44" + +readonly security_patch="2025-06-05" diff --git a/vars/akita b/vars/akita new file mode 100644 index 00000000..fb19e14e --- /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="BP1A.250505.005.B1" + +# Updated automatically via pixel/update-device-vars.sh + +readonly aosp_branch="android15-qpr2-s8-release" + +readonly prev_aosp_tag="android-15.0.0_r28" +readonly aosp_tag="android-15.0.0_r34" + +readonly build_number="13277630" + +readonly image_url="https://dl.google.com/dl/android/aosp/akita-bp1a.250505.005.b1-factory-26869594.zip" +readonly image_sha256="26869594099ad5c1bd70d2303dbe768d4b93bb50d312251d45640ccdc45aae11" + +readonly flash_url="https://flash.android.com/build/13277630?target=akita-user&signed" + +readonly ota_url="https://dl.google.com/dl/android/aosp/akita-ota-bp1a.250505.005.b1-405428be.zip" +readonly ota_sha256="405428be3836aba30e4ba6a001c790c9ff15154beafaa5d03e8c4abff5f663f1" + +readonly security_patch="2025-05-05" diff --git a/vars/aosp_target_release b/vars/aosp_target_release new file mode 100644 index 00000000..bba48b44 --- /dev/null +++ b/vars/aosp_target_release @@ -0,0 +1,2 @@ +# Updated manually +aosp_target_release=bp1a 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/bangkk b/vars/bangkk new file mode 100644 index 00000000..350b9019 --- /dev/null +++ b/vars/bangkk @@ -0,0 +1,7 @@ +# moto g84 + +# Usage: ${device_repos[@]} +device_repos=( + device/motorola/bangkk + # common repos in fogos +) diff --git a/vars/barbet b/vars/barbet index a5b5f020..d0e3f835 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.S4" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android14-qpr3-s14-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_r55" +readonly aosp_tag="android-14.0.0_r75" -readonly build_number="10750268" +readonly build_number="12281092" -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.s4-factory-eb064cd6.zip" +readonly image_sha256="eb064cd61c8e95ace5f2e2a3c2f29d72fb716f2cc4fa12d742c2fae9c934002c" -readonly flash_url="https://flash.android.com/build/10750268?target=barbet-user&signed" +readonly flash_url="https://flash.android.com/build/12281092?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.s4-65a8b7c3.zip" +readonly ota_sha256="65a8b7c3a4ad3a14a0b5b38b24adb05e64ba7f69d03b40e82e33260cc7ef8c33" -readonly security_patch="2023-09-01" +readonly security_patch="2024-08-05" diff --git a/vars/bluejay b/vars/bluejay index c964dd1f..43840b03 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="BP1A.250505.005" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android15-qpr2-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_r26" +readonly aosp_tag="android-15.0.0_r32" -readonly build_number="10750268" +readonly build_number="13277524" -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-bp1a.250505.005-factory-b5528397.zip" +readonly image_sha256="b552839786586b7f0c946abfb59478d5477531d94a164c10f2f577b0ef0861ab" -readonly flash_url="https://flash.android.com/build/10750268?target=bluejay-user&signed" +readonly flash_url="https://flash.android.com/build/13277524?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-bp1a.250505.005-728eab10.zip" +readonly ota_sha256="728eab10ee8393a04503e2f79cfe441f7f287a6dda4ba207d0550632009f6904" -readonly security_patch="2023-09-01" +readonly security_patch="2025-05-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..7a3f3f8e --- /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="BP1A.250505.005" + +# Updated automatically via pixel/update-device-vars.sh + +readonly aosp_branch="android15-qpr2-release" + +readonly prev_aosp_tag="android-15.0.0_r26" +readonly aosp_tag="android-15.0.0_r32" + +readonly build_number="13277524" + +readonly image_url="https://dl.google.com/dl/android/aosp/caiman-bp1a.250505.005-factory-f158d94e.zip" +readonly image_sha256="f158d94e5e9209ed9b22a4a4d81b1ae70a1631410adf75d2a2a8297d02d7363a" + +readonly flash_url="https://flash.android.com/build/13277524?target=caiman-user&signed" + +readonly ota_url="https://dl.google.com/dl/android/aosp/caiman-ota-bp1a.250505.005-fa38a01c.zip" +readonly ota_sha256="fa38a01c7f3eb8a96b6f9891a5db2b5b7d0492b10087981c0dae4ab3e313b7cd" + +readonly security_patch="2025-05-05" diff --git a/vars/cheetah b/vars/cheetah index fd6521f1..485b4895 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="BP1A.250505.005.B1" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android15-qpr2-s8-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_r28" +readonly aosp_tag="android-15.0.0_r34" -readonly build_number="10750268" +readonly build_number="13277630" -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-bp1a.250505.005.b1-factory-c7b1354d.zip" +readonly image_sha256="c7b1354d87f6e478c1d2d982dbc296f1b589d6797575639085c0a3ea4c1da974" -readonly flash_url="https://flash.android.com/build/10750268?target=cheetah-user&signed" +readonly flash_url="https://flash.android.com/build/13277630?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-bp1a.250505.005.b1-29966098.zip" +readonly ota_sha256="29966098f2f60bf571673a589d32ce6f516440f466830e926ca90e13211eade0" -readonly security_patch="2023-09-01" +readonly security_patch="2025-05-05" diff --git a/vars/comet b/vars/comet new file mode 100644 index 00000000..dbb7e130 --- /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="BP1A.250505.005" + +# Updated automatically via pixel/update-device-vars.sh + +readonly aosp_branch="android15-qpr2-release" + +readonly prev_aosp_tag="android-15.0.0_r26" +readonly aosp_tag="android-15.0.0_r32" + +readonly build_number="13277524" + +readonly image_url="https://dl.google.com/dl/android/aosp/comet-bp1a.250505.005-factory-7bab37e3.zip" +readonly image_sha256="7bab37e32a1ef699ec0bb01c6356e1565d8722459ccb975bdf837d03dea9c142" + +readonly flash_url="https://flash.android.com/build/13277524?target=comet-user&signed" + +readonly ota_url="https://dl.google.com/dl/android/aosp/comet-ota-bp1a.250505.005-d344e885.zip" +readonly ota_sha256="d344e8857143f34c9d16429f9de945a3db91ce01b2534654ad4c220fe4ed2630" + +readonly security_patch="2025-05-05" diff --git a/vars/common b/vars/common index b89f243b..bd60d1cd 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=android15-qpr2 +readonly device_branch=android15-qpr2 -readonly common_aosp_branch=android13-security-release # Oct 2023 +readonly common_aosp_branch=android15-security-release # June 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_r32 # May 2025, Pixel 6, Tablet, 9 +readonly common_aosp_tag=android-security-15.0.0_r9 # June 2025, Security -readonly common_aosp_build_id=TQ3A.230905.001 # Sep 2023, Pixel 4a (5G) - 7a +readonly common_aosp_build_id=BP1A.250505.005 # May 2025, Pixel 6, Tablet, 9 -readonly topic=oct23 +readonly topic=jun25 -readonly lineageos_branch=lineage-20.0 -readonly lineageos_device_branch=lineage-20 +readonly lineageos_branch=lineage-22.2 +readonly lineageos_device_branch=lineage-22.2 readonly merge_method="merge" diff --git a/vars/coral b/vars/coral deleted file mode 100644 index dd4c3e03..00000000 --- a/vars/coral +++ /dev/null @@ -1,45 +0,0 @@ -# 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 - device/google/coral-sepolicy -) - -# Updated semi-manually via pixel/update-any-var.sh - -readonly build_id="TP1A.221005.002.B2" - -# Updated automatically via pixel/update-device-vars.sh - -readonly aosp_branch="unknown" - -readonly prev_aosp_tag="android-13.0.0_r7" -readonly aosp_tag="android-13.0.0_r31" - -readonly build_number="9382335" - -readonly image_url="https://dl.google.com/dl/android/aosp/coral-tp1a.221005.002.b2-factory-db99b1f8.zip" -readonly image_sha256="db99b1f89e2fea16cbf48c876809c78d6dc46279e7311ab52d00d8125ef3a5d9" - -readonly flash_url="https://flash.android.com/build/9382335?target=coral-user&signed" - -readonly ota_url="https://dl.google.com/dl/android/aosp/coral-ota-tp1a.221005.002.b2-9e04f1c9.zip" -readonly ota_sha256="9e04f1c9c2eaaf58d8186393d38661638784791f74a9e9d9a96a4359b144b9ed" - -readonly security_patch="2022-10-05" 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..8dffa2a9 100644 --- a/vars/device_kernels +++ b/vars/device_kernels @@ -1,14 +1,4 @@ # 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..1e73351c 100644 --- a/vars/devices +++ b/vars/devices @@ -1,6 +1,21 @@ # All supported devices # Usage: ${devices[@]} readonly devices=( + FP4 + FP5 + fogo + bangkk + fogos + rhode + hawao + devon + comet + komodo + caiman + tokay + akita + husky + shiba felix tangorpro lynx @@ -9,16 +24,8 @@ readonly devices=( bluejay raven oriole + otter barbet redfin bramble - sunfish - coral - flame - bonito - sargo - crosshatch - blueline - FP4 - axolotl ) diff --git a/vars/felix b/vars/felix index 5fb8de27..9ecb7682 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="BP1A.250505.005.B1" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-c-s10-release" +readonly aosp_branch="android15-qpr2-s8-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_r28" +readonly aosp_tag="android-15.0.0_r34" -readonly build_number="10750808" +readonly build_number="13277630" -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-bp1a.250505.005.b1-factory-01439a87.zip" +readonly image_sha256="01439a870c037278406d7086c16943e211d4c79bb2504f45e3e23c055711d40a" -readonly flash_url="https://flash.android.com/build/10750808?target=felix-user&signed" +readonly flash_url="https://flash.android.com/build/13277630?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-bp1a.250505.005.b1-1685cbb9.zip" +readonly ota_sha256="1685cbb9451047059a04a5441635885ef899f186ae42a4e768e260ff5935c5cc" -readonly security_patch="2023-09-01" +readonly security_patch="2025-05-05" diff --git a/vars/flame b/vars/flame deleted file mode 100644 index c2c86208..00000000 --- a/vars/flame +++ /dev/null @@ -1,44 +0,0 @@ -# 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 -) - -# Updated semi-manually via pixel/update-any-var.sh - -readonly build_id="TP1A.221005.002.B2" - -# Updated automatically via pixel/update-device-vars.sh - -readonly aosp_branch="unknown" - -readonly prev_aosp_tag="android-13.0.0_r7" -readonly aosp_tag="android-13.0.0_r31" - -readonly build_number="9382335" - -readonly image_url="https://dl.google.com/dl/android/aosp/flame-tp1a.221005.002.b2-factory-38e4f49a.zip" -readonly image_sha256="38e4f49a8f72a8f9522f86874187de47add539372fa8c951d11ebde4f9c21103" - -readonly flash_url="https://flash.android.com/build/9382335?target=flame-user&signed" - -readonly ota_url="https://dl.google.com/dl/android/aosp/flame-ota-tp1a.221005.002.b2-4d76895a.zip" -readonly ota_sha256="4d76895aac34a8bb816a338439ee62ca0794628228cf4c1330b4e40a5c8cb4af" - -readonly security_patch="2022-10-05" diff --git a/vars/fogo b/vars/fogo new file mode 100644 index 00000000..d7c62114 --- /dev/null +++ b/vars/fogo @@ -0,0 +1,7 @@ +# moto g 5G - 2024 + +# Usage: ${device_repos[@]} +device_repos=( + device/motorola/fogo + # common repos in fogos +) diff --git a/vars/fogos b/vars/fogos new file mode 100644 index 00000000..3edc09f8 --- /dev/null +++ b/vars/fogos @@ -0,0 +1,8 @@ +# moto g34/g45 + +# Usage: ${device_repos[@]} +device_repos=( + device/motorola/fogos + device/motorola/sm6375-common + kernel/motorola/sm6375 +) diff --git a/vars/husky b/vars/husky new file mode 100644 index 00000000..e1656900 --- /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="BP1A.250505.005.B1" + +# Updated automatically via pixel/update-device-vars.sh + +readonly aosp_branch="android15-qpr2-s8-release" + +readonly prev_aosp_tag="android-15.0.0_r28" +readonly aosp_tag="android-15.0.0_r34" + +readonly build_number="13277630" + +readonly image_url="https://dl.google.com/dl/android/aosp/husky-bp1a.250505.005.b1-factory-29f5f55f.zip" +readonly image_sha256="29f5f55fb3e85e751c7122d3b2e507772510e5fa7c98da7ec26721e735bc90a4" + +readonly flash_url="https://flash.android.com/build/13277630?target=husky-user&signed" + +readonly ota_url="https://dl.google.com/dl/android/aosp/husky-ota-bp1a.250505.005.b1-5f2620d8.zip" +readonly ota_sha256="5f2620d8b704c6ebd5bcc4077fdc7faa412552c6e2b9a56f8c3304ce4d4b8177" + +readonly security_patch="2025-05-05" diff --git a/vars/komodo b/vars/komodo new file mode 100644 index 00000000..4406c007 --- /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="BP1A.250505.005" + +# Updated automatically via pixel/update-device-vars.sh + +readonly aosp_branch="android15-qpr2-release" + +readonly prev_aosp_tag="android-15.0.0_r26" +readonly aosp_tag="android-15.0.0_r32" + +readonly build_number="13277524" + +readonly image_url="https://dl.google.com/dl/android/aosp/komodo-bp1a.250505.005-factory-3945a024.zip" +readonly image_sha256="3945a02463894927d1272e46a28a2cf999dc9d5a9db046a9b215157a8404228b" + +readonly flash_url="https://flash.android.com/build/13277524?target=komodo-user&signed" + +readonly ota_url="https://dl.google.com/dl/android/aosp/komodo-ota-bp1a.250505.005-8997fae7.zip" +readonly ota_sha256="8997fae7ef176ff6cd7ee35bf1c6435fb3ec30ce2b69b28e572f283e7443e266" + +readonly security_patch="2025-05-05" diff --git a/vars/lineage_devices b/vars/lineage_devices index 2cc2a38d..78dc1c16 100644 --- a/vars/lineage_devices +++ b/vars/lineage_devices @@ -1,9 +1,13 @@ # LineageOS supported devices (excluding Pixels) # Usage: ${lineage_devices[@]} readonly lineage_devices=( + FP5 FP4 - axolotl - devon - hawao + fogo + bangkk + fogos rhode + hawao + devon + otter ) diff --git a/vars/lynx b/vars/lynx index 79eb3cc1..cb6d41d5 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="BP1A.250505.005.B1" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android15-qpr2-s8-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_r28" +readonly aosp_tag="android-15.0.0_r34" -readonly build_number="10750268" +readonly build_number="13277630" -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-bp1a.250505.005.b1-factory-45a1393f.zip" +readonly image_sha256="45a1393fe222246fd7b2918e072b52c6e34a4048fcf3f6b8c840632b1acd128b" -readonly flash_url="https://flash.android.com/build/10750268?target=lynx-user&signed" +readonly flash_url="https://flash.android.com/build/13277630?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-bp1a.250505.005.b1-db24813f.zip" +readonly ota_sha256="db24813f3c561f792a19c4015dabe2220e8ee2497ee435f8e6ace7a0a229f815" -readonly security_patch="2023-09-01" +readonly security_patch="2025-05-05" diff --git a/vars/moto b/vars/moto index a0bed993..211ea173 100644 --- a/vars/moto +++ b/vars/moto @@ -1,7 +1,10 @@ # Motorola devices # Usage: ${devices[@]} readonly devices=( - devon - hawao + fogo + bangkk + fogos rhode + hawao + devon ) diff --git a/vars/msm-4.14 b/vars/msm-4.14 deleted file mode 100644 index 590ac8b9..00000000 --- a/vars/msm-4.14 +++ /dev/null @@ -1,8 +0,0 @@ -# Pixel 4, 4a - -# Updated semi-manually via pixel/update-any-var.sh - -readonly kernel_branch="android-msm-sunfish-4.14-android13-qpr3" - -readonly prev_kernel_tag=android-13.0.0_r0.101 # Jul 2023 -readonly kernel_tag=android-13.0.0_r0.110 # Aug 2023 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/notpixels b/vars/notpixels new file mode 100644 index 00000000..d16e113b --- /dev/null +++ b/vars/notpixels @@ -0,0 +1,16 @@ +# All supported devices except Google Pixels currently supported in AOSP +# Usage: ${devices[@]} +readonly devices=( + FP4 + FP5 + fogo + bangkk + fogos + rhode + hawao + devon + otter + barbet + redfin + bramble +) diff --git a/vars/oriole b/vars/oriole index acf5156a..ea01c079 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="BP1A.250505.005" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android15-qpr2-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_r26" +readonly aosp_tag="android-15.0.0_r32" -readonly build_number="10750268" +readonly build_number="13277524" -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-bp1a.250505.005-factory-9fc37bcc.zip" +readonly image_sha256="9fc37bccc63a243d046f459d22cfbf0dd0ea26336f356c9dd3fe0525093316c1" -readonly flash_url="https://flash.android.com/build/10750268?target=oriole-user&signed" +readonly flash_url="https://flash.android.com/build/13277524?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-bp1a.250505.005-0ac3ca61.zip" +readonly ota_sha256="0ac3ca6175db1b86ed666aa2079a1f8ad41ea67a52e5a9b834c09bde6a6e5a5f" -readonly security_patch="2023-09-01" +readonly security_patch="2025-05-05" diff --git a/vars/otter b/vars/otter new file mode 100644 index 00000000..491879ae --- /dev/null +++ b/vars/otter @@ -0,0 +1,15 @@ +# SHIFTphone 8 + +# Usage: ${device_repos[@]} +device_repos=( + device/shift/otter + kernel/shift/qcm6490 +) + +# Updated manually +readonly build_id="SOS.6.0.20241128" + +readonly image_url="https://downloads.shiftphones.com/builds/OTTER.SOS.6.0.G-RELEASE-20241128-OTA.zip" +readonly image_sha256="72ac3572b6de152563107afef1e5f1f7e63ed4dd79bb98df50ad5af6ec89ac20" + +readonly security_patch="2024-10-05" diff --git a/vars/panther b/vars/panther index 3a8fd6e6..122e20fd 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="BP1A.250505.005.B1" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android15-qpr2-s8-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_r28" +readonly aosp_tag="android-15.0.0_r34" -readonly build_number="10750268" +readonly build_number="13277630" -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-bp1a.250505.005.b1-factory-f3671e06.zip" +readonly image_sha256="f3671e060ad7c2597fd39e918f9a3aeb3f83c8948ddd295bd04655b8808bedf8" -readonly flash_url="https://flash.android.com/build/10750268?target=panther-user&signed" +readonly flash_url="https://flash.android.com/build/13277630?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-bp1a.250505.005.b1-cf5588e6.zip" +readonly ota_sha256="cf5588e661121815a18522a4b56578254791f4fd8bec380fb1032be5921171ad" -readonly security_patch="2023-09-01" +readonly security_patch="2025-05-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..620bf4b1 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="BP1A.250505.005" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-release" +readonly aosp_branch="android15-qpr2-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_r26" +readonly aosp_tag="android-15.0.0_r32" -readonly build_number="10750268" +readonly build_number="13277524" -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-bp1a.250505.005-factory-3ded8f89.zip" +readonly image_sha256="3ded8f89d71d17f3cee423c017e69d0156d0a04c1e27e020c2fbb7d57918f0be" -readonly flash_url="https://flash.android.com/build/10750268?target=raven-user&signed" +readonly flash_url="https://flash.android.com/build/13277524?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-bp1a.250505.005-5793e41b.zip" +readonly ota_sha256="5793e41b178a28f1d4f114cf9d345b50e0b8e73f542ad522bbda1b18c1f0f32a" -readonly security_patch="2023-09-01" +readonly security_patch="2025-05-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..fa3e5317 --- /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="BP1A.250505.005.B1" + +# Updated automatically via pixel/update-device-vars.sh + +readonly aosp_branch="android15-qpr2-s8-release" + +readonly prev_aosp_tag="android-15.0.0_r28" +readonly aosp_tag="android-15.0.0_r34" + +readonly build_number="13277630" + +readonly image_url="https://dl.google.com/dl/android/aosp/shiba-bp1a.250505.005.b1-factory-afdf8d90.zip" +readonly image_sha256="afdf8d90c7011d3834537868a69f4e34f4e5fa4b94572b71598b23caf3d7f320" + +readonly flash_url="https://flash.android.com/build/13277630?target=shiba-user&signed" + +readonly ota_url="https://dl.google.com/dl/android/aosp/shiba-ota-bp1a.250505.005.b1-6214dfec.zip" +readonly ota_sha256="6214dfec838ae04545749778c194bc16420c313e854392d1e6ae17a06d2f9e26" + +readonly security_patch="2025-05-05" diff --git a/vars/sunfish b/vars/sunfish deleted file mode 100644 index 2e2097ed..00000000 --- a/vars/sunfish +++ /dev/null @@ -1,45 +0,0 @@ -# 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 - device/google/sunfish-sepolicy -) - -# Updated semi-manually via pixel/update-any-var.sh - -readonly build_id="TQ3A.230805.001" - -# Updated automatically via pixel/update-device-vars.sh - -readonly aosp_branch="android13-qpr3-release" - -readonly prev_aosp_tag="android-13.0.0_r61" -readonly aosp_tag="android-13.0.0_r67" - -readonly build_number="10316531" - -readonly image_url="https://dl.google.com/dl/android/aosp/sunfish-tq3a.230805.001-factory-b3d86cc6.zip" -readonly image_sha256="b3d86cc61452d79b7e67426fe40594ede549ead3ab20d7729caf1a1dfbd8e107" - -readonly flash_url="https://flash.android.com/build/10316531?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 security_patch="2023-08-05" diff --git a/vars/tangorpro b/vars/tangorpro index f7154a87..c8f9f59b 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="BP1A.250505.005" # Updated automatically via pixel/update-device-vars.sh -readonly aosp_branch="android13-qpr3-s10-release" +readonly aosp_branch="android15-qpr2-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_r26" +readonly aosp_tag="android-15.0.0_r32" -readonly build_number="10750577" +readonly build_number="13277524" -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-bp1a.250505.005-factory-fbebb053.zip" +readonly image_sha256="fbebb0532ba8a9e3cdec28fbb67d0dc3eac9c964b65751ab0b2679ef655686a1" -readonly flash_url="https://flash.android.com/build/10750577?target=tangorpro-user&signed" +readonly flash_url="https://flash.android.com/build/13277524?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-bp1a.250505.005-a5bf2935.zip" +readonly ota_sha256="a5bf29350aaf1c958a724e07052d089b34d3a38536d2076058f2b1c5abc0c401" -readonly security_patch="2023-09-01" +readonly security_patch="2025-05-05" diff --git a/vars/tokay b/vars/tokay new file mode 100644 index 00000000..1d279df3 --- /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="BP1A.250505.005" + +# Updated automatically via pixel/update-device-vars.sh + +readonly aosp_branch="android15-qpr2-release" + +readonly prev_aosp_tag="android-15.0.0_r26" +readonly aosp_tag="android-15.0.0_r32" + +readonly build_number="13277524" + +readonly image_url="https://dl.google.com/dl/android/aosp/tokay-bp1a.250505.005-factory-5e869188.zip" +readonly image_sha256="5e8691883c5004c15b72ab941533a44f164b2b6bdbf8393c8987da42ec31bbd8" + +readonly flash_url="https://flash.android.com/build/13277524?target=tokay-user&signed" + +readonly ota_url="https://dl.google.com/dl/android/aosp/tokay-ota-bp1a.250505.005-6c165ea5.zip" +readonly ota_sha256="6c165ea5f9a99e1effffb31924ad65067b99ac74c9741720546633eeff607148" + +readonly security_patch="2025-05-05"