From 96ede5363abbad5c62da0445450afc967a944e3d Mon Sep 17 00:00:00 2001 From: Joel16 Date: Sun, 15 Dec 2019 20:33:17 -0500 Subject: [PATCH] Initial lineage-15.1 commit --- Android.mk | 1 + BoardConfig.mk | 5 +- configs/libnfc-brcm.conf | 2 +- configs/libnfc-nxp.conf | 58 ++++++-- configs/wlan/bcmdhd.cal | 5 +- device.mk | 3 +- init_satsuki/Android.mk | 7 +- init_satsuki/init_satsuki.cpp | 44 +++++-- lineage.mk | 2 +- {cmhw => lineagehw}/HighTouchSensitivity.java | 4 +- .../base/core/res/res/values/config.xml | 124 +++++++++++++----- .../base/core/res/res/xml/power_profile.xml | 2 +- .../apps/Settings/res/values/config.xml | 3 - .../apps/Settings/res/values/dimens.xml | 1 - proprietary-files.txt | 2 +- 15 files changed, 190 insertions(+), 73 deletions(-) rename {cmhw => lineagehw}/HighTouchSensitivity.java (96%) diff --git a/Android.mk b/Android.mk index 704927c..f80d7db 100644 --- a/Android.mk +++ b/Android.mk @@ -1,3 +1,4 @@ + # # Copyright (C) 2016 The CyanogenMod Project # diff --git a/BoardConfig.mk b/BoardConfig.mk index a54fb14..6f083bc 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -28,8 +28,8 @@ TARGET_OTA_ASSERT_DEVICE := E6833,E6853,E6883,satsuki,satsuki_dsds # Boot image/kernel TARGET_KERNEL_CONFIG := kitakami_satsuki_defconfig -# CM hardware -BOARD_HARDWARE_CLASS += $(DEVICE_PATH)/cmhw +# Lineage hardware +BOARD_HARDWARE_CLASS += $(DEVICE_PATH)/lineagehw TARGET_TAP_TO_WAKE_NODE := "/sys/devices/virtual/input/clearpad/wakeup_gesture" # Partitions @@ -53,7 +53,6 @@ WIFI_BUS := PCIE # Init TARGET_INIT_VENDOR_LIB := libinit_satsuki -TARGET_UNIFIED_DEVICE := true # Inherit from the proprietary version -include vendor/sony/satsuki/BoardConfigVendor.mk diff --git a/configs/libnfc-brcm.conf b/configs/libnfc-brcm.conf index 15ce76c..724036b 100644 --- a/configs/libnfc-brcm.conf +++ b/configs/libnfc-brcm.conf @@ -339,7 +339,7 @@ NFA_MAX_EE_SUPPORTED=0x02 ############################################################################### # NCI Hal Module name -NCI_HAL_MODULE="nfc_nci.pn54x" +NCI_HAL_MODULE="nfc_nci" ############################################################################### # AID_MATCHING constants diff --git a/configs/libnfc-nxp.conf b/configs/libnfc-nxp.conf index d024343..b42b00a 100644 --- a/configs/libnfc-nxp.conf +++ b/configs/libnfc-nxp.conf @@ -17,6 +17,14 @@ NXPLOG_NCIR_LOGLEVEL=0x01 NXPLOG_FWDNLD_LOGLEVEL=0x01 NXPLOG_TML_LOGLEVEL=0x01 +############################################################################### +# Nfc Device Node name +NXP_NFC_DEV_NODE="/dev/pn54x" + +############################################################################### +# File name for Firmware +NXP_FW_NAME="libpn547_fw.so" + ############################################################################### # Extension for Mifare reader enable # 0x00 - Disabled @@ -205,16 +213,16 @@ NXP_CORE_SCRN_OFF_AUTONOMOUS_ENABLE=0x00 # *** ALM(NO BOOSTER) FW VERSION = 08.01.25 *** NXP_RF_CONF_BLK_1={ 20, 02, F3, 20, - A0, 0D, 03, 00, 40, 04, + A0, 0D, 03, 00, 40, 0A, A0, 0D, 03, 04, 43, 20, A0, 0D, 03, 04, FF, 05, A0, 0D, 06, 06, 44, A3, 90, 03, 00, A0, 0D, 06, 06, 30, CF, 00, 08, 00, A0, 0D, 06, 06, 2F, 8F, 05, 80, 0C, - A0, 0D, 04, 06, 03, 00, 71, - A0, 0D, 03, 06, 48, 1F, + A0, 0D, 04, 06, 03, 00, 6E, + A0, 0D, 03, 06, 48, 18, A0, 0D, 03, 06, 43, A0, - A0, 0D, 06, 06, 42, 00, 02, FF, F1, + A0, 0D, 06, 06, 42, 00, 02, F3, F1, A0, 0D, 06, 06, 41, 80, 00, 00, 00, A0, 0D, 03, 06, 37, 18, A0, 0D, 03, 06, 16, 00, @@ -236,7 +244,7 @@ NXP_RF_CONF_BLK_1={ A0, 0D, 06, 32, 4A, 30, 07, 01, 1F, A0, 0D, 06, 34, 2D, 24, 77, 0C, 00, A0, 0D, 06, 34, 34, 00, 00, E4, 03, - A0, 0D, 06, 34, 44, 2D, 00, 02, 00 + A0, 0D, 06, 34, 44, 20, 00, 02, 00 } # *** ALM(NO BOOSTER) FW VERSION = 08.01.25 *** NXP_RF_CONF_BLK_2={ @@ -262,7 +270,7 @@ NXP_RF_CONF_BLK_2={ A0, 0D, 06, 46, 44, 21, 00, 02, 00, A0, 0D, 06, 46, 2D, 05, 47, 0E, 00, A0, 0D, 06, 44, 4A, 33, 07, 01, 07, - A0, 0D, 06, 44, 42, 88, 10, FF, FF, + A0, 0D, 06, 44, 42, 70, 10, FF, FF, A0, 0D, 03, 44, 16, 00, A0, 0D, 03, 44, 15, 00, A0, 0D, 06, 4A, 44, 22, 00, 02, 00, @@ -291,16 +299,16 @@ NXP_RF_CONF_BLK_3={ A0, 0D, 06, 56, 44, 22, 00, 02, 00, A0, 0D, 06, 5C, 2D, 05, 69, 0C, 00, A0, 0D, 06, 5C, 44, 21, 00, 02, 00, - A0, 0D, 06, 54, 42, 88, 10, FF, FF, + A0, 0D, 06, 54, 42, 70, 10, FF, FF, A0, 0D, 06, 54, 4A, 33, 07, 01, 07, A0, 0D, 03, 54, 16, 00, A0, 0D, 03, 54, 15, 00, - A0, 0D, 06, 5A, 42, 90, 10, FF, FF, + A0, 0D, 06, 5A, 42, 70, 10, FF, FF, A0, 0D, 06, 5A, 4A, 31, 07, 01, 07, A0, 0D, 03, 5A, 16, 00, A0, 0D, 03, 5A, 15, 00, A0, 0D, 06, 98, 2F, AF, 05, 80, 0F, - A0, 0D, 06, 9A, 42, 00, 02, FF, F1, + A0, 0D, 06, 9A, 42, 00, 03, F2, F1, A0, 0D, 06, 30, 44, A3, 90, 03, 00, A0, 0D, 06, 6C, 44, A3, 90, 03, 00, A0, 0D, 06, 6C, 30, CF, 00, 08, 00, @@ -329,7 +337,7 @@ NXP_RF_CONF_BLK_4={ A0, 0D, 06, 88, 30, 5F, 00, 16, 00, A0, 0D, 03, 88, 47, 00, A0, 0D, 06, 88, 44, A1, 90, 03, 00, - A0, 0D, 03, 0C, 48, 1F, + A0, 0D, 03, 0C, 48, 18, A0, 0D, 03, 10, 43, 20, A0, 0D, 06, 6A, 42, F8, 10, FF, FF, A0, 0D, 03, 6A, 16, 00, @@ -400,11 +408,11 @@ NXP_CORE_CONF_EXTN={20, 02, 4D, 12, A0, 0E, 01, 01, A0, 11, 04, CD, 67, 22, 01, A0, 12, 01, 00, - A0, 13, 01, 00, + A0, 13, 01, 02, A0, 40, 01, 01, - A0, 41, 01, 02, + A0, 41, 01, 04, A0, 42, 01, 19, - A0, 43, 01, 50, + A0, 43, 01, 05, A0, 47, 02, 88, 43, A0, 5E, 01, 01, A0, 61, 01, 2A, @@ -533,4 +541,28 @@ NXP_CE_ROUTE_STRICT_DISABLE=0x01 # AID_MATCHING_L 0x01 # AID_MATCHING_K 0x02 AID_MATCHING_PLATFORM=0x01 +################################################################################ +#Used to Restrict Type A UICC baud rate +#0 = default supported +#1 = 212 maximum supported +#2 = 424 maximum supported +#3 = 848 maximum supported + +NXP_TYPEA_UICC_BAUD_RATE=0x00 +################################################################################ +#Used to Restrict Type B UICC baud rate +#0 = default supported +#1 = 212 maximum supported +#2 = 424 maximum supported +#3 = 848 maximum supported + +NXP_TYPEB_UICC_BAUD_RATE=0x00 +################################################################################ + +#Config to allow adding aids +#NFC on/off is required after this config +#1 = enabling adding aid to NFCC routing table. +#0 = disabling adding aid to NFCC routing table. +NXP_ENABLE_ADD_AID=0x01 +################################################################################## diff --git a/configs/wlan/bcmdhd.cal b/configs/wlan/bcmdhd.cal index 97b8589..ed1ed5e 100644 --- a/configs/wlan/bcmdhd.cal +++ b/configs/wlan/bcmdhd.cal @@ -71,8 +71,10 @@ temps_hysteresis=15 tempoffset=255 rawtempsense=0x1ff -tworangetssi2g=0 +tworangetssi2g=1 tworangetssi5g=0 +lowpowerrange2g=0 +lowpowerrange5g=0 #pa2gccka0=-145,6220,-699 #pa2gccka1=-167,5991,-703 @@ -122,7 +124,6 @@ mcsbw805ghpo=0xcaaaaaaa,0x11111111 mcslr5glpo=0x0000 mcslr5gmpo=0x0000 mcslr5ghpo=0x0000 - sb20in40hrpo=0x0 sb20in80and160hr5glpo=0x0 sb40and80hr5glpo=0x0 diff --git a/device.mk b/device.mk index 0ac9aa2..4623a13 100644 --- a/device.mk +++ b/device.mk @@ -34,7 +34,6 @@ TARGET_SCREEN_WIDTH := 2160 # Dalvik/HWUI $(call inherit-product, frameworks/native/build/phone-xxhdpi-2048-dalvik-heap.mk) -$(call inherit-product, frameworks/native/build/phone-xxhdpi-2048-hwui-memory.mk) # init PRODUCT_COPY_FILES += \ @@ -42,7 +41,7 @@ PRODUCT_COPY_FILES += \ # Audio configuration PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/audio/mixer_paths.xml:system/etc/mixer_paths.xml + $(LOCAL_PATH)/audio/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml # Input PRODUCT_COPY_FILES += \ diff --git a/init_satsuki/Android.mk b/init_satsuki/Android.mk index b6db811..fb8d7f0 100644 --- a/init_satsuki/Android.mk +++ b/init_satsuki/Android.mk @@ -1,3 +1,4 @@ + # # Copyright (C) 2017 The LineageOS Project # @@ -20,7 +21,11 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional -LOCAL_C_INCLUDES := system/core/init +LOCAL_C_INCLUDES := \ + system/core/base/include \ + system/core/init \ + external/selinux/libselinux/include \ + external/libcap/libcap/include LOCAL_CFLAGS := -Wall LOCAL_SRC_FILES := init_satsuki.cpp LOCAL_MODULE := libinit_satsuki diff --git a/init_satsuki/init_satsuki.cpp b/init_satsuki/init_satsuki.cpp index 58292ba..0aaa936 100644 --- a/init_satsuki/init_satsuki.cpp +++ b/init_satsuki/init_satsuki.cpp @@ -18,18 +18,40 @@ #include +#include + #include #include #include #include #include +#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_ +#include #include #include "vendor_init.h" #include "property_service.h" -#include "log.h" #include "util.h" +using android::init::import_kernel_cmdline; +using android::init::property_set; + +void property_override(char const prop[], char const value[]) +{ + prop_info *pi; + + pi = (prop_info*) __system_property_find(prop); + if (pi) + __system_property_update(pi, value, strlen(value)); + else + __system_property_add(prop, strlen(prop), value, strlen(value)); +} + +void property_override_dual(char const system_prop[], char const vendor_prop[], char const value[]) +{ + property_override(system_prop, value); + property_override(vendor_prop, value); +} static void import_kernel_nv(const std::string& key, const std::string& value, bool for_emulator __attribute__((unused))) @@ -44,20 +66,20 @@ static void import_kernel_nv(const std::string& key, property_set("ro.telephony.default_network", "9,1"); property_set("ro.semc.product.model", "E6883"); property_set("ro.semc.product.name", "Xperia Z5 Premium Dual"); - property_set("ro.product.model", "E6883"); - property_set("ro.product.name", "satsuki_dsds"); - property_set("ro.product.device", "satsuki_dsds"); - property_set("ro.build.description", "satsuki_dsds-user 7.1.1 N-MR1-KITAKAMI-170609-1025 1 dev-keys"); - property_set("ro.build.fingerprint", "Sony/satsuki_dsds/satsuki_dsds:7.1.1/N-MR1-KITAKAMI-170609-1025/1:user/dev-keys"); + property_override_dual("ro.product.model", "ro.vendor.product.model", "E6883"); + property_override_dual("ro.product.name", "ro.vendor.product.name", "satsuki_dsds"); + property_override_dual("ro.product.device", "ro.vendor.product.device", "satsuki_dsds"); + property_override("ro.build.description", "satsuki_dsds-user 7.1.1 N-MR1-KITAKAMI-170609-1025 1 dev-keys"); + property_override_dual("ro.build.fingerprint", "ro.vendor.build.fingerprint", "Sony/satsuki_dsds/satsuki_dsds:7.1.1/N-MR1-KITAKAMI-170609-1025/1:user/dev-keys"); } else { property_set("ro.telephony.default_network", "9"); property_set("ro.semc.product.model", "E6853"); property_set("ro.semc.product.name", "Xperia Z5 Premium"); - property_set("ro.product.model", "E6853"); - property_set("ro.product.name", "satsuki"); - property_set("ro.product.device", "satsuki"); - property_set("ro.build.description", "satsuki-user 7.1.1 N-MR1-KITAKAMI-170609-1025 1 dev-keys"); - property_set("ro.build.fingerprint", "Sony/satsuki/satsuki:7.1.1/N-MR1-KITAKAMI-170609-1025/1:user/dev-keys"); + property_override_dual("ro.product.model", "ro.vendor.product.model", "E6853"); + property_override_dual("ro.product.name", "ro.vendor.product.name", "satsuki"); + property_override_dual("ro.product.device", "ro.vendor.product.device", "satsuki"); + property_override("ro.build.description", "satsuki-user 7.1.1 N-MR1-KITAKAMI-170609-1025 1 dev-keys"); + property_override_dual("ro.build.fingerprint", "ro.vendor.build.fingerprint", "Sony/satsuki/satsuki:7.1.1/N-MR1-KITAKAMI-170609-1025/1:user/dev-keys"); } } } diff --git a/lineage.mk b/lineage.mk index 411e578..1e9c895 100644 --- a/lineage.mk +++ b/lineage.mk @@ -17,6 +17,6 @@ $(call inherit-product, device/sony/satsuki/full_satsuki.mk) # Inherit some common CM stuff -$(call inherit-product, vendor/cm/config/common_full_phone.mk) +$(call inherit-product, vendor/lineage/config/common_full_phone.mk) PRODUCT_NAME := lineage_satsuki diff --git a/cmhw/HighTouchSensitivity.java b/lineagehw/HighTouchSensitivity.java similarity index 96% rename from cmhw/HighTouchSensitivity.java rename to lineagehw/HighTouchSensitivity.java index 62d9d0b..e387569 100644 --- a/cmhw/HighTouchSensitivity.java +++ b/lineagehw/HighTouchSensitivity.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package org.cyanogenmod.hardware; +package org.lineageos.hardware; -import org.cyanogenmod.internal.util.FileUtils; +import org.lineageos.internal.util.FileUtils; /** * Glove mode / high touch sensitivity diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index bb4e4e2..13c4dc6 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -1,42 +1,104 @@ + + - - 3600 - - - 25 + - 25 + Zone 0: 0 <= LUX < array[0] + Zone 1: array[0] <= LUX < array[1] + ... + Zone N: array[N - 1] <= LUX < array[N] + Zone N + 1 array[N] <= LUX < infinity - - 1 + Must be overridden in platform specific overlays --> + + 16 + 64 + 144 + 256 + 400 + 576 + 784 + 1024 + 1296 + 1600 + 1936 + 2304 + 2704 + 3136 + 3600 + 4096 + - - 3600 + + + 10 + 16 + 32 + 48 + 64 + 80 + 96 + 112 + 128 + 144 + 160 + 176 + 192 + 208 + 224 + 240 + 255 + - - 185 + + 10 - - 390 + + 5 - - 3 + + 10 + + + 5 + + + true + + + http://uaprof.sonymobile.com/E6853R3211.xml diff --git a/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/overlay/frameworks/base/core/res/res/xml/power_profile.xml index a3c7582..8ee950c 100644 --- a/overlay/frameworks/base/core/res/res/xml/power_profile.xml +++ b/overlay/frameworks/base/core/res/res/xml/power_profile.xml @@ -97,4 +97,4 @@ .2 2 - + \ No newline at end of file diff --git a/overlay/packages/apps/Settings/res/values/config.xml b/overlay/packages/apps/Settings/res/values/config.xml index 9f6192e..0c6fb43 100644 --- a/overlay/packages/apps/Settings/res/values/config.xml +++ b/overlay/packages/apps/Settings/res/values/config.xml @@ -1,12 +1,9 @@