+1
−0
fs_mgr/fs_mgr_overlayfs.cpp
0 → 100644
+478
−0
fs_mgr/include/fs_mgr_overlayfs.h
0 → 100644
+24
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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