From b77a4354ffd89ada97557ec9cd2dabcd50354f3c Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Thu, 14 Apr 2022 17:25:48 +0200 Subject: [PATCH] sm8250-common: Set DSDS based on simcardnum.doublesim=1 Change-Id: Ib0ae4728b33aefeaf50f0c3c074481ef35ccb0b0 --- common.mk | 1 + init/Android.bp | 6 ++++++ init/init.oplus.rc | 10 ++++++++++ init/init.oplus.sh | 10 ++++++++++ 4 files changed, 27 insertions(+) create mode 100755 init/init.oplus.sh diff --git a/common.mk b/common.mk index 9c0508e..c1f96cf 100644 --- a/common.mk +++ b/common.mk @@ -276,6 +276,7 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ init.class_main.sh \ init.oplus.rc \ + init.oplus.sh \ init.qcom.early_boot.sh \ init.qcom.post_boot.sh \ init.qcom.rc \ diff --git a/init/Android.bp b/init/Android.bp index 06c8d06..6a99f0a 100644 --- a/init/Android.bp +++ b/init/Android.bp @@ -51,6 +51,12 @@ sh_binary { vendor: true, } +sh_binary { + name: "init.oplus.sh", + src: "init.oplus.sh", + device_specific: true, +} + sh_binary { name: "init.qcom.early_boot.sh", src: "init.qcom.early_boot.sh", diff --git a/init/init.oplus.rc b/init/init.oplus.rc index 7233ffc..6d37105 100644 --- a/init/init.oplus.rc +++ b/init/init.oplus.rc @@ -79,6 +79,16 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,none,adb && pro write /config/usb_gadget/g1/idVendor 0x22D9 write /config/usb_gadget/g1/idProduct 0x2766 +# Radio +on property:vendor.radio.multisim.config=* + setprop persist.radio.multisim.config ${vendor.radio.multisim.config} + +service oplus-sh /odm/bin/init.oplus.sh + class late_start + user system + group system radio + oneshot + service oplus_sensor_fb /odm/bin/oplus_sensor_fb user system group system diff --git a/init/init.oplus.sh b/init/init.oplus.sh new file mode 100755 index 0000000..1b21741 --- /dev/null +++ b/init/init.oplus.sh @@ -0,0 +1,10 @@ +#! /vendor/bin/sh +# +# Copyright (C) 2022 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +if grep -q simcardnum.doublesim=1 /proc/cmdline; then + setprop vendor.radio.multisim.config dsds +fi