Remove older fstab and partitioning schemes

Make dynamic partitions mandatory. This allows us to remove fstab via DT
and other features deprecated by the platform. The only modality is now
composite on/off.

Test: Build and run
Bug: 140313636
Change-Id: Id87c94e9b52a5734696a4cd8e24cd6db5e751614
Merged-In: Id87c94e9b52a5734696a4cd8e24cd6db5e751614
diff --git a/host_package.mk b/host_package.mk
index 4bb2678..87c19e1 100644
--- a/host_package.mk
+++ b/host_package.mk
@@ -84,15 +84,7 @@
     libcuttlefish_device_config.so \
 
 
-cvd_host_configs := \
-    system-root.dtb \
-    composite-system-root.dtb \
-    initrd-root.dtb \
-    gsi.fstab \
-    composite-gsi.fstab \
-
 cvd_host_package_files := \
-     $(addprefix config/,$(cvd_host_configs)) \
      $(addprefix $(bin_path)/,$(cvd_host_executables)) \
      $(addprefix $(lib_path)/,$(cvd_host_shared_libraries)) \
      $(foreach test,$(cvd_host_tests), ${tests_path}/$(test)/$(test)) \
diff --git a/shared/BoardConfig.mk b/shared/BoardConfig.mk
index 37a03c7..2f43430 100644
--- a/shared/BoardConfig.mk
+++ b/shared/BoardConfig.mk
@@ -50,9 +50,6 @@
 BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
 TARGET_COPY_OUT_SYSTEM_EXT := system_ext
 
-ifeq ($(TARGET_BUILD_SYSTEM_ROOT_IMAGE),true)
-BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
-endif
 BOARD_USES_GENERIC_AUDIO := false
 USE_CAMERA_STUB := true
 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
@@ -146,33 +143,17 @@
 
 
 TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888
-ifeq ($(TARGET_BUILD_SYSTEM_ROOT_IMAGE),true)
-# Use the initrd version for the dtb build, because we need to have /system
-# defined somewhere, and the dtb fstab doesn't define it (deliberately)
-TARGET_RECOVERY_FSTAB ?= device/google/cuttlefish/shared/config/fstab.initrd
-else ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true)
-TARGET_RECOVERY_FSTAB ?= device/google/cuttlefish/shared/config/fstab.initrd-dynamic-partitions
-else
-TARGET_RECOVERY_FSTAB ?= device/google/cuttlefish/shared/config/fstab.initrd
-endif
 
-ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true)
-  BOARD_SUPER_PARTITION_SIZE := 6442450944
-  BOARD_SUPER_PARTITION_GROUPS := google_dynamic_partitions
-  BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor product system_ext
-  BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 6442450944
-  BOARD_SUPER_PARTITION_METADATA_DEVICE := vda
-  BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
-  BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true
-  TARGET_RELEASETOOLS_EXTENSIONS := device/google/cuttlefish/shared
-else
-  # No dynamic partitions support; we must specify maximum sizes
-  BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648 # 2GB
-  BOARD_VENDORIMAGE_PARTITION_SIZE := 536870912 # 512MB
-  BOARD_PRODUCTIMAGE_PARTITION_SIZE := 2147483648 # 2GB
-  BOARD_SYSTEM_EXTIMAGE_PARTITION_SIZE := 1610612736 # 1.5GB
-  TARGET_NO_RECOVERY ?= true
-endif
+TARGET_RECOVERY_FSTAB ?= device/google/cuttlefish/shared/config/fstab
+
+BOARD_SUPER_PARTITION_SIZE := 6442450944
+BOARD_SUPER_PARTITION_GROUPS := google_dynamic_partitions
+BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor product system_ext
+BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 6442450944
+BOARD_SUPER_PARTITION_METADATA_DEVICE := vda
+BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
+BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true
+TARGET_RELEASETOOLS_EXTENSIONS := device/google/cuttlefish/shared
 
 # To see full logs from init, disable ratelimiting.
 # The default is 5 messages per second amortized, with a burst of up to 10.
diff --git a/shared/auto/device.mk b/shared/auto/device.mk
index b45a1e1..12c698a 100644
--- a/shared/auto/device.mk
+++ b/shared/auto/device.mk
@@ -84,12 +84,4 @@
 PRODUCT_ENFORCE_RRO_TARGETS := framework-res
 PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS := device/google/cuttlefish/shared/overlay
 
