Dont launch lspd when flavor not match (#1483)

To be compatible with fef44bd24f
This commit is contained in:
LoveSy 2021-12-15 00:13:40 +08:00 committed by GitHub
parent 5b479c09b5
commit 6572809f1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -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<FixCrLfFilter>("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<ReplaceTokens>("tokens" to tokens)
filter<FixCrLfFilter>("eol" to FixCrLfFilter.CrLf.newInstance("lf"))

View File

@ -14,11 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
#
# 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 &"