-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathcommon.mk
239 lines (200 loc) · 5.83 KB
/
common.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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# Copyright (C) 2017 The Lineage Project
#
# 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.
LOCAL_PATH := device/samsung/scx35-common
# Inherit from AOSP product configuration
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
# Inherit from sprd-common device configuration
$(call inherit-product, device/samsung/sprd-common/common.mk)
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay-lineage
# Audio
PRODUCT_PACKAGES += \
audio_hw.xml \
audio_para \
audio_effects_vendor.conf \
audio_policy.conf \
codec_pga.xml \
tiny_hw.xml \
audio.primary.sc8830 \
libaudio-resampler
# Bluetooth
PRODUCT_PACKAGES += \
libbluetooth_jni \
bluetooth.default \
libbt-vendor
# Codecs
PRODUCT_PACKAGES += \
libcolorformat_switcher \
libstagefrighthw \
libstagefright_sprd_mpeg4dec \
libstagefright_sprd_mpeg4enc \
libstagefright_sprd_h264dec \
libstagefright_sprd_h264enc \
libstagefright_sprd_vpxdec \
libstagefright_sprd_aacdec \
libstagefright_sprd_mp3dec
# seccomp
PRODUCT_COPY_FILES += \
device/samsung/scx35-common/seccomp/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy
# Media config
PRODUCT_PACKAGES += \
media_codecs.xml
MEDIA_XML_CONFIGS := \
frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_video_le.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml
PRODUCT_COPY_FILES += \
$(foreach f,$(MEDIA_XML_CONFIGS),$(f):$(TARGET_COPY_OUT_VENDOR)/etc/$(notdir $(f)))
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/system/etc/init/[email protected]:$(TARGET_COPY_OUT_VENDOR)/etc/init/[email protected] \
$(LOCAL_PATH)/system/etc/init/mediaserver.rc:$(TARGET_COPY_OUT_SYSTEM)/etc/init/mediaserver.rc
# Common libs
PRODUCT_PACKAGES += \
libstlport \
librilutils \
libril_shim \
libgps_shim \
libphoneserver_shim
# RIL
PRODUCT_PACKAGES += \
libatchannel \
libsecril-client \
libsecril-shim \
libril \
rild \
modemd \
modem_control
PRODUCT_PROPERTY_OVERRIDES += \
ro.radio.modemtype=w \
rild.libpath=/system/vendor/lib/libsecril-shim.so
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/system/etc/init/rild.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/rild.rc
# GPS
PRODUCT_PACKAGES += \
libgpspc \
libefuse \
gps.conf \
gps.xml
# HWC
PRODUCT_PACKAGES += \
libHWCUtils \
gralloc.sc8830 \
libmemoryheapion \
libion_sprd
# System init.rc files
PRODUCT_PACKAGES += \
at_distributor.rc \
chown_service.rc \
data.rc \
dns.rc \
engpc.rc \
gpsd.rc \
kill_phone.rc \
macloader.rc \
modem_control.rc \
modemd.rc \
nvitemd.rc \
phoneserver.rc \
refnotify.rc \
set_mac.rc \
smd_symlink.rc \
swap.rc \
wpa_supplicant.rc
# Rootdir files
PRODUCT_PACKAGES += \
init.board.rc \
init.wifi.rc \
init.sc8830.rc \
init.sc8830.usb.rc \
ueventd.sc8830.rc
# Packages
PRODUCT_PACKAGES += \
Jelly
# Lights
PRODUCT_PACKAGES += \
lights.sc8830
# Camera config
PRODUCT_PROPERTY_OVERRIDES += \
camera.disable_zsl_mode=1
# Languages
PRODUCT_PROPERTY_OVERRIDES += \
ro.product.locale.language=en \
ro.product.locale.region=GB
# Wifi
PRODUCT_PACKAGES += \
macloader \
libandroid_net \
libwpa_client \
wificond \
wifilogd \
wpa_supplicant.conf \
wpa_supplicant_overlay.conf \
p2p_supplicant_overlay.conf
# Disable mobile data on first boot
PRODUCT_PROPERTY_OVERRIDES += \
ro.com.android.mobiledata=false
# Disable treble OMX
PRODUCT_PROPERTY_OVERRIDES += \
persist.media.treble_omx=false
# ART device props
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.dex2oat-flags=--no-watch-dog \
dalvik.vm.image-dex2oat-filter=quicken \
dalvik.vm.dex2oat-filter=quicken \
pm.dexopt.first-boot=quicken \
pm.dexopt.boot=verify \
pm.dexopt.install=verify \
pm.dexopt.bg-dexopt=quicken \
pm.dexopt.ab-ota=quicken \
pm.dexopt.inactive=verify \
pm.dexopt.shared=quicken
# HIDL (HAL Interface Definition Language)
include $(LOCAL_PATH)/hidl.mk
# Performance
PRODUCT_PROPERTY_OVERRIDES += \
sys.use_fifo_ui=1
# Permissions
PERMISSIONS_XML_FILES := \
frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml \
frameworks/native/data/etc/android.hardware.camera.front.xml \
frameworks/native/data/etc/android.hardware.camera.xml \
frameworks/native/data/etc/android.hardware.sensor.proximity.xml \
frameworks/native/data/etc/android.hardware.sensor.light.xml \
frameworks/native/data/etc/android.software.midi.xml \
packages/wallpapers/LivePicker/android.software.live_wallpaper.xml
PRODUCT_COPY_FILES += \
$(foreach f,$(PERMISSIONS_XML_FILES),$(f):$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/$(notdir $(f)))
# enable Google-specific location features,
# like NetworkLocationProvider and LocationCollector
PRODUCT_PROPERTY_OVERRIDES += \
ro.com.google.locationfeatures=1 \
ro.com.google.networklocation=1
# sdcardfs
PRODUCT_PROPERTY_OVERRIDES += \
ro.sys.sdcardfs=false
# Dalvik heap config
$(call inherit-product, frameworks/native/build/phone-hdpi-512-dalvik-heap.mk)
# For userdebug builds
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
ro.secure=0 \
ro.adb.secure=0 \
ro.debuggable=1 \
persist.sys.root_access=1 \
persist.service.adb.enable=1
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.usb.config=mtp,adb
# Android Go
PRODUCT_PROPERTY_OVERRIDES += \
ro.config.low_ram=false
$(call inherit-product, build/target/product/go_defaults_512.mk)