fs_mgr: add overlayfs handling for squashfs system filesystems
Logistics for adb remount on developer builds for readonly system partitions using overlayfs to deal with not being able to remount with read-write. Conditions are that filesystem is squashfs, read-only, debug build, kernel supports overlayfs. The default is a valid /cache/overlay/ directory, with .../<mount_point>/upper and .../<mount_point>/work, associated with each system partition <mount_point>. Will take the sepolicy of context of lowerdir as rootcontext= option. Add fs_mgr_overlayfs_mount_all() to recurse through fs_mgr_read_fstab_default(), and checking against /proc/mounts to add any acceptable overlayfs mounts. The checking with /proc/mounts makes sure we do not overlayfs overtop an overlayfs. Add fs_mgr_overlayfs_setup(const char*, const char* bool*) and fs_mgr_overlayfs_teardown(const char*, bool*) to respectively setup or teardown the overlayfs support directories. Return value includes success and optional supplied change booleans. Test: compile Bug: 109821005 Bug: 110985612 Change-Id: Ie9b4e9ca0f2bdd9275ac2e2e905431636948e131
Loading
Please register or sign in to comment