gta4xl: Kang AIDL RIL stack from a14

Change-Id: Ib5d438869b6422269e70e7287dc4399a3cd5adb2
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 1452c48..5f8fe8c 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -28,6 +28,8 @@
 TARGET_KERNEL_CONFIG := exynos9611-gta4xl_defconfig
 
 ## Manifest
+DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += \
+    $(DEVICE_PATH)/device_framework_matrix.xml
 DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/device_manifest.xml
 
 ## Properties
diff --git a/configs/ril/sehradiomanager.conf b/configs/ril/sehradiomanager.conf
new file mode 100644
index 0000000..a5f5da7
--- /dev/null
+++ b/configs/ril/sehradiomanager.conf
@@ -0,0 +1,2 @@
+FW_READY=1
+CA_ENABLED=1
diff --git a/device.mk b/device.mk
index 77c0bd0..a0da925 100644
--- a/device.mk
+++ b/device.mk
@@ -33,4 +33,21 @@
 
 # RIL
 PRODUCT_PACKAGES += \
-    secril_config_svc
+    android.hardware.radio@1.2.vendor:64 \
+    android.hardware.radio.config-V1-ndk.vendor:64 \
+    android.hardware.radio.data-V1-ndk.vendor:64 \
+    android.hardware.radio.messaging-V1-ndk.vendor:64 \
+    android.hardware.radio.modem-V1-ndk.vendor:64 \
+    android.hardware.radio.network-V1-ndk.vendor:64 \
+    android.hardware.radio.sim-V1-ndk.vendor:64 \
+    android.hardware.radio.voice-V1-ndk.vendor:64
+
+PRODUCT_PACKAGES += \
+    libdsms_vendor:64
+
+PRODUCT_PACKAGES += \
+    secril_config_svc \
+    sehradiomanager
+
+PRODUCT_COPY_FILES += \
+    $(LOCAL_PATH)/configs/ril/sehradiomanager.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sehradiomanager.conf
diff --git a/device_framework_matrix.xml b/device_framework_matrix.xml
new file mode 100644
index 0000000..bd7ff6a
--- /dev/null
+++ b/device_framework_matrix.xml
@@ -0,0 +1,59 @@
+<?xml version="2.0" encoding="UTF-8"?>
+<compatibility-matrix version="2.0" type="framework">
+    <hal format="aidl">
+        <name>vendor.samsung.hardware.radio.network</name>
+        <version>1</version>
+        <interface>
+            <name>ISehRadioNetwork</name>
+            <instance>slot1</instance>
+            <instance>slot2</instance>
+        </interface>
+    </hal>
+    <hal format="aidl">
+        <name>vendor.samsung.hardware.radio.channel</name>
+        <version>1</version>
+        <interface>
+            <name>ISehRadioChannel</name>
+            <instance>imsd</instance>
+            <instance>imsd2</instance>
+            <instance>epdgd</instance>
+            <instance>epdgd2</instance>
+        </interface>
+    </hal>
+    <hal format="aidl">
+        <name>vendor.samsung.hardware.radio.bridge</name>
+        <version>1</version>
+        <interface>
+            <name>ISehRadioBridge</name>
+            <instance>slot1</instance>
+            <instance>slot2</instance>
+        </interface>
+    </hal>
+    <hal format="aidl">
+        <name>vendor.samsung.hardware.radio.data</name>
+        <version>1</version>
+        <interface>
+            <name>ISehRadioData</name>
+            <instance>slot1</instance>
+            <instance>slot2</instance>
+        </interface>
+    </hal>
+    <hal format="aidl">
+        <name>vendor.samsung.hardware.radio.sim</name>
+        <version>1</version>
+        <interface>
+            <name>ISehRadioSim</name>
+            <instance>slot1</instance>
+            <instance>slot2</instance>
+        </interface>
+    </hal>
+    <hal format="aidl">
+        <name>vendor.samsung.hardware.radio.messaging</name>
+        <version>1</version>
+        <interface>
+            <name>ISehRadioMessaging</name>
+            <instance>slot1</instance>
+            <instance>slot2</instance>
+        </interface>
+    </hal>
+</compatibility-matrix>
diff --git a/device_manifest.xml b/device_manifest.xml
index c35876c..b2b0b7d 100644
--- a/device_manifest.xml
+++ b/device_manifest.xml
@@ -9,47 +9,4 @@
             <instance>default</instance>
         </interface>
     </hal>