-TARGET_USE_DYNAMIC_PARTITIONS ?= true
 TARGET_NO_TELEPHONY := true
-
-ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true)
-  PRODUCT_USE_DYNAMIC_PARTITIONS := true
-  TARGET_BUILD_SYSTEM_ROOT_IMAGE := false
-else
-  TARGET_BUILD_SYSTEM_ROOT_IMAGE ?= true
-endif
diff --git a/shared/config/Android.mk b/shared/config/Android.mk
index 0bd4af8..1397bcc 100644
--- a/shared/config/Android.mk
+++ b/shared/config/Android.mk
@@ -35,57 +35,3 @@
 	$(hide) mkdir -p $(dir $@)
 	$(hide) $< "${TARGET_PRODUCT}" "${PRODUCT_MODEL}" \
 	    "${PLATFORM_SDK_VERSION}" > $@
-
-include $(CLEAR_VARS)
-
-# This file is deprecated and is kept round for host tools compatibility with
-# older target filesystem images. It is not necessary to pass a .dtb blob
-# through to QEMU any more.
-
-LOCAL_MODULE := initrd_root_dtb
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(HOST_OUT)/config
-LOCAL_MODULE_STEM := initrd-root.dtb
-LOCAL_SRC_FILES := initrd-root.dtb
-
-include $(BUILD_PREBUILT)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := system_root_dtb
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(HOST_OUT)/config
-LOCAL_MODULE_STEM := system-root.dtb
-LOCAL_SRC_FILES := system-root.dtb
-
-include $(BUILD_PREBUILT)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := composite_system_root_dtb
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(HOST_OUT)/config
-LOCAL_MODULE_STEM := composite-system-root.dtb
-LOCAL_SRC_FILES := composite-system-root.dtb
-
-include $(BUILD_PREBUILT)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := gsi_fstab
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(HOST_OUT)/config
-LOCAL_MODULE_STEM := gsi.fstab
-LOCAL_SRC_FILES := gsi.fstab
-
-include $(BUILD_PREBUILT)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := composite_gsi_fstab
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(HOST_OUT)/config
-LOCAL_MODULE_STEM := composite-gsi.fstab
-LOCAL_SRC_FILES := composite-gsi.fstab
-
-include $(BUILD_PREBUILT)
diff --git a/shared/config/composite-fstab.dtb b/shared/config/composite-fstab.dtb
deleted file mode 100644
index 2a2cd7c..0000000
--- a/shared/config/composite-fstab.dtb
+++ /dev/null
@@ -1,6 +0,0 @@
-boot /boot emmc defaults recoveryonly
-/dev/block/by-name/userdata /data ext4 nodev,noatime,nosuid,errors=panic wait,fileencryption=aes-256-xts:aes-256-cts
-/dev/block/by-name/cache /cache ext4 nodev,noatime,nosuid,errors=panic wait
-/dev/block/by-name/metadata /metadata ext4 nodev,noatime,nosuid,errors=panic wait,formattable
-/dev/block/zram0 none swap defaults zramsize=75%
-/tmp /sdcard none defaults,bind recoveryonly
diff --git a/shared/config/composite-gsi.fstab b/shared/config/composite-gsi.fstab
deleted file mode 100644
index ceeeff2..0000000
--- a/shared/config/composite-gsi.fstab
+++ /dev/null
@@ -1,3 +0,0 @@
-/dev/block/by-name/vendor /vendor ext4 noatime,ro,errors=panic wait
-/dev/block/by-name/product /product ext4 noatime,ro,errors=panic wait
-/dev/block/by-name/system_ext /system_ext ext4 noatime,ro,errors=panic wait
diff --git a/shared/config/composite-system-root.dtb b/shared/config/composite-system-root.dtb
deleted file mode 100644
index 18abd9f..0000000
--- a/shared/config/composite-system-root.dtb
+++ /dev/null
Binary files differ
diff --git a/shared/config/composite-system-root.dts b/shared/config/composite-system-root.dts
deleted file mode 100644
index 4379277..0000000
--- a/shared/config/composite-system-root.dts
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2018 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.
- */
-
-/dts-v1/;
-
-/ {
-	firmware {
-		android {
-			compatible = "android,firmware";
-			fstab {
-				compatible = "android,fstab";
-				vendor {
-					compatible = "android,vendor";
-					dev = "/dev/block/by-name/vendor";
-					type = "ext4";
-					mnt_flags = "noatime,ro,errors=panic";
-					fsmgr_flags = "wait";
-				};
-
-				product {
-					compatible = "android,product";
-					dev = "/dev/block/by-name/product";
-					type = "ext4";
-					mnt_flags = "noatime,ro,errors=panic";
-					fsmgr_flags = "wait";
-				};
-			};
-		};
-	};
-};
diff --git a/shared/config/fstab.initrd-dynamic-partitions b/shared/config/fstab
similarity index 100%
rename from shared/config/fstab.initrd-dynamic-partitions
rename to shared/config/fstab
diff --git a/shared/config/composite-fstab.initrd-dynamic-partitions b/shared/config/fstab.composite
similarity index 100%
rename from shared/config/composite-fstab.initrd-dynamic-partitions
rename to shared/config/fstab.composite
diff --git a/shared/config/fstab.dtb b/shared/config/fstab.dtb
deleted file mode 100644
index dee5587..0000000
--- a/shared/config/fstab.dtb
+++ /dev/null
@@ -1,6 +0,0 @@
-boot /boot emmc defaults recoveryonly
-/dev/block/vdb /data ext4 nodev,noatime,nosuid,errors=panic wait,fileencryption=aes-256-xts:aes-256-cts
-/dev/block/vdc /cache ext4 nodev,noatime,nosuid,errors=panic wait
-/dev/block/vdd /metadata ext4 nodev,noatime,nosuid,errors=panic wait,formattable
-/dev/block/zram0 none swap defaults zramsize=75%
-/tmp /sdcard none defaults,bind recoveryonly
diff --git a/shared/config/fstab.initrd b/shared/config/fstab.initrd
deleted file mode 100644
index 51f1ade..0000000
--- a/shared/config/fstab.initrd
+++ /dev/null
@@ -1,10 +0,0 @@
-boot /boot emmc defaults recoveryonly
-/dev/block/vda /system ext4 noatime,ro,errors=panic wait
-/dev/block/vdb /data ext4 nodev,noatime,nosuid,errors=panic wait,fileencryption=aes-256-xts:aes-256-cts
-/dev/block/vdc /cache ext4 nodev,noatime,nosuid,errors=panic wait
-/dev/block/vdd /metadata ext4 nodev,noatime,nosuid,errors=panic wait,formattable
-/dev/block/vde /vendor ext4 noatime,ro,errors=panic wait
-/dev/block/vdf /product ext4 noatime,ro,errors=panic wait
-/dev/block/vdg /system_ext ext4 noatime,ro,errors=panic wait
-/dev/block/zram0 none swap defaults zramsize=75%
-/tmp /sdcard none defaults,bind recoveryonly
diff --git a/shared/config/gsi.fstab b/shared/config/gsi.fstab
deleted file mode 100644
index d727dd7..0000000
--- a/shared/config/gsi.fstab
+++ /dev/null
@@ -1,3 +0,0 @@
-/dev/block/vde /vendor ext4 noatime,ro,errors=panic wait
-/dev/block/vdf /product ext4 noatime,ro,errors=panic wait
-/dev/block/vdg /system_ext ext4 noatime,ro,errors=panic wait
diff --git a/shared/config/init.common.rc b/shared/config/init.common.rc
index 3778d81..162da7c 100644
--- a/shared/config/init.common.rc
+++ b/shared/config/init.common.rc
@@ -20,7 +20,7 @@
 on early-init && property:ro.boot.fstab_name="fstab"
     mount /dev/block/vdd /metadata ext4 nodev,noatime,nosuid,errors=panic wait,formattable
 
