dre: Setup sim restart shell script
sm8450 and above have a very annoying SMS receiving bug where for some carriers it won't work after a device restart if QTI telephony injection isn't available, but one of the workarounds is to either use airplane mode toggle or eject the sim card and reinsert it Instead of doing that? Let's try and automate disabling and enabling the sim card EDIT: Some holi/blair devices have this problem too. Co-authored-by: Marc Bourgoin <themard85@gmail.com> Change-Id: I76732c2a668ff179e32050aee4abe315de3d9357
This commit is contained in:
parent
391bdbdc31
commit
61b1fbd7dc
6 changed files with 44 additions and 0 deletions
|
@ -266,6 +266,7 @@ PRODUCT_PACKAGES += \
|
|||
init.qcom.sh \
|
||||
init.qcom.usb.rc \
|
||||
init.qcom.usb.sh \
|
||||
init.sim.restart.sh \
|
||||
init.target.rc \
|
||||
ueventd.oplus.rc \
|
||||
ueventd.qcom.rc
|
||||
|
|
|
@ -76,3 +76,8 @@ sh_binary {
|
|||
src: "init.qcom.sh",
|
||||
vendor: true,
|
||||
}
|
||||
|
||||
sh_binary {
|
||||
name: "init.sim.restart.sh",
|
||||
src: "init.sim.restart.sh",
|
||||
}
|
|
@ -44,6 +44,7 @@ on property:sys.boot_completed=1
|
|||
copy /vendor/etc/Oppo_QC_LTM_Commercial_SM8250_2020_01_15.pfm /mnt/vendor/persist/data/pfm/licenses/1000-1000-no-exp-1186717196.pfm
|
||||
chmod 0600 /mnt/vendor/persist/data/pfm/licenses/1000-1000-no-exp-1186717196.pfm
|
||||
chown system system /mnt/vendor/persist/data/pfm/licenses/1000-1000-no-exp-1186717196.pfm
|
||||
start sim-restart
|
||||
|
||||
on property:vendor.post_boot.parsed=1
|
||||
# IRQ Tuning
|
||||
|
@ -109,3 +110,9 @@ service oplus_sensor_fb /odm/bin/oplus_sensor_fb
|
|||
group system
|
||||
class late_start
|
||||
oneshot
|
||||
|
||||
service sim-restart /system/bin/init.sim.restart.sh
|
||||
user root
|
||||
class main
|
||||
oneshot
|
||||
disabled
|
||||
|
|
16
init/init.sim.restart.sh
Executable file
16
init/init.sim.restart.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/system/bin/sh
|
||||
#
|
||||
# Copyright (C) 2024 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
sleep 1
|
||||
|
||||
service call phone 185 i32 0 i32 0
|
||||
service call phone 186 i32 0 i32 0
|
||||
|
||||
sleep 2
|
||||
|
||||
service call phone 185 i32 0 i32 1
|
||||
service call phone 186 i32 0 i32 1
|
1
sepolicy/private/file_contexts
Normal file
1
sepolicy/private/file_contexts
Normal file
|
@ -0,0 +1 @@
|
|||
/system/bin/init\.sim\.restart\.sh u:object_r:init_sim_restart_exec:s0
|
14
sepolicy/private/init_sim_restart.te
Normal file
14
sepolicy/private/init_sim_restart.te
Normal file
|
@ -0,0 +1,14 @@
|
|||
type init_sim_restart, domain, coredomain;
|
||||
type init_sim_restart_exec, system_file_type, exec_type, file_type;
|
||||
|
||||
init_daemon_domain(init_sim_restart)
|
||||
|
||||
allow init_sim_restart init:unix_stream_socket connectto;
|
||||
allow init_sim_restart property_socket:sock_file write;
|
||||
allow init_sim_restart shell_exec:file { execute getattr map read };
|
||||
allow init_sim_restart toolbox_exec:file { execute execute_no_trans getattr map open read };
|
||||
|
||||
allow init_sim_restart radio:binder call;
|
||||
allow init_sim_restart radio_service:service_manager find;
|
||||
allow init_sim_restart servicemanager:binder call;
|
||||
allow init_sim_restart system_file:file execute_no_trans;
|
Loading…
Reference in a new issue