/
device.mk
163 lines (138 loc) · 6.38 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
#
# Copyright (C) 2014 The CyanogenMod 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.
#
# Need AppWidget permission to prevent from Launcher's crash.
# TODO(pattjin): Remove this when the TV Launcher is used, which does not support AppWidget.
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.app_widgets.xml:system/etc/permissions/android.software.app_widgets.xml
# Device uses high-density artwork where available
PRODUCT_AAPT_CONFIG := normal large xlarge hdpi xhdpi
PRODUCT_AAPT_PREF_CONFIG := xhdpi
# Bootanimation
# TARGET_BOOTANIMATION_NAME := 800
$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
$(call inherit-product-if-exists, vendor/google/molly/molly-vendor.mk)
DEVICE_PACKAGE_OVERLAYS += device/google/molly/overlay
# ADB Over Wifi
PRODUCT_PROPERTY_OVERRIDES += \
service.adb.tcp.port=4321
# Audio
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/libaudio/audio_policy.conf:system/etc/audio_policy.conf
PRODUCT_PACKAGES += \
audio.a2dp.default \
audio_policy.default \
audio.primary.default \
audio.primary.molly \
audio.r_submix.default \
audio.usb.default \
libaudiopolicyservice \
libaudiopolicymanager \
libaudiopolicymanagerdefault \
libtinyalsa \
libaudiospdif \
libaudioutils \
libaudioresampler
USE_CUSTOM_AUDIO_POLICY := 1
PRODUCT_PROPERTY_OVERRIDES += \
media.stagefright.cache-params=10240/20480/15 \
persist.sys.media.avsync=true \
media.aac_51_output_enabled=true
# Codec Configs
PRODUCT_COPY_FILES += \
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_tv.xml:system/etc/media_codecs_google_tv.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \
$(LOCAL_PATH)/media/media_codecs.xml:system/etc/media_codecs.xml \
$(LOCAL_PATH)/media/media_codecs_performance.xml:system/etc/media_codecs_performance.xml \
$(LOCAL_PATH)/media/media_profiles.xml:system/etc/media_profiles.xml
# DRM
PRODUCT_PROPERTY_OVERRIDES += \
drm.service.enabled=true \
ro.com.widevine.cachesize=16777216
# help GL work in M
PRODUCT_PACKAGES += \
libmhax
# HDMI
PRODUCT_PROPERTY_OVERRIDES += ro.hdmi.device_type=4
# Keylayouts
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/keylayouts/ADT-1_Remote.kl:system/usr/keylayout/ADT-1_Remote.kl \
$(LOCAL_PATH)/keylayouts/gpio-keypad.kl:system/usr/keylayout/gpio-keypad.kl \
$(LOCAL_PATH)/keylayouts/Spike.kl:system/usr/keylayout/Spike.kl \
$(LOCAL_PATH)/keylayouts/virtual-remote.kl:system/usr/keylayout/virtual-remote.kl \
$(LOCAL_PATH)/keylayouts/gpio-keypad.idc:system/usr/idc/gpio-keypad.idc \
$(LOCAL_PATH)/keylayouts/virtual-remote.idc:system/usr/idc/virtual-remote.idc \
$(LOCAL_PATH)/keylayouts/gpio-keypad.kcm:system/usr/keychars/gpio-keypad.kcm \
$(LOCAL_PATH)/keylayouts/virtual-remote.kcm:system/usr/keychars/virtual-remote.kcm \
$(LOCAL_PATH)/keylayouts/Nexus_Remote.kl:system/usr/keylayout/Nexus_Remote.kl \
$(LOCAL_PATH)/keylayouts/Vendor_20a0_Product_0001.kl:system/usr/keylayout/Vendor_20a0_Product_0001.kl \
$(LOCAL_PATH)/keylayouts/Vendor_18d1_Product_2c40.kl:system/usr/keylayout/Vendor_18d1_Product_2c40.kl
# Misc
PRODUCT_TAGS += dalvik.gc.type-precise
PRODUCT_CHARACTERISTICS := tv,nosdcard
PRODUCT_PROPERTY_OVERRIDES += ro.sf.lcd_density=320
# 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.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \
frameworks/native/data/etc/android.hardware.hdmi.cec.xml:system/etc/permissions/android.hardware.hdmi.cec.xml \
frameworks/native/data/etc/android.software.midi.xml:system/etc/permissions/android.software.midi.xml \
frameworks/native/data/etc/android.hardware.location.xml:system/etc/permissions/android.hardware.location.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 \
$(LOCAL_PATH)/permissions/com.nvidia.nvsi.xml:system/etc/permissions/com.nvidia.nvsi.xml \
$(LOCAL_PATH)/permissions/com.google.android.tv.installed.xml:system/etc/permissions/com.google.android.tv.installed.xml \
$(LOCAL_PATH)/permissions/tv_core_hardware.xml:system/etc/permissions/tv_core_hardware.xml \
$(LOCAL_PATH)/permissions/molly_hardware.xml:system/etc/permissions/molly_hardware.xml
# Power HAL
PRODUCT_PACKAGES += \
power.default
# Ramdisk
PRODUCT_PACKAGES += \
fstab.molly \
init.molly.rc \
init.molly.usb.rc \
init.molly.led.rc \
ueventd.molly.rc
# TV-specific Apps/Packages
PRODUCT_PACKAGES += \
AppDrawer \
CMLeanbackCustomizer \
LeanbackLauncher \
LeanbackIme \
TvProvider \
TvSettings \
tv_input.default \
TV
# USB
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
persist.sys.usb.config=mtp
PRODUCT_PACKAGES += \
com.android.future.usb.accessory
# Wifi
PRODUCT_PACKAGES += \
dhcpcd.conf \
hostapd \
libwpa_client \
wpa_supplicant \
wpa_supplicant.conf
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/wifi/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf \
$(LOCAL_PATH)/wifi/wpa_supplicant.conf:system/etc/wifi/wpa_supplicant.conf
PRODUCT_PROPERTY_OVERRIDES += wifi.interface=wlan0