Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Find blobs in the factory android vendor partition that duplicate blobs in AOSP by examining build errors.
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" \
echo "Found duplicate: ${duplicate}"
echo "$duplicate" | tee -a duplicates.txt
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.