-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdevice_sloane.mk
executable file
·321 lines (267 loc) · 9.97 KB
/
device_sloane.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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
#
# Copyright (C) 2021 The LineageOS 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/amazon/sloane
# Include all the languages
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
# Include atv base
$(call inherit-product, device/google/atv/products/atv_base.mk)
# Include lineage atv
$(call inherit-product, device/lineage/atv/lineage_atv.mk)
# Call the proprietary vendor makefile
$(call inherit-product-if-exists, vendor/amazon/sloane/sloane-vendor.mk)
# Device uses high-density artwork where available
PRODUCT_AAPT_CONFIG := normal large xlarge tvdpi hdpi xhdpi xxhdpi
PRODUCT_AAPT_PREF_CONFIG := xhdpi
# ATV SDK
PRODUCT_IS_ATV_SDK := true
# Overlay
DEVICE_PACKAGE_OVERLAYS += device/amazon/sloane/overlay
# Lights HAL
PRODUCT_PACKAGES += \
lights.mt8173 \
# Audio
PRODUCT_PACKAGES += \
audio.a2dp.default \
audio.r_submix.default \
audio.usb.default \
audio_policy.stub \
libalsautils \
libaudio-resampler \
libtinyalsa \
libtinycompress \
libtinyxml \
libaudioroute \
libaudiospdif \
libnbaio \
libeffects \
# USB
PRODUCT_PACKAGES += \
# Power
PRODUCT_PACKAGES += \
power.mt8173 \
# Memtrack
PRODUCT_PACKAGES += \
# Keymaster
PRODUCT_PACKAGES += \
# Blisrc
PRODUCT_PACKAGES += \
libblisrc \
libblisrc32
# Configstore
PRODUCT_PACKAGES += \
# Media Codecs
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/media/media_codecs.xml:system/etc/media_codecs.xml \
$(LOCAL_PATH)/configs/media/media_profiles.xml:system/etc/media_profiles.xml \
$(LOCAL_PATH)/configs/media/mtk_omx_core.cfg:system/etc/mtk_omx_core.cfg \
frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_video_le.xml:system/etc/media_codecs_google_video_le.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_tv.xml:system/etc/media_codecs_google_tv.xml
# Seccomp
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/seccomp-policy/mediaextractor.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaextractor.policy \
$(LOCAL_PATH)/seccomp-policy/mediacodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy
# Prebuilt Keylayouts
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/keylayouts/lightning-device.kl:system/usr/keylayout/lightning-device.kl \
$(LOCAL_PATH)/configs/keylayouts/Vendor_1949_Product_0401.kl:system/usr/keylayout/Vendor_1949_Product_0401.kl \
$(LOCAL_PATH)/configs/keylayouts/Vendor_1949_Product_0402.kl:system/usr/keylayout/Vendor_1949_Product_0402.kl \
$(LOCAL_PATH)/configs/keylayouts/Vendor_1949_Product_0407.kl:system/usr/keylayout/Vendor_1949_Product_0407.kl
# Input
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/idc/amazon_touch.idc:system/usr/keylayout/amazon_touch.idc
# Kernel Modules
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/insmod/init.insmod.cfg:system/etc/init.insmod.cfg
# Wifi
PRODUCT_PACKAGES += \
hostapd \
lib_driver_cmd_mt76xx \
wpa_supplicant.conf \
wificond
# Wi-Fi Configs
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/wifi/dhcpcd.conf:system/etc/dhcpcd/dhcpcd.conf \
$(LOCAL_PATH)/configs/wifi/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf \
$(LOCAL_PATH)/configs/wifi/wpa_supplicant.conf:system/etc/wifi/wpa_supplicant.conf \
$(LOCAL_PATH)/configs/wifi/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf
# Network
PRODUCT_PACKAGES += \
netd \
netutils-wrapper-1.0
# Graphics
PRODUCT_PACKAGES += \
libion \
# Graphics (MTK)
PRODUCT_PACKAGES += \
libgui_ext \
libui_ext \
libgralloc_extra
# Shim Libraries
PRODUCT_PACKAGES += \
libshim_log \
libshim_ui \
libshim_parcel \
libshim_drm \
libshim_audio \
libshim_stagefright \
libshim_atomic \
libshim_mutexdestroy \
libshim_callstack \
libshim_selinux \
libshim_wpa
# Keyboard
PRODUCT_PACKAGES += \
LeanBackIme
# SetupWraith
PRODUCT_PACKAGES += \
SetupWraith
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/apps/prebuilts/SetupWraith/privapp_whitelist_com.google.android.tungsten.setupwraith.xml:system/etc/permissions/privapp_whitelist_com.google.android.tungsten.setupwraith.xml
# Remote Pairing Services
PRODUCT_PACKAGES += \
AtvRemoteService \
GamepadPairingService \
GlobalKeyInterceptor \
RemoteControlService
# TV Input
PRODUCT_PACKAGES += \
# CEC
PRODUCT_PACKAGES += \
# OverScan
PRODUCT_PACKAGES += \
OverScan
# Remove unused packages
PRODUCT_PACKAGES += \
RemovePackages
# Bluetooth
PRODUCT_PACKAGES += \
btremoted \
libbt-vendor \
libbluetooth_mtk \
# Bluetooth Configs
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/bluetooth/bt_did.conf:system/etc/bluetooth/bt_did.conf \
$(LOCAL_PATH)/configs/bluetooth/bt_stack.conf:system/etc/bluetooth/bt_stack.conf \
$(LOCAL_PATH)/configs/bluetooth/auto_pair_devlist.conf:system/etc/bluetooth/auto_pair_devlist.conf
# Camera Init
PRODUCT_COPY_FILES += $(LOCAL_PATH)/configs/init/mediaserver.rc:system/etc/init/mediaserver.rc
# Camera
PRODUCT_SUPPORTS_CAMERA := false
# Audio Wakelock (So Music will not stop while turn off screen)
PRODUCT_COPY_FILES += $(LOCAL_PATH)/configs/init/audioserver.rc:system/etc/init/audioserver.rc
# Thermal
PRODUCT_PACKAGES += \
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/thermal/.ht120.mtc:system/etc/.tp/.ht120.mtc \
$(LOCAL_PATH)/configs/thermal/thermal.policy.conf:system/etc/.tp/thermal.policy.conf
# HIDL
PRODUCT_PACKAGES += \
# Enable StagefrightCodec 2.0
PRODUCT_PACKAGES += libstagefright_ccodec
# Ramdisk
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/fstab.mt8173:root/fstab.mt8173 \
$(LOCAL_PATH)/rootdir/init.mt8173.rc:root/init.mt8173.rc \
$(LOCAL_PATH)/rootdir/init.mt8173.usb.rc:root/init.mt8173.usb.rc \
$(LOCAL_PATH)/rootdir/init.recovery.mt8173.rc:root/init.recovery.mt8173.rc \
$(LOCAL_PATH)/rootdir/init.project.rc:root/init.project.rc \
$(LOCAL_PATH)/rootdir/init.trace.rc:root/init.trace.rc \
$(LOCAL_PATH)/rootdir/ueventd.mt8173.rc:root/ueventd.mt8173.rc \
$(LOCAL_PATH)/rootdir/init.insmod.sh:system/etc/init.insmod.sh \
$(LOCAL_PATH)/rootdir/ozwpan.sh:root/ozwpan.sh \
$(LOCAL_PATH)/rootdir/baddr_loader.sh:root/baddr_loader.sh
# Permissions
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \
frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \
frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \
frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \
$(LOCAL_PATH)/configs/permissions/android.hardware.hdmi.cec.xml:system/etc/permissions/android.hardware.hdmi.cec.xml
# Default OMX service to non-Treble
PRODUCT_PROPERTY_OVERRIDES += \
persist.media.treble_omx=false
# Disable cameraserver
PRODUCT_PROPERTY_OVERRIDES += \
media.stagefright.legacyencoder=true \
media.stagefright.less-secure=true \
# Override Default Properties
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
ro.secure=0 \
ro.adb.secure=0 \
ro.allow.mock.location=0 \
ro.mount.fs=EXT4 \
camera.disable_zsl_mode=1 \
ro.debuggable=1 \
persist.service.acm.enable=0 \
service.adb.root=1
# Graphics
PRODUCT_PROPERTY_OVERRIDES += \
debug.hwui.renderer=opengl \
debug.hwui.use_partial_updates=false \
debug.sf.disable_backpressure=1 \
debug.sf.latch_unsignaled=1 \
persist.sys.display.clearMotion=1 \
debug.hwui.use_buffer_age=false
# DRM
PRODUCT_PACKAGES += \
libdrm \
libfwdlockengine
# No RIL
PRODUCT_PROPERTY_OVERRIDES += \
keyguard.no_require_sim=1 \
ro.radio.use-ppp=no \
ro.config.nocheckin=yes \
ro.radio.noril=1 \
ro.carrier=wifi-only \
persist.radio.noril=1
# AudioFlinger
PRODUCT_PROPERTY_OVERRIDES += ro.af.client_heap_size_kbyte=7168
# Configure dalvik heap
$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)