diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 2105e369..89960a19 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -263,7 +263,7 @@ fun afterEval() = android.applicationVariants.forEach { variant -> into(magiskDir) from("${rootProject.projectDir}/README.md") from("$projectDir/magisk_module") { - exclude("riru.sh", "module.prop", "customize.sh", "sepolicy.rule") + exclude("riru.sh", "module.prop", "customize.sh", "sepolicy.rule", "post-fs-data.sh") } from("$projectDir/magisk_module") { include("module.prop") @@ -282,7 +282,7 @@ fun afterEval() = android.applicationVariants.forEach { variant -> filter("eol" to FixCrLfFilter.CrLf.newInstance("lf")) } from("$projectDir/magisk_module") { - include("customize.sh") + include("customize.sh", "post-fs-data.sh") val tokens = mapOf("FLAVOR" to flavorLowered) filter("tokens" to tokens) filter("eol" to FixCrLfFilter.CrLf.newInstance("lf")) diff --git a/core/magisk_module/post-fs-data.sh b/core/magisk_module/post-fs-data.sh index 0776e819..1e7f2f3c 100644 --- a/core/magisk_module/post-fs-data.sh +++ b/core/magisk_module/post-fs-data.sh @@ -14,11 +14,16 @@ # You should have received a copy of the GNU General Public License # along with LSPosed. If not, see . # -# Copyright (C) 2020 EdXposed Contributors # Copyright (C) 2021 LSPosed Contributors # MODDIR=${0%/*} +FLAVOR=@FLAVOR@ + +if ! [ "$ZYGISK_ENABLE" = "$([ $FLAVOR = "zygisk" ] && echo 1)" ]; then + log -t "LSPosed" "$FLAVOR does not match, skipping" + exit +fi rm -f "/data/local/tmp/lspd.dex" unshare -m sh -c "$MODDIR/lspd &"