-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcommon.mk
165 lines (132 loc) · 7.39 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
# do not restrict vendor files
PRODUCT_RESTRICT_VENDOR_FILES := false
PRODUCT_LOCALES := \
en_US zh_CN zh_TW es_ES pt_BR ru_RU fr_FR de_DE tr_TR vi_VN ms_MY in_ID th_TH it_IT ar_EG hi_IN bn_IN ur_PK \
fa_IR pt_PT nl_NL el_GR hu_HU tl_PH ro_RO cs_CZ ko_KR km_KH iw_IL my_MM pl_PL es_US bg_BG hr_HR lv_LV lt_LT \
sk_SK uk_UA de_AT da_DK fi_FI nb_NO sv_SE en_GB hy_AM zh_HK et_EE ja_JP kk_KZ sr_RS sl_SI ca_ES
# default to german / germany
#PRODUCT_DEFAULT_LANGUAGE := de
#PRODUCT_DEFAULT_REGION := DE
# overlay has priorities. high <-> low.
DEVICE_PACKAGE_OVERLAYS += \
$(LOCAL_PATH)/overlay \
device/mediatek/common/overlay/sd_in_ex_otg \
device/mediatek/common/overlay/navbar \
# AAPT
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREF_CONFIG := 420dpi
PRODUCT_AAPT_PREBUILT_DPI := xxhdpi xhdpi hdpi
# Boot animation
TARGET_SCREEN_HEIGHT := 1920
TARGET_SCREEN_WIDTH := 1080
# Init
PRODUCT_COPY_FILES += \
$(call find-copy-subdir-files,*,${LOCAL_PATH}/init/vendor,$(TARGET_COPY_OUT_VENDOR))
# Permissions
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
PRODUCT_COPY_FILES += \
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 \
frameworks/native/data/etc/android.hardware.faketouch.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.faketouch.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.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.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/native/data/etc/android.hardware.touchscreen.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.xml \
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.xml \
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.distinct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.distinct.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.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
# Permissions - GMS Express Plus
ifneq ($(SHIFT_BUILD_WITH_GMS),false)
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/permissions/com.google.android.feature.gmsexpress_plus_build.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.google.android.feature.gmsexpress_plus_build.xml \
endif
# TODO: remove ASAP!!!
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/hacks/libion/lib/libion.so:$(TARGET_COPY_OUT_VENDOR)/lib/libion.so \
$(LOCAL_PATH)/hacks/libion/lib64/libion.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libion.so \
####################################################################################################################################################################################
# Audio
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio/audio_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy.conf:mtk \
PRODUCT_COPY_FILES += \
frameworks/av/media/libeffects/data/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
PRODUCT_COPY_FILES += \
vendor/mediatek/proprietary/custom/SHIFT5me/factory/res/sound/testpattern1.wav:$(TARGET_COPY_OUT_VENDOR)/res/sound/testpattern1.wav:mtk \
vendor/mediatek/proprietary/custom/SHIFT5me/factory/res/sound/ringtone.wav:$(TARGET_COPY_OUT_VENDOR)/res/sound/ringtone.wav:mtk \
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio/srs_processing.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/srs_processing.cfg:mtk \
PRODUCT_PROPERTY_OVERRIDES += \
ro.camera.sound.forced=0 \
ro.audio.silent=0 \
# Display
PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.lcd_density=420 \
debug.sf.enable_hwc_vds=1 \
# Images for LCD test in factory mode
PRODUCT_COPY_FILES += \
vendor/mediatek/proprietary/custom/SHIFT5me/factory/res/images/lcd_test_00.png:$(TARGET_COPY_OUT_VENDOR)/res/images/lcd_test_00.png:mtk \
vendor/mediatek/proprietary/custom/SHIFT5me/factory/res/images/lcd_test_01.png:$(TARGET_COPY_OUT_VENDOR)/res/images/lcd_test_01.png:mtk \
vendor/mediatek/proprietary/custom/SHIFT5me/factory/res/images/lcd_test_02.png:$(TARGET_COPY_OUT_VENDOR)/res/images/lcd_test_02.png:mtk \
# Keyboard layout
PRODUCT_COPY_FILES += \
device/mediatek/mt6797/ACCDET.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/ACCDET.kl:mtk \
$(LOCAL_PATH)/configs/keylayout/mtk-kpd.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/mtk-kpd.kl:mtk \
# Light HAL
PRODUCT_PACKAGES += \
# Logs (set buffer to 1M on userdebug and eng builds)
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PROPERTY_OVERRIDES += ro.logd.size=1M
endif
# Media
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml
# Performance
PRODUCT_PROPERTY_OVERRIDES += \
ro.mtk_perf_simple_start_win=1 \
ro.mtk_perf_fast_start_win=1 \
ro.mtk_perf_response_time=1 \
# Properties
PRODUCT_PROPERTY_OVERRIDES += \
persist.service.acm.enable=0 \
qemu.hw.mainkeys=0 \
ro.mediatek.chip_ver=S01 \
ro.mediatek.platform=MT6797 \
ro.kernel.zio=38,108,105,16 \
sys.ipo.disable=1 \
sys.ipo.pwrdncap=2 \
# RIL
SIM_COUNT := 2
PRODUCT_PROPERTY_OVERRIDES += \
rild.libpath=mtk-ril.so \
rild.libargs=-d/dev/ttyC0 \
ro.telephony.sim.count=2 \
persist.radio.default.sim=0 \
# SAR
#PRODUCT_PACKAGES += MTKSARTestProgram
#PRODUCT_PACKAGES += SARSETTINGS
# Sensors
PRODUCT_PACKAGES += pscali
# USB
PRODUCT_PROPERTY_OVERRIDES += \
ro.sys.usb.bicr=no \
ro.sys.usb.charging.only=yes \
ro.sys.usb.mtp.whql.enable=0 \
ro.sys.usb.storage.type=mtp \
# WiFi
PRODUCT_PROPERTY_OVERRIDES += \
wifi.interface=wlan0 \
ro.mediatek.wlan.wsc=1 \
ro.mediatek.wlan.p2p=1 \
mediatek.wlan.ctia=0 \
wifi.tethering.interface=ap0 \
wifi.direct.interface=p2p0 \
$(call inherit-product, device/mediatek/mt6797/device.mk)
$(call inherit-product, vendor/mediatek/libs/k97v1_64/device-vendor.mk)