device-common.mk 13.7 KB
Newer Older
Chirayu Desai's avatar
Chirayu Desai committed
1
2
#
# Copyright (C) 2016 The CyanogenMod Project
3
# Copyright (C) 2017-2020 The LineageOS Project
Chirayu Desai's avatar
Chirayu Desai committed
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

18
19
20
# Get non-open-source common files
$(call inherit-product, vendor/sony/kitakami-common/kitakami-common-vendor.mk)

21
22
23
# Get non-open-source common extra files
$(call inherit-product, vendor/sony/kitakami-common-extras/kitakami-common-vendor-extras.mk)

24
# Overlays
25
26
27
DEVICE_PACKAGE_OVERLAYS += \
    $(LOCAL_PATH)/overlay \
    $(LOCAL_PATH)/overlay-lineage
28
29
30
31
32
33
34

# Radio config
ifneq ($(BOARD_HAVE_RADIO),false)
    DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay-radio
    $(call inherit-product, $(LOCAL_PATH)/radio.mk)
endif

35
PRODUCT_ENFORCE_RRO_TARGETS := *
36
37
38
39
PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += \
     $(LOCAL_PATH)/overlay/lineage-sdk \
     $(LOCAL_PATH)/overlay/packages/apps/Snap/res/values

40
41
# Permissions
PRODUCT_COPY_FILES += \
42
    frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
43
44
    frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
    frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
    frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
    frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml \
    frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
    frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
    frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml \
    frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \
    frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \
    frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \
    frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \
    frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml \
    frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \
    frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \
    frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml \
    frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
    frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
    frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
Bernhard Thoben's avatar
Bernhard Thoben committed
61
62
    frameworks/native/data/etc/android.hardware.vulkan.level-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
    frameworks/native/data/etc/android.hardware.vulkan.version-1_0_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
63
64
65
66
    frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
    frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
    frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml \
    frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \
Bernhard Thoben's avatar
Bernhard Thoben committed
67
    frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
Chirayu Desai's avatar
Chirayu Desai committed
68
69
70
71
72
73
74

# ANT+
PRODUCT_PACKAGES += \
    AntHalService \
    com.dsi.ant.antradio_library \
    libantradio

75
76
77
78
# APEX
PRODUCT_COPY_FILES += \
    $(LOCAL_PATH)/configs/ld.config.txt:$(TARGET_COPY_OUT_SYSTEM)/etc/swcodec/ld.config.txt

Chirayu Desai's avatar
Chirayu Desai committed
79
80
# Audio
PRODUCT_PACKAGES += \
TARKZiM's avatar
TARKZiM committed
81
    android.hardware.audio@2.0-impl \
Bernhard Thoben's avatar
Bernhard Thoben committed
82
    android.hardware.audio@4.0-impl \
TARKZiM's avatar
TARKZiM committed
83
84
    android.hardware.audio@2.0-service \
    android.hardware.audio.effect@2.0-impl \
Bernhard Thoben's avatar
Bernhard Thoben committed
85
    android.hardware.audio.effect@4.0-impl \
Bernhard Thoben's avatar
Bernhard Thoben committed
86
87
    audiod \
    audio.a2dp.default \
Chirayu Desai's avatar
Chirayu Desai committed
88
89
90
91
92
93
94
95
    audio.primary.msm8994 \
    audio.r_submix.default \
    audio.usb.default \
    libqcompostprocbundle \
    libqcomvisualizer \
    libqcomvoiceprocessing \
    tinymix

