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    PresencePolling \
36    RcsService \
37    SafetyRegulatoryInfo \
38    Stk \
39    Tag \
40    TimeZoneUpdater \
41
42# Binaries
43PRODUCT_PACKAGES += llkd
44
45# OTA support
46PRODUCT_PACKAGES += \
47    recovery-refresh \
48    update_engine \
49    update_verifier \
50
51# Wrapped net utils for /vendor access.
52PRODUCT_PACKAGES += netutils-wrapper-1.0
53
54# Charger images
55PRODUCT_PACKAGES += charger_res_images
56
57# system_other support
58PRODUCT_PACKAGES += \
59    cppreopts.sh \
60    otapreopt_script \
61
62# Bluetooth libraries
63PRODUCT_PACKAGES += \
64    audio.a2dp.default \
65    audio.hearing_aid.default \
66
67# For ringtones that rely on forward lock encryption
68PRODUCT_PACKAGES += libfwdlockengine
69
70# System libraries commonly depended on by things on the system_ext or product partitions.
71# These lists will be pruned periodically.
72PRODUCT_PACKAGES += \
73    android.hardware.biometrics.fingerprint@2.1 \
74    android.hardware.radio@1.0 \
75    android.hardware.radio@1.1 \
76    android.hardware.radio@1.2 \
77    android.hardware.radio@1.3 \
78    android.hardware.radio@1.4 \
79    android.hardware.radio.config@1.0 \
80    android.hardware.radio.deprecated@1.0 \
81    android.hardware.secure_element@1.0 \
82    android.hardware.wifi@1.0 \
83    libaudio-resampler \
84    libaudiohal \
85    libdrm \
86    liblogwrap \
87    liblz4 \
88    libminui \
89    libnl \
90    libprotobuf-cpp-full \
91
92# These libraries are empty and have been combined into libhidlbase, but are still depended
93# on by things off /system.
94# TODO(b/135686713): remove these
95PRODUCT_PACKAGES += \
96    libhidltransport \
97    libhwbinder \
98
99# Camera service uses 'libdepthphoto' for adding dynamic depth
100# metadata inside depth jpegs.
101PRODUCT_PACKAGES += \
102    libdepthphoto \
103
104PRODUCT_PACKAGES_DEBUG += \
105    avbctl \
106    bootctl \
107    tinycap \
108    tinyhostless \
109    tinymix \
110    tinypcminfo \
111    tinyplay \
112    update_engine_client \
113
114PRODUCT_HOST_PACKAGES += \
115    tinyplay
116
117# Include all zygote init scripts. "ro.zygote" will select one of them.
118PRODUCT_COPY_FILES += \
119    system/core/rootdir/init.zygote32.rc:system/etc/init/hw/init.zygote32.rc \
120    system/core/rootdir/init.zygote64.rc:system/etc/init/hw/init.zygote64.rc \
121    system/core/rootdir/init.zygote64_32.rc:system/etc/init/hw/init.zygote64_32.rc \
122
123# Enable dynamic partition size
124PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
125
126PRODUCT_ENFORCE_RRO_TARGETS := *
127
128# TODO(b/150820813) Settings depends on static overlay, remove this after eliminating the dependency.
129PRODUCT_ENFORCE_RRO_EXEMPTED_TARGETS := Settings
130
131PRODUCT_NAME := mainline_system
132PRODUCT_BRAND := generic
133
134# Define /system partition-specific product properties to identify that /system
135# partition is mainline_system.
136PRODUCT_SYSTEM_NAME := mainline
137PRODUCT_SYSTEM_BRAND := Android
138PRODUCT_SYSTEM_MANUFACTURER := Android
139PRODUCT_SYSTEM_MODEL := mainline
140PRODUCT_SYSTEM_DEVICE := generic
141
142_base_mk_allowed_list :=
143
144_my_allowed_list := $(_base_mk_allowed_list)
145
146# For mainline, system.img should be mounted at /, so we include ROOT here.
147_my_paths := \
148  $(TARGET_COPY_OUT_ROOT)/ \
149  $(TARGET_COPY_OUT_SYSTEM)/ \
150
151$(call require-artifacts-in-path, $(_my_paths), $(_my_allowed_list))
152