-
Notifications
You must be signed in to change notification settings - Fork 3
/
device.mk
178 lines (149 loc) · 6.84 KB
/
device.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
#
# Copyright 2020, Pavel Dubrova <pashadubrova@gmail.com>
#
# 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.
#
# Device overlay
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
PRODUCT_SOONG_NAMESPACES += external/mesa3d
# Treble
PRODUCT_FULL_TREBLE_OVERRIDE := true
# VNDK
PRODUCT_USE_VNDK_OVERRIDE := true
# AAPT configuration
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREBUILT_DPI := xhdpi hdpi
PRODUCT_AAPT_PREF_CONFIG := xhdpi
# Build recovery.img
PRODUCT_BUILD_RECOVERY_IMAGE := true
# Audio policy configuration
USE_XML_AUDIO_POLICY_CONF := 1
# Audio
PRODUCT_PACKAGES += \
audio.primary.msm8939 \
android.hardware.audio@4.0-impl:32 \
android.hardware.audio.effect@4.0-impl:32 \
android.hardware.audio@2.0-service \
android.hardware.soundtrigger@2.0-impl \
android.hardware.bluetooth.audio@2.0-impl
# Build default bluetooth a2dp and usb audio HALs
PRODUCT_PACKAGES += \
audio.a2dp.default \
audio.bluetooth.default \
audio.usb.default \
audio.r_submix.default
# Build tinyalsa cli tools for debugging
PRODUCT_PACKAGES += \
tinyplay \
tinycap \
tinymix \
tinypcminfo
# Bluetooth
PRODUCT_PACKAGES += \
android.hardware.bluetooth@1.1-service.btlinux
# Configstore
PRODUCT_PACKAGES += \
android.hardware.configstore@1.1-service
# Display
PRODUCT_PACKAGES += \
android.hardware.drm@1.0-impl \
android.hardware.drm@1.0-service \
android.hardware.graphics.allocator@2.0-impl:64 \
android.hardware.graphics.allocator@2.0-service \
android.hardware.graphics.composer@2.2-impl:64 \
android.hardware.graphics.composer@2.2-service \
android.hardware.graphics.mapper@2.0-impl-2.1 \
gralloc.gbm \
hwcomposer.drm \
libGLES_mesa \
libdrm_freedreno
# Gatekeeper
PRODUCT_PACKAGES += \
android.hardware.gatekeeper@1.0-service.software
# Health
PRODUCT_PACKAGES += \
android.hardware.health@2.0-service \
android.hardware.health@2.0-impl
# Keymaster
PRODUCT_PACKAGES += \
android.hardware.keymaster@3.0-impl \
android.hardware.keymaster@3.0-service
# Lights AIDL HALs
PRODUCT_PACKAGES += \
lights.msm8939 \
android.hardware.lights-service.qti
# Memtrack
PRODUCT_PACKAGES += \
memtrack.msm8939 \
android.hardware.memtrack@1.0-service \
android.hardware.memtrack@1.0-impl
# Usb
PRODUCT_PACKAGES += \
android.hardware.usb@1.0-service.basic
# Wi-Fi
PRODUCT_PACKAGES += \
hostapd \
libwpa_client \
wpa_supplicant \
wpa_supplicant.conf \
wificond \
wifilogd
# vndk/vndk-sp/ll-ndk modules
PRODUCT_PACKAGES += \
vndk_package
# Audio config
PRODUCT_COPY_FILES += \
device/linaro/hikey/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
device/linaro/hikey/audio/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \
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/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.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 \
frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml
# Media codecs config file
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/vendor/etc/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml
# Wi-Fi config overlay
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/vendor/etc/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
$(LOCAL_PATH)/rootdir/vendor/etc/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf
# WCNSS NV
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/vendor/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin
# Specific Permissions
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.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 \
frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/fstab.ramdisk.tulip:$(TARGET_COPY_OUT_RAMDISK)/fstab.tulip \
$(LOCAL_PATH)/rootdir/vendor/etc/fstab.tulip:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.tulip \
$(LOCAL_PATH)/rootdir/vendor/etc/init/init.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.rc \
$(LOCAL_PATH)/rootdir/vendor/etc/init/init.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.usb.rc \
$(LOCAL_PATH)/rootdir/vendor/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc
# Display properties
PRODUCT_PROPERTY_OVERRIDES += \
ro.hardware.gralloc=gbm \
ro.hardware.hwcomposer=drm \
ro.sf.lcd_density=320 \
ro.opengles.version=196609
# Wi-Fi interface name
PRODUCT_PROPERTY_OVERRIDES += \
wifi.interface=wlan0