• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 file is to configure vendor/data partitions of emulator-related products
18#
19$(call inherit-product-if-exists, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
20
21# Enable Scoped Storage related
22$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
23
24PRODUCT_SOONG_NAMESPACES += \
25    device/generic/goldfish \
26    device/generic/goldfish-opengl
27
28PRODUCT_SYSTEM_EXT_PROPERTIES += ro.lockscreen.disable.default=1
29
30DISABLE_RILD_OEM_HOOK := true
31
32DEVICE_MANIFEST_FILE += device/generic/goldfish/manifest.xml
33PRODUCT_SOONG_NAMESPACES += hardware/google/camera
34PRODUCT_SOONG_NAMESPACES += hardware/google/camera/devices/EmulatedCamera
35
36# Device modules
37PRODUCT_PACKAGES += \
38    vulkan.ranchu \
39    libandroidemu \
40    libOpenglCodecCommon \
41    libOpenglSystemCommon \
42    libcuttlefish-ril-2 \
43    libgoldfish-rild \
44    qemu-adb-keys \
45    qemu-device-state \
46    qemu-props \
47    stagefright \
48    android.hardware.graphics.composer@2.4-service \
49    android.hardware.graphics.allocator@3.0-service \
50    android.hardware.graphics.mapper@3.0-impl-ranchu \
51    hwcomposer.ranchu \
52    toybox_vendor \
53    android.hardware.wifi@1.0-service \
54    android.hardware.media.c2@1.0-service-goldfish \
55    libcodec2_goldfish_vp8dec \
56    libcodec2_goldfish_vp9dec \
57    libcodec2_goldfish_avcdec \
58    libcodec2_goldfish_hevcdec \
59    sh_vendor \
60    local_time.default \
61    SdkSetup \
62    EmulatorRadioConfig \
63    goldfish_overlay_connectivity_gsi \
64    EmulatorTetheringConfigOverlay \
65    libstagefrighthw \
66    libstagefright_goldfish_vpxdec \
67    libstagefright_goldfish_avcdec \
68    MultiDisplayProvider \
69    libGoldfishProfiler \
70    dlkm_loader
71
72ifneq ($(EMULATOR_VENDOR_NO_FINGERPRINT), true)
73    PRODUCT_PACKAGES += \
74        fingerprint.ranchu \
75        android.hardware.biometrics.fingerprint@2.1-service
76endif
77
78ifneq ($(BUILD_EMULATOR_OPENGL),false)
79PRODUCT_PACKAGES += \
80    libGLESv1_CM_emulation \
81    lib_renderControl_enc \
82    libEGL_emulation \
83    libGLESv2_enc \
84    libvulkan_enc \
85    libGLESv2_emulation \
86    libGLESv1_enc \
87    libEGL_angle \
88    libGLESv1_CM_angle \
89    libGLESv2_angle
90endif
91#
92# Enable bluetooth
93PRODUCT_PACKAGES += \
94    bt_vhci_forwarder \
95    android.hardware.bluetooth@1.1-service.btlinux \
96    android.hardware.bluetooth.audio@2.1-impl
97
98# Bluetooth hardware properties.
99ifeq ($(TARGET_PRODUCT_PROP),)
100TARGET_PRODUCT_PROP := $(LOCAL_PATH)/bluetooth.prop
101endif
102
103# Bluetooth se policies
104BOARD_SEPOLICY_DIRS += system/bt/vendor_libs/linux/sepolicy
105
106PRODUCT_PACKAGES += \
107    android.hardware.health@2.1-service \
108    android.hardware.health@2.1-impl \
109    android.hardware.health.storage@1.0-service \
110
111PRODUCT_PACKAGES += \
112    android.hardware.neuralnetworks@1.3-service-sample-all \
113    android.hardware.neuralnetworks@1.3-service-sample-limited
114
115PRODUCT_PACKAGES += \
116    android.hardware.security.keymint-service
117PRODUCT_COPY_FILES += \
118    frameworks/native/data/etc/android.hardware.keystore.app_attest_key.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.keystore.app_attest_key.xml
119
120PRODUCT_PACKAGES += \
121    DisplayCutoutEmulationEmu01Overlay \
122    EmulationPixel5Overlay \
123    SystemUIEmulationPixel5Overlay \
124    EmulationPixel4XLOverlay \
125    SystemUIEmulationPixel4XLOverlay \
126    EmulationPixel4Overlay \
127    SystemUIEmulationPixel4Overlay \
128    EmulationPixel4aOverlay \
129    SystemUIEmulationPixel4aOverlay \
130    EmulationPixel3XLOverlay \
131    SystemUIEmulationPixel3XLOverlay \
132    EmulationPixel3Overlay \
133    SystemUIEmulationPixel3Overlay \
134    EmulationPixel3aOverlay \
135    SystemUIEmulationPixel3aOverlay \
136    EmulationPixel3aXLOverlay \
137    SystemUIEmulationPixel3aXLOverlay \
138    EmulationPixel2XLOverlay \
139    NavigationBarMode2ButtonOverlay \
140
141ifneq ($(EMULATOR_VENDOR_NO_GNSS),true)
142    PRODUCT_PACKAGES += android.hardware.gnss@2.0-service.ranchu
143endif
144
145ifneq ($(EMULATOR_VENDOR_NO_SENSORS),true)
146PRODUCT_PACKAGES += \
147    android.hardware.sensors@2.1-service.multihal \
148    android.hardware.sensors@2.1-impl.ranchu
149# TODO(rkir):
150# add a soong namespace and move this into a.h.sensors@2.1-impl.ranchu
151# as prebuilt_etc. For now soong_namespace causes a build break because the fw
152# refers to our wifi HAL in random places.
153PRODUCT_COPY_FILES += \
154    device/generic/goldfish/sensors/hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/hals.conf
155endif
156
157PRODUCT_PACKAGES += \
158    android.hardware.drm@1.0-service \
159    android.hardware.drm@1.0-impl \
160    android.hardware.drm@1.4-service.clearkey \
161
162
163PRODUCT_PACKAGES += \
164    android.hardware.power-service.example \
165
166PRODUCT_PROPERTY_OVERRIDES += ro.control_privapp_permissions?=enforce
167PRODUCT_PROPERTY_OVERRIDES += ro.hardware.power=ranchu
168PRODUCT_PROPERTY_OVERRIDES += ro.crypto.volume.filenames_mode=aes-256-cts
169PRODUCT_VENDOR_PROPERTIES += graphics.gpu.profiler.support=true
170
171PRODUCT_PROPERTY_OVERRIDES += persist.sys.zram_enabled=1 \
172
173PRODUCT_PACKAGES += \
174    android.hardware.dumpstate@1.1-service.example \
175
176# Prevent logcat from getting canceled early on in boot
177PRODUCT_PROPERTY_OVERRIDES += ro.logd.size=1M \
178
179ifneq ($(EMULATOR_VENDOR_NO_CAMERA),true)
180PRODUCT_PACKAGES += \
181    android.hardware.camera.provider@2.4-service \
182    android.hardware.camera.provider@2.4-impl \
183    camera.ranchu \
184    camera.ranchu.jpeg \
185    android.hardware.camera.provider@2.7-service-google \
186    libgooglecamerahwl_impl \
187    android.hardware.camera.provider@2.7-impl-google
188DEVICE_MANIFEST_FILE += device/generic/goldfish/manifest.camera.xml
189endif
190
191ifneq ($(EMULATOR_VENDOR_NO_SOUND),true)
192PRODUCT_PACKAGES += \
193    android.hardware.audio.service \
194    android.hardware.audio@7.1-impl.ranchu \
195    android.hardware.soundtrigger@2.2-impl.ranchu \
196    android.hardware.audio.effect@7.0-impl \
197
198DEVICE_MANIFEST_FILE += device/generic/goldfish/audio/android.hardware.audio.effects@7.0.xml
199
200PRODUCT_COPY_FILES += \
201    device/generic/goldfish/audio/policy/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
202    device/generic/goldfish/audio/policy/primary_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/primary_audio_policy_configuration.xml \
203    frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration_7_0.xml \
204    frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \
205    frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
206    frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
207    frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
208    frameworks/av/media/libeffects/data/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
209
210endif
211
212PRODUCT_PACKAGES += \
213    android.hardware.gatekeeper@1.0-service.software
214
215# WiFi: vendor side
216PRODUCT_PACKAGES += \
217	mac80211_create_radios \
218	dhcpclient \
219	hostapd \
220	wpa_supplicant \
221
222PRODUCT_PACKAGES += \
223    android.hardware.usb@1.0-service
224
225# Thermal
226PRODUCT_PACKAGES += \
227	android.hardware.thermal@2.0-service.mock
228
229# Atrace
230PRODUCT_PACKAGES += \
231	android.hardware.atrace@1.0-service
232
233# Vibrator
234PRODUCT_PACKAGES += \
235	android.hardware.vibrator-service.example
236
237# Authsecret
238PRODUCT_PACKAGES += \
239    android.hardware.authsecret@1.0-service
240
241# Identity
242PRODUCT_PACKAGES += \
243    android.hardware.identity-service.example
244
245# lights
246PRODUCT_PACKAGES += \
247    android.hardware.lights-service.example
248
249# power stats
250PRODUCT_PACKAGES += \
251    android.hardware.power.stats@1.0-service.mock
252
253# Reboot escrow
254PRODUCT_PACKAGES += \
255    android.hardware.rebootescrow-service.default
256
257# Extension implementation for Jetpack WindowManager
258PRODUCT_PACKAGES += \
259    androidx.window.extensions \
260    androidx.window.sidecar \
261
262PRODUCT_PACKAGES += \
263    android.hardware.biometrics.face@1.0-service.example
264
265PRODUCT_PACKAGES += \
266    android.hardware.contexthub@1.1-service.mock
267
268# for 32, 32+64 guest, default using omx, but can be
269# modified at command line as follows
270# -qemu -append qemu.media.ccodec=<value> can override it; default 0
271PRODUCT_PROPERTY_OVERRIDES += \
272    debug.stagefright.ccodec=0
273
274# Enable Incremental on the device via kernel driver
275PRODUCT_PROPERTY_OVERRIDES += ro.incremental.enable=yes
276
277
278PRODUCT_COPY_FILES += \
279    device/generic/goldfish/data/etc/dtb.img:dtb.img \
280    device/generic/goldfish/emulator-info.txt:data/misc/emulator/version.txt \
281    device/generic/goldfish/data/etc/apns-conf.xml:data/misc/apns/apns-conf.xml \
282    device/generic/goldfish/radio/RadioConfig/radioconfig.xml:data/misc/emulator/config/radioconfig.xml \
283    device/generic/goldfish/data/etc/iccprofile_for_sim0.xml:data/misc/modem_simulator/iccprofile_for_sim0.xml \
284    device/google/cuttlefish/host/commands/modem_simulator/files/iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml:data/misc/modem_simulator/iccprofile_for_carrierapitests.xml \
285    device/generic/goldfish/data/etc/numeric_operator.xml:data/misc/modem_simulator/etc/modem_simulator/files/numeric_operator.xml \
286    device/generic/goldfish/data/etc/local.prop:data/local.prop \
287    device/generic/goldfish/init.qemu-adb-keys.sh:$(TARGET_COPY_OUT_SYSTEM_EXT)/bin/init.qemu-adb-keys.sh \
288    device/generic/goldfish/init.ranchu-core.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.ranchu-core.sh \
289    device/generic/goldfish/init.ranchu-net.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.ranchu-net.sh \
290    device/generic/goldfish/init.ranchu.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.ranchu.rc \
291    device/generic/goldfish/init.system_ext.rc:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/init/init.system_ext.rc \
292    device/generic/goldfish/ueventd.ranchu.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc \
293    device/generic/goldfish/input/virtio_input_rotary.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_rotary.idc \
294    device/generic/goldfish/input/qwerty2.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/qwerty2.idc \
295    device/generic/goldfish/input/qwerty.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/qwerty.kl \
296    device/generic/goldfish/input/virtio_input_multi_touch_1.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_1.idc \
297    device/generic/goldfish/input/virtio_input_multi_touch_2.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_2.idc \
298    device/generic/goldfish/input/virtio_input_multi_touch_3.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_3.idc \
299    device/generic/goldfish/input/virtio_input_multi_touch_4.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_4.idc \
300    device/generic/goldfish/input/virtio_input_multi_touch_5.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_5.idc \
301    device/generic/goldfish/input/virtio_input_multi_touch_6.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_6.idc \
302    device/generic/goldfish/input/virtio_input_multi_touch_7.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_7.idc \
303    device/generic/goldfish/input/virtio_input_multi_touch_8.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_8.idc \
304    device/generic/goldfish/input/virtio_input_multi_touch_9.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_9.idc \
305    device/generic/goldfish/input/virtio_input_multi_touch_10.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_10.idc \
306    device/generic/goldfish/input/virtio_input_multi_touch_11.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_11.idc \
307    device/generic/goldfish/display_settings_app_compat.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings_app_compat.xml \
308    device/generic/goldfish/display_settings_freeform.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings_freeform.xml \
309    device/generic/goldfish/display_settings.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings.xml \
310    device/generic/goldfish/data/etc/config.ini:config.ini \
311    device/generic/goldfish/wifi/simulated_hostapd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/simulated_hostapd.conf \
312    device/generic/goldfish/wifi/wpa_supplicant.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant.conf \
313    frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
314    frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
315    frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
316    frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \
317    frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
318    device/generic/goldfish/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
319    device/generic/goldfish/camera/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
320    frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
321    frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \
322    device/generic/goldfish/camera/media_codecs_google_video_default.xml:${TARGET_COPY_OUT_VENDOR}/etc/media_codecs_google_video.xml \
323    device/generic/goldfish/camera/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
324    device/generic/goldfish/camera/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
325    frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
326    frameworks/native/data/etc/android.hardware.camera.ar.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.ar.xml \
327    frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
328    frameworks/native/data/etc/android.hardware.camera.concurrent.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.concurrent.xml \
329    frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
330    frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \
331    frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml \
332    frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
333    frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
334    frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
335    frameworks/native/data/etc/android.software.vulkan.deqp.level-2022-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
336    frameworks/native/data/etc/android.software.opengles.deqp.level-2022-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml \
337    frameworks/native/data/etc/android.software.autofill.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.autofill.xml \
338    frameworks/native/data/etc/android.software.verified_boot.xml:${TARGET_COPY_OUT_PRODUCT}/etc/permissions/android.software.verified_boot.xml \
339    device/generic/goldfish/data/etc/permissions/privapp-permissions-goldfish.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-goldfish.xml \
340    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_back.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_back.json \
341    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_front.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_front.json \
342    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_depth.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_depth.json \
343
344ifneq ($(EMULATOR_VENDOR_NO_FINGERPRINT), true)
345    PRODUCT_COPY_FILES += \
346        frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
347endif
348