-on early-init && property:ro.boot.fstab_name="composite-fstab"
+on early-init && property:ro.boot.fstab_name="fstab.composite"
     mount /dev/block/by-name/metadata /metadata ext4 nodev,noatime,nosuid,errors=panic wait,formattable
 
 on init
diff --git a/shared/config/initrd-root.dtb b/shared/config/initrd-root.dtb
deleted file mode 100644
index d12be7e..0000000
--- a/shared/config/initrd-root.dtb
+++ /dev/null
Binary files differ
diff --git a/shared/config/initrd-root.dts b/shared/config/initrd-root.dts
deleted file mode 100644
index 8b4e749..0000000
--- a/shared/config/initrd-root.dts
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2018 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.
- */
-
-/dts-v1/;
-
-/ {
-	firmware {
-		android {
-			compatible = "android,firmware";
-			fstab {
-				compatible = "android,fstab";
-				system {
-					compatible = "android,system";
-					dev = "/dev/block/vda";
-					type = "ext4";
-					mnt_flags = "noatime,ro,errors=panic";
-					fsmgr_flags = "wait";
-				};
-
-				vendor {
-					compatible = "android,vendor";
-					dev = "/dev/block/vde";
-					type = "ext4";
-					mnt_flags = "noatime,ro,errors=panic";
-					fsmgr_flags = "wait";
-				};
-
-				product {
-					compatible = "android,product";
-					dev = "/dev/block/vdf";
-					type = "ext4";
-					mnt_flags = "noatime,ro,errors=panic";
-					fsmgr_flags = "wait";
-				};
-
-				system_ext {
-					compatible = "android,system_ext";
-					dev = "/dev/block/vdg";
-					type = "ext4";
-					mnt_flags = "noatime,ro,errors=panic";
-					fsmgr_flags = "wait";
-				};
-			};
-		};
-	};
-};
diff --git a/shared/config/system-root.dtb b/shared/config/system-root.dtb
deleted file mode 100644
index 2ebd0d7..0000000
--- a/shared/config/system-root.dtb
+++ /dev/null
Binary files differ
diff --git a/shared/config/system-root.dts b/shared/config/system-root.dts
deleted file mode 100644
index 25e5bb9..0000000
--- a/shared/config/system-root.dts
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2018 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.
- */
-
-/dts-v1/;
-
-/ {
-	firmware {
-		android {
-			compatible = "android,firmware";
-			fstab {
-				compatible = "android,fstab";
-				vendor {
-					compatible = "android,vendor";
-					dev = "/dev/block/vde";
-					type = "ext4";
-					mnt_flags = "noatime,ro,errors=panic";
-					fsmgr_flags = "wait";
-				};
-
-				product {
-					compatible = "android,product";
-					dev = "/dev/block/vdf";
-					type = "ext4";
-					mnt_flags = "noatime,ro,errors=panic";
-					fsmgr_flags = "wait";
-				};
-
-				system_ext {
-					compatible = "android,system_ext";
-					dev = "/dev/block/vdg";
-					type = "ext4";
-					mnt_flags = "noatime,ro,errors=panic";
-					fsmgr_flags = "wait";
-				};
-			};
-		};
-	};
-};
diff --git a/shared/device.mk b/shared/device.mk
index e3d2209..1f59971 100644
--- a/shared/device.mk
+++ b/shared/device.mk
@@ -21,6 +21,7 @@
 PRODUCT_SHIPPING_API_LEVEL := 29
 PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false
 PRODUCT_BUILD_BOOT_IMAGE := true