96
97
98
99
100
101
102
103
104
105
PRODUCT_COPY_FILES += \
    $(LOCAL_PATH)/audio/notifications/Ascensions.ogg:$(TARGET_COPY_OUT_SYSTEM)/media/audio/notifications/Ascensions.ogg \
    $(LOCAL_PATH)/audio/notifications/Birds_of_Paradise.ogg:$(TARGET_COPY_OUT_SYSTEM)/media/audio/notifications/Birds_of_Paradise.ogg \
    $(LOCAL_PATH)/audio/notifications/Climb.ogg:$(TARGET_COPY_OUT_SYSTEM)/media/audio/notifications/Climb.ogg \
    $(LOCAL_PATH)/audio/notifications/Climb_up.ogg:$(TARGET_COPY_OUT_SYSTEM)/media/audio/notifications/Climb_up.ogg \
    $(LOCAL_PATH)/audio/notifications/Notification.ogg:$(TARGET_COPY_OUT_SYSTEM)/media/audio/notifications/Notification.ogg \
    $(LOCAL_PATH)/audio/notifications/Ray.ogg:$(TARGET_COPY_OUT_SYSTEM)/media/audio/notifications/Ray.ogg \
    $(LOCAL_PATH)/audio/notifications/Whisper.ogg:$(TARGET_COPY_OUT_SYSTEM)/media/audio/notifications/Whisper.ogg \
    $(LOCAL_PATH)/audio/ringtones/Breeze.ogg:$(TARGET_COPY_OUT_SYSTEM)/media/audio/ringtones/Breeze.ogg \

106
# Audio configuration
Chirayu Desai's avatar
Chirayu Desai committed
107
PRODUCT_COPY_FILES += \
Bernhard Thoben's avatar
Bernhard Thoben committed
108
    $(LOCAL_PATH)/audio/aanc_tuning_mixer.txt:$(TARGET_COPY_OUT_SYSTEM)/etc/aanc_tuning_mixer.txt \
109
    $(LOCAL_PATH)/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
110
111
    $(LOCAL_PATH)/audio/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
    $(LOCAL_PATH)/audio/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
