-
Notifications
You must be signed in to change notification settings - Fork 11
/
device.mk
96 lines (76 loc) · 3.14 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
LOCAL_PATH := device/xiaomi/nikel
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
# Device uses high-density artwork where available
PRODUCT_AAPT_CONFIG := normal xhdpi xxhdpi
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
# Recovery allowed devices
TARGET_OTA_ASSERT_DEVICE := nikel
PRODUCT_PACKAGES += \
libmtk_symbols \
libstlport
# Kernel
ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := device/xiaomi/nikel/prebuilt/kernel
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif
PRODUCT_COPY_FILES := \
$(LOCAL_KERNEL):kernel
# Lights
PRODUCT_PACKAGES += \
lights.mt6797
# Audio
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio/audio_device.xml:system/etc/audio_device.xml \
$(LOCAL_PATH)/configs/audio/audio_policy.conf:system/etc/audio_policy.conf \
$(LOCAL_PATH)/configs/audio/a2dp_audio_policy_configuration.xml:/system/etc/a2dp_audio_policy_configuration.xml
# Media
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml \
$(LOCAL_PATH)/configs/media_profiles.xml:system/etc/media_profiles.xml
# Keyboard layout
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/mtk-kpd.kl:system/usr/keylayout/mtk-kpd.kl \
$(LOCAL_PATH)/configs/ACCDET.kl:system/usr/keylayout/ACCDET.kl \
$(LOCAL_PATH)/configs/AVRCP.kl:system/usr/keylayout/AVRCP.kl
# Ramdisk
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/factory_init.project.rc:root/factory_init.project.rc \
$(LOCAL_PATH)/rootdir/factory_init.rc:root/factory_init.rc \
$(LOCAL_PATH)/rootdir/fstab.mt6797:root/fstab.mt6797 \
$(LOCAL_PATH)/rootdir/init.modem.rc:root/init.modem.rc \
$(LOCAL_PATH)/rootdir/init.mt6797.rc:root/init.mt6797.rc \
$(LOCAL_PATH)/rootdir/init.mt6797.usb.rc:root/init.mt6797.usb.rc \
$(LOCAL_PATH)/rootdir/meta_init.modem.rc:root/meta_init.modem.rc \
$(LOCAL_PATH)/rootdir/meta_init.project.rc:root/meta_init.project.rc \
$(LOCAL_PATH)/rootdir/meta_init.rc:root/meta_init.rc \
$(LOCAL_PATH)/rootdir/ueventd.mt6797.rc:root/ueventd.mt6797.rc \
$(LOCAL_PATH)/rootdir/init.recovery.mt6797.rc:root/init.recovery.mt6797.rc
# TWRP
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/recovery/etc/twrp.fstab:recovery/root/etc/twrp.fstab
# Thermal
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/thermal/.ht120.mtc:system/etc/.tp/.ht120.mtc \
$(LOCAL_PATH)/configs/thermal/thermal.conf:system/etc/.tp/thermal.conf \
$(LOCAL_PATH)/configs/thermal/thermal.off.conf:system/etc/.tp/thermal.off.conf \
$(LOCAL_PATH)/configs/thermal/.thermal_policy_00:system/etc/.tp/.thermal_policy_00
# Debug
ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=0
ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=0
ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1
# Optimization
PRODUCT_PROPERTY_OVERRIDES += \
ro.kernel.android.checkjni=0
# Camera
PRODUCT_PROPERTY_OVERRIDES += \
media.stagefright.legacyencoder=true \
media.stagefright.less-secure=true
PRODUCT_PACKAGES += \
fs_config_files
# Dalvik/HWUI
$(call inherit-product, frameworks/native/build/phone-xxhdpi-3072-dalvik-heap.mk)
# Common stuff
$(call inherit-product, device/xiaomi/nikel/common.mk)
# Vendor
$(call inherit-product, vendor/xiaomi/nikel/nikel-vendor.mk)