Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module: move daemon start exclusively to service.sh #57

Merged
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 @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions magisk-loader/magisk_module/post-fs-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@&"
6 changes: 4 additions & 2 deletions magisk-loader/magisk_module/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@&"

# Start daemon in service.sh as early start can cause Play Integrity detection
unshare --propagation slave -m sh -c "$MODDIR/daemon $@&"