[LG G5 ROMs, Kernels, Recoveries, & Other Developme] MetaIIica:
If any have same Signal issue. With this Patch i have a better Signal (same as Stock) as with the CAF-Ril

you can solve this with this patch. Its use LGE Ril and not CAF Ril

Save the code as 0001-LGE-Ril.patch and go to in Terminal

cd device/lge/g5-common

SOURCE=~/SOURCE_TO_YOUR_PATCH

patch -p1 < $SOURCE/0001-LGE-Ril.patch

git add -A && git commit -m "Use LGE Ril"

and now build as normal

From 7a0e4429896deac23af463d373ec0eb75ebd4fb2 Mon Sep 17 00:00:00 2001
From: Sven <digixp2006@gmail.com>
Date: Thu, 27 Oct 2016 11:18:39 +0200
Subject: [PATCH 1/1] LGE Ril

---
BoardConfigCommon.mk | 4 +-
.../com/android/internal/telephony/LgeLteRIL.java | 108 +++++++++++++++++++++
system.prop | 35 +++----
3 files changed, 121 insertions(+), 26 deletions(-)
create mode 100644 ril/telephony/java/com/android/internal/telephony/LgeLteRIL.java

diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index f072b16..5cf5630 100755
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -147,8 +147,8 @@ PRODUCT_BOOT_JARS += tcmiface tcmclient com.qti.dpmframework dpmapi com.qti.loca
TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/rootdir/etc/fstab.qcom

# RIL
-TARGET_RIL_VARIANT := caf
-# BOARD_RIL_CLASS := ../../../$(COMMON_PATH)/ril/
+#TARGET_RIL_VARIANT := caf
+BOARD_RIL_CLASS := ../../../$(COMMON_PATH)/ril/

# SELinux policies
include device/qcom/sepolicy/sepolicy.mk
diff --git a/ril/telephony/java/com/android/internal/telephony/LgeLteRIL.java b/ril/telephony/java/com/android/internal/telephony/LgeLteRIL.java
new file mode 100644
index 0000000..76aa965
--- /dev/null
+++ b/ril/telephony/java/com/android/internal/telephony/LgeLteRIL.java
@@ -0,0 +1,108 @@
+/*
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.telephony;
+
+import static com.android.internal.telephony.RILConstants.*;
+
+import android.content.Context;
+import android.os.Message;
+import android.os.Parcel;
+
+/**
+ * Custom Qualcomm RIL for G4
+ *
+ * {@hide}
+ */
+public class LgeLteRIL extends RIL implements CommandsInterface {
+
+ public static final int RIL_UNSOL_AVAILABLE_RAT = 1054;
+ public static final int RIL_UNSOL_LOG_RF_BAND_INFO = 1165;
+ public static final int RIL_UNSOL_LTE_REJECT_CAUSE = 1187;
+
+ public LgeLteRIL(Context context, int preferredNetworkType, int cdmaSubscription) {
+ super(context, preferredNetworkType, cdmaSubscription, null);
+ }
+
+ public LgeLteRIL(Context context, int preferredNetworkType,
+ int cdmaSubscription, Integer instanceId) {
+ super(context, preferredNetworkType, cdmaSubscription, instanceId);
+ }
+
+ static String
+ lgeResponseToString(int request)
+ {
+ switch(request) {
+ case RIL_UNSOL_AVAILABLE_RAT: return "RIL_UNSOL_AVAILABLE_RAT";
+ case RIL_UNSOL_LOG_RF_BAND_INFO: return "RIL_UNSOL_LOG_RF_BAND_INFO";
+ case RIL_UNSOL_LTE_REJECT_CAUSE: return "RIL_UNSOL_LTE_REJECT_CAUSE";
+ default: return "<unknown response>";
+ }
+ }
+
+ protected void lgeUnsljLogRet(int response, Object ret) {
+ riljLog("[LGE-UNSL]< " + lgeResponseToString(response) + " " + retToString(response, ret));
+ }
+
+ @Override
+ protected void
+ processUnsolicited (Parcel p) {
+ Object ret;
+ int dataPosition = p.dataPosition(); // save off position within the Parcel
+ int response = p.readInt();
+
+ switch(response) {
+ case RIL_UNSOL_AVAILABLE_RAT: ret = responseInts(p); break;
+ case RIL_UNSOL_LOG_RF_BAND_INFO: ret = responseInts(p); break;
+ case RIL_UNSOL_LTE_REJECT_CAUSE: ret = responseInts(p); break;
+ default:
+ // Rewind the Parcel
+ p.setDataPosition(dataPosition);
+ // Forward responses that we are not overriding to the super class
+ super.processUnsolicited(p);
+ return;
+ }
+
+ switch(response) {
+ case RIL_UNSOL_AVAILABLE_RAT:
+ if (RILJ_LOGD) lgeUnsljLogRet(response, ret);
+ break;
+ case RIL_UNSOL_LOG_RF_BAND_INFO:
+ if (RILJ_LOGD) lgeUnsljLogRet(response, ret);
+ break;
+ case RIL_UNSOL_LTE_REJECT_CAUSE:
+ if (RILJ_LOGD) lgeUnsljLogRet(response, ret);
+ break;
+ }
+ }
+
+ @Override
+ public void
+ setNetworkSelectionModeManual(String operatorNumeric, Message response) {
+ RILRequest rr
+ = RILRequest.obtain(RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL,
+ response);
+
+ if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)
+ + " " + operatorNumeric);
+
+ rr.mParcel.writeInt(2);
+ rr.mParcel.writeString(operatorNumeric);
+ rr.mParcel.writeString("2"); // NOCHANGE
+
+ send(rr);
+ }
+}
diff --git a/system.prop b/system.prop
index 91b8dad..95603be 100755
--- a/system.prop
+++ b/system.prop
@@ -88,36 +88,23 @@ ro.vendor.extension_library=libqti-perfd-client.so

