From be8e53eb32db08b5b2724948327ca6da3ec74e93 Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Wed, 8 Dec 2021 18:12:40 +0100 Subject: [PATCH] Provision apk lives in product in Android 10 --- build/meta/com/google/android/update-binary | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/build/meta/com/google/android/update-binary b/build/meta/com/google/android/update-binary index 8dc0fd2..d44ba4c 100644 --- a/build/meta/com/google/android/update-binary +++ b/build/meta/com/google/android/update-binary @@ -30,6 +30,7 @@ cleanup() { ui_print "Unmounting partitions" umount -l "$SYSTEM_MNT" + umount -l /product || true } error_no_space() { @@ -109,6 +110,7 @@ ui_print "Mounting partitions" # Ensure system is unmounted so mounting succeeds umount /system || umount /mnt/system || true +umount /product || true # Find partitions DYNAMIC_PARTITIONS=`getprop ro.boot.dynamic_partitions` @@ -128,6 +130,7 @@ if [ ! -z "$CURRENTSLOT" ]; then fi SYSTEM_BLOCK=$(find_block "system") +PRODUCT_BLOCK=$(find_block "product") # Disable rw protection on dynamic partitions if [ "$DYNAMIC_PARTITIONS" = "true" ]; then @@ -145,6 +148,16 @@ exit 1 fi SYSTEM_OUT="${SYSTEM_MNT}/system" +if [ -n "$PRODUCT_BLOCK" ]; then + mkdir /product || true + if mount -o rw "$PRODUCT_BLOCK" /product; then + ui_print "/product mounted" + else + ui_print "Could not mount /product" + exit 1 + fi +fi + # Compute storage requirements SYSTEM_STORAGE=`df $SYSTEM_MNT | tail -1 | tr -s ' ' | cut -d ' ' -f4` STORAGE_BUFFER=10240 @@ -188,7 +201,7 @@ done ui_print "Copying files" cp --preserve=a -r ./* "${SYSTEM_OUT}/" if [ -e priv-app/SetupWizardPrebuilt ] ; then - rm -rf "${SYSTEM_OUT}/priv-app/Provision" + rm -rf "${SYSTEM_OUT}/product/priv-app/Provision" fi cleanup