diff --git a/CommonInstaller b/CommonInstaller index 80176de..915c05a 100644 --- a/CommonInstaller +++ b/CommonInstaller @@ -250,6 +250,11 @@ mount_partitions () { SYSTEM_AS_ROOT=$(grep_prop ro.build.ab_update /default.prop) if [ -d /system_root -o ${SYSTEM_AS_ROOT} ]; then + [ -L /system_root ] && mv /system_root /system_root_link + if [ ! -d /system_root ]; then + rm -rf /system_root + mkdir -p /system_root + fi ! is_mounted /system_root && mount -o rw /system_root ! is_mounted /system_root && mount -o rw ${SYSTEM_BLOCK} /system_root mount -o bind /system_root/system /system @@ -264,7 +269,7 @@ mount_partitions () { echo " INFO: #7 [VENDOR_BLOCK] ${VENDOR_BLOCK}" ! is_mounted /vendor && mount -o ro /vendor - ! is mounted /vendor && mount -o ro ${VENDOR_BLOCK} /vendor + ! is_mounted /vendor && mount -o ro ${VENDOR_BLOCK} /vendor if [[ ! $(is_mounted /vendor) && -d /system/vendor ]]; then ### XXX work-around required for some devices diff --git a/patcher/CommonPatcher b/patcher/CommonPatcher index fd7403d..fc633aa 100644 --- a/patcher/CommonPatcher +++ b/patcher/CommonPatcher @@ -134,6 +134,11 @@ mount_partitions () { SYSTEM_AS_ROOT=$(grep_prop ro.build.ab_update /default.prop) if [ -d /system_root -o ${SYSTEM_AS_ROOT} ]; then + [ -L /system_root ] && mv /system_root /system_root_link + if [ ! -d /system_root ]; then + rm -rf /system_root + mkdir -p /system_root + fi ! is_mounted /system_root && mount -o rw /system_root ! is_mounted /system_root && mount -o rw ${SYSTEM_BLOCK} /system_root mount -o bind /system_root/system /system @@ -148,7 +153,7 @@ mount_partitions () { echo " INFO: #7 [VENDOR_BLOCK] ${VENDOR_BLOCK}" ! is_mounted /vendor && mount -o ro /vendor - ! is mounted /vendor && mount -o ro ${VENDOR_BLOCK} /vendor + ! is_mounted /vendor && mount -o ro ${VENDOR_BLOCK} /vendor if [[ ! $(is_mounted /vendor) && -d /system/vendor ]]; then ### XXX work-around required for some devices diff --git a/systest/SysTest b/systest/SysTest index 51d01a9..d13962f 100644 --- a/systest/SysTest +++ b/systest/SysTest @@ -131,6 +131,11 @@ mount_partitions () { SYSTEM_AS_ROOT=$(grep_prop ro.build.ab_update /default.prop) if [ -d /system_root -o ${SYSTEM_AS_ROOT} ]; then + [ -L /system_root ] && mv /system_root /system_root_link + if [ ! -d /system_root ]; then + rm -rf /system_root + mkdir -p /system_root + fi ! is_mounted /system_root && mount -o rw /system_root ! is_mounted /system_root && mount -o rw ${SYSTEM_BLOCK} /system_root mount -o bind /system_root/system /system @@ -140,7 +145,7 @@ mount_partitions () { fi ! is_mounted /vendor && mount -o ro /vendor - ! is mounted /vendor && mount -o ro ${VENDOR_BLOCK} /vendor + ! is_mounted /vendor && mount -o ro ${VENDOR_BLOCK} /vendor if [[ ! $(is_mounted /vendor) && -d /system/vendor ]]; then ### XXX work-around required for some devices diff --git a/uninstaller/META-INF/com/google/android/update-binary b/uninstaller/META-INF/com/google/android/update-binary index 3c21423..0606856 100644 --- a/uninstaller/META-INF/com/google/android/update-binary +++ b/uninstaller/META-INF/com/google/android/update-binary @@ -198,6 +198,11 @@ mount_partitions () { SYSTEM_AS_ROOT=$(grep_prop ro.build.ab_update /default.prop) if [ -d /system_root -o ${SYSTEM_AS_ROOT} ]; then + [ -L /system_root ] && mv /system_root /system_root_link + if [ ! -d /system_root ]; then + rm -rf /system_root + mkdir -p /system_root + fi ! is_mounted /system_root && mount -o rw /system_root ! is_mounted /system_root && mount -o rw ${SYSTEM_BLOCK} /system_root mount -o bind /system_root/system /system @@ -212,7 +217,7 @@ mount_partitions () { echo " INFO: #7 [VENDOR_BLOCK] ${VENDOR_BLOCK}" ! is_mounted /vendor && mount -o ro /vendor - ! is mounted /vendor && mount -o ro ${VENDOR_BLOCK} /vendor + ! is_mounted /vendor && mount -o ro ${VENDOR_BLOCK} /vendor if [[ ! $(is_mounted /vendor) && -d /system/vendor ]]; then ### XXX work-around required for some devices