Revert "Mount system_other with AVB verification."
This reverts commit dad923662fed86a8af0315dd5970d7a133a570db.
system_other won't be updated during OTA and it might contain AVB
metadata leftover from previous flash. When it happens, device might
fail to boot because of incorrect dm-verity-fec settings.
e.g.,
device-mapper: verity-fec: 259:36: FEC: recursion too deep
This only happens on A/B devices with PRODUCT_RETROFIT_DYNAMIC_PARTITIONS
set to true, where system_other is a physical partition with the
AVB metadata located at the end of the partition. The active slot
contains primary logical images.
A possible scenario will be:
a. system_b partition is installed with system_other.img, and AVB
footer is at the end of system_b.
b. First time OTA to install logical images to system_b and
mark _b as the active slot. But AVB footer of system_other from
step-a isn't cleared. e.g., the logical images don't use up to
the end of system_b.
c. Second time OTA to install logical images to system_a and mark _a
as the active slot.
d. Factory wipe the device, which triggers the mounting of
system_other. The leftover of AVB footer from step-a doesn't match
the leftover of the filesystem data from step-b, then triggers this
error.
Bug: 129032485
Bug: 139402097
Test: tree hugger
Change-Id: I3cb25117fcab29cd41add978685c6844822acbdc
diff --git a/device.mk b/device.mk
index 7d408cc..e9656a7 100644
--- a/device.mk
+++ b/device.mk
@@ -877,10 +877,3 @@
# Increment the SVN for any official public releases
PRODUCT_PROPERTY_OVERRIDES += \
ro.vendor.build.svn=2
-
-# Use /product/etc/fstab.postinstall to mount system_other.
-PRODUCT_PRODUCT_PROPERTIES += \
- ro.postinstall.fstab.prefix=/product
-
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/fstab.postinstall:$(TARGET_COPY_OUT_PRODUCT)/etc/fstab.postinstall
diff --git a/fstab.postinstall b/fstab.postinstall
deleted file mode 100644
index df8f77b..0000000
--- a/fstab.postinstall
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2019 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
-/dev/block/by-name/system /postinstall ext4 ro,nosuid,nodev,noexec slotselect_other,avb_keys=/product/etc/security/avb/system_other.avbpubkey