1#
2# Copyright (C) 2018 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# This makefile is the basis of a generic system image for a handheld device.
18$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system.mk)
19$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system.mk)
20$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_default.mk)
21# Add adb keys to debuggable AOSP builds (if they exist)
22$(call inherit-product-if-exists, vendor/google/security/adb/vendor_key.mk)
23
24# Enable updating of APEXes
25$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
26
27# Shared java libs
28PRODUCT_PACKAGES += \
29    com.android.nfc_extras \
30
31# Applications
32PRODUCT_PACKAGES += \
33    LiveWallpapersPicker \
34    PartnerBookmarksProvider \
35    preinstalled-packages-platform-generic-system.xml \
36    Stk \
37    Tag \
38
39ifeq ($(RELEASE_AVATAR_PICKER_APP),true)
40  PRODUCT_PACKAGES += \
41    AvatarPicker
42endif
43
44# OTA support
45PRODUCT_PACKAGES += \
46    recovery-refresh \
47    update_engine \
48    update_verifier \
49
50# Wrapped net utils for /vendor access.
51PRODUCT_PACKAGES += netutils-wrapper-1.0
52
53# Charger images
54PRODUCT_PACKAGES += charger_res_images
55
56# system_other support
57PRODUCT_PACKAGES += \
58    cppreopts.sh \
59    otapreopt_script \
60
61# For ringtones that rely on forward lock encryption
62PRODUCT_PACKAGES += libfwdlockengine
63
64# System libraries commonly depended on by things on the system_ext or product partitions.
65# These lists will be pruned periodically.
66PRODUCT_PACKAGES += \
67    android.hardware.biometrics.fingerprint@2.1 \
68    android.hardware.radio@1.0 \
69    android.hardware.radio@1.1 \
70    android.hardware.radio@1.2 \
71    android.hardware.radio@1.3 \
72    android.hardware.radio@1.4 \
73    android.hardware.radio.config@1.0 \
74    android.hardware.radio.deprecated@1.0 \
75    android.hardware.secure_element@1.0 \
76    libaudio-resampler \
77    libaudiohal \
78    libdrm \
79    liblogwrap \
80    liblz4 \
81    libminui \
82    libnl \
83    libprotobuf-cpp-full \
84
85# These libraries are empty and have been combined into libhidlbase, but are still depended
86# on by things off /system.
87# TODO(b/135686713): remove these
88PRODUCT_PACKAGES += \
89    libhidltransport \
90    libhwbinder \
91
92PRODUCT_PACKAGES_DEBUG += \
93    avbctl \
94    bootctl \
95    tinycap \
96    tinyhostless \
97    tinymix \
98    tinypcminfo \
99    tinyplay \
100    update_engine_client \
101
102PRODUCT_HOST_PACKAGES += \
103    tinyplay
104
105# Enable configurable audio policy
106PRODUCT_PACKAGES += \
107    libaudiopolicyengineconfigurable \
108    libpolicy-subsystem
109
110# Add all of the packages used to support older/upgrading devices
111# These can be removed as we drop support for the older API levels
112PRODUCT_PACKAGES += \
113    $(PRODUCT_PACKAGES_SHIPPING_API_LEVEL_29) \
114    $(PRODUCT_PACKAGES_SHIPPING_API_LEVEL_33) \
115    $(PRODUCT_PACKAGES_SHIPPING_API_LEVEL_34)
116
117# Include all zygote init scripts. "ro.zygote" will select one of them.
118PRODUCT_PACKAGES += \
119    init.zygote32.rc \
120    init.zygote64.rc \
121    init.zygote64_32.rc
122
123# Support Credential Manager
124PRODUCT_PACKAGES += \
125    android.software.credentials.prebuilt.xml
126
127# Enable dynamic partition size
128PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
129
130PRODUCT_ENFORCE_RRO_TARGETS := *
131
132PRODUCT_NAME := generic_system
133PRODUCT_BRAND := generic
134
135# Define /system partition-specific product properties to identify that /system
136# partition is generic_system.
137PRODUCT_SYSTEM_NAME := mainline
138PRODUCT_SYSTEM_BRAND := Android
139PRODUCT_SYSTEM_MANUFACTURER := Android
140PRODUCT_SYSTEM_MODEL := mainline
141PRODUCT_SYSTEM_DEVICE := generic
142
143_base_mk_allowed_list :=
144
145_my_allowed_list := $(_base_mk_allowed_list)
146
147# For mainline, system.img should be mounted at /, so we include ROOT here.
148_my_paths := \
149  $(TARGET_COPY_OUT_ROOT)/ \
150  $(TARGET_COPY_OUT_SYSTEM)/ \
151
152$(call require-artifacts-in-path, $(_my_paths), $(_my_allowed_list))
153
154# Product config map to toggle between sources and prebuilts of required mainline modules
155PRODUCT_RELEASE_CONFIG_MAPS += $(wildcard vendor/google_shared/build/release/gms_mainline/required/release_config_map.textproto)
156