From f4c5432da99fb6cd4a3a44eee1198f8d09c3cf89 Mon Sep 17 00:00:00 2001 From: j-hc <25510067+j-hc@users.noreply.github.com> Date: Sat, 6 Aug 2022 17:55:55 +0300 Subject: [PATCH] mount script: set selinux context --- utils.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils.sh b/utils.sh index 033d3f5..067fdb4 100755 --- a/utils.sh +++ b/utils.sh @@ -220,12 +220,13 @@ build_music() { service_sh() { #shellcheck disable=SC2016 - local s='while [ "$(getprop sys.boot_completed)" != 1 ]; do + local s='until [ "$(getprop sys.boot_completed)" = 1 ]; do sleep 1 done BASEPATH=$(pm path PACKAGE | grep base | sed "s/package://g") if [ "$BASEPATH" ]; then - su -c mount $MODDIR/base.apk $BASEPATH + chcon u:object_r:apk_data_file:s0 $MODDIR/base.apk + mount -o bind $MODDIR/base.apk $BASEPATH fi' echo "${s//PACKAGE/$1}" >"${MODULE_TEMPLATE_DIR}/service.sh" }