Loading fs_mgr/README.overlayfs.md +6 −0 Original line number Original line Diff line number Diff line Loading @@ -89,6 +89,12 @@ Caveats if higher than 4.6. if higher than 4.6. - *adb enable-verity* will free up overlayfs and as a bonus the - *adb enable-verity* will free up overlayfs and as a bonus the device will be reverted pristine to before any content was updated. device will be reverted pristine to before any content was updated. Update engine does not take advantage of this, will perform a full OTA. - Update engine will not run if *fs_mgr_overlayfs_is_setup*() reports true as adb remount overrides are incompatable with an OTA for multiple reasons. NB: This is not a problem for fastbootd or recovery as overrides are disabled for those special boot scenarios. - If dynamic partitions runs out of space, resizing a logical - If dynamic partitions runs out of space, resizing a logical partition larger may fail because of the scratch partition. partition larger may fail because of the scratch partition. If this happens, either fastboot flashall or adb enable-verity can If this happens, either fastboot flashall or adb enable-verity can Loading fs_mgr/fs_mgr_overlayfs.cpp +15 −0 Original line number Original line Diff line number Diff line Loading @@ -96,6 +96,10 @@ bool fs_mgr_overlayfs_teardown(const char*, bool* change) { return false; return false; } } bool fs_mgr_overlayfs_is_setup() { return false; } #else // ALLOW_ADBD_DISABLE_VERITY == 0 #else // ALLOW_ADBD_DISABLE_VERITY == 0 namespace { namespace { Loading Loading @@ -923,6 +927,17 @@ bool fs_mgr_overlayfs_teardown(const char* mount_point, bool* change) { return ret; return ret; } } bool fs_mgr_overlayfs_is_setup() { if (fs_mgr_overlayfs_already_mounted(kScratchMountPoint, false)) return true; std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(), fs_mgr_free_fstab); if (fs_mgr_overlayfs_invalid(fstab.get())) return false; for (const auto& mount_point : fs_mgr_candidate_list(fstab.get())) { if (fs_mgr_overlayfs_already_mounted(mount_point)) return true; } return false; } #endif // ALLOW_ADBD_DISABLE_VERITY != 0 #endif // ALLOW_ADBD_DISABLE_VERITY != 0 bool fs_mgr_has_shared_blocks(const std::string& mount_point, const std::string& dev) { bool fs_mgr_has_shared_blocks(const std::string& mount_point, const std::string& dev) { Loading fs_mgr/include/fs_mgr_overlayfs.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,7 @@ std::vector<std::string> fs_mgr_overlayfs_required_devices(const std::vector<fst bool fs_mgr_overlayfs_setup(const char* backing = nullptr, const char* mount_point = nullptr, bool fs_mgr_overlayfs_setup(const char* backing = nullptr, const char* mount_point = nullptr, bool* change = nullptr); bool* change = nullptr); bool fs_mgr_overlayfs_teardown(const char* mount_point = nullptr, bool* change = nullptr); bool fs_mgr_overlayfs_teardown(const char* mount_point = nullptr, bool* change = nullptr); bool fs_mgr_overlayfs_is_setup(); bool fs_mgr_has_shared_blocks(const std::string& mount_point, const std::string& dev); bool fs_mgr_has_shared_blocks(const std::string& mount_point, const std::string& dev); std::string fs_mgr_get_context(const std::string& mount_point); std::string fs_mgr_get_context(const std::string& mount_point); Loading Loading
fs_mgr/README.overlayfs.md +6 −0 Original line number Original line Diff line number Diff line Loading @@ -89,6 +89,12 @@ Caveats if higher than 4.6. if higher than 4.6. - *adb enable-verity* will free up overlayfs and as a bonus the - *adb enable-verity* will free up overlayfs and as a bonus the device will be reverted pristine to before any content was updated. device will be reverted pristine to before any content was updated. Update engine does not take advantage of this, will perform a full OTA. - Update engine will not run if *fs_mgr_overlayfs_is_setup*() reports true as adb remount overrides are incompatable with an OTA for multiple reasons. NB: This is not a problem for fastbootd or recovery as overrides are disabled for those special boot scenarios. - If dynamic partitions runs out of space, resizing a logical - If dynamic partitions runs out of space, resizing a logical partition larger may fail because of the scratch partition. partition larger may fail because of the scratch partition. If this happens, either fastboot flashall or adb enable-verity can If this happens, either fastboot flashall or adb enable-verity can Loading
fs_mgr/fs_mgr_overlayfs.cpp +15 −0 Original line number Original line Diff line number Diff line Loading @@ -96,6 +96,10 @@ bool fs_mgr_overlayfs_teardown(const char*, bool* change) { return false; return false; } } bool fs_mgr_overlayfs_is_setup() { return false; } #else // ALLOW_ADBD_DISABLE_VERITY == 0 #else // ALLOW_ADBD_DISABLE_VERITY == 0 namespace { namespace { Loading Loading @@ -923,6 +927,17 @@ bool fs_mgr_overlayfs_teardown(const char* mount_point, bool* change) { return ret; return ret; } } bool fs_mgr_overlayfs_is_setup() { if (fs_mgr_overlayfs_already_mounted(kScratchMountPoint, false)) return true; std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(), fs_mgr_free_fstab); if (fs_mgr_overlayfs_invalid(fstab.get())) return false; for (const auto& mount_point : fs_mgr_candidate_list(fstab.get())) { if (fs_mgr_overlayfs_already_mounted(mount_point)) return true; } return false; } #endif // ALLOW_ADBD_DISABLE_VERITY != 0 #endif // ALLOW_ADBD_DISABLE_VERITY != 0 bool fs_mgr_has_shared_blocks(const std::string& mount_point, const std::string& dev) { bool fs_mgr_has_shared_blocks(const std::string& mount_point, const std::string& dev) { Loading
fs_mgr/include/fs_mgr_overlayfs.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,7 @@ std::vector<std::string> fs_mgr_overlayfs_required_devices(const std::vector<fst bool fs_mgr_overlayfs_setup(const char* backing = nullptr, const char* mount_point = nullptr, bool fs_mgr_overlayfs_setup(const char* backing = nullptr, const char* mount_point = nullptr, bool* change = nullptr); bool* change = nullptr); bool fs_mgr_overlayfs_teardown(const char* mount_point = nullptr, bool* change = nullptr); bool fs_mgr_overlayfs_teardown(const char* mount_point = nullptr, bool* change = nullptr); bool fs_mgr_overlayfs_is_setup(); bool fs_mgr_has_shared_blocks(const std::string& mount_point, const std::string& dev); bool fs_mgr_has_shared_blocks(const std::string& mount_point, const std::string& dev); std::string fs_mgr_get_context(const std::string& mount_point); std::string fs_mgr_get_context(const std::string& mount_point); Loading