From c78f2a22eed4b713397942b3c4267f33c072604e Mon Sep 17 00:00:00 2001 From: Box In a Box Date: Thu, 20 Jan 2022 15:25:29 +0000 Subject: [PATCH] dumper: Randomize Branch Names (1). This is needed in order to dump custom-roms, as multiple builds of the same device might use the same fingerprint, thus not pushing the firmware, or git notifying to use "-f" flag, which is not what we want. (2). We aren't hosting our dumps on a custom server, so storage isn't much of a headache as of now. --- dumper.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dumper.sh b/dumper.sh index a94111c..fc1e0bf 100755 --- a/dumper.sh +++ b/dumper.sh @@ -985,6 +985,9 @@ repo=$(echo "${brand}"_"${codename}"_dump | tr '[:upper:]' '[:lower:]') platform=$(echo "${platform}" | tr '[:upper:]' '[:lower:]' | tr -dc '[:print:]' | tr '_' '-' | cut -c 1-35) top_codename=$(echo "${codename}" | tr '[:upper:]' '[:lower:]' | tr -dc '[:print:]' | tr '_' '-' | cut -c 1-35) manufacturer=$(echo "${manufacturer}" | tr '[:upper:]' '[:lower:]' | tr -dc '[:print:]' | tr '_' '-' | cut -c 1-35) +# Randomize Branch Names: This is needed in order to dump custom-roms, as multiple builds of the same device might use the same fingerprint, thus not pushing the firmware, or git notifying to use "-f" flag, which is not what we want. +# We aren't hosting our dumps on a custom server, so storage isn't much of a headache as of now. +branch="${branch}""-random-text-""${RANDOM}""${RANDOM}""${RANDOM}" # Repo README File printf "## %s\n- Manufacturer: %s\n- Platform: %s\n- Codename: %s\n- Brand: %s\n- Flavor: %s\n- Release Version: %s\n- Id: %s\n- Incremental: %s\n- Tags: %s\n- CPU Abilist: %s\n- A/B Device: %s\n- Locale: %s\n- Screen Density: %s\n- Fingerprint: %s\n- OTA version: %s\n- Branch: %s\n- Repo: %s\n" "${description}" "${manufacturer}" "${platform}" "${codename}" "${brand}" "${flavor}" "${release}" "${id}" "${incremental}" "${tags}" "${abilist}" "${is_ab}" "${locale}" "${density}" "${fingerprint}" "${otaver}" "${branch}" "${repo}" > "${OUTDIR}"/README.md printf "\n\n>Dumped by [Phoenix Firmware Dumper](https://github.com/DroidDumps/phoenix_firmware_dumper)\n" >> "${OUTDIR}"/README.md