LOCAL_PATH := device/oneplus/fajita
-# Getting this to build in my local omni tree proved quite difficult so just using a prebuilt update_engine_sideload for now.
-# Oddly enough, OnePlus stock recovery does not include an update_engine_sideload binary either.
+# define hardware platform
+PRODUCT_PLATFORM := sdm845
+
+# A/B support
+PRODUCT_PACKAGES += \
+ otapreopt_script \
+ cppreopts.sh \
+ update_engine \
+ update_verifier
+
+PRODUCT_PACKAGES += \
+ bootctrl.sdm845
+
+AB_OTA_POSTINSTALL_CONFIG += \
+ RUN_POSTINSTALL_system=true \
+ POSTINSTALL_PATH_system=system/bin/otapreopt_script \
+ FILESYSTEM_TYPE_system=ext4 \
+ POSTINSTALL_OPTIONAL_system=true
+
# Enable update engine sideloading by including the static version of the
# boot_control HAL and its dependencies.
-#PRODUCT_STATIC_BOOT_CONTROL_HAL := \
-# libsparse
+PRODUCT_STATIC_BOOT_CONTROL_HAL := \
+ bootctrl.sdm845 \
+ libgptutils \
+ libz \
+ libcutils
-#PRODUCT_PACKAGES += \
-# update_engine_sideload
+# Boot control HAL
+PRODUCT_PACKAGES += \
+ android.hardware.boot@1.0-impl \
+ android.hardware.boot@1.0-service \