+PRODUCT_USE_DYNAMIC_PARTITIONS := true
 DISABLE_RILD_OEM_HOOK := true
 
 # Properties that are not vendor-specific. These will go in the product
@@ -145,41 +146,12 @@
     frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
     frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \
     system/bt/vendor_libs/test_vendor_lib/data/controller_properties.json:vendor/etc/bluetooth/controller_properties.json \
-
-
-#
-# The fstab requires special handling. For system-as-root builds, we *must*
-# retrieve the vendor partition mount options from DTB, as system must be
-# "pristine" to support GSI. For builds with an initrd, we prefer not to
-# rely on DTB, and *must* retrieve the partition mount options from an fstab
-# in the initrd instead. (In either case, the fstab *must also* be installed to
-# /vendor/etc)
-#
-ifeq ($(TARGET_BUILD_SYSTEM_ROOT_IMAGE),true)
-PRODUCT_COPY_FILES += \
-    device/google/cuttlefish/shared/config/fstab.dtb:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.cutf_ivsh \
-    device/google/cuttlefish/shared/config/fstab.dtb:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.cutf_cvm \
-    device/google/cuttlefish/shared/config/composite-fstab.dtb:$(TARGET_COPY_OUT_VENDOR)/etc/composite-fstab.cutf_ivsh \
-    device/google/cuttlefish/shared/config/composite-fstab.dtb:$(TARGET_COPY_OUT_VENDOR)/etc/composite-fstab.cutf_cvm \
-
-else ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true)
-PRODUCT_COPY_FILES += \
-    device/google/cuttlefish/shared/config/fstab.initrd-dynamic-partitions:$(TARGET_COPY_OUT_RAMDISK)/fstab.cutf_ivsh \
-    device/google/cuttlefish/shared/config/fstab.initrd-dynamic-partitions:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.cutf_ivsh \
-    device/google/cuttlefish/shared/config/fstab.initrd-dynamic-partitions:$(TARGET_COPY_OUT_RAMDISK)/fstab.cutf_cvm \
-    device/google/cuttlefish/shared/config/fstab.initrd-dynamic-partitions:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.cutf_cvm \
-    device/google/cuttlefish/shared/config/composite-fstab.initrd-dynamic-partitions:$(TARGET_COPY_OUT_VENDOR)/etc/composite-fstab.cutf_ivsh \
-    device/google/cuttlefish/shared/config/composite-fstab.initrd-dynamic-partitions:$(TARGET_COPY_OUT_VENDOR)/etc/composite-fstab.cutf_cvm \
-
-else
-PRODUCT_COPY_FILES += \
-    device/google/cuttlefish/shared/config/fstab.initrd:$(TARGET_COPY_OUT_RAMDISK)/fstab.cutf_ivsh \
-    device/google/cuttlefish/shared/config/fstab.initrd:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.cutf_ivsh \
-    device/google/cuttlefish/shared/config/fstab.initrd:$(TARGET_COPY_OUT_RAMDISK)/fstab.cutf_cvm \
-    device/google/cuttlefish/shared/config/fstab.initrd:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.cutf_cvm \
-
-endif
-
+    device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_RAMDISK)/fstab.cutf_ivsh \
+    device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.cutf_ivsh \
+    device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_RAMDISK)/fstab.cutf_cvm \
+    device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.cutf_cvm \
+    device/google/cuttlefish/shared/config/fstab.composite:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.composite.cutf_ivsh \
+    device/google/cuttlefish/shared/config/fstab.composite:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.composite.cutf_cvm \
 
 #
 # USB Specific