# RIL
rild.libpath=/vendor/lib64/libril-qc-qmi-1.so
+persist.radio.apm_sim_not_pwdn=1
persist.radio.add_power_save=1
-persist.rild.nitz_plmn=
-persist.rild.nitz_long_ons_0=
-persist.rild.nitz_long_ons_1=
-persist.rild.nitz_long_ons_2=
-persist.rild.nitz_long_ons_3=
-persist.rild.nitz_short_ons_0=
-persist.rild.nitz_short_ons_1=
-persist.rild.nitz_short_ons_2=
-persist.rild.nitz_short_ons_3=
+persist.rild.nitz_plmn=""
+persist.rild.nitz_long_ons_0=""
+persist.rild.nitz_long_ons_1=""
+persist.rild.nitz_long_ons_2=""
+persist.rild.nitz_long_ons_3=""
+persist.rild.nitz_short_ons_0=""
+persist.rild.nitz_short_ons_1=""
+persist.rild.nitz_short_ons_2=""
+persist.rild.nitz_short_ons_3=""
ril.subscription.types=NV,RUIM
ro.ril.telephony.mqanelements=5
DEVICE_PROVISIONED=1
+ro.telephony.ril_class=LgeLteRIL
ro.telephony.default_network=9
telephony.lteOnGsmDevice=1
-persist.volte_enalbed_by_hw=1
-persist.radio.data_ltd_sys_ind=1
-ro.telephony.default_network=22,22
-telephony.lteOnCdmaDevice=1
-ro.telephony.call_ring.multiple=false
-persist.radio.apm_sim_not_pwdn=1
-persist.radio.custom_ecc=1
-persist.radio.sib16_support=1
-persist.data.qmi.adb_logmask=0
-persist.net.doxlat=true
-persist.oem.dump=0
-persist.radio.ignore_dom_time=5
-persist.radio.hw_mbn_update=0
-persist.radio.sw_mbn_update=0
-persist.radio.start_ota_daemon=1

# Sensors
persist.debug.sensors.hal=e
--
1.9.1