Bernhard Thoben's avatar
Bernhard Thoben committed
112
    $(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml
113
114
115
116
117
118
119

PRODUCT_COPY_FILES += \
    frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
    frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
    frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
    frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
    frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml
120
121
122
123

# Bluetooth
PRODUCT_COPY_FILES += \
    $(LOCAL_PATH)/bluetooth/bt_vendor.conf:system/etc/bluetooth/bt_vendor.conf
Chirayu Desai's avatar
Chirayu Desai committed
124

125
126
PRODUCT_PACKAGES += \
    android.hardware.bluetooth@1.0-impl \
127
    android.hardware.bluetooth@1.0-service \
128
129
    libbt-vendor

130
131
# Camera
PRODUCT_PACKAGES += \
Bernhard Thoben's avatar
Bernhard Thoben committed
132
    android.hardware.camera.provider@2.4-impl:32 \
133
    camera.msm8994 \
134
135
    Snap

Chirayu Desai's avatar
Chirayu Desai committed
136
137
138
# Charger
PRODUCT_PACKAGES += charger_res_images

139
140
141
142
# CryptfsHW
PRODUCT_PACKAGES += \
    vendor.qti.hardware.cryptfshw@1.0-service-qti.qsee

Chirayu Desai's avatar
Chirayu Desai committed
143
144
145
146
# Data services
PRODUCT_PACKAGES += \
    librmnetctl

Bernhard Thoben's avatar
Bernhard Thoben committed
147
148
149
150
151
152
# DRM
PRODUCT_PACKAGES += \
    android.hardware.drm@1.0-impl \
    android.hardware.drm@1.0-service \
    android.hardware.drm@1.2-service.clearkey

Chirayu Desai's avatar
Chirayu Desai committed
153
154
# Display
PRODUCT_PACKAGES += \
155
156
157
    android.hardware.graphics.allocator@2.0-impl \
    android.hardware.graphics.allocator@2.0-service \
    android.hardware.graphics.composer@2.1-impl \
158
    android.hardware.graphics.mapper@2.0-impl-2.1 \
159
    android.hardware.memtrack@1.0-impl \
Bernhard Thoben's avatar
Bernhard Thoben committed
160
161
162
    android.hardware.memtrack@1.0-service

PRODUCT_PACKAGES += \
Chirayu Desai's avatar
Chirayu Desai committed
163
164
165
    copybit.msm8994 \
    gralloc.msm8994 \
    hwcomposer.msm8994 \
Bernhard Thoben's avatar
Bernhard Thoben committed
166
167
    memtrack.msm8994 \
    libtinyxml
Chirayu Desai's avatar
Chirayu Desai committed
168

169
170
171
172
# FM
PRODUCT_PACKAGES += \
    FMRadio \
    brcm-uim-sysfs \
Bernhard Thoben's avatar
Bernhard Thoben committed
173
    libfmradio.v4l2-fm
174

Bernhard Thoben's avatar
Bernhard Thoben committed
175
176
177
178
179
180
181
# Fingerprint
PRODUCT_COPY_FILES += \
    frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml

PRODUCT_PACKAGES += \
    android.hardware.biometrics.fingerprint@2.1-service.kitakami
    
182
183
# Gatekeeper
PRODUCT_PACKAGES += \
184
    android.hardware.gatekeeper@1.0-impl
185

186
# GPS
187
188
189
PRODUCT_PACKAGES += \
    libshim_gps

190
191
192
193
194
195
PRODUCT_COPY_FILES += \
    $(LOCAL_PATH)/gps/flp.conf:system/etc/flp.conf \
    $(LOCAL_PATH)/gps/gps.conf:system/etc/gps.conf \
    $(LOCAL_PATH)/gps/izat.conf:system/etc/izat.conf \
    $(LOCAL_PATH)/gps/sap.conf:system/etc/sap.conf

196
PRODUCT_PACKAGES += \
Bernhard Thoben's avatar
Bernhard Thoben committed
197
    android.hardware.gnss@1.0-impl
198

199
200
201
202
# Flash LED config
PRODUCT_COPY_FILES += \
    $(LOCAL_PATH)/configs/flashled_calc_parameters.cfg:system/etc/flashled_calc_parameters.cfg

203
204
# Health
PRODUCT_PACKAGES += \
Bernhard Thoben's avatar
Bernhard Thoben committed
205
    android.hardware.health@1.0-impl
206

207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# Init
PRODUCT_COPY_FILES += \
    $(LOCAL_PATH)/rootdir/fstab.qcom:root/fstab.qcom \
    $(LOCAL_PATH)/rootdir/init.qcom.usb.rc:root/init.qcom.usb.rc \
    $(LOCAL_PATH)/rootdir/init.qcom.rc:root/init.qcom.rc \
    $(LOCAL_PATH)/rootdir/ueventd.qcom.rc:root/ueventd.qcom.rc

# Input
PRODUCT_COPY_FILES += \
    $(LOCAL_PATH)/keylayout/clearpad.kl:system/usr/keylayout/clearpad.kl \
    $(LOCAL_PATH)/keylayout/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \
    $(LOCAL_PATH)/keylayout/mhl-rcp.kl:system/usr/keylayout/mhl-rcp.kl \
    $(LOCAL_PATH)/keylayout/msm8994-tomtom-snd-card_Button_Jack.kl:system/usr/keylayout/msm8994-tomtom-snd-card_Button_Jack.kl \
    $(LOCAL_PATH)/keylayout/synaptics_dsx.kl:system/usr/keylayout/synaptics_dsx.kl

# IRQ
PRODUCT_COPY_FILES += \
224
    $(LOCAL_PATH)/configs/msm_irqbalance.conf:$(TARGET_COPY_OUT_VENDOR)/etc/msm_irqbalance.conf
225

226
227
# Keymaster
PRODUCT_PACKAGES += \
Bernhard Thoben's avatar
Bernhard Thoben committed
228
    android.hardware.keymaster@3.0-impl
229

230
231
# Lights
PRODUCT_PACKAGES += \
232
    android.hardware.light@2.0-impl \
Bernhard Thoben's avatar
Bernhard Thoben committed
233
    android.hardware.light@2.0-service \
234
    lights.msm8994
235

236
237
# LiveDisplay
PRODUCT_PACKAGES += \
238
    vendor.lineage.livedisplay@2.0-service-legacymm \
239
    vendor.lineage.livedisplay@2.0-service-sysfs
240

Chirayu Desai's avatar
Chirayu Desai committed
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# Media
PRODUCT_PACKAGES += \
    libc2dcolorconvert \
    libdashplayer \
    libdivxdrmdecrypt \
    libextmedia_jni \
    libOmxAacEnc \
    libOmxAmrEnc \
    libOmxCore \
    libOmxEvrcEnc \
    libOmxQcelp13Enc \
    libOmxSwVencMpeg4 \
    libOmxSwVencHevc \
    libOmxVdec \
    libOmxVdecHevc \
    libOmxVenc \
    libOmxVidcCommon \
    libstagefrighthw \
    libstagefright_soft_flacdec

261
PRODUCT_COPY_FILES += \
262
263
264
265
266
267
    frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
    frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \
    frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
    $(LOCAL_PATH)/configs/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
    $(LOCAL_PATH)/configs/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
    $(LOCAL_PATH)/configs/media_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml
268

Chirayu Desai's avatar
Chirayu Desai committed
269
270
# NFC
PRODUCT_PACKAGES += \
271
    android.hardware.nfc@1.0-impl \
Chirayu Desai's avatar
Chirayu Desai committed
272
273
274
275
    com.android.nfc_extras \
    NfcNci \
    Tag

276
277
278
279
# OTG
PRODUCT_PACKAGES += \
    SonyOtgSwitch

280
# Power
Chirayu Desai's avatar
Chirayu Desai committed
281
PRODUCT_PACKAGES += \
282
    android.hardware.power@1.2-service-qti
Chirayu Desai's avatar
Chirayu Desai committed
283

284
285
286
287
# Public Libraries
PRODUCT_COPY_FILES += \
    $(LOCAL_PATH)/configs/public.libraries.txt:$(TARGET_COPY_OUT_VENDOR)/etc/public.libraries.txt

288
289
290
291
# Recovery
PRODUCT_PACKAGES += \
    librecovery_updater_kitakami

292
293
294
295
# Renderscript
PRODUCT_PACKAGES += \
    android.hardware.renderscript@1.0-impl

Chirayu Desai's avatar
Chirayu Desai committed
296
297
# RIL
PRODUCT_PACKAGES += \
Bernhard Thoben's avatar
Bernhard Thoben committed
298
    libxml2
Chirayu Desai's avatar
Chirayu Desai committed
299

300
301
302
303
# RIL Wrapper
PRODUCT_PACKAGES += \
    libril-wrapper

Ethan Chen's avatar
Ethan Chen committed
304
305
# Seccomp
PRODUCT_COPY_FILES += \
306
    $(LOCAL_PATH)/seccomp/mediacodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy
Ethan Chen's avatar
Ethan Chen committed
307

308
309
# Sensors
PRODUCT_PACKAGES += \
Bernhard Thoben's avatar
Bernhard Thoben committed
310
    android.hardware.sensors@1.0-impl
311

312
313
314
315
# Shim libs
PRODUCT_PACKAGES += \
   camera.qcom_shim

Chirayu Desai's avatar
Chirayu Desai committed
316
317
318
319
320
# TimeKeep
PRODUCT_PACKAGES += \
    timekeep \
    TimeKeep

Joey's avatar
Joey committed
321
322
323
324
# Trust HAL
PRODUCT_PACKAGES += \
    vendor.lineage.trust@1.0-service

325
326
# USB
PRODUCT_PACKAGES += \
327
    android.hardware.usb@1.0-service.basic
328

329
330
# Vibrator
PRODUCT_PACKAGES += \
Bernhard Thoben's avatar
Bernhard Thoben committed
331
    android.hardware.vibrator@1.0-impl
332

Chirayu Desai's avatar
Chirayu Desai committed
333
334
# Wifi
PRODUCT_PACKAGES += \
335
    android.hardware.wifi@1.0-service \
Chirayu Desai's avatar
Chirayu Desai committed
336
337
338
339
340
    hostapd \
    libwpa_client \
    wpa_supplicant \
    wpa_supplicant.conf

341
342
343
PRODUCT_COPY_FILES += \
    $(LOCAL_PATH)/configs/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf