db845c: Make it a Virtual A/B device

All dynamic partitions are A/B.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Change-Id: I9650626b5a463ff9f368680ae8c32b8432fee1e8
diff --git a/db845c/device.mk b/db845c/device.mk
index 2240981..0c2cbf9 100644
--- a/db845c/device.mk
+++ b/db845c/device.mk
@@ -20,6 +20,16 @@
 # setup dalvik vm configs
 $(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
 
+# Enable Virtual A/B
+AB_OTA_UPDATER := true
+AB_OTA_PARTITIONS += \
+    product \
+    system \
+    system_ext \
+    vendor
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
+
 PRODUCT_COPY_FILES := \
     $(DB845C_KERNEL_DIR)/Image.gz:kernel \
     $(DB845C_KERNEL_DIR)/sdm845-db845c.dtb:dtb.img \
diff --git a/fstab.common b/fstab.common
index f9023ad..a0d925f 100644
--- a/fstab.common
+++ b/fstab.common
@@ -1,9 +1,9 @@
-system		/system		ext4	noatime,ro,errors=panic		wait,logical,first_stage_mount
+system		/system		ext4	noatime,ro,errors=panic		wait,logical,first_stage_mount,slotselect
 /dev/block/platform/soc@0/1d84000.ufshc/by-name/userdata /data		ext4	discard,noatime,noauto_da_alloc,data=ordered,user_xattr,barrier=1,inlinecrypt	wait,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized,quota
 /dev/block/platform/soc@0/1d84000.ufshc/by-name/metadata	/metadata	ext4	noatime,nosuid,nodev,discard					wait,formattable
 /dev/block/platform/soc@0/1d84000.ufshc/by-name/cache /cache	 ext4	nodev,noatime,nosuid,errors=panic wait
 /dev/block/platform/soc@0/1d84000.ufshc/by-name/misc /misc emmc defaults defaults
 /devices/platform/soc@0/8804000.sdhci/mmc_host/mmc*	auto	auto	defaults	voldmanaged=sdcard1:auto
-vendor		/vendor		ext4	noatime,ro,errors=panic		wait,logical,first_stage_mount
-system_ext	/system_ext	ext4	noatime,ro,errors=panic		wait,logical,first_stage_mount
-product	/product	ext4	noatime,ro,errors=panic		wait,logical,first_stage_mount
+vendor		/vendor		ext4	noatime,ro,errors=panic		wait,logical,first_stage_mount,slotselect
+system_ext	/system_ext	ext4	noatime,ro,errors=panic		wait,logical,first_stage_mount,slotselect
+product	/product	ext4	noatime,ro,errors=panic		wait,logical,first_stage_mount,slotselect