From 914bed8556a81f3357c9d7097096a72281ffcd28 Mon Sep 17 00:00:00 2001 From: Tad Date: Thu, 29 Jul 2021 12:33:17 -0400 Subject: [PATCH] Reimplement fe6f8537 LTE tested working with hybrid 33-107 modem. Phone calls drop to HSPA as expected. No issues if using stock modem either compared to without this patch. In my area, without this patch, my makos are useless cell-wise. Gives extra life to the Nexus 4. Signed-off-by: Tad --- .../android_device_lge_mako/0001-LTE.patch | 70 +++++++++++++++++++ .../android_kernel_essential_msm8998.sh | 3 +- Scripts/LineageOS-18.1/Patch.sh | 1 + 3 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 Patches/LineageOS-18.1/android_device_lge_mako/0001-LTE.patch diff --git a/Patches/LineageOS-18.1/android_device_lge_mako/0001-LTE.patch b/Patches/LineageOS-18.1/android_device_lge_mako/0001-LTE.patch new file mode 100644 index 00000000..09a9e179 --- /dev/null +++ b/Patches/LineageOS-18.1/android_device_lge_mako/0001-LTE.patch @@ -0,0 +1,70 @@ +From 8a1f4883ab37ea10142c903cf0ec25c95dc03579 Mon Sep 17 00:00:00 2001 +From: Tad +Date: Thu, 29 Jul 2021 12:31:30 -0400 +Subject: [PATCH 1/1] LTE Enablement + +Change-Id: I36cbd7ce1a070201da24dc237154355e780d01b4 +--- + .../base/core/res/res/values/config.xml | 2 +- + .../services/Telephony/res/values/config.xml | 22 +++++++++++++++++++ + system_prop.mk | 2 +- + 3 files changed, 24 insertions(+), 2 deletions(-) + create mode 100644 overlay/packages/services/Telephony/res/values/config.xml + +diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml +index 9f37d0a..2220fca 100644 +--- a/overlay/frameworks/base/core/res/res/values/config.xml ++++ b/overlay/frameworks/base/core/res/res/values/config.xml +@@ -178,7 +178,7 @@ + Empty is viewed as "all". Only used on devices which + don't support RIL_REQUEST_GET_RADIO_CAPABILITY + format is UMTS|LTE|... --> +- GSM|WCDMA ++ GSM|WCDMA|LTE + + + true +diff --git a/overlay/packages/services/Telephony/res/values/config.xml b/overlay/packages/services/Telephony/res/values/config.xml +new file mode 100644 +index 0000000..53c62dd +--- /dev/null ++++ b/overlay/packages/services/Telephony/res/values/config.xml +@@ -0,0 +1,22 @@ ++ ++ ++ ++ ++ ++ ++ true ++ ++ +diff --git a/system_prop.mk b/system_prop.mk +index 6398872..81ca1bb 100644 +--- a/system_prop.mk ++++ b/system_prop.mk +@@ -48,7 +48,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ + # RIL + PRODUCT_PROPERTY_OVERRIDES += \ + rild.libpath=/vendor/lib/libril-qc-qmi-1.so \ +- telephony.lteOnCdmaDevice=0 \ ++ telephony.lteOnCdmaDevice=1 \ + persist.radio.apm_sim_not_pwdn=1 \ + ro.telephony.call_ring.multiple=0 + +-- +2.31.1 + diff --git a/Scripts/LineageOS-18.1/CVE_Patchers/android_kernel_essential_msm8998.sh b/Scripts/LineageOS-18.1/CVE_Patchers/android_kernel_essential_msm8998.sh index 6bba92e2..05d54366 100644 --- a/Scripts/LineageOS-18.1/CVE_Patchers/android_kernel_essential_msm8998.sh +++ b/Scripts/LineageOS-18.1/CVE_Patchers/android_kernel_essential_msm8998.sh @@ -98,7 +98,6 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-11608/4.4/0006.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-11608/^5.6.1/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-14386/3.10-^4.4/0002.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-16119/^5.10/0002.patch -git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-1955/ANY/0004.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3655/^5.13/0003.patch -editKernelLocalversion "-dos.p100" +editKernelLocalversion "-dos.p99" cd "$DOS_BUILD_BASE" diff --git a/Scripts/LineageOS-18.1/Patch.sh b/Scripts/LineageOS-18.1/Patch.sh index a0f4de0e..f3316be2 100644 --- a/Scripts/LineageOS-18.1/Patch.sh +++ b/Scripts/LineageOS-18.1/Patch.sh @@ -312,6 +312,7 @@ sed -i '1itypeattribute wcnss_service misc_block_device_exception;' sepolicy/wcn fi; if enterAndClear "device/lge/mako"; then +patch -p1 < "$DOS_PATCHES/android_device_lge_mako/0001-LTE.patch"; #Enable LTE support echo "pmf=0" >> wifi/wpa_supplicant_overlay.conf; #Wi-Fi chipset doesn't support PMF awk -i inplace '!/TARGET_RELEASETOOLS_EXTENSIONS/' BoardConfig.mk; #broken releasetools sed -i 's/bdAddrLoader/bdAddrLoader-mako/' device.mk bdAddrLoader/Android.bp bdAddrLoader/addrloader.c rootdir/etc/init.mako.bt.sh sepolicy/file_contexts; #Fix conflicts