1# 2# Copyright (C) 2022 The Android Open-Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15 16# This file enables baseline features, such as io_uring, 17# userspace merge, etc. But sets compression method to none. 18# This .mk file also removes snapuserd from vendor ramdisk, 19# as T launching devices will have init_boot which has snapuserd 20# in generic ramdisk. 21# T launching devices should include this .mk file, and configure 22# compression algorithm by setting 23# PRODUCT_VIRTUAL_AB_COMPRESSION_METHOD to gz or brotli. Complete 24# set of supported algorithms can be found in 25# system/core/fs_mgr/libsnapshot/cow_writer.cpp 26 27PRODUCT_VIRTUAL_AB_OTA := true 28 29PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.enabled=true 30 31PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.compression.enabled=true 32PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.userspace.snapshots.enabled=true 33PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.io_uring.enabled=true 34PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.compression.xor.enabled=true 35 36PRODUCT_VIRTUAL_AB_COMPRESSION := true 37PRODUCT_VIRTUAL_AB_COMPRESSION_METHOD ?= none 38PRODUCT_PACKAGES += \ 39 snapuserd \ 40 41# For dedicated recovery partitions, we need to include snapuserd 42# For GKI devices, BOARD_USES_RECOVERY_AS_BOOT is empty, but 43# so is BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT. 44ifdef BUILDING_RECOVERY_IMAGE 45ifneq ($(BOARD_USES_RECOVERY_AS_BOOT),true) 46ifneq ($(BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT),true) 47PRODUCT_PACKAGES += \ 48 snapuserd.recovery 49endif 50endif 51endif 52 53