diff --git a/Android.mk b/Android.mk index e0ab9cc..bbde074 100644 --- a/Android.mk +++ b/Android.mk @@ -1,3 +1,6 @@ +# +# Copyright (C) 2016 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 @@ -22,20 +25,37 @@ LOCAL_PATH := $(call my-dir) -ifeq ($(TARGET_DEVICE),z2) - -include device/zuk/z2/symlinks.mk +ifeq ($(TARGET_DEVICE),z2_plus) include $(call all-makefiles-under,$(LOCAL_PATH)) include $(CLEAR_VARS) -# END WiFi symlinks -$(shell mkdir -p $(TARGET_OUT_ETC)/firmware/wlan/qca_cld; \ - ln -sf /system/etc/wifi/WCNSS_qcom_cfg.ini \ - $(TARGET_OUT_ETC)/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini; \ - ln -sf /persist/wlan_mac.bin \ - $(TARGET_OUT_ETC)/firmware/wlan/qca_cld/wlan_mac.bin) +LOCAL_MODULE := wifi_symlinks +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := FAKE +LOCAL_MODULE_SUFFIX := -timestamp + +include $(BUILD_SYSTEM)/base_rules.mk + +$(LOCAL_BUILT_MODULE): ACTUAL_INI_FILE := /system/etc/wifi/WCNSS_qcom_cfg.ini +$(LOCAL_BUILT_MODULE): WCNSS_INI_SYMLINK := $(TARGET_OUT)/etc/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini + +$(LOCAL_BUILT_MODULE): ACTUAL_MAC_FILE := /persist/wlan_mac.bin +$(LOCAL_BUILT_MODULE): WCNSS_MAC_SYMLINK := $(TARGET_OUT)/etc/firmware/wlan/qca_cld/wlan_mac.bin + + +$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/Android.mk +$(LOCAL_BUILT_MODULE): + $(hide) echo "Making symlinks for wifi" + $(hide) mkdir -p $(dir $@) + $(hide) mkdir -p $(dir $(WCNSS_INI_SYMLINK)) + $(hide) rm -rf $@ + $(hide) rm -rf $(WCNSS_INI_SYMLINK) + $(hide) ln -sf $(ACTUAL_INI_FILE) $(WCNSS_INI_SYMLINK) + $(hide) rm -rf $(WCNSS_MAC_SYMLINK) + $(hide) ln -sf $(ACTUAL_MAC_FILE) $(WCNSS_MAC_SYMLINK) + $(hide) touch $@ include $(call all-makefiles-under,$(LOCAL_PATH)) @@ -50,4 +70,6 @@ $(IMS_SYMLINKS): $(LOCAL_INSTALLED_MODULE) ALL_DEFAULT_INSTALLED_MODULES += $(IMS_SYMLINKS) +include device/zuk/z2_plus/tftp.mk + endif diff --git a/BoardConfig.mk b/BoardConfig.mk index 0f5d44d..5a9f9f2 100755 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -1,3 +1,5 @@ +# Copyright (C) 2016 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 @@ -18,17 +20,18 @@ # definition file). # -# Boldly go. -USE_CLANG_PLATFORM_BUILD := true TARGET_OTA_ASSERT_DEVICE := z2,Z2,z2plus,z2_plus -PLATFORM_PATH := device/zuk/z2 +PLATFORM_PATH := device/zuk/z2_plus TARGET_SPECIFIC_HEADER_PATH := $(PLATFORM_PATH)/include BOARD_VENDOR := zuk +# Use Snapdragon LLVM, if available +TARGET_USE_SDCLANG := true + # Bootloader TARGET_BOOTLOADER_BOARD_NAME := msm8996 TARGET_NO_BOOTLOADER := true @@ -77,10 +80,10 @@ BLOCK_BASED_OTA := true BOARD_ANT_WIRELESS_DEVICE := "qualcomm-uart" # Audio -#AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true +USE_CUSTOM_AUDIO_POLICY := 1 +BOARD_USES_ALSA_AUDIO := true +AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true AUDIO_FEATURE_ENABLED_ACDB_LICENSE := true -#AUDIO_FEATURE_ENABLED_APE_OFFLOAD := true -AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true AUDIO_FEATURE_ENABLED_ANC_HEADSET := true AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := true @@ -90,17 +93,11 @@ AUDIO_FEATURE_ENABLED_FLAC_OFFLOAD := true AUDIO_FEATURE_ENABLED_FLUENCE := true AUDIO_FEATURE_ENABLED_HFP := true AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true -AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true AUDIO_FEATURE_ENABLED_NT_PAUSE_TIMEOUT := true AUDIO_FEATURE_ENABLED_PCM_OFFLOAD := true AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24 := true AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true -#AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD := true -#AUDIO_FEATURE_ENABLED_WMA_OFFLOAD := true -AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true -BOARD_SUPPORTS_SOUND_TRIGGER := false -BOARD_USES_ALSA_AUDIO := true -USE_CUSTOM_AUDIO_POLICY := 1 +AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true # Bluetooth BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(PLATFORM_PATH)/bluetooth @@ -149,13 +146,22 @@ VSYNC_EVENT_PHASE_OFFSET_NS := 2000000 SF_VSYNC_EVENT_PHASE_OFFSET_NS := 6000000 #TARGET_USES_HWC2 := true - +# Enable dexpreopt to speed boot time +ifeq ($(HOST_OS),linux) + ifeq ($(call match-word-in-list,$(TARGET_BUILD_VARIANT),user),true) + ifeq ($(WITH_DEXPREOPT),) + WITH_DEXPREOPT := true + endif + endif +endif # GPS TARGET_NO_RPC := true USE_DEVICE_SPECIFIC_GPS := true # Init +TARGET_INIT_VENDOR_LIB := libinit_z2_plus +TARGET_RECOVERY_DEVICE_MODULES := libinit_z2_plus TARGET_PLATFORM_DEVICE_BASE := /devices/soc/ # Keystore @@ -215,4 +221,4 @@ WIFI_DRIVER_MODULE_NAME := "wlan" WPA_SUPPLICANT_VERSION := VER_0_8_X # inherit from the proprietary version --include vendor/zuk/z2/BoardConfigVendor.mk +-include vendor/zuk/z2_plus/BoardConfigVendor.mk diff --git a/README.md b/README.md index 69ac33d..68a6ee0 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -Device configuration for ZUK Z2. +Device configuration for ZUK Z2; +Based on Davide D M, with commits from oneplus 3; +Edited by Fedor917. \ No newline at end of file diff --git a/cm.mk b/cm.mk index 7362056..0430af1 100644 --- a/cm.mk +++ b/cm.mk @@ -1,3 +1,5 @@ +# Copyright (C) 2016 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 @@ -15,21 +17,21 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) # Inherit from oneplus3 device -$(call inherit-product, device/zuk/z2/device.mk) +$(call inherit-product, device/zuk/z2_plus/device.mk) # Inherit some common CM stuff. $(call inherit-product, vendor/cm/config/common_full_phone.mk) -PRODUCT_NAME := cm_z2 -PRODUCT_DEVICE := z2 +PRODUCT_NAME := cm_z2_plus +PRODUCT_DEVICE := z2_plus PRODUCT_MANUFACTURER := ZUK PRODUCT_BRAND := ZUK -PRODUCT_MODEL := Z2 +PRODUCT_MODEL := Z2 Plus PRODUCT_GMS_CLIENTID_BASE := android-zuk -TARGET_VENDOR_PRODUCT_NAME := z2 -TARGET_VENDOR_DEVICE_NAME := z2 -PRODUCT_BUILD_PROP_OVERRIDES += TARGET_DEVICE=z2 PRODUCT_NAME=z2 +TARGET_VENDOR_PRODUCT_NAME := z2_plus +TARGET_VENDOR_DEVICE_NAME := z2_plus +PRODUCT_BUILD_PROP_OVERRIDES += TARGET_DEVICE=z2_plus PRODUCT_NAME=z2_plus TARGET_VENDOR := zuk diff --git a/device.mk b/device.mk index 8736181..1efec98 100644 --- a/device.mk +++ b/device.mk @@ -1,3 +1,5 @@ +# Copyright (C) 2016 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 @@ -18,7 +20,7 @@ # definition file). # -$(call inherit-product-if-exists, vendor/zuk/z2/z2-vendor.mk) +$(call inherit-product-if-exists, vendor/zuk/z2_plus/z2_plus-vendor.mk) # Overlays DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay @@ -72,25 +74,24 @@ TARGET_SCREEN_WIDTH := 1080 PRODUCT_PROPERTY_OVERRIDES += \ dalvik.vm.heapstartsize=8m \ - dalvik.vm.heapgrowthlimit=288m \ - dalvik.vm.heapsize=768m \ + dalvik.vm.heapgrowthlimit=256m \ + dalvik.vm.heapsize=512m \ dalvik.vm.heaptargetutilization=0.75 \ dalvik.vm.heapminfree=512k \ dalvik.vm.heapmaxfree=8m PRODUCT_PROPERTY_OVERRIDES += \ - ro.hwui.texture_cache_size=72 \ - ro.hwui.layer_cache_size=48 \ - ro.hwui.path_cache_size=32 \ + ro.hwui.texture_cache_size=96 \ + ro.hwui.layer_cache_size=64 \ + ro.hwui.r_buffer_cache_size=12 \ + ro.hwui.path_cache_size=39 \ ro.hwui.gradient_cache_size=1 \ - ro.hwui.drop_shadow_cache_size=6 \ - ro.hwui.r_buffer_cache_size=8 \ - ro.hwui.r_buffer_cache_size=8 \ + ro.hwui.drop_shadow_cache_size=7 \ ro.hwui.texture_cache_flushrate=0.4 \ - ro.hwui.text_small_cache_width=1024 \ - ro.hwui.text_small_cache_height=1024 \ - ro.hwui.text_large_cache_width=2048 \ - ro.hwui.text_large_cache_height=1024 + ro.hwui.text_small_cache_width=2048 \ + ro.hwui.text_small_cache_height=2048 \ + ro.hwui.text_large_cache_width=3072 \ + ro.hwui.text_large_cache_height=2048 # Haters gonna hate.. PRODUCT_CHARACTERISTICS := nosdcard @@ -146,11 +147,16 @@ PRODUCT_PACKAGES += \ # Doze mode PRODUCT_PACKAGES += \ - CmDoze + ZukDoze # Fingerprint sensor PRODUCT_PACKAGES += \ - fingerprintd + fingerprintd \ + ZukPocketMode + +# For android_filesystem_config.h +PRODUCT_PACKAGES += \ + fs_config_files # Gello PRODUCT_PACKAGES += \ @@ -158,14 +164,15 @@ PRODUCT_PACKAGES += \ # GPS PRODUCT_PACKAGES += \ + gps.msm8996 \ libcurl PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/gps/etc/flp.conf:system/etc/flp.conf \ $(LOCAL_PATH)/gps/etc/gps.conf:system/etc/gps.conf \ $(LOCAL_PATH)/gps/etc/izat.conf:system/etc/izat.conf \ - $(LOCAL_PATH)/gps/etc/sap.conf:system/etc/sap.conf \ $(LOCAL_PATH)/gps/etc/lowi.conf:system/etc/lowi.conf \ + $(LOCAL_PATH)/gps/etc/sap.conf:system/etc/sap.conf \ $(LOCAL_PATH)/gps/etc/xtwifi.conf:system/etc/xtwifi.conf # Graphics @@ -264,6 +271,7 @@ PRODUCT_PACKAGES += \ libQWiFiSoftApCfg \ libwpa_client \ hostapd \ + dhcpcd.conf \ wpa_supplicant \ wpa_supplicant.conf diff --git a/extract-files.sh b/extract-files.sh index 6dfc868..2ed934d 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -2,7 +2,7 @@ set -e -export DEVICE=z2 +export DEVICE=z2_plus export VENDOR=zuk function extract() { diff --git a/setup-makefiles.sh b/setup-makefiles.sh index 72b7ac6..0b5e5eb 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -18,7 +18,7 @@ set -e # Required! -DEVICE=z2 +DEVICE=z2_plus VENDOR=zuk # Load extractutils and do some sanity checks