1# 2# Copyright (C) 2020 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 17# Sets Android TV Low RAM recommended default product options. 18 19# Set lowram options and enable traced by default 20PRODUCT_VENDOR_PROPERTIES += ro.config.low_ram=true 21 22# Speed profile services and wifi-service to reduce RAM and storage. 23PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := speed-profile 24 25# Always preopt extracted APKs to prevent extracting out of the APK for gms 26# modules. 27PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK := true 28 29# Use TV specific preloaded classes for the boot classpath, determines which 30# methods from the boot classpath get optimized, which class is included in 31# the boot .art image, and how the corresponding DEX files are laid out. 32PRODUCT_COPY_FILES += device/google/atv/products/lowram_boot_profiles/preloaded-classes:system/etc/preloaded-classes 33 34# Use TV specific profile for the boot classpath, determines which methods 35# from the boot classpath get optimized, which class is included in the boot 36# .art image, and how the corresponding DEX files are laid out. 37PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE := true 38PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION := device/google/atv/products/lowram_boot_profiles/boot-image-profile.txt 39 40# Do not generate libartd. 41PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD := false 42 43# Strip the local variable table and the local variable type table to reduce 44# the size of the system image. This has no bearing on stack traces, but will 45# leave less information available via JDWP. 46PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := true 47 48# Add the system properties. 49TARGET_SYSTEM_PROP += \ 50 build/make/target/board/go_defaults_common.prop 51 52# Dedupe VNDK libraries with identical core variants. 53TARGET_VNDK_USE_CORE_VARIANT := true 54 55# Use the low memory allocator outside of eng builds to save RSS. 56ifeq (,$(filter eng, $(TARGET_BUILD_VARIANT))) 57 MALLOC_SVELTE := true 58endif 59 60# Overlay for lowram 61PRODUCT_PACKAGES += TvLowRamOverlay 62 63# Disable camera 64PRODUCT_SUPPORTS_CAMERA := false 65