Run fsck to resolve possible data corruption

Cherry-picked from 19eb98145d.

Trigger fsck on mount of /data if the value of ro.preventative_fsck is
not equal to the contents of /metadata/vold/preventative_fsck, then set
the file to the property to prevent future runs

See b/305658663 for context

Bug: 305658663
Test: Make sure fsck run after first boot and not after second
Change-Id: Ie6b9fc94752d91e77e8fc48979216917c1fd9ec3
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
This commit is contained in:
Jaegeuk Kim 2023-10-25 12:31:27 -07:00
parent f60b0e874f
commit 44082e91da

View file

@ -47,6 +47,10 @@ PRODUCT_PRODUCT_PROPERTIES += \
# Set the max page size to 4096 (b/300367402) # Set the max page size to 4096 (b/300367402)
PRODUCT_MAX_PAGE_SIZE_SUPPORTED := 4096 PRODUCT_MAX_PAGE_SIZE_SUPPORTED := 4096
# Trigger fsck on upgrade (305658663)
PRODUCT_PRODUCT_PROPERTIES += \
ro.preventative_fsck = 1
# Indicate that the bootloader supports the MTE developer option switch # Indicate that the bootloader supports the MTE developer option switch
# (MISC_MEMTAG_MODE_MEMTAG_ONCE), with the exception of _fullmte products that # (MISC_MEMTAG_MODE_MEMTAG_ONCE), with the exception of _fullmte products that
# force enable MTE. # force enable MTE.