diff --git a/shared/phone/device.mk b/shared/phone/device.mk
index befa105..d087705 100644
--- a/shared/phone/device.mk
+++ b/shared/phone/device.mk
@@ -46,11 +46,3 @@
 # These flags are important for the GSI, but break auto
 PRODUCT_ENFORCE_RRO_TARGETS := framework-res
 PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS := device/google/cuttlefish/shared/overlay
-
-TARGET_USE_DYNAMIC_PARTITIONS ?= true
-ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true)
-  PRODUCT_USE_DYNAMIC_PARTITIONS := true
-  TARGET_BUILD_SYSTEM_ROOT_IMAGE := false
-else
-  TARGET_BUILD_SYSTEM_ROOT_IMAGE ?= true
-endif
diff --git a/shared/phone/device_vendor.mk b/shared/phone/device_vendor.mk
index 30d4105..0df1f4a 100644
--- a/shared/phone/device_vendor.mk
+++ b/shared/phone/device_vendor.mk
@@ -50,11 +50,3 @@
 # These flags are important for the GSI, but break auto
 PRODUCT_ENFORCE_RRO_TARGETS := framework-res
 PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS := device/google/cuttlefish/shared/overlay
-
-TARGET_USE_DYNAMIC_PARTITIONS ?= true
-ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true)
-  PRODUCT_USE_DYNAMIC_PARTITIONS := true
-  TARGET_BUILD_SYSTEM_ROOT_IMAGE := false
-else
-  TARGET_BUILD_SYSTEM_ROOT_IMAGE ?= true
-endif
diff --git a/shared/tv/device.mk b/shared/tv/device.mk
index dc67c0e..8a34d71 100644
--- a/shared/tv/device.mk
+++ b/shared/tv/device.mk
@@ -28,14 +28,6 @@
 # HDMI CEC HAL
 PRODUCT_PACKAGES += android.hardware.tv.cec@1.0-service.mock
 
-TARGET_USE_DYNAMIC_PARTITIONS ?= true
-ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true)
-  PRODUCT_USE_DYNAMIC_PARTITIONS := true
-  TARGET_BUILD_SYSTEM_ROOT_IMAGE := false
-else
-  TARGET_BUILD_SYSTEM_ROOT_IMAGE ?= true
-endif
-
 # Enabling managed profiles
 PRODUCT_COPY_FILES += frameworks/native/data/etc/android.software.managed_users.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.managed_users.xml
 DEVICE_PACKAGE_OVERLAYS += device/google/cuttlefish/shared/tv/overlay