Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ public static void start(String[] args) {

int systemServerMaxRetry = 1;
for (String arg : args) {
if (arg.startsWith("--system-server-max-retry=")) {
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=")) {
try {
systemServerMaxRetry = Integer.parseInt(arg.substring(arg.lastIndexOf('=') + 1));
} catch (Throwable ignored) {
Expand Down
2 changes: 2 additions & 0 deletions magisk-loader/magisk_module/post-fs-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ 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 $@&"
6 changes: 2 additions & 4 deletions magisk-loader/magisk_module/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#

MODDIR=${0%/*}

cd "$MODDIR"

# 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 $@&"
# post-fs-data.sh may be blocked by other modules. retry to start this
unshare --propagation slave -m sh -c "$MODDIR/daemon --from-service $@&"