From 50d7ecef470fb8329fe1e573b132829724230fb5 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Wed, 29 Aug 2018 17:00:56 +0200 Subject: [PATCH] CommonInstaller: - if there's no /vendor partition, but /system/vendor exists, create a compatibility link, which is required on some ROMs - if log all mounted paritions in the recovery.log - update /vendor mounting code --- CommonInstaller | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/CommonInstaller b/CommonInstaller index 9646b82..491ffe1 100644 --- a/CommonInstaller +++ b/CommonInstaller @@ -227,11 +227,19 @@ mount_partitions () { [ ! -f /system/build.prop ] && error "failed to mount /system (unsupported A/B device?)" - is_mounted /vendor || mount -o ro /vendor 2>/dev/null - if ! is_mounted /vendor; then - VENDORBLOCK=$(find /dev/block -iname vendor${SLOT} | head -n 1) - mount -t ext4 -o ro ${VENDORBLOCK} /vendor 2>/dev/null + if [ -L /system/vendor ]; then + ! is_mounted /vendor && mount /vendor + if ! is_mounted /vendor; then + VENDORBLOCK=$(find /dev/block -iname vendor${SLOT} | head -n 1) + mount -t ext4 -o ro ${VENDORBLOCK} /vendor + fi + elif [ -d /system/vendor ]; then + ### XXX work-around required for some ROMs + echo " xxx compat /vendor link created!" + ln -sf /system/vendor /vendor fi + + mount | awk '{print $1 " on " $3}' } detect_mode () {