diff --git a/daemon/src/main/java/org/lsposed/lspd/service/ServiceManager.java b/daemon/src/main/java/org/lsposed/lspd/service/ServiceManager.java index 0998d910948..1d26901129a 100644 --- a/daemon/src/main/java/org/lsposed/lspd/service/ServiceManager.java +++ b/daemon/src/main/java/org/lsposed/lspd/service/ServiceManager.java @@ -95,9 +95,7 @@ public static void start(String[] args) { int systemServerMaxRetry = 1; for (String arg : args) { - if (arg.equals("--from-service")) { - Log.w(TAG, "LSPosed daemon is not started properly. Try for a late start..."); - } else if (arg.startsWith("--system-server-max-retry=")) { + if (arg.startsWith("--system-server-max-retry=")) { try { systemServerMaxRetry = Integer.parseInt(arg.substring(arg.lastIndexOf('=') + 1)); } catch (Throwable ignored) { diff --git a/magisk-loader/magisk_module/post-fs-data.sh b/magisk-loader/magisk_module/post-fs-data.sh index c0234f4da84..9f687745b0b 100644 --- a/magisk-loader/magisk_module/post-fs-data.sh +++ b/magisk-loader/magisk_module/post-fs-data.sh @@ -21,6 +21,4 @@ MODDIR=${0%/*} rm -f "/data/local/tmp/daemon.apk" rm -f "/data/local/tmp/manager.apk" -cd "$MODDIR" -unshare --propagation slave -m sh -c "$MODDIR/daemon $@&" diff --git a/magisk-loader/magisk_module/service.sh b/magisk-loader/magisk_module/service.sh index 48b99320fab..cd07853d036 100644 --- a/magisk-loader/magisk_module/service.sh +++ b/magisk-loader/magisk_module/service.sh @@ -18,6 +18,8 @@ # MODDIR=${0%/*} + cd "$MODDIR" -# post-fs-data.sh may be blocked by other modules. retry to start this -unshare --propagation slave -m sh -c "$MODDIR/daemon --from-service $@&" + +# To avoid breaking Play Integrity in certain cases, we start LSPosed service daemon in late_start service mode instead of post-fs-data mode +unshare --propagation slave -m sh -c "$MODDIR/daemon $@&"