mount script: set selinux context

This commit is contained in:
j-hc 2022-08-06 17:55:55 +03:00
parent 99c389929f
commit f4c5432da9
No known key found for this signature in database
GPG Key ID: 242B44D16774A2ED

View File

@ -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"
}