Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Find blobs in the factory android vendor partition that duplicate blobs in AOSP by examining build errors.
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
You can’t perform that action at this time.