sm7125-common: switch to U RIL

- Pull RIL and QMI blobs from A525FXXS7FXE2 (U)
- Build sehradiomanager for working signal strength
- Update SMSC and slotID patches accordingly
- Build vendor.samsung.hardware.radio@2.[0,1,2] from source

Change-Id: I5ee7e727133d421cc0d37eeacf647669cac2561b
fourteen-wip
Simon1511 9 months ago committed by Jenna
parent 14861f7f2e
commit 827276b7df
  1. 18
      audio/impl/PrimaryDevice.cpp
  2. 5
      common.mk
  3. 2
      configs/framework_compatibility_matrix.xml
  4. 6
      configs/manifest.xml
  5. 6
      extract-files.sh
  6. 110
      proprietary-files.txt
  7. 4
      rootdir/Android.mk
  8. 8
      rootdir/etc/init.vendor.rilcommon.rc
  9. 24
      rootdir/etc/vendor.samsung.rilchip.qcom.rc
  10. 1
      sepolicy/vendor/file_contexts
  11. 13
      sepolicy/vendor/sehradiomanager.te
  12. 14
      sepolicy/vendor/service_contexts
  13. 1
      vendor.prop

@ -216,23 +216,25 @@ Return<Result> PrimaryDevice::setMode(AudioMode mode) {
* For the g_call_sim_slot parameter 0x01 describes SIM1 and 0x02 SIM2.
*/
char simSlot[92];
char simSlot1[92], simSlot2[92];
// These props return either -1 (not calling),
// 0 (SIM1 is calling) or 1 (SIM2 is calling)
property_get("vendor.calls.slotid", simSlot, "");
// These props return either 0 (not calling),
// or 1 (SIM is calling)
property_get("vendor.calls.slot_id0", simSlot1, "");
property_get("vendor.calls.slot_id1", simSlot2, "");
// Wait until one sim slot reports a call
if (mode == AudioMode::IN_CALL) {
while (strcmp(simSlot, "-1") == 0) {
property_get("vendor.calls.slotid", simSlot, "");
while (strcmp(simSlot1, "0") == 0 && strcmp(simSlot2, "0") == 0) {
property_get("vendor.calls.slot_id0", simSlot1, "");
property_get("vendor.calls.slot_id1", simSlot2, "");
}
}
if (strcmp(simSlot, "0") == 0) {
if (strcmp(simSlot1, "1") == 0) {
// SIM1
mDevice->halSetParameters("g_call_sim_slot=0x01");
} else if (strcmp(simSlot, "1") == 0) {
} else if (strcmp(simSlot2, "1") == 0) {
// SIM2
mDevice->halSetParameters("g_call_sim_slot=0x02");
}

@ -49,7 +49,7 @@ PRODUCT_PACKAGES += \
init.audio.samsung.rc \
init.nfc.samsung.rc \
init.vendor.onebinary.rc \
init.vendor.rilchip.rc \
vendor.samsung.rilchip.qcom.rc \
init.vendor.rilcommon.rc \
init.vendor.sensors.rc
@ -360,7 +360,8 @@ PRODUCT_PACKAGES += \
libxml2 \
librilutils \
librmnetctl \
secril_config_svc
secril_config_svc \
sehradiomanager
# Sensors
PRODUCT_PACKAGES += \

@ -820,7 +820,7 @@
</hal>
<hal format="hidl" optional="true">
<name>vendor.samsung.hardware.radio</name>
<version>2.1</version>
<version>2.2</version>
<interface>
<name>ISehRadio</name>
<instance>slot1</instance>

@ -423,14 +423,14 @@
<hal format="hidl">
<name>vendor.samsung.hardware.radio</name>
<transport>hwbinder</transport>
<version>2.1</version>
<version>2.2</version>
<interface>
<name>ISehRadio</name>
<instance>slot1</instance>
<instance>slot2</instance>
</interface>
<fqname>@2.1::ISehRadio/slot1</fqname>
<fqname>@2.1::ISehRadio/slot2</fqname>
<fqname>@2.2::ISehRadio/slot1</fqname>
<fqname>@2.2::ISehRadio/slot2</fqname>
</hal>
<hal format="hidl">
<name>vendor.samsung.hardware.radio.bridge</name>

@ -62,9 +62,9 @@ function blob_fixup() {
case "${1}" in
vendor/lib64/libsec-ril.so|vendor/lib64/libsec-ril-dsds.so)
# Replace SlotID prop
sed -i 's/ril.dds.call.slotid/vendor.calls.slotid/g' "${2}"
# Pass an empty value to SecRil::RequestComplete in OnGetSmscAddressDone
xxd -p -c0 "${2}" | sed "s/600e40f9820c805224008052e10315aae30314aa/600e40f9820c805224008052e10315aa030080d2/g" | xxd -r -p > "${2}".patched
sed -i 's/ril.dds.call.ongoing/vendor.calls.slot_id/g' "${2}"
# Pass an empty value to SecRil::RequestComplete in OnGetSmscAddressDone (mov x3,x20 -> mov,x3,#0x0)
xxd -p -c0 "${2}" | sed "s/600e40f9820c805224008052e10315aa080040f9e30314aa/600e40f9820c805224008052e10315aa080040f9030080d2/g" | xxd -r -p > "${2}".patched
mv "${2}".patched "${2}"
;;
vendor/lib64/hw/android.hardware.health@2.0-impl-2.1-samsung.so)

@ -861,6 +861,28 @@ vendor/lib64/libprotobuf-cpp-lite-3.9.1.so
vendor/etc/public.libraries.txt
# QMI
vendor/bin/irsc_util
vendor/bin/pd-mapper
vendor/bin/qrtr-ns
vendor/bin/ssr_setup
vendor/lib/libdsutils.so
vendor/lib64/libdsutils.so
vendor/lib/libqmi.so
vendor/lib64/libqmi.so
vendor/lib/libqmi_cci.so
vendor/lib64/libqmi_cci.so
vendor/lib/libqmi_client_helper.so
vendor/lib64/libqmi_client_helper.so
vendor/lib/libqmi_client_qmux.so
vendor/lib64/libqmi_client_qmux.so
vendor/lib/libqmi_csi.so
vendor/lib64/libqmi_csi.so
vendor/lib/libqmiservices.so
vendor/lib64/libqmiservices.so
vendor/lib/libqdi.so
vendor/lib64/libqdi.so
vendor/lib/libqdp.so
vendor/lib64/libqdp.so
vendor/lib/libdiag.so
vendor/lib/libdiagjni.so
vendor/lib/libpdmapper.so
@ -889,6 +911,30 @@ vendor/etc/sec_config
vendor/etc/init/init.qti.qcv.rc
# RIL
vendor/bin/hw/rild
vendor/bin/adpl
vendor/bin/ipacm-diag
vendor/bin/tftp_server
vendor/bin/rmt_storage
vendor/etc/init/netmgrd.rc
vendor/etc/data/dsi_config.xml
vendor/etc/data/netmgr_config.xml
vendor/etc/locale/plmn_delta_eng.bin
vendor/etc/plmn_delta_hktw.bin
vendor/etc/plmn_se13.bin
vendor/etc/mtu-conf.xml
vendor/lib/libconfigdb.so
vendor/lib64/libconfigdb.so
vendor/lib/libdsi_netctrl.so
vendor/lib64/libdsi_netctrl.so
vendor/lib/libqcmaputils.so
vendor/lib64/libqcmaputils.so
vendor/lib64/libengmode_client.so
vendor/lib64/libsec-ril.so|581c3cc3814bd3450f0228a9f3b46eab53a5ba09
vendor/lib64/libsecril-client.so
vendor/lib64/libril_sem.so
vendor/lib64/libSemTelephonyProps.so
vendor/lib64/libSemDataProps.so
vendor/etc/init/dataadpl.rc
vendor/etc/init/ipacm-diag.rc
vendor/etc/init/vendor.qti.tftp.rc
@ -910,70 +956,8 @@ vendor/lib64/libvkmanager_vendor.so
vendor/lib/libxml.so
vendor/lib64/libxml.so
vendor/lib64/vendor.samsung.hardware.radio.bridge@2.0.so
vendor/lib64/vendor.samsung.hardware.radio@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.1.so
# QMI - from A525FXXU4AUJ2
vendor/bin/irsc_util|c2cb91666e88000df258730cd4a0a81a207a2704
vendor/bin/pd-mapper|a4e55ee88823aa430b1631c98dc813754d3dc013
vendor/bin/qrtr-ns|09cff0de46c5d4eb1cd7dfa5b5bdda015e9d7a75
vendor/bin/ssr_setup|d29b53a3121e9e305eb5a31273d3fb9101d4ffc7
vendor/lib/libdsutils.so|36cdb350c59799aa0a80f519f96ead7d3ee89973
vendor/lib64/libdsutils.so|d46085964069785ea6b3bac24a69348ebd47d74c
vendor/lib/libqmi.so|721c5dc3a64d603d1aa80ee5a0692cccc7ecbdcd
vendor/lib64/libqmi.so|350b7221e85ac9930af92203aadfa8f785051917
vendor/lib/libqmi_cci.so|9e6e1f9410034b352a90d3636dbab77e04ac798e
vendor/lib64/libqmi_cci.so|fe28dceb33e9a3070b19ea394a26245f4cc9bda3
vendor/lib/libqmi_client_helper.so|71c4f5375645420915c2c4acdfdc82eb7ef92f76
vendor/lib64/libqmi_client_helper.so|906e317d26ab331745166bc5a42b767c3fa517f8
vendor/lib/libqmi_client_qmux.so|ed3d7ebdce68a988825e992143333dfa9aede478
vendor/lib64/libqmi_client_qmux.so|c79a6964a0e4684b45c5340a5fce7a96f3442cc1
vendor/lib/libqmi_csi.so|f65cbe21c2a8d8e1d375aeacadb1f31d2818497f
vendor/lib64/libqmi_csi.so|28b7dd8906c028af98500bbab2e912d16fab455f
vendor/lib/libqmiservices.so|97e8634aafcddc9520b788694dff0e6499ec2d00
vendor/lib64/libqmiservices.so|33b70e96e031e646758e5d887f1c9d6792e990ab
vendor/lib/librilqmiservices-ext.so|aeefecff17a9e4f247da67f878667760535cfd8b
vendor/lib64/librilqmiservices-ext.so|a020dafb8d1932ab90bbcfe362afb93dc74d010d
vendor/lib/libqdi.so|ba4b20f2c09fff4ffc3a14d4ae9746fa21c52179
vendor/lib64/libqdi.so|b57089bb6cdb17442b06952bf21f97ee2d4b1f30
vendor/lib/libqdp.so|738344f32ef0c1372fb1b207232bab22800c20a0
vendor/lib64/libqdp.so|14b4020c1cb9a04a52742b226913324ef060775b
# RIL - from A525FXXU4AUJ2
vendor/bin/hw/rild|72c84e72636177fd669be36a6eb8eda63fe270b0
vendor/bin/adpl|e4b48a55f8b9a8376daf115aace6f19c6289a325
vendor/bin/ATFWD-daemon|936e1d2b6127c551eabe6bfeeab31c2271bebf02
vendor/bin/ipacm-diag|aa89edba217878c5ea07b2d9f89a5410078b5f98
vendor/bin/netmgrd|6871b8c8ceb075ee710654fc2e11eff8e0eef2e1
vendor/bin/tftp_server|2a13e915980354f803b0dd04c53bf5318bcec173
vendor/bin/rmt_storage|17f8aa097adc319ef6b9c5caaf5ef267089f2b8d
vendor/etc/data/dsi_config.xml|ea5973ae0bffbdfbffb84fc2348b260d53b03b02
vendor/etc/data/netmgr_config.xml|ebd99ffce6bc051ee811478c4f866907cfb80046
vendor/etc/init/netmgrd.rc|3968aa11ebdebab2b5b53bbea1525e8cd5dfe837
vendor/etc/locale/plmn_delta_eng.bin|642c0104ac67f587f07fa79ceab34ba43c4522fa
vendor/etc/plmn_delta_hktw.bin|97a5a4747e8c32d463d8f26254257309b8a03a63
vendor/etc/plmn_se13.bin|e1961fbbab7d8ef092b76a707b8364ba8c4ef012
vendor/etc/seccomp_policy/atfwd@2.0.policy|74fdb7d47bdb6d0cb06b13701a96a76c9171ab5d
vendor/etc/mtu-conf.xml|febe82a2b92265b74e9ceb528f0c9da10a3b51e7
vendor/lib/libconfigdb.so|d6b7ee43c7cad7e9b1f296a2e9531540c5499f84
vendor/lib64/libconfigdb.so|1193bbec010e24102caa7974a22cc0dcf0ec6c47
vendor/lib/libdsi_netctrl.so|3ebe293a1bc3d217ad2c8acf39f4eaf9245c59f5
vendor/lib64/libdsi_netctrl.so|24cb384cc9b8ca1bc1c0c6f36cfce5d237064bd6
vendor/lib/libnetmgr.so|72f9fb23851dd6ffe6ac0aabfce5081d69f1839a
vendor/lib/libnetmgr_common.so|b7987fd703db7688086b10c612e910e445db65a6
vendor/lib64/libnetmgr.so|527afad81de5394679e6ef4c46e7faf4d03e5419
vendor/lib64/libnetmgr_common.so|9ffa3e00702aa3db43908cf44af70fb438aa5bd5
vendor/lib/libqcmaputils.so|287f2558403918db436c39b39fa731ddda2235ee
vendor/lib64/libqcmaputils.so|7ecfbdbec099854c60a6393ee7f568bedc28989b
vendor/lib64/libengmode_client.so|a0d931e18a4e81a8de4169a419b187568d042708
vendor/lib64/libsec-ril.so|5bc6b84fb09f11202d5bb61ca422bae351e9d0c7
vendor/lib64/libsec-ril-dsds.so|12bc89df6348392265fc240d461dfdba114aa434
vendor/lib64/libsecril-client.so|c49dbd56d93e00ccb3f008b955e81495573ff313
vendor/lib/libril.so|b7759521aeb60a07b929e4ff53ba25338c4cd087
vendor/lib64/libril.so|49d4eebf79faefd03b8378c3ed07cf44730a15ff
vendor/lib64/liblqe.so|732f3a617a90c2c96b54fe80d0ab2a409b2cb82a
vendor/lib64/vendor.qti.hardware.radio.atcmdfwd@1.0.so|c6dd375aba54c664e61cf1915477feb01154333f
# Sensors
vendor/bin/factory.ssc

@ -117,10 +117,10 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.vendor.rilchip.rc
LOCAL_MODULE := vendor.samsung.rilchip.qcom.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.vendor.rilchip.rc
LOCAL_SRC_FILES := etc/vendor.samsung.rilchip.qcom.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init
include $(BUILD_PREBUILT)

@ -10,10 +10,7 @@
on post-fs-data
mkdir /data/vendor/secradio 0770 radio radio
on property:ro.vendor.multisim.simslotcount=1
stop ril-daemon1
on property:vts.native_server.on=*
on property:vts.native_server.on=*
setprop vendor.vts.native_server.on ${vts.native_server.on}
service network_config /vendor/bin/secril_config_svc NetworkConfig
@ -29,7 +26,10 @@ service sim_config /vendor/bin/secril_config_svc SimConfig
disabled
on fs
chown radio radio /mnt/vendor/efs/factory.prop
chmod 0600 /mnt/vendor/efs/factory.prop
exec_start sim_config
on post-fs-data
exec_start network_config
setprop ro.telephony.default_network ${ro.vendor.radio.default_network}

@ -11,18 +11,6 @@ service ril-daemon /vendor/bin/hw/rild
capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW SYS_ADMIN CHOWN SYS_TIME
socket sap_uim_socket1 stream 660 bluetooth bluetooth
service ril-daemon1 /vendor/bin/hw/rild -c 2
class main
user radio
group radio cache inet misc audio log oem_2901 system drmrpc vpn readproc wakelock net_admin
capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW SYS_ADMIN CHOWN SYS_TIME
# QMUX must be in multiple groups to support external process connections
service qmuxd /vendor/bin/qmuxd
class main
user root
group radio audio bluetooth gps oem_2901
service irsc_util_oem /vendor/bin/irsc_util "/vendor/etc/sec_config_oem"
class core
user root
@ -32,6 +20,9 @@ service irsc_util_oem /vendor/bin/irsc_util "/vendor/etc/sec_config_oem"
service vendor.ril-daemon /vendor/bin/hw/rild-dummy
override
service vendor.ril-daemon1 /vendor/bin/hw/rild-dummy
override
service vendor.ril-daemon2 /vendor/bin/hw/rild-dummy
override
@ -45,3 +36,12 @@ service vendor.embmsslServer /vendor/bin/embmsslServer
on property:init.svc.vendor.netmgrd=running && property:ro.vendor.use_data_netmgrd=false
stop vendor.netmgrd
# To enable QMS logs
on post-fs-data
mkdir /data/vendor/qms_logs 0775 radio system
mkdir /data/vendor/qms_logs/main 0775 radio system
mkdir /data/vendor/qms_logs/other 0775 radio system
mkdir /data/vendor/qms_logs/config 0775 radio system
copy /vendor/etc/qms_log_config /data/vendor/qms_logs/config/qms_log_config
chmod 0666 /data/vendor/qms_logs/config/qms_log_config

@ -64,3 +64,4 @@
/(vendor|system/vendor)/bin/hw/android.hardware.sensors-service.samsung-multihal u:object_r:hal_sensors_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.vibrator\-service\.samsung u:object_r:hal_vibrator_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.health@2\.1-service-samsung u:object_r:hal_health_default_exec:s0
/(vendor|system/vendor)/bin/hw/sehradiomanager u:object_r:sehradiomanager_exec:s0

@ -0,0 +1,13 @@
# sehradiomanager.te
type sehradiomanager, domain;
type sehradiomanager_exec, exec_type, file_type, vendor_file_type;
init_daemon_domain(sehradiomanager)
get_prop(sehradiomanager, vendor_radio_prop)
get_prop(sehradiomanager, hwservicemanager_prop)
binder_call(sehradiomanager, hwservicemanager)
binder_call(sehradiomanager, servicemanager)
binder_call(servicemanager, sehradiomanager)
hal_client_domain(sehradiomanager, hal_telephony)

@ -0,0 +1,14 @@
vendor.samsung.hardware.radio.bridge.ISehRadioBridge/slot1 u:object_r:hal_radio_service:s0
vendor.samsung.hardware.radio.bridge.ISehRadioBridge/slot2 u:object_r:hal_radio_service:s0
vendor.samsung.hardware.radio.channel.ISehRadioChannel/epdgd u:object_r:hal_radio_service:s0
vendor.samsung.hardware.radio.channel.ISehRadioChannel/epdgd2 u:object_r:hal_radio_service:s0
vendor.samsung.hardware.radio.channel.ISehRadioChannel/imsd u:object_r:hal_radio_service:s0
vendor.samsung.hardware.radio.channel.ISehRadioChannel/imsd2 u:object_r:hal_radio_service:s0
vendor.samsung.hardware.radio.data.ISehRadioData/slot1 u:object_r:hal_radio_service:s0
vendor.samsung.hardware.radio.data.ISehRadioData/slot2 u:object_r:hal_radio_service:s0
vendor.samsung.hardware.radio.messaging.ISehRadioMessaging/slot1 u:object_r:hal_radio_service:s0
vendor.samsung.hardware.radio.messaging.ISehRadioMessaging/slot2 u:object_r:hal_radio_service:s0
vendor.samsung.hardware.radio.network.ISehRadioNetwork/slot1 u:object_r:hal_radio_service:s0
vendor.samsung.hardware.radio.network.ISehRadioNetwork/slot2 u:object_r:hal_radio_service:s0
vendor.samsung.hardware.radio.sim.ISehRadioSim/slot1 u:object_r:hal_radio_service:s0
vendor.samsung.hardware.radio.sim.ISehRadioSim/slot2 u:object_r:hal_radio_service:s0

@ -177,7 +177,6 @@ ro.vendor.extension_library=libqti-perfd-client.so
# RIL
vendor.sec.rild.libpath=/vendor/lib64/libsec-ril.so
vendor.sec.rild.libpath2=/vendor/lib64/libsec-ril-dsds.so
persist.vendor.radio.atfwd.start=true
ro.vendor.sec.radio.def_network=9
persist.vendor.radio.enableadvancedscan=true

Loading…
Cancel
Save