CommonInstaller: further improve/fix mounting /system and /vendor

merge-requests/33/head
Christopher Roy Bratusek 4 years ago
parent a86402774a
commit 8690da9c4a

@ -10,9 +10,9 @@
* note: missing `nanodroid_utils` will still make the default value used, as desired
* fix that empty `nanodroid_init=""` setup variable will get overriden with default value
* note: missing `nanodroid_init` will still make the default value used, as desired
* ensure we mount `system_${SLOT}` instead of `system`
* try to mount `/system_root` if direct/block mounting of `/system` fails
* fixes issue with mounting `/system` on some devices in TWRP
* ensure we mount `vendor_${SLOT}` instead of `vendor`
* ensure we mount `/vendor` block device if direct mounting fails
* fixes issue with mounting `/vendor` on some devices in TWRP
* only create `/system/vendor -> /vendor` compat link needed on some devices if there's no `vendor_${SLOT}` partition

@ -248,9 +248,10 @@ mount_partitions () {
is_mounted /data || mount /data || error "failed to mount /data!"
mount -o bind /dev/urandom /dev/random
! is_mounted /system && mount -o rw system${SLOT}
! is_mounted /system && mount -o rw /system
! is_mounted /system && mount -o rw ${SYSTEM_BLOCK} /system
! is_mounted /system && error "failed to mount /system!"
! is_mounted /system && mount -o rw /system_root
if [ -f /system/init.rc ]; then
SYSTEM_AS_ROOT=true
@ -265,7 +266,8 @@ mount_partitions () {
VENDOR_BLOCK=$(readlink -f ${vendor_tmp})
echo " INFO: #7 [VENDOR_BLOCK] ${VENDOR_BLOCK}"
! is_mounted /vendor && mount -o ro vendor${SLOT} || mount -o ro ${VENDOR_BLOCK} /vendor
! is_mounted /vendor && mount -o ro /vendor
! is mounted /vendor && mount -o ro ${VENDOR_BLOCK} /vendor
if [ -d /system/vendor -a ! is_mounted /vendor ]; then
### XXX work-around required for some ROMs

Loading…
Cancel
Save