From 90b15f30f8bdf698af39386e7d8464f1d3775530 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Thu, 1 Apr 2021 20:44:19 +0200 Subject: [PATCH] Ignore {product,system_ext} block devices in case they are symlinks This is common on devices where maintainers have chosen not to use real partitions because of their size being too small to be useful --- build/meta/com/google/android/update-binary | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build/meta/com/google/android/update-binary b/build/meta/com/google/android/update-binary index 9f0050f..2551cd8 100644 --- a/build/meta/com/google/android/update-binary +++ b/build/meta/com/google/android/update-binary @@ -175,6 +175,16 @@ exit 1 fi SYSTEM_OUT="${SYSTEM_MNT}/system" +# Ignore {product,system_ext} block devices in case they are symlinks +# This is common on devices where maintainers have chosen not to use +# real partitions because of their size being too small to be useful +if [ -L "${SYSTEM_MNT}/product" ]; then +PRODUCT_BLOCK="" +fi +if [ -L "${SYSTEM_MNT}/system_ext" ]; then +SYSTEM_EXT_BLOCK="" +fi + if [ -n "$PRODUCT_BLOCK" ]; then mkdir /product || true if mount -o rw "$PRODUCT_BLOCK" /product; then