diff --git a/rootdir/bin/init.oem.hw.sh b/rootdir/bin/init.oem.hw.sh index 4973f47..2a7adc4 100755 --- a/rootdir/bin/init.oem.hw.sh +++ b/rootdir/bin/init.oem.hw.sh @@ -359,6 +359,10 @@ set_ro_hw_properties_upgrade() utag_value=$(cat $utag_path/ascii) setprop $prop_prefix$utag_name "$utag_value" notice "ro.vendor.hw.$utag_name='$utag_value'" + + if [ "$utag_name" = "dualsim" ] && [ "$utag_value" = "true" ]; then + setprop persist.vendor.radio.multisim.config dsds + fi done } @@ -384,6 +388,10 @@ set_ro_hw_properties() utag_value=$(cat $utag_path/ascii) setprop $prop_prefix$utag_name "$utag_value" notice "$prop_prefix$utag_name='$utag_value'" + + if [ "$utag_name" = "dualsim" ] && [ "$utag_value" = "true" ]; then + setprop persist.vendor.radio.multisim.config dsds + fi done } diff --git a/rootdir/etc/init/hw/init.mmi.rc b/rootdir/etc/init/hw/init.mmi.rc index 3f1a810..40a35c6 100644 --- a/rootdir/etc/init/hw/init.mmi.rc +++ b/rootdir/etc/init/hw/init.mmi.rc @@ -40,6 +40,7 @@ on early-init setprop ro.vendor.boot.bl_state ${ro.boot.bl_state} setprop ro.vendor.boot.serialno ${ro.boot.serialno} setprop ro.vendor.zygote ${ro.zygote} + setprop persist.radio.multisim.config ${persist.vendor.radio.multisim.config} # Make sure ro.boot.product.hardware.sku is set before hwservicemanager startup. setprop ro.boot.product.hardware.sku ${ro.vendor.product.hardware.sku.variant} @@ -312,13 +313,6 @@ on property:sys.boot_completed=1 && property:ro.vendor.zram.product_swapon="" write /proc/sys/vm/swappiness 100 setprop sys.sysctl.swappiness 100 -# translate MMI property in order to keep the consistent with QCOM -on property:ro.vendor.hw.dualsim=true - setprop persist.radio.multisim.config dsds - -on property:ro.vendor.hw.dualsim=false - setprop persist.radio.multisim.config "" - on property:sys.sysctl.swappiness=* write /proc/sys/vm/swappiness ${sys.sysctl.swappiness} diff --git a/sepolicy/vendor/vendor_init_hw.te b/sepolicy/vendor/vendor_init_hw.te index c0af646..4c9fafd 100644 --- a/sepolicy/vendor/vendor_init_hw.te +++ b/sepolicy/vendor/vendor_init_hw.te @@ -13,6 +13,7 @@ allow vendor_init_hw vendor_toolbox_exec:file rx_file_perms; set_prop(vendor_init_hw, vendor_mot_hw_prop) set_prop(vendor_init_hw, vendor_mot_touch_prop) +set_prop(vendor_init_hw, vendor_radio_prop) allow vendor_init_hw vendor_file:file execute_no_trans;