diff --git a/CommonInstaller b/CommonInstaller index 702f1b34..687f7c20 100644 --- a/CommonInstaller +++ b/CommonInstaller @@ -245,7 +245,8 @@ mount_partitions () { if [ ! -f /system/build.prop ]; then DEVICE_AB=TRUE - SYSTEMBLOCK=$(find /dev/block -iname system${SLOT} | head -n 1) + sys_tmp=$(find /dev/block -type l -iname system${SLOT} | head -n 1) + SYSTEMBLOCK=$(readlink -f ${sys_tmp}) mount -o rw ${SYSTEMBLOCK} /system fi @@ -266,7 +267,8 @@ mount_partitions () { 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) + vendor_tmp=$(find /dev/block -type l -iname vendor${SLOT} | head -n 1) + VENDORBLOCK=$(readlink -f ${vendor_tmp}) mount -o ro ${VENDORBLOCK} /vendor fi elif [ -d /system/vendor ]; then diff --git a/patcher/CommonPatcher b/patcher/CommonPatcher index 759fb643..c20a289a 100644 --- a/patcher/CommonPatcher +++ b/patcher/CommonPatcher @@ -65,8 +65,9 @@ mount_partitions () { ! is_mounted /system && mount -o rw /system || mount -o rw,remount /system - if [ ! -f /system/build.prop ]; then - SYSTEMBLOCK=$(find /dev/block -iname system${SLOT} | head -n 1) + if ! is_mounted /system; then + sys_tmp=$(find /dev/block -type l -iname system${SLOT} | head -n 1) + SYSTEMBLOCK=$(readlink -f ${sys_tmp}) mount -o rw ${SYSTEMBLOCK} /system fi @@ -82,7 +83,8 @@ mount_partitions () { 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) + vendor_tmp=$(find /dev/block -type l -iname vendor${SLOT} | head -n 1) + VENDORBLOCK=$(readlink -f ${vendor_tmp}) mount -o ro ${VENDORBLOCK} /vendor fi elif [ -d /system/vendor ]; then