Include service-cleaner.sh which kills looping services 30s after boot
This commit is contained in:
parent
71789c3977
commit
6eaf501e68
3
base.mk
3
base.mk
@ -49,7 +49,8 @@ PRODUCT_COPY_FILES += \
|
|||||||
device/phh/treble/fixSPL/getSPL.arm:system/bin/getSPL
|
device/phh/treble/fixSPL/getSPL.arm:system/bin/getSPL
|
||||||
|
|
||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
device/phh/treble/empty:system/phh/empty
|
device/phh/treble/empty:system/phh/empty \
|
||||||
|
device/phh/treble/service-cleaner.sh:system/bin/service-cleaner.sh
|
||||||
|
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
treble-environ-rc
|
treble-environ-rc
|
||||||
|
@ -2,3 +2,4 @@
|
|||||||
/system/bin/vndk-detect u:object_r:vndk_detect_exec:s0
|
/system/bin/vndk-detect u:object_r:vndk_detect_exec:s0
|
||||||
/system/etc/usb_audio_policy_configuration.xml u:object_r:vendor_configs_file:s0
|
/system/etc/usb_audio_policy_configuration.xml u:object_r:vendor_configs_file:s0
|
||||||
/system/bin/rw-system.sh u:object_r:phhsu_exec:s0
|
/system/bin/rw-system.sh u:object_r:phhsu_exec:s0
|
||||||
|
/system/bin/service-cleaner.sh u:object_r:phhsu_exec:s0
|
||||||
|
9
service-cleaner.sh
Normal file
9
service-cleaner.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/system/bin/sh
|
||||||
|
|
||||||
|
sleep 30
|
||||||
|
getprop | \
|
||||||
|
grep restarting | \
|
||||||
|
sed -nE -e 's/\[([^]]*).*/\1/g' -e 's/init.svc.(.*)/\1/p' |
|
||||||
|
while read svc ;do
|
||||||
|
setprop ctl.stop $svc
|
||||||
|
done
|
6
vndk.rc
6
vndk.rc
@ -3,3 +3,9 @@ on post-fs
|
|||||||
exec - root -- /system/bin/rw-system.sh
|
exec - root -- /system/bin/rw-system.sh
|
||||||
mount none /system/etc/usb_audio_policy_configuration.xml /vendor/etc/usb_audio_policy_configuration.xml bind
|
mount none /system/etc/usb_audio_policy_configuration.xml /vendor/etc/usb_audio_policy_configuration.xml bind
|
||||||
export LD_CONFIG_FILE /system/etc/ld.config.${persist.sys.vndk}.txt
|
export LD_CONFIG_FILE /system/etc/ld.config.${persist.sys.vndk}.txt
|
||||||
|
|
||||||
|
service phh_service_cleaner /system/bin/service-cleaner.sh
|
||||||
|
disabled
|
||||||
|
|
||||||
|
on property:sys.boot_completed=1
|
||||||
|
start phh_service_cleaner
|
||||||
|
Loading…
Reference in New Issue
Block a user