-    <hal format="hidl" override="true">
-        <name>android.hardware.radio</name>
-        <transport>hwbinder</transport>
-        <fqname>@1.2::ISap/slot1</fqname>
-        <fqname>@1.4::IRadio/slot1</fqname>
-    </hal>
-     <hal format="hidl" override="true">
-         <name>android.hardware.radio.config</name>
-         <transport>hwbinder</transport>
-        <version>1.1</version>
-        <interface>
-            <name>IRadioConfig</name>
-            <instance>default</instance>
-        </interface>
-     </hal>
-     <hal format="hidl">
-        <name>vendor.samsung.hardware.radio</name>
-        <transport>hwbinder</transport>
-        <version>2.2</version>
-        <interface>
-            <name>ISehRadio</name>
-            <instance>slot1</instance>
-        </interface>
-    </hal>
-    <hal format="hidl">
-        <name>vendor.samsung.hardware.radio.bridge</name>
-         <transport>hwbinder</transport>
-         <version>2.0</version>
-         <interface>
-            <name>ISehBridge</name>
-            <instance>slot1</instance>
-        </interface>
-    </hal>
-    <hal format="hidl">
-        <name>vendor.samsung.hardware.radio.channel</name>
-        <transport>hwbinder</transport>
-        <version>2.0</version>
-        <interface>
-            <name>ISehChannel</name>
-            <instance>epdgd</instance>
-            <instance>imsd</instance>
-         </interface>
-     </hal>
 </manifest>
diff --git a/extract-files.sh b/extract-files.sh
index 64860ac..e1ba861 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -8,12 +8,8 @@
 
 function blob_fixup() {
     case "${1}" in
-        vendor/bin/hw/rild)
-            "${PATCHELF}" --replace-needed libril.so libril-samsung.so "${2}"
-            ;;
         vendor/lib*/libsec-ril.so)
-            "${PATCHELF}" --replace-needed libril.so libril-samsung.so "${2}"
-            xxd -p -c0 "${2}" | sed "s/600e40f9820c805224008052e10315aae30314aa/600e40f9820c805224008052e10315aa030080d2/g" | xxd -r -p > "${2}".patched
+            xxd -p -c0 "${2}" | sed "s/800e40f9e10316aa820c8052e30315aa/800e40f9e10316aa820c8052080080d2/g" | xxd -r -p > "${2}".patched
             mv "${2}".patched "${2}"
             ;;
     esac
diff --git a/proprietary-files.txt b/proprietary-files.txt
index baf48ef..29ffe3b 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -29,7 +29,9 @@
 -vendor/lib64/libwrappergps.so
 
 ## RIL
+-vendor/bin/cass
 -vendor/bin/cbd
+vendor/etc/init/cass.rc
 vendor/etc/init/init.baseband.rc
 vendor/etc/init/init.vendor.rilcommon.rc
 vendor/etc/floating_feature.xml
@@ -41,20 +43,26 @@
 -vendor/lib64/libengmode_client.so
 -vendor/lib64/libfloatingfeature.so
 -vendor/lib64/libvkmanager_vendor.so
--vendor/lib64/vendor.samsung.hardware.radio.bridge@2.0.so
--vendor/lib64/vendor.samsung.hardware.radio.bridge@2.1.so
--vendor/lib64/vendor.samsung.hardware.radio.channel@2.0.so
--vendor/lib64/vendor.samsung.hardware.radio@2.0.so
--vendor/lib64/vendor.samsung.hardware.radio@2.1.so
--vendor/lib64/vendor.samsung.hardware.radio@2.2.so
 
-## RIL - from gta4xl - P615XXS4DVA4
--vendor/bin/hw/rild|d4ee9a7cc9a8aa3623dc610e17213f9c7abe0181
-vendor/etc/init/init.vendor.rilchip.rc|0f5f13a11c084db5dc0eb47bb693235a2273f91e
--vendor/lib/libsemnativecarrierfeature.so|d280604d21163b87ca731df9b9d95d09b39f3c2a
--vendor/lib64/libril-samsung.so|629940983136ff525ed41a3324f50c3f9d752432
--vendor/lib64/libsec-ril.so|bcbfaa30a1482ce1a2134945143b00ab235a910c
--vendor/lib64/libsemnativecarrierfeature.so|ca44453cf7cca968606b56936be7de0d214d74be
+## RIL - from a14 - A145FXXS5BXA1
+-vendor/bin/hw/rild|006374bbdd818b1d6ee83617ddabbf4073974e0e
+vendor/etc/init/vendor.samsung.rilchip.slsi.rc|95aa52333814b340e5064eae3a9bd5cb8a96a3ff
+-vendor/etc/vintf/manifest/vendor.samsung.hardware.radio.exclude.slsi.xml|c3f8ea3f6228f2d572081b0c0ae29a251de4350b
+-vendor/etc/vintf/manifest/vendor.samsung.hardware.radio_manifest_2_33.xml|e9cdde9d05c5cce32f76bbb164437f43b3288157
+-vendor/etc/vintf/manifest/vendor.samsung.hardware.sehradio_manifest_2_33.xml|ebbe359a9b2d78cb88debe79d9183c039afb7c01
+-vendor/lib/libsemnativecarrierfeature.so|a5c3b35d8b515ea478e6fcbe7483bfbab95b36fd
+-vendor/lib64/libSemDataProps.so|86a95ebb35d80cc1ec2bdd0f80601787f1ef88ba
+-vendor/lib64/libSemTelephonyProps.so|659466f18732155cbf308c14924135f2e65a3f48
+-vendor/lib64/libprotobuf-cpp-full-21.7.so|92fd1090bd6aa2d00d4ae4e721f48a6e601b67d5
+-vendor/lib64/libril_sem.so|0a685aa2e67d05f180edea84d55f4b4c56da4748
+-vendor/lib64/libsec-ril.so|d11c5da2fa5619fa526a4d9a3d92c26678a4c671|cb8c5220ddaa2b6b2705dfa83d8f0740ea38106a
+-vendor/lib64/libsemnativecarrierfeature.so|91a9c92f3b2094479090c269771a704c58ed30c6
+-vendor/lib64/vendor.samsung.hardware.radio-V1-ndk.so|669709f8ff7d3435592c518ad0ba087f42b65606
+-vendor/lib64/vendor.samsung.hardware.radio.bridge-V1-ndk.so|a324420e0ecab5f08c606f28eb233b68792072c7
+-vendor/lib64/vendor.samsung.hardware.radio.channel-V1-ndk.so|e44c75cf85ac8f286cce8877544e2df0403579e2
+-vendor/lib64/vendor.samsung.hardware.radio.data-V1-ndk.so|9d4b2dddfe22574fabc94231fc47d6a7ec99fcd1
+-vendor/lib64/vendor.samsung.hardware.radio.messaging-V1-ndk.so|23184bdd3a38b864a17cabcd771ee7347da31495
+-vendor/lib64/vendor.samsung.hardware.radio.sim-V1-ndk.so|f89b327cf692da0aba6d4304592b52766b736e24
 
 ## TEEGRIS Firmware
 vendor/tee/00000000-0000-0000-0000-000000534b4d
@@ -62,3 +70,9 @@
 vendor/tee/00000000-0000-0000-0000-0053545354ab
 vendor/tee/00000000-0000-0000-0000-4b45594d5354
 vendor/tee/00000000-0000-0000-0000-505256544545
+
+## VaultKeeper
+-vendor/bin/vaultkeeperd
+vendor/etc/init/vaultkeeper_common.rc
+-vendor/lib64/libstork_shared.so
+-vendor/lib64/libvkservice.so