Created
March 2, 2020 00:53
-
-
Save lrvick/2121308f28d525ae3c2e64e915548170 to your computer and use it in GitHub Desktop.
Find blobs in the factory android vendor partition that duplicate blobs in AOSP by examining build errors.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
device="coral" | |
set -x | |
while true; do | |
duplicate=$( \ | |
make DEVICE=${device} build \ | |
| grep -A1 'FAILED:' \ | |
| grep 'error:' \ | |
| awk -F"', previously defined" '{print $1}' \ | |
| awk -F"out/target/product/${device}/" '{print $2}' \ | |
) | |
[[ -z "${duplicate}" ]] && break | |
duplicate_base=$(printf "%s" "${duplicate}" | sed 's/.*\///') | |
sed -i "\:$duplicate_base:d" \ | |
build/base/vendor/google_devices/${device}/${device}-vendor-blobs.mk | |
echo "Found duplicate: ${duplicate}" | |
echo "$duplicate" | tee -a duplicates.txt | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment