From 9f697c42f509854bf82501236b9548e4b51c6dbe Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Tue, 24 Oct 2023 07:59:40 -0700 Subject: [PATCH] Run fsck to resolve possible data corruption 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 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1bc693d338e8d26307d51bb6731d8e94f1df33f9) Merged-In: I1263d2d55fe22d994ae8c8654b1e75ad9e4ddafe Change-Id: I1263d2d55fe22d994ae8c8654b1e75ad9e4ddafe --- device-common.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/device-common.mk b/device-common.mk index cbeb2689..ef90ca1a 100644 --- a/device-common.mk +++ b/device-common.mk @@ -48,3 +48,7 @@ PRODUCT_PRODUCT_PROPERTIES += \ # Set thermal warm reset PRODUCT_PRODUCT_PROPERTIES += \ ro.thermal_warmreset = true + +# Trigger fsck on upgrade (305658663) +PRODUCT_PRODUCT_PROPERTIES += \ + ro.preventative_fsck = 1 \ No newline at end of file