multirom: Support mounting booted external EXT4/F2FS #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When booting from an EXT4 or F2FS MicroSD / USB Drive,
the external partition itself is not mountable and
accessible from the Android userspace for media or data
External booted partition is mounted early for /system,
/data and /cache, therefore e2fsck fails to check,
and vold avoids mounting the 'corrupted' partition
Furthermore on CM/LineageOS based ROMs, external drives
using EXT4 or F2FS are mounted with an sdcard context,
which fails due to the superblock mounts mismatching
the early MultiROM mount of the same partition
Work around this limitation from vold and external boots
by flagging such a boot as an external_mount path,
remove the fstab entry matching the external MicroSD
or external USB, and finally mount the partition
to a new 'external_multirom' folder inside the internal
media storage under /data/media or /data/media/0
Stores external mount paths and filesystem globally
for later use upon Android mounts preparation
Change-Id: Ifab658ac03a481b40b517a978621f25e09f8622b
Signed-off-by: Adrian DC radian.dc@